diff --git a/.gitattributes b/.gitattributes index 5312cd7..a664be3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,49 +1,49 @@ -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain - -*.jpg binary -*.png binary -*.gif binary - -*.cs text=auto diff=csharp -*.vb text=auto -*.c text=auto -*.cpp text=auto -*.cxx text=auto -*.h text=auto -*.hxx text=auto -*.py text=auto -*.rb text=auto -*.java text=auto -*.html text=auto -*.htm text=auto -*.css text=auto -*.scss text=auto -*.sass text=auto -*.less text=auto -*.js text=auto -*.lisp text=auto -*.clj text=auto -*.sql text=auto -*.php text=auto -*.lua text=auto -*.m text=auto -*.asm text=auto -*.erl text=auto -*.fs text=auto -*.fsx text=auto -*.hs text=auto - -*.csproj text=auto merge=union -*.vbproj text=auto merge=union -*.fsproj text=auto merge=union -*.dbproj text=auto merge=union -*.sln text=auto eol=crlf merge=union +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain + +*.jpg binary +*.png binary +*.gif binary + +*.cs text=auto diff=csharp +*.vb text=auto +*.c text=auto +*.cpp text=auto +*.cxx text=auto +*.h text=auto +*.hxx text=auto +*.py text=auto +*.rb text=auto +*.java text=auto +*.html text=auto +*.htm text=auto +*.css text=auto +*.scss text=auto +*.sass text=auto +*.less text=auto +*.js text=auto +*.lisp text=auto +*.clj text=auto +*.sql text=auto +*.php text=auto +*.lua text=auto +*.m text=auto +*.asm text=auto +*.erl text=auto +*.fs text=auto +*.fsx text=auto +*.hs text=auto + +*.csproj text=auto merge=union +*.vbproj text=auto merge=union +*.fsproj text=auto merge=union +*.dbproj text=auto merge=union +*.sln text=auto eol=crlf merge=union diff --git a/.gitignore b/.gitignore index f1166c6..d918a27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -/build/* -/install -node_modules -.c9revisions -*.pyc -*.ropeproject* +/build/* +/install +node_modules +.c9revisions +*.pyc +*.ropeproject* +*.DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index f4786c5..6cb2598 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,342 +1,402 @@ -#################################################################### -# -# CMake Build Script for sbml2matlab -# - -cmake_minimum_required(VERSION 2.8) -project(sbml2matlab) - -#################################################################### -#################################################################### -# -# These lines configure the parameters for packaging the binaries -# they can be invoked with: make package / nmake package or by using -# cpack -G zip|deb|rpm|dmg|nsis -# - -INCLUDE(InstallRequiredSystemLibraries) - -#---------------------CPACK--------------------- -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Translate SBML files to MATLAB functions") -SET(CPACK_PACKAGE_NAME "sbml2matlab") -SET(CPACK_PACKAGE_VENDOR "Stanley Gu") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt") -SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") -SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "2") -SET(CPACK_PACKAGE_VERSION_PATCH "0") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "sbml2matlab-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") - -INCLUDE(CPack) - -option(BUILD_SHARED_LIBS "Build shared libraries by default (static libraries still built)" ON) -set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS are used), Debug, Release, RelWithDebInfo, MinSizeRel" ) - - -#################################################################### -# -# Here we have the main configuration options for sbml2matlab -# - -# which language bindings should be build -option(WITH_SWIG "Regenerate SWIG-based language bindings." ON ) -option(WITH_PYTHON "Generate Python language bindings." OFF) -OPTION(WITH_LIBSBML_EXPAT "Set if libsbml was compiled with a separate expat library." OFF) -OPTION(WITH_LIBSBML_LIBXML "Set if libsbml was compiled with a separate libxml library." ON) -OPTION(WITH_LIBSBML_XERCES "Set if libsbml was compiled with a separate xerces library." OFF) -OPTION(WITH_LIBSBML_COMPRESSION "Set if libsbml was compiled with separate zdll and bzip libraries." OFF) - -set(EXTRA_LIBS "" CACHE STRING "Libraries the other libraries depend on that are in non-standard locations" ) -set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${EXTRA_LIBS} ) - - -SET(SBML2MATLAB_VERSION_STRING "v${SBML2MATLAB_VERSION_MAJOR}.${SBML2MATLAB_VERSION_MINOR}${SBML2MATLAB_VERSION_PATCH}${SBML2MATLAB_VERSION_RELEASE}") -add_definitions( -DSBML2MATLAB_VERSION_STRING="${SBML2MATLAB_VERSION_STRING}" ) - - -######################################################## -# -# Locate libsbml -# - -find_path(LIBSBML_INCLUDE_DIR - NAMES sbml/SBMLTypes.h - PATHS /usr/include /usr/local/include - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/dependencies/include - ${CMAKE_SOURCE_DIR}/../libsbml-5/release/include/ - ) -INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${LIBSBML_INCLUDE_DIR}) - -find_library(LIBSBML_LIBRARY - NAMES libsbml.lib libsbml.so libsbml - PATHS /usr/lib /usr/local/lib - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${CMAKE_SOURCE_DIR}/../libsbml-5/release/lib/ - ) - -set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${LIBSBML_LIBRARY} ) - - -############################################################### -# -# Locate the libraries libsbml depends on, for static linking. -# - -if(WITH_LIBSBML_EXPAT) - find_library(EXPAT_LIBRARY - NAMES libexpat.lib libexpat.so libexpat.dylib libexpat expat.lib expat.so expat.dylib expat - PATHS /usr/lib /usr/local/lib - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${LIBSBML_INCLUDE_DIR}/../lib - ) - set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${EXPAT_LIBRARY} ) -endif() - -if(WITH_LIBSBML_LIBXML) - find_library(LIBXML_LIBRARY - NAMES libxml2.lib libxml2.so libxml2.dylib libxml2 - PATHS /usr/lib /usr/local/lib - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${LIBSBML_INCLUDE_DIR}/../lib - ) - set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${LIBXML_LIBRARY} ) - - if(WIN32) - find_library(ICONV_LIBRARY - NAMES iconv.lib iconv.so iconv.dylib iconv libiconv.lib libiconv.so libiconv.dylib libiconv - PATHS /usr/lib /usr/local/lib - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${LIBSBML_INCLUDE_DIR}/../lib - ) - set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${ICONV_LIBRARY} ) - endif() -endif() - -if(WITH_LIBSBML_XERCES) - find_library(XERCES_LIBRARY - NAMES xerces-c_static_3.lib xerces-c_static_3.so xerces-c_static_3.dylib xerces-c_static_3 - PATHS /usr/lib /usr/local/lib - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${LIBSBML_INCLUDE_DIR}/../lib - ) - set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${XERCES_LIBRARY} ) -endif() - -if(WITH_LIBSBML_COMPRESSION) - if(WIN32) - find_library(ZDLL_LIBRARY - NAMES zdll.lib zdll.so zdll.dylib zdll - PATHS /usr/lib /usr/local/lib - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${LIBSBML_INCLUDE_DIR}/../lib - ) - set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${ZDLL_LIBRARY} ) - endif() - - find_library(BZIP_LIBRARY - NAMES bzip2.lib bzip2.so libbz2.so bzip2.dylib bzip2 - PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dependencies/lib - ${LIBSBML_INCLUDE_DIR}/../lib - ) - set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${BZIP_LIBRARY} ) -endif() - -############################################################################### -# -# If WITH_SWIG is selected, we need to find swig -# -if(WITH_SWIG) - find_program(SWIG_EXECUTABLE - NAMES swig - PATHS - "c:/Program Files (x86)/Swig" - c:/Program Files/Swig - c:/swigwin-2.0.11 - c:/swigwin-2.0.10 - c:/swigwin-2.0.9 - c:/swigwin-2.0.8 - c:/swigwin-2.0.7 - c:/swigwin-2.0.6 - c:/swigwin-2.0.5 - c:/swigwin-2.0.4 - c:/swigwin-2.0.3 - c:/swigwin-2.0.2 - c:/swigwin-2.0.1 - c:/swigwin-2.0.0 - /usr/local/bin - /opt/local/bin - /usr/bin - DOC "The file name of the swig executable." - ) - find_package(SWIG) - set(SWIG_EXTRA_ARGS "" CACHE STRING "Extra arguments to SWIG" ) -endif(WITH_SWIG) - -if(WITH_SWIG) - message(STATUS " Using SWIG = ${SWIG_EXECUTABLE}") - - if (SWIG_FOUND AND SWIG_VERSION VERSION_LESS "2.0.4") - message(WARNING " You are using swig version ${SWIG_VERSION} while we recommend at least version 2.0.4.") - endif() - -endif() - -# -# Determine the python installation directory -# -if (WITH_PYTHON) - set(PYTHON_PACKAGE_INSTALL_DIR) - if (UNIX OR CYGWIN) - execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys;import platform; sys.stdout.write(platform.python_version()[:3])" - OUTPUT_VARIABLE PYTHON_VERSION) - set(PYTHON_PACKAGE_INSTALL_DIR lib/python${PYTHON_VERSION}/site-packages) - else() - set(PYTHON_PACKAGE_INSTALL_DIR ${MISC_PREFIX}bindings/python) - endif() -endif() - -if(WITH_PYTHON) - message(STATUS " Using Python = ${PYTHON_EXECUTABLE}") -endif() - - -# Language bindings -ADD_SUBDIRECTORY(bindings) - -##New NOM stuff -set (NOM_SRC_DIR NOM/) - -file(GLOB LIBNOM_SOURCES - ${NOM_SRC_DIR}NOM.cpp - ) -file(GLOB LIBNOM_HEADERS - ${NOM_SRC_DIR}NOM.h - ) - -if(WIN32 AND NOT UNIX) - #Add this flag to suppress 'sprintf' vs. 'sprintf_s' and 'strcpy' vs. 'strcpy_s' warnings in VS. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS") - #We throw C++ exceptions from our 'C' functions; change the Exception Handler (EH) flag - string(REGEX - REPLACE - "/EHsc" - "/EHs" - CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS}" - ) - - string(REGEX - REPLACE - "/EHc" - "/EHs" - CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS}" - ) -endif() - -# Set up the include directories -INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/NOM - ${LIBSBML_INCLUDE_DIR} -) - -##### Build the NOM library ##### -set(LIBNOM_LIBRARY NOM) -add_library(${LIBNOM_LIBRARY} ${LIBNOM_HEADERS} ${LIBNOM_SOURCES}) -#message(STATUS " SBML2MATLAB_LIBS: ${SBML2MATLAB_LIBS}") -target_link_libraries(${LIBNOM_LIBRARY} ${SBML2MATLAB_LIBS}) -add_definitions(-DLIB_EXPORTS) -install(TARGETS ${LIBNOM_LIBRARY} DESTINATION lib) -install(FILES ${LIBNOM_HEADERS} DESTINATION include) - -if (NOT UNIX) - add_definitions(-DWIN32 -DLIBSBML_EXPORTS -DLIBLAX_EXPORTS) - if (WITH_PYTHON) - INSTALL(TARGETS ${LIBNOM_LIBRARY} DESTINATION bindings/python/nom ) - endif() -endif(NOT UNIX) - - -##### Build the static library ##### -add_library (${LIBNOM_LIBRARY}-static STATIC ${LIBNOM_SOURCES} ) - -if (WIN32 AND NOT CYGWIN) - # don't decorate static library - set_target_properties(${LIBNOM_LIBRARY}-static PROPERTIES COMPILE_DEFINITIONS "LIBLAX_STATIC=1;LIBSBML_STATIC=1;LIBNOM_STATIC=1") -endif(WIN32 AND NOT CYGWIN) - -target_link_libraries(${LIBNOM_LIBRARY}-static ${SBML2MATLAB_LIBS}) - -INSTALL(TARGETS ${LIBNOM_LIBRARY}-static - DESTINATION lib - ) - -##### Build the various sbml2matlab things ##### - -SET(SBML2MATLAB_SOURCE sbml2matlab.h uScanner.h sbml2matlab.cpp) - -ADD_EXECUTABLE( sbml2matlab - ${PROJECT_SOURCE_DIR}/${SBML2MATLAB_SOURCE} -) -install(TARGETS sbml2matlab LIBRARY DESTINATION . RUNTIME DESTINATION . ARCHIVE DESTINATION .) - -ADD_LIBRARY( libsbml2matlab SHARED - ${PROJECT_SOURCE_DIR}/${SBML2MATLAB_SOURCE} -) - -ADD_LIBRARY( libsbml2matlab-static STATIC - ${PROJECT_SOURCE_DIR}/${SBML2MATLAB_SOURCE} -) - -install(TARGETS libsbml2matlab LIBRARY DESTINATION . RUNTIME DESTINATION . ARCHIVE DESTINATION .) - -install(FILES README.txt DESTINATION .) -install(FILES LICENSE.txt DESTINATION .) -install(FILES NOTICE.txt DESTINATION .) -install(FILES help.zip DESTINATION ./help) - -if (NOT UNIX) - if (WITH_PYTHON) - message(STATUS " Installing sbml2matlab in bindings/python/sbml2matlab") - INSTALL(TARGETS libsbml2matlab DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) - endif() -endif(NOT UNIX) -INSTALL(FILES NOTICE.txt DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES LICENSE.txt DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES README.txt DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES bindings/python/__init__.py DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES bindings/python/setup.py DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/..) - -# link to dependencies -# TARGET_LINK_LIBRARIES(sbml2matlab NOM) -TARGET_LINK_LIBRARIES(libsbml2matlab NOM-static ${SBML2MATLAB_LIBS}) -TARGET_LINK_LIBRARIES(libsbml2matlab-static NOM-static ${SBML2MATLAB_LIBS}) -TARGET_LINK_LIBRARIES(sbml2matlab NOM-static ${SBML2MATLAB_LIBS}) -#message(STATUS " SBML2MATLAB_LIBS: ${SBML2MATLAB_LIBS}") - -IF(WIN32 AND NOT UNIX) - # There is a bug in NSI that does not handle full unix paths properly. Make - # sure there is at least one set of four (4) backslashes. - # SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp") - SET(CPACK_NSIS_INSTALLED_ICON_NAME "sbml2matlab.exe") - SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") - SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\code.google.com/p/snowburst") - SET(CPACK_NSIS_CONTACT "stanleygu@gmail.com") - SET(CPACK_NSIS_MODIFY_PATH ON) - # don't decorate static library - set_target_properties(libsbml2matlab-static PROPERTIES COMPILE_DEFINITIONS "LIBLAX_STATIC=1;LIBSBML_STATIC=1;SBML2MATLAB_STATIC=1;NOM_STATIC=1") -ELSE(WIN32 AND NOT UNIX) - SET(CPACK_STRIP_FILES "bin/sbml2matlab") - SET(CPACK_SOURCE_STRIP_FILES "") -ENDIF(WIN32 AND NOT UNIX) -SET(CPACK_PACKAGE_EXECUTABLES "sbml2matlab" "sbml2matlab") -SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\README.lnk' '\$INSTDIR\\\\README.markdown'") +#################################################################### +# +# CMake Build Script for sbml2matlab +# + +cmake_minimum_required(VERSION 2.8) +project(sbml2matlab) + +#################################################################### +#################################################################### +# +# These lines configure the parameters for packaging the binaries +# they can be invoked with: make package / nmake package or by using +# cpack -G zip|deb|rpm|dmg|nsis +# + +include(InstallRequiredSystemLibraries) + +#---------------------CPACK--------------------- +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Translate SBML files to MATLAB functions") +set(CPACK_PACKAGE_NAME "sbml2matlab") +set(CPACK_PACKAGE_VENDOR "Stanley Gu") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") +set(CPACK_PACKAGE_VERSION_MAJOR "1") +set(CPACK_PACKAGE_VERSION_MINOR "2") +set(CPACK_PACKAGE_VERSION_PATCH "0") +set(CPACK_PACKAGE_install_DIRECTORY "sbml2matlab-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") + +set(LIBSBML_PREFIX "" CACHE PATH "Path to where libSBML is installed") + +include(CPack) + +option(BUILD_SHARED_LIBS "Build shared libraries by default (static libraries still built)" ON) +set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS are used), Debug, Release, RelWithDebInfo, MinSizeRel" ) + + +#################################################################### +# +# Here we have the main configuration options for sbml2matlab +# + +# which language bindings should be build +option(WITH_SWIG "Regenerate SWIG-based language bindings." ON ) +option(WITH_PYTHON "Generate Python language bindings." OFF) +option(WITH_LIBSBML_EXPAT "Set if libsbml was compiled with a separate expat library." OFF) +option(WITH_LIBSBML_LIBXML "Set if libsbml was compiled with a separate libxml library." ON) +option(WITH_LIBSBML_XERCES "Set if libsbml was compiled with a separate xerces library." OFF) +option(WITH_LIBSBML_COMPRESSION "Set if libsbml was compiled with separate zdll and bzip libraries." OFF) + +set(EXTRA_LIBS "" CACHE STRING "Libraries the other libraries depend on that are in non-standard locations" ) +set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${EXTRA_LIBS} ) + + +set(SBML2MATLAB_VERSION_STRING "v${SBML2MATLAB_VERSION_MAJOR}.${SBML2MATLAB_VERSION_MINOR}${SBML2MATLAB_VERSION_PATCH}${SBML2MATLAB_VERSION_RELEASE}") +add_definitions( -DSBML2MATLAB_VERSION_STRING="${SBML2MATLAB_VERSION_STRING}" ) + + +######################################################## + +# Locate libsbml +find_path(LIBSBML_INCLUDE_DIR + NAMES sbml/SBMLTypes.h + PATHS ${LIBSBML_PREFIX}/include + /usr/include /usr/local/include + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/dependencies/include + ${CMAKE_SOURCE_DIR}/../libsbml-5/release/include/ + ) +include_directories(${INCLUDE_DIRECTORIES} ${LIBSBML_INCLUDE_DIR}) + +find_library(LIBSBML_LIBRARY + NAMES sbml libsbml.lib libsbml.so libsbml + PATHS ${LIBSBML_PREFIX}/lib + /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${CMAKE_SOURCE_DIR}/../libsbml-5/release/lib/ + ) + +find_library(LIBSBML_STATIC_LIBRARY + NAMES sbml-static + PATHS ${LIBSBML_PREFIX}/lib + /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${CMAKE_SOURCE_DIR}/../libsbml-5/release/lib/ + ) + +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${LIBSBML_STATIC_LIBRARY}) +else() + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${LIBSBML_STATIC_LIBRARY} z bz2 ) +endif() + +############################################################### + +# Locate the libraries libsbml depends on, for static linking. +if(WITH_LIBSBML_EXPAT) + find_library(EXPAT_LIBRARY + NAMES libexpat.lib libexpat.so libexpat.dylib libexpat expat.lib expat.so expat.dylib expat + PATHS /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${LIBSBML_INCLUDE_DIR}/../lib + ) + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${EXPAT_LIBRARY} ) +endif() + +if(WITH_LIBSBML_LIBXML) + find_library(LIBXML_LIBRARY + NAMES xml2 libxml2.lib libxml2.so libxml2.dylib libxml2 + PATHS + /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${LIBSBML_INCLUDE_DIR}/../lib + ) + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${LIBXML_LIBRARY} ) + + if(WIN32) + find_library(ICONV_LIBRARY + NAMES iconv iconv.lib iconv.so iconv.dylib iconv libiconv.lib libiconv.so libiconv.dylib libiconv + PATHS + /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${LIBSBML_INCLUDE_DIR}/../lib + ) + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${ICONV_LIBRARY} ) + endif() +endif() + +if(WITH_LIBSBML_XERCES) + find_library(XERCES_LIBRARY + NAMES xerces-c_static_3.lib xerces-c_static_3.so xerces-c_static_3.dylib xerces-c_static_3 + PATHS /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${LIBSBML_INCLUDE_DIR}/../lib + ) + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${XERCES_LIBRARY} ) +endif() + +if(WITH_LIBSBML_COMPRESSION) + if(WIN32) + find_library(ZDLL_LIBRARY + NAMES z zdll.lib zdll.so zdll.dylib zdll + PATHS /usr/lib /usr/local/lib + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${LIBSBML_INCLUDE_DIR}/../lib + ) + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${ZDLL_LIBRARY} ) + endif() + + find_library(BZIP_LIBRARY + NAMES bzip2 bzip2.lib bzip2.so libbz2.so bzip2.dylib bzip2 + PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dependencies/lib + ${LIBSBML_INCLUDE_DIR}/../lib + ) + set(SBML2MATLAB_LIBS ${SBML2MATLAB_LIBS} ${BZIP_LIBRARY} ) +endif() + +############################################################################### + +# If WITH_SWIG is selected, we need to find swig +if(WITH_SWIG) + find_program(SWIG_EXECUTABLE + NAMES swig + PATHS + "c:/Program Files (x86)/Swig" + c:/Program Files/Swig + c:/swigwin-2.0.11 + c:/swigwin-2.0.10 + c:/swigwin-2.0.9 + c:/swigwin-2.0.8 + c:/swigwin-2.0.7 + c:/swigwin-2.0.6 + c:/swigwin-2.0.5 + c:/swigwin-2.0.4 + c:/swigwin-2.0.3 + c:/swigwin-2.0.2 + c:/swigwin-2.0.1 + c:/swigwin-2.0.0 + /usr/local/bin + /opt/local/bin + /usr/bin + DOC "The file name of the swig executable." + ) + find_package(SWIG) + set(SWIG_EXTRA_ARGS "" CACHE STRING "Extra arguments to SWIG" ) +endif(WITH_SWIG) + +if(WITH_SWIG) + if (SWIG_FOUND AND SWIG_VERSION VERSION_LESS "2.0.4") + message(WARNING " You are using swig version ${SWIG_VERSION} while we recommend at least version 2.0.4.") + endif() + +endif() + +# Determine the python installation directory +if (WITH_PYTHON) + set(PYTHON_PACKAGE_install_DIR) + if (UNIX OR CYGWIN) + execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys;import platform; sys.stdout.write(platform.python_version()[:3])" + OUTPUT_VARIABLE PYTHON_VERSION) + set(PYTHON_PACKAGE_install_DIR lib/python${PYTHON_VERSION}/site-packages) + else() + set(PYTHON_PACKAGE_install_DIR ${MISC_PREFIX}bindings/python) + endif() +endif() + +# Language bindings +add_subdirectory(bindings) + +if(WIN32 AND NOT UNIX) + #Add this flag to suppress 'sprintf' vs. 'sprintf_s' and 'strcpy' vs. 'strcpy_s' warnings in VS. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS") + #We throw C++ exceptions from our 'C' functions; change the Exception Handler (EH) flag + string(REGEX + REPLACE + "/EHsc" + "/EHs" + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS}" + ) + + string(REGEX + REPLACE + "/EHc" + "/EHs" + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS}" + ) +endif() + +message(STATUS " +------------------------------------------------------------------------------- +sbml2matlab Configuration Summary +------------------------------------------------------------------------------- + + https://github.com/sys-bio/sbml2matlab + + Configured on host $ENV{COMPUTERNAME} ${HOSTNAME} + host OS ${CMAKE_SYSTEM_NAME} + host architecture ${CMAKE_SYSTEM_PROCESSOR} + + General flags: + CC ${CMAKE_C_COMPILER} + CXX ${CMAKE_CXX_COMPILER} + CPPFLAGS ${BUILD_DEFINITIONS} + CFLAGS ${CMAKE_C_FLAGS} + CXXFLAGS ${CMAKE_CXX_FLAGS} + LDFLAGS ${CMAKE_EXE_LINKER_FLAGS} + + Installation prefix: ${CMAKE_INSTALL_PREFIX} + + Options: + Full RPATH ${ENABLE_FULL_RPATH} + Enable unit tests ${WITH_TESTS} + + Packages marked with *** are missing required dependencies: + " +) + +if(LIBSBML_LIBRARY) + message( " * libsbml libs ${LIBSBML_LIBRARY}") + message( " * libsbml includes ${LIBSBML_INCLUDE_DIR}") +else() + message( " *** libsbml *N/A") +endif() + +if(WITH_SWIG) + message( " * swig ${SWIG_EXECUTABLE}") +else() + message( " * swig *N/A") +endif() + +if(WITH_PYTHON) + message( " * Python ${PYTHON_EXECUTABLE}") +else() + message( " * Python *N/A") +endif() + +# Set up the include directories +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/NOM + ${LIBSBML_INCLUDE_DIR} +) + +# NOM sources +set (NOM_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/NOM) + +file(GLOB LIBNOM_SOURCES + ${NOM_SRC_DIR}/NOM.cpp + ) +file(GLOB LIBNOM_HEADERS + ${NOM_SRC_DIR}/NOM.h + ) + +# Build the NOM library +add_library(NOM ${LIBNOM_HEADERS} ${LIBNOM_SOURCES}) +target_link_libraries(NOM ${SBML2MATLAB_LIBS}) +add_definitions(-DLIB_EXPORTS) +install(TARGETS NOM DESTINATION lib) +install(FILES ${LIBNOM_HEADERS} DESTINATION include) + +if (NOT UNIX) + add_definitions(-DWIN32 -DLIBSBML_EXPORTS -DLIBLAX_EXPORTS) + if (WITH_PYTHON) + install(TARGETS NOM DESTINATION bindings/python/nom ) + endif() +endif(NOT UNIX) + + +# Build the NOM static library +add_library (NOM-static STATIC ${LIBNOM_SOURCES} ) + +if (WIN32 AND NOT CYGWIN) + # don't decorate static library + set_target_properties(NOM-static PROPERTIES COMPILE_DEFINITIONS "LIBLAX_STATIC=1;LIBSBML_STATIC=1;LIBNOM_STATIC=1") +endif() +if(UNIX) + set_target_properties(NOM-static PROPERTIES COMPILE_FLAGS "-fPIC") +endif() + +target_link_libraries(NOM-static ${SBML2MATLAB_LIBS}) + +install(TARGETS NOM-static + DESTINATION lib + ) + +# Build sbml2matlab + +set(SBML2MATLAB_SOURCE sbml2matlab.h uScanner.h sbml2matlab.cpp) + +add_executable( sbml2matlab + ${SBML2MATLAB_SOURCE} +) +install(TARGETS sbml2matlab DESTINATION bin ) + + +add_library( libsbml2matlab SHARED + ${SBML2MATLAB_SOURCE} +) +set_target_properties( libsbml2matlab PROPERTIES PREFIX "" ) + +add_library( libsbml2matlab-static STATIC + ${SBML2MATLAB_SOURCE} +) +set_target_properties( libsbml2matlab-static PROPERTIES PREFIX "" ) + +if(UNIX) + set_target_properties(libsbml2matlab-static PROPERTIES COMPILE_FLAGS "-fPIC") +endif() + +install( TARGETS libsbml2matlab LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib ) + +install(FILES README.txt DESTINATION .) +install(FILES LICENSE.txt DESTINATION .) +install(FILES NOTICE.txt DESTINATION .) +install(FILES help.zip DESTINATION ./help) + +if (NOT UNIX) + if (WITH_PYTHON) + message(STATUS " Installing sbml2matlab in bindings/python/sbml2matlab") + install(TARGETS libsbml2matlab DESTINATION ${PYTHON_PACKAGE_install_DIR}) + install(FILES NOTICE.txt DESTINATION ${PYTHON_PACKAGE_install_DIR}) + install(FILES LICENSE.txt DESTINATION ${PYTHON_PACKAGE_install_DIR}) + install(FILES README.txt DESTINATION ${PYTHON_PACKAGE_install_DIR}) + install(FILES bindings/python/__init__.py DESTINATION ${PYTHON_PACKAGE_install_DIR}) + install(FILES bindings/python/setup.py DESTINATION ${PYTHON_PACKAGE_install_DIR}/..) + endif() +endif(NOT UNIX) + +# link to dependencies +# target_link_libraries(sbml2matlab NOM) +target_link_libraries(libsbml2matlab NOM-static ${SBML2MATLAB_LIBS}) +target_link_libraries(libsbml2matlab-static NOM-static ${SBML2MATLAB_LIBS}) +target_link_libraries(sbml2matlab NOM-static ${SBML2MATLAB_LIBS}) +#message(STATUS " SBML2MATLAB_LIBS: ${SBML2MATLAB_LIBS}") + +IF(WIN32 AND NOT UNIX) + # There is a bug in NSI that does not handle full unix paths properly. Make + # sure there is at least one set of four (4) backslashes. + # set(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp") + set(CPACK_NSIS_installED_ICON_NAME "sbml2matlab.exe") + set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_install_DIRECTORY}") + set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\code.google.com/p/snowburst") + set(CPACK_NSIS_CONTACT "stanleygu@gmail.com") + set(CPACK_NSIS_MODIFY_PATH ON) + # don't decorate static library + set_target_properties(libsbml2matlab-static PROPERTIES COMPILE_DEFINITIONS "LIBLAX_STATIC=1;LIBSBML_STATIC=1;SBML2MATLAB_STATIC=1;NOM_STATIC=1") +ELSE(WIN32 AND NOT UNIX) + set(CPACK_STRIP_FILES "bin/sbml2matlab") + set(CPACK_SOURCE_STRIP_FILES "") +ENDIF(WIN32 AND NOT UNIX) +set(CPACK_PACKAGE_EXECUTABLES "sbml2matlab" "sbml2matlab") +set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\README.lnk' '\$INSTDIR\\\\README.markdown'") diff --git a/LICENSE.txt b/LICENSE.txt index 483f78f..0af2b39 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,24 +1,24 @@ -Copyright (c) 2012, Stanley Gu -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the University of Washington nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL STANLEY GU BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Copyright (c) 2012, Stanley Gu +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the University of Washington nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL STANLEY GU BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.txt b/README.md similarity index 100% rename from README.txt rename to README.md diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt index 2509913..89898d0 100644 --- a/bindings/CMakeLists.txt +++ b/bindings/CMakeLists.txt @@ -1,53 +1,53 @@ -############################################################################### -# -# Description : CMake build script for antimony language bindings -# Original author(s): Lucian Smith, from libsbml and Frank Bergmann -# -############################################################################### - -# -# When checked removes all generated SWIG wrappers upon configure -# -option(SBML2MATLAB_REMOVE_WRAPPERS "Remove generated SWIG wrappers." OFF) -mark_as_advanced(SBML2MATLAB_REMOVE_WRAPPERS) - -# -# and build selected language bindings -# - -# antimony_api.h has a couple includes, which are easy enough to follow, and -# means we don't have to explicitly include them all the time otherwise. -SET(SWIG_EXTRA_ARGS "-includeall") - -if(WITH_CSHARP) -add_subdirectory(csharp) -endif() - -if(WITH_JAVA) -add_subdirectory(java) -endif() - -if(WITH_PERL) -add_subdirectory(perl) -endif() - -if(WITH_MATLAB) -add_subdirectory(matlab) -endif() - -if(WITH_OCTAVE) -add_subdirectory(octave) -endif() - -if(WITH_PYTHON) -add_subdirectory(python) -endif() - -if(WITH_RUBY) -add_subdirectory(ruby) -endif() - -if(WITH_R) -add_subdirectory(r) -endif() - +############################################################################### +# +# Description : CMake build script for antimony language bindings +# Original author(s): Lucian Smith, from libsbml and Frank Bergmann +# +############################################################################### + +# +# When checked removes all generated SWIG wrappers upon configure +# +option(SBML2MATLAB_REMOVE_WRAPPERS "Remove generated SWIG wrappers." OFF) +mark_as_advanced(SBML2MATLAB_REMOVE_WRAPPERS) + +# +# and build selected language bindings +# + +# antimony_api.h has a couple includes, which are easy enough to follow, and +# means we don't have to explicitly include them all the time otherwise. +SET(SWIG_EXTRA_ARGS "-includeall") + +if(WITH_CSHARP) +add_subdirectory(csharp) +endif() + +if(WITH_JAVA) +add_subdirectory(java) +endif() + +if(WITH_PERL) +add_subdirectory(perl) +endif() + +if(WITH_MATLAB) +add_subdirectory(matlab) +endif() + +if(WITH_OCTAVE) +add_subdirectory(octave) +endif() + +if(WITH_PYTHON) +add_subdirectory(python) +endif() + +if(WITH_RUBY) +add_subdirectory(ruby) +endif() + +if(WITH_R) +add_subdirectory(r) +endif() + diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 353f275..0a45dd1 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -1,185 +1,183 @@ -############################################################################### -# -# Description : CMake build script for sbml2matlab Python bindings -# Author(s) : Lucian Smith, from libsbml and Frank Bergmann -# -############################################################################### - -find_package(SWIG REQUIRED) -include(${SWIG_USE_FILE}) -include(FindPythonLibs) -include(FindPythonInterp) - - -#################################################################### -# -# determine local dependencies, so as to re-swig if one of them changed -# - -file(GLOB SWIG_DEPENDENCIES - ${CMAKE_CURRENT_SOURCE_DIR}/*.i - ${CMAKE_CURRENT_SOURCE_DIR}/*.h - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../swig/*.i - ${CMAKE_CURRENT_SOURCE_DIR}/../swig/*.h - ) - - -# -# Remove SWIG wrappers if requested -# -if (SBML2MATLAB_REMOVE_WRAPPERS) - foreach(file - ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp - ${CMAKE_CURRENT_BINARY_DIR}/pydoc-normal.i - ${CMAKE_CURRENT_BINARY_DIR}/pydoc-doxygen.i - ) - if (EXISTS ${file}) - FILE(REMOVE ${file}) - endif() - endforeach() -endif(SBML2MATLAB_REMOVE_WRAPPERS) - -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp - COMMAND "${PYTHON_EXECUTABLE}" - ARGS "${CMAKE_CURRENT_SOURCE_DIR}/../swig/swigdoc.py" - python - -I"${CMAKE_CURRENT_SOURCE_DIR}/../.." - -D"${CMAKE_CURRENT_SOURCE_DIR}/../../doc" - "${CMAKE_CURRENT_SOURCE_DIR}/../swig/sbml2matlab.i" - "${CMAKE_CURRENT_BINARY_DIR}/pydoc-doxygen.i" - COMMAND "${PYTHON_EXECUTABLE}" - ARGS "${CMAKE_CURRENT_SOURCE_DIR}/doc-converter/rewrite_pydoc.py" - -f "${CMAKE_CURRENT_BINARY_DIR}/pydoc-doxygen.i" - -o "${CMAKE_CURRENT_BINARY_DIR}/pydoc-normal.i" - COMMAND "${CMAKE_COMMAND}" - ARGS -E rename pydoc-doxygen.i pydoc.i - COMMAND "${SWIG_EXECUTABLE}" - ARGS -I${CMAKE_CURRENT_SOURCE_DIR}/../swig/ - -I${CMAKE_CURRENT_SOURCE_DIR}/../.. - -I${CMAKE_CURRENT_BINARY_DIR} - -I${CMAKE_SOURCE_DIR}/src - -I${CMAKE_SOURCE_DIR}/include - -c++ - -python - ${SWIG_EXTRA_ARGS} - -o ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sbml2matlab.i - COMMAND "${CMAKE_COMMAND}" - ARGS -E rename pydoc.i pydoc-doxygen.i - COMMAND "${CMAKE_COMMAND}" - ARGS -E rename libsbml2matlab.py sbml2matlab-doxygen.py - COMMAND "${CMAKE_COMMAND}" - ARGS -E rename pydoc-normal.i pydoc.i - COMMAND "${SWIG_EXECUTABLE}" - ARGS -I${CMAKE_CURRENT_SOURCE_DIR}/../swig/ - -I${CMAKE_CURRENT_SOURCE_DIR}/../.. - -I${CMAKE_CURRENT_BINARY_DIR} - -I${CMAKE_SOURCE_DIR}/src - -I${CMAKE_SOURCE_DIR}/include - -c++ - -python - ${SWIG_EXTRA_ARGS} - -o ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sbml2matlab.i - COMMAND "${CMAKE_COMMAND}" - ARGS -E rename pydoc.i pydoc-normal.i - MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/sbml2matlab.i - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/doc-converter/rewrite_pydoc.py - ${CMAKE_CURRENT_SOURCE_DIR}/../swig/swigdoc.py - ${SWIG_DEPENDENCIES} - COMMENT "Swig Python source") - -add_custom_target(binding_python_swig ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp) - -#################################################################### -# -# Build native library -# - -message(STATUS " Current source directory = ${CMAKE_CURRENT_SOURCE_DIR}") -message(STATUS " Main source directory = ${CMAKE_SOURCE_DIR}") - - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../swig) -include_directories(${CMAKE_SOURCE_DIR}/bindings/) -include_directories(${CMAKE_SOURCE_DIR}) -include_directories(${PYTHON_INCLUDE_DIRS}) -if (EXTRA_INCLUDE_DIRS) - include_directories(${EXTRA_INCLUDE_DIRS}) -endif(EXTRA_INCLUDE_DIRS) - -if (MSVC) - # the build fails when compiled with packages as the object file is too - # big adding the big flag makes it work! - add_definitions(/bigobj) -endif(MSVC) - -add_library(binding_python_lib SHARED sbml2matlab_wrap.cpp) -add_dependencies( binding_python_lib binding_python_swig) - -set_target_properties (binding_python_lib PROPERTIES OUTPUT_NAME "_libsbml2matlab") -if (UNIX) - set_target_properties (binding_python_lib PROPERTIES PREFIX "") - set_target_properties (binding_python_lib PROPERTIES SUFFIX ".so") - if (APPLE) - SET_TARGET_PROPERTIES(binding_python_lib PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") - endif() -else() - if (CYGWIN) - set_target_properties (binding_python_lib PROPERTIES PREFIX "") - set_target_properties (binding_python_lib PROPERTIES SUFFIX ".dll") - else() - set_target_properties (binding_python_lib PROPERTIES SUFFIX ".pyd") - endif() -endif() - -message(STATUS "libraries: ${SBML2MATLAB_LIBS}\nsbml2matlab:libsbml2matlab") -#target_link_libraries(binding_python_lib ${SBML2MATLAB_LIBS} libsbml2matlab-static ${PYTHON_LIBRARIES}) -target_link_libraries(binding_python_lib ${SBML2MATLAB_LIBS} libsbml2matlab-static) - -# -# Determine the python installation directory -# -set(PYTHON_PACKAGE_INSTALL_DIR) -if (UNIX OR CYGWIN) - execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys;import platform; sys.stdout.write(platform.python_version()[:3])" - OUTPUT_VARIABLE PYTHON_VERSION) - set(PYTHON_PACKAGE_INSTALL_DIR lib/python${PYTHON_VERSION}/site-packages) -else() - set(PYTHON_PACKAGE_INSTALL_DIR ${MISC_PREFIX}bindings/python) -endif() - -INSTALL(TARGETS binding_python_lib DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libsbml2matlab.pth" "sbml2matlab\n") -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libsbml2matlab.pth DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES setup.py MANIFEST.in DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libsbml2matlab.pth DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libsbml2matlab.py DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) -INSTALL(FILES __init__.py DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) - -if (NOT UNIX) - file(GLOB new_win_dependencies "${CMAKE_SOURCE_DIR}/win32/*.dll") - install(FILES ${new_win_dependencies} DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) -endif() - -#################################################################### -# -# testing -# - -if(WITH_CHECK) - - # copy test files to build dir - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - - # run python tests - add_test(NAME test_python_binding - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/test.py - -p $ -b ${CMAKE_CURRENT_SOURCE_DIR}/test) - -endif() +############################################################################### +# +# Description : CMake build script for sbml2matlab Python bindings +# Author(s) : Lucian Smith, from libsbml and Frank Bergmann +# +############################################################################### + +find_package(SWIG REQUIRED) +include(${SWIG_USE_FILE}) +include(FindPythonLibs) +include(FindPythonInterp) + + +#################################################################### +# +# determine local dependencies, so as to re-swig if one of them changed +# + +file(GLOB SWIG_DEPENDENCIES + ${CMAKE_CURRENT_SOURCE_DIR}/*.i + ${CMAKE_CURRENT_SOURCE_DIR}/*.h + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../swig/*.i + ${CMAKE_CURRENT_SOURCE_DIR}/../swig/*.h + ) + + +# +# Remove SWIG wrappers if requested +# +if (SBML2MATLAB_REMOVE_WRAPPERS) + foreach(file + ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp + ${CMAKE_CURRENT_BINARY_DIR}/pydoc-normal.i + ${CMAKE_CURRENT_BINARY_DIR}/pydoc-doxygen.i + ) + if (EXISTS ${file}) + FILE(REMOVE ${file}) + endif() + endforeach() +endif(SBML2MATLAB_REMOVE_WRAPPERS) + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp + COMMAND "${PYTHON_EXECUTABLE}" + ARGS "${CMAKE_CURRENT_SOURCE_DIR}/../swig/swigdoc.py" + python + -I"${CMAKE_CURRENT_SOURCE_DIR}/../.." + -D"${CMAKE_CURRENT_SOURCE_DIR}/../../doc" + "${CMAKE_CURRENT_SOURCE_DIR}/../swig/sbml2matlab.i" + "${CMAKE_CURRENT_BINARY_DIR}/pydoc-doxygen.i" + COMMAND "${PYTHON_EXECUTABLE}" + ARGS "${CMAKE_CURRENT_SOURCE_DIR}/doc-converter/rewrite_pydoc.py" + -f "${CMAKE_CURRENT_BINARY_DIR}/pydoc-doxygen.i" + -o "${CMAKE_CURRENT_BINARY_DIR}/pydoc-normal.i" + COMMAND "${CMAKE_COMMAND}" + ARGS -E rename pydoc-doxygen.i pydoc.i + COMMAND "${SWIG_EXECUTABLE}" + ARGS -I${CMAKE_CURRENT_SOURCE_DIR}/../swig/ + -I${CMAKE_CURRENT_SOURCE_DIR}/../.. + -I${CMAKE_CURRENT_BINARY_DIR} + -I${CMAKE_SOURCE_DIR}/src + -I${CMAKE_SOURCE_DIR}/include + -c++ + -python + ${SWIG_EXTRA_ARGS} + -o ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sbml2matlab.i + COMMAND "${CMAKE_COMMAND}" + ARGS -E rename pydoc.i pydoc-doxygen.i + COMMAND "${CMAKE_COMMAND}" + ARGS -E rename sbml2matlab.py sbml2matlab-doxygen.py + COMMAND "${CMAKE_COMMAND}" + ARGS -E rename pydoc-normal.i pydoc.i + COMMAND "${SWIG_EXECUTABLE}" + ARGS -I${CMAKE_CURRENT_SOURCE_DIR}/../swig/ + -I${CMAKE_CURRENT_SOURCE_DIR}/../.. + -I${CMAKE_CURRENT_BINARY_DIR} + -I${CMAKE_SOURCE_DIR}/src + -I${CMAKE_SOURCE_DIR}/include + -c++ + -python + ${SWIG_EXTRA_ARGS} + -o ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sbml2matlab.i + COMMAND "${CMAKE_COMMAND}" + ARGS -E rename pydoc.i pydoc-normal.i + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/sbml2matlab.i + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/doc-converter/rewrite_pydoc.py + ${CMAKE_CURRENT_SOURCE_DIR}/../swig/swigdoc.py + ${SWIG_DEPENDENCIES} + COMMENT "Swig Python source") + +add_custom_target(binding_python_swig ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab_wrap.cpp) + +#################################################################### +# +# Build native library +# + +message(STATUS " Current source directory = ${CMAKE_CURRENT_SOURCE_DIR}") +message(STATUS " Main source directory = ${CMAKE_SOURCE_DIR}") + + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../swig) +include_directories(${CMAKE_SOURCE_DIR}/bindings/) +include_directories(${CMAKE_SOURCE_DIR}) +include_directories(${PYTHON_INCLUDE_DIRS}) +if (EXTRA_INCLUDE_DIRS) + include_directories(${EXTRA_INCLUDE_DIRS}) +endif(EXTRA_INCLUDE_DIRS) + +if (MSVC) + # the build fails when compiled with packages as the object file is too + # big adding the big flag makes it work! + add_definitions(/bigobj) +endif(MSVC) + +add_library(binding_python_lib SHARED sbml2matlab_wrap.cpp) +add_dependencies(binding_python_lib binding_python_swig) + +set_target_properties (binding_python_lib PROPERTIES OUTPUT_NAME "_sbml2matlab") +if (UNIX) + set_target_properties (binding_python_lib PROPERTIES PREFIX "") + set_target_properties (binding_python_lib PROPERTIES SUFFIX ".so") + if (APPLE) + SET_TARGET_PROPERTIES(binding_python_lib PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + endif() +else() + if (CYGWIN) + set_target_properties (binding_python_lib PROPERTIES PREFIX "") + set_target_properties (binding_python_lib PROPERTIES SUFFIX ".dll") + else() + set_target_properties (binding_python_lib PROPERTIES SUFFIX ".pyd") + endif() +endif() + +target_link_libraries(binding_python_lib ${SBML2MATLAB_LIBS} libsbml2matlab-static) +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(binding_python_lib ${PYTHON_LIBRARY}) +endif() + +# +# Determine the python installation directory +# +set(PYTHON_PACKAGE_INSTALL_DIR) +if (UNIX OR CYGWIN) + execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys;import platform; sys.stdout.write(platform.python_version()[:3])" + OUTPUT_VARIABLE PYTHON_VERSION) + set(PYTHON_PACKAGE_INSTALL_DIR lib/python${PYTHON_VERSION}/site-packages) +else() + set(PYTHON_PACKAGE_INSTALL_DIR ${MISC_PREFIX}bindings/python) +endif() + +INSTALL(TARGETS binding_python_lib DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) + +INSTALL(FILES setup.py MANIFEST.in conda/meta.yaml conda/build.sh conda/bld.bat DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sbml2matlab.py DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) +INSTALL(FILES __init__.py DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) + +if (NOT UNIX) + file(GLOB new_win_dependencies "${CMAKE_SOURCE_DIR}/win32/*.dll") + install(FILES ${new_win_dependencies} DESTINATION ${PYTHON_PACKAGE_INSTALL_DIR}/sbml2matlab ) +endif() + +#################################################################### +# +# testing +# + +if(WITH_CHECK) + + # copy test files to build dir + file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + + # run python tests + add_test(NAME test_python_binding + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/test.py + -p $ -b ${CMAKE_CURRENT_SOURCE_DIR}/test) + +endif() diff --git a/bindings/python/__init__.py b/bindings/python/__init__.py index d9d1af5..e3151b4 100644 --- a/bindings/python/__init__.py +++ b/bindings/python/__init__.py @@ -1,2 +1,2 @@ -from libsbml2matlab import * +from sbml2matlab import * __version__ = '1.2.3' diff --git a/bindings/python/conda/bld.bat b/bindings/python/conda/bld.bat new file mode 100644 index 0000000..c40a9bb --- /dev/null +++ b/bindings/python/conda/bld.bat @@ -0,0 +1,2 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 diff --git a/bindings/python/conda/build.sh b/bindings/python/conda/build.sh new file mode 100644 index 0000000..5a5aeeb --- /dev/null +++ b/bindings/python/conda/build.sh @@ -0,0 +1 @@ +$PYTHON setup.py install diff --git a/bindings/python/conda/meta.yaml b/bindings/python/conda/meta.yaml new file mode 100644 index 0000000..d968baf --- /dev/null +++ b/bindings/python/conda/meta.yaml @@ -0,0 +1,12 @@ +package: + name: sbml2matlab + version: 0.9.0 + +requirements: + build: + - python + - setuptools + +about: + home: https://github.com/sys-bio/sbml2matlab + license: BSD 3-Clause diff --git a/bindings/python/doc-converter/Makefile b/bindings/python/doc-converter/Makefile index 088cf0a..08ad1a1 100644 --- a/bindings/python/doc-converter/Makefile +++ b/bindings/python/doc-converter/Makefile @@ -1,3 +1,3 @@ -check: - env PYTHONPATH=`pwd` test/run.py - +check: + env PYTHONPATH=`pwd` test/run.py + diff --git a/bindings/python/doc-converter/out.i b/bindings/python/doc-converter/out.i index 3ac1a2c..3849aca 100644 --- a/bindings/python/doc-converter/out.i +++ b/bindings/python/doc-converter/out.i @@ -1,1261 +1,1261 @@ -%feature("docstring") loadFile " - Load a file of any format libAntimony knows about (potentially - Antimony, SBML, or CellML). If all attempts fail, the errors from - the attempt to read the file in the Antimony format are saved, so if - the file is actually SBML or CellML, the error is likely to be 'but - contains errors, the reported errors will be from the attempt to read - it as Antimony, and a '-1' is returned. - - NOTE: This function will not attempt to parse the file as SBML if - libAntimony is compiled with the '-NSBML' flag, and will not attempt - to parse the file as CellML if compiled with the '-NCELLML' flag. - - Returns a long integer indicating the index of the file read and - stored. On an error, returns -1 and no information is stored. - - Parameter 'filename' is The filename as a character string. May be - either absolute or relative to the directory the executable is being - run from. - - See also getLastError(). -"; - - -%feature("docstring") loadString " - Load a string of any format libAntimony knows about (potentially - Antimony, SBML, or CellML). The first attempts to read the string as - SBML, and if this results in an error, then reads it as Antimony. If - this, too, results in an error, the second error is saved, and a '-1' - is returned. - - NOTE: This function will not attempt to parse the string as SBML if - libAntimony is compiled with the '-NSBML' flag, and will not attempt - to parse the string as CellML if compiled with the '-NCELLML' flag. - - Returns a long integer indicating the index of the string read and - stored. On an error, returns -1 and no information is stored. - - Parameter 'model' is The model, in (potentially) Antimony, SBML, or - CellML format. - - See also getLastError(). -"; - - -%feature("docstring") loadAntimonyFile " - Loads a file and parses it as an Antimony file. On an error, the - error is saved, -1 is returned, and no information is stored. - - Returns a long integer indicating the index of the file read and - stored. On an error, returns -1 and no information is stored. - - Parameter 'filename' is The filename as a character string. May be - either absolute or relative to the directory the executable is being - run from. - - See also getLastError(). -"; - - -%feature("docstring") loadAntimonyString " - Loads a string and parses it as an Antimony set of modules. On an - error, the error is saved, -1 is returned, and no information is - stored. - - Returns a long integer indicating the index of the string read and - stored. On an error, returns -1 and no information is stored. - - Parameter 'model' is The model in Antimony format. - - See also getLastError(). -"; - - -%feature("docstring") loadSBMLFile " - @brief Load a file known to be SBML. - - Loads a file and parses it (using libSBML) as an SBML file. On an - error, the error is saved, -1 is returned, and no information is - stored. Returns a long integer indicating the index of the file read - and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with - the '-NSBML' flag. - - Parameter 'filename' is The filename as a character string. May be - either absolute or relative to the directory the executable is being - run from. - - See also getLastError(). -"; - - -%feature("docstring") loadSBMLString " - @brief Load a string known to be SBML. - - Loads a string and parses it (using libSBML) as an SBML file. On an - error, the error is saved, -1 is returned, and no information is - stored. Returns a long integer indicating the index of the string - read and stored. On an error, returns -1 and no information is - stored. NOTE: This function is unavailable when libAntimony is - compiled with the '-NSBML' flag. - - Parameter 'model' is The model, in SBML format. - - See also getLastError(). -"; - - -%feature("docstring") loadSBMLStringWithLocation " - @brief Load a string known to be SBML with its file location. - - Loads a string and parses it (using libSBML) as an SBML file. On an - error, the error is saved, -1 is returned, and no information is - stored. This function additionally allows you to set the location of - the string, in case there are relative file references in the file - (as there can be in some hierarchical models). Returns a long - integer indicating the index of the string read and stored. On an - error, returns -1 and no information is stored. NOTE: This function - is unavailable when libAntimony is compiled with the '-NSBML' flag. - - Parameter 'model' is The model, in SBML format. Parameter 'location' - is The location of the file (i.e. 'file1.xml' or - '/home/user/sbml/models/file.xml') - - See also getLastError(). -"; - - -%feature("docstring") loadCellMLFile " - @brief Load a file known to be CellML. - - Loads a file and parses it (using libCellML) as a CellML file. On an - error, the error is saved, -1 is returned, and no information is - stored. Returns a long integer indicating the index of the file read - and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with - the '-NCELLML' flag. - - Parameter 'filename' is The filename as a character string. May be - either absolute or relative to the directory the executable is being - run from. - - See also getLastError(). -"; - - -%feature("docstring") loadCellMLString " - @brief Load a string known to be CellML. - - Loads a string and parses it (using libCellML) as a CellML file. On - an error, the error is saved, -1 is returned, and no information is - stored. Returns a long integer indicating the index of the string - read and stored. On an error, returns -1 and no information is - stored. NOTE: This function is unavailable when libAntimony is - compiled with the '-NCELLML' flag. - - Parameter 'model' is The model, in CellML format. - - See also getLastError(). -"; - - -%feature("docstring") getNumFiles " - @brief Returns the number of files loaded into memory so far. - - Every time 'load' is called successfully, the module(s) - in those files are saved. This function will tell you how many sets - of modules from successful reads are resident in memory. Returns The - number of files currently stored in memory. -"; - - -%feature("docstring") revertTo " - Change the 'active' set of modules to the ones from the given index - (as received from 'load'). Attempting to revert to a - negative or nonexistent index returns 'false' and the previous active - set of modules is retained. A successful change return 'true'. -"; - - -%feature("docstring") clearPreviousLoads " - Clears memory of all files loaded. The next successful call to - 'load' will return 0 as the first valid index. -"; - - -%feature("docstring") addDirectory " - Add a directory in which imported files may be found, and in which to - look for a '.antimony' file (which contains rules about where to look - locally for imported antimony and sbml files). -"; - - -%feature("docstring") clearDirectories " - Clears the list of directories added with the 'addDirectory' - function. -"; - - -%feature("docstring") writeAntimonyFile " - Writes out an antimony-formatted file containing the given module. - If no module name is given, all modules in the current set are - returned. If the module depends on any sub-modules, those modules - are written out as well, also in the antimony format. Returns 0 on - failure (and sets an error), 1 on success. -"; - - -%feature("docstring") getAntimonyString " - Returns the same output as writeAntimonyFile, but to a char array - instead of to a file. Returns None on failure, and sets an error. -"; - - -%feature("docstring") writeSBMLFile " - Writes out a SBML-formatted XML file to the file indicated. The - output is 'flattened', that is, all components of sub-modules are re- - named and placed in a single model. Returns the output of libSBML's - 'writeSBML', which 'Returns non-zero on success and zero if the - filename could not be opened for writing.' An error indicating this - is set on returning zero. NOTE: This function is unavailable when - libAntimony is compiled with the '-NSBML' flag. - -See also getSBMLString. -"; - - -%feature("docstring") getSBMLString " - Returns the same output as writeSBMLFile, but to a char array instead - of to a file. The output is 'flattened', that is, all components of - sub-modules are re-named and placed in a single model. Returns the - output of libSBML's 'writeSBMLToString', which 'Returns the string on - success and None if one of the underlying parser components fail - (rare).' NOTE: This function is unavailable when libAntimony is - compiled with the '-NSBML' flag. - -See also writeSBMLFile. -"; - - -%feature("docstring") writeCompSBMLFile " - Writes out a SBML-formatted XML file to the file indicated, using the - 'Hierarchichal Model Composition' package. This retains Antimony's - modularity in the SBML format. Returns the output of libSBML's - 'writeSBML', which 'Returns non-zero on success and zero if the - filename could not be opened for writing.' An error indicating this - is set on returning zero. NOTE: This function is unavailable when - libAntimony is compiled with the '-NSBML' flag, or if compiled - without the USE_COMP flag. - -See also getSBMLString. -"; - - -%feature("docstring") getCompSBMLString " - Returns the same output as writeSBMLFile, but to a char array instead - of to a file, using the 'Hierarchichal Model Composition' package. - This retains Antimony's modularity in the SBML format. Returns the - output of libSBML's 'writeSBMLToString', which 'Returns the string on - success and None if one of the underlying parser components fail - (rare).' NOTE: This function is unavailable when libAntimony is - compiled with the '-NSBML' flag, or if compiled without the USE_COMP - flag. - -See also writeSBMLFile. -"; - - -%feature("docstring") writeCellMLFile " - Writes out a CellML-formatted XML file to the file indicated, - retaining the same Antimony hierarchy using the CellML 'component' - hieararchy. Returns one on success and zero on failure. NOTE: This - function is unavailable when libAntimony is compiled with the - '-NCELLML' flag. - -See also getCellMLString. -"; - - -%feature("docstring") getCellMLString " - Returns the same output as writeCellMLFile, but to a char array - instead of to a file. Returns the string on success (as translated - to 'char' from CellML's native 'wchar') and None on failure.' NOTE: - This function is unavailable when libAntimony is compiled with the - '-NCELLML' flag. - -See also writeCellMLToString. -"; - - -%feature("docstring") printAllDataFor " - An example function that will print to stdout all the information in - the given module. This function probably isn't as useful to call as - it is to examine and copy for your own purposes: it only calls - functions defined here in antimony_api.h. -"; - - -%feature("docstring") checkModule " - Returns 'true' if the submitted module name exists in the current - active set, 'false' if not. -"; - - -%feature("docstring") getLastError " - When any function returns an error condition, a longer description of - the problem is stored in memory, and is obtainable with this - function. In most cases, this means that a call that returns a - pointer returned 'None' (or 0). -"; - - -%feature("docstring") getWarnings " - When translating some other format to Antimony, elements that are - unable to be translated are saved as warnings, retrievable with this - function (returns None if no warnings present). Warnings may also be - generated by problems discovered in '.antimony' files. -"; - - -%feature("docstring") getSBMLInfoMessages " - Returns the 'info' messages from libSBML. libAntimony always - translates its modules into SBML to check for errors. If SBML finds - errors, libAntimony gives up, passes on the error message, and does - not save the model. However, libSBML may discover other things about - your model it wants to tell you about, in 'info' and 'warning' - messages. Info messages are just things it found it thinks you might - want to know; warning messages are things it found which it feels - violates 'best practices' in biological modelling, but not to the - extent that it feels you did something actually wrong. Since - Antimony is unitless, for example, you will always find warnings - about how you didn't set any units. This function returns the 'info' - messages from libSBML. If there are no info messages, returns an - empty string. NOTE: This function is unavailable when libAntimony - is compiled with the '-NSBML' flag. See also getSBMLWarnings. -"; - - -%feature("docstring") getSBMLWarnings " - Returns the 'warning' messages from libSBML. If there are no warning - messages (an unlikely occurrence), returns an empty string. NOTE: - This function is unavailable when libAntimony is compiled with the - '-NSBML' flag. See also getSBMLInfoMessages. -"; - - -%feature("docstring") getNumModules " - Returns the number of modules in the current active set (the last - file successfully loaded, or whichever file was returned to with - 'revertTo'). -"; - - -%feature("docstring") getModuleNames " - Returns an array of all the current module names. -"; - - -%feature("docstring") getNthModuleName " - Returns the nth module name. Returns None and sets an error if there - is no such module n. -"; - - -%feature("docstring") getMainModuleName " - Returns the 'main' module name. In Antimony, this is either the - module marked by an asterisk ('modelmainModel()') or the last module - defined in the file. In translated SBML models, this is the model - child of thelt;sbmlgt; object. In translated CellML models, this is - the 'containing' model that the translator creates to hold all the - CellML components. Returns None only if there are no modules at all. -"; - - -%feature("docstring") getNumSymbolsInInterfaceOf " - Returns the number of symbols defined to be in the interface of the - given module. In other words, if a module is defined 'module M(x, y, - z)', this returns '3'. (Modules with no interface symbols return - '0'.) -"; - - -%feature("docstring") getSymbolNamesInInterfaceOf " - Returns the names of the symbols defined to be in the interface of - the given module. In other words, if a module is defined 'module - M(x, y, z)', this returns the list 'x, y, z'. A module with no - symbols defined in its interface would return a pointer to an empty - string. -"; - - -%feature("docstring") getNthSymbolNameInInterfaceOf " - Returns the Nth symbol name defined to be in the interface of the - given module. If a module is defined 'module M(x, y, z)', calling - this with n=0 returns 'x'. If no such symbol is found, None is - returned and an error is set. -"; - - -%feature("docstring") getNumReplacedSymbolNames " - Returns the Nth replacement symbol name of a symbol that has replaced - a different symbol in the given module, through the use of an 'is' - construct, or through the use of a module's interface. See also - getNthFormerSymbolName, getNthReplacementSymbolName. -"; - - -%feature("docstring") getAllReplacementSymbolPairs " - Returns a list of pairs of symbol names that have been synchronized - with each other--the first the symbol that was replaced, and the - second the symbol used as the replacement. These replacements are - created when 'is' is used, and when a module's 'interface' (the - symbols listed in parentheses) is used. See also - getNthFormerSymbolName, getNthReplacementSymbolName, - getNthReplacementSymbolPair. -"; - - -%feature("docstring") getNthReplacementSymbolPair " - Returns the Nth pair of symbol names that have been synchronized with - each other--the first the symbol that was replaced, and the second - the symbol used as the replacement. These replacements are created - when 'is' is used, and when a module's 'interface' (the symbols - listed in parentheses) is used. See also getNthFormerSymbolName, - getNthReplacementSymbolName. -"; - - -%feature("docstring") getNthFormerSymbolName " - Returns the Nth symbol name that has been replaced by a new symbol - name in the given module, through the use of an 'is' construct, or - through the use of a module's interface. See also - getNthReplacementSymbolName, GetNumReplacedSymbolNames. -"; - - -%feature("docstring") getNthReplacementSymbolName " - Returns the Nth replacement symbol name of a symbol that has replaced - a different symbol in the given module, through the use of an 'is' - construct, or through the use of a module's interface. See also - getNthFormerSymbolName, GetNumReplacedSymbolNames. -"; - - -%feature("docstring") getNumReplacedSymbolNamesBetween " - Returns the Nth replacement symbol name of a symbol that has replaced - a different symbol in the given module, through the use of an 'is' - construct, or through the use of a module's interface, between the - given submodules, with the variable in the first submodule being the - former variable name, and the variable in the second being the - replacement variable name. If an empty string is used as one of the - submodule names, those synchronized variables that are not part of - any submodule are searched for. See also getNthFormerSymbolName, - getNthReplacementSymbolName. -"; - - -%feature("docstring") getAllReplacementSymbolPairsBetween " - Returns a list of pairs of symbol names that have been synchronized - with each other--the first the symbol that was replaced, and the - second the symbol used as the replacement, between the given - submodules, with the variable in the first submodule being the former - variable name, and the variable in the second being the replacement - variable name. These replacements are created when 'is' is used, and - when a module's 'interface' (the symbols listed in parentheses) is - used. See also getNthFormerSymbolName, getNthReplacementSymbolName, - getNthReplacementSymbolPair. -"; - - -%feature("docstring") getNthReplacementSymbolPairBetween " - Returns the Nth pair of symbol names that have been synchronized with - each other--the first the symbol that was replaced, and the second - the symbol used as the replacement, between the given submodules, - with the variable in the first submodule being the former variable - name, and the variable in the second being the replacement variable - name. These replacements are created when 'is' is used, and when a - module's 'interface' (the symbols listed in parentheses) is used. - See also getNthFormerSymbolName, getNthReplacementSymbolName. -"; - - -%feature("docstring") getNthFormerSymbolNameBetween " - Returns the Nth symbol name that has been replaced by a new symbol - name in the given module, through the use of an 'is' construct, or - through the use of a module's interface, between the given - submodules, with the variable in the first submodule being the former - variable name, and the variable in the second being the replacement - variable name. See also getNthReplacementSymbolName, - GetNumReplacedSymbolNames. -"; - - -%feature("docstring") getNthReplacementSymbolNameBetween " - Returns the Nth replacement symbol name of a symbol that has replaced - a different symbol in the given module, through the use of an 'is' - construct, or through the use of a module's interface, between the - given submodules, with the variable in the first submodule being the - former variable name, and the variable in the second being the - replacement variable name. See also getNthFormerSymbolName, - GetNumReplacedSymbolNames. -"; - - -%feature("docstring") getNumSymbolsOfType " - Returns the number of symbols of the given return type. Useful when - looping over the arrays in the subsequent functions. See also get(). -"; - - -%feature("docstring") getSymbolNamesOfType " - Returns the names of the symbols of the given return type. (In SBML, - these are the 'id's.) -"; - - -%feature("docstring") getSymbolDisplayNamesOfType " - Returns the 'display names' of the symbols of the given return type. - (In SBML, these are the 'name's.) -"; - - -%feature("docstring") getSymbolEquationsOfType " - Returns the equations associated with the symbols of the given return - type. - Species: The initial assignment or - assignment rule for the species in question - Formulas and - operators: The initial assignment or assignment rule for the formula - in question - Compartments: The initial assignment or - assignment rule for the compartment in question - DNA elements: - The assignment rule or reaction rate of the element in question (no - DNA element is defined by an initial assignment or by a rate rule - with an initial assignment) - DNA Strands: The - assignment rule or reaction rate for the last element of the strand - - Reactions and genes: The reaction rate - Events: - The trigger condition - Interactions: Nothing - Modules: - Nothing - - For elements that could have either initial assignments or assignment - rules, use getTypeOfEquationForSymbol, or just use - getSymbolInitialAssignmentsOfType and getSymbolAssignmentRulesOfType - explicitly. -"; - - -%feature("docstring") getSymbolInitialAssignmentsOfType " - Returns the equations associated with the initial assignment for - symbols of the given return type. - Species: The - initial assignment for the species in question - Formulas and - operators: The initial assignment of the formula in question - - Compartments: The initial assignment for the compartment - - - DNA Strands: Nothing - Reactions and genes: - Nothing - Events: Nothing - Interactions: - Nothing - Modules: Nothing -"; - - -%feature("docstring") getSymbolAssignmentRulesOfType " - Returns the equations associated with the assignment rule for symbols - of the given return type. - Species: The assignment - rule for the species in question - Formulas and operators: The - assignment rule of the formula in question - Compartments: - The assignment rule for the compartment - DNA Strands: - The assignment rule or reaction rate at the end of the strand. - - Reactions and genes: The reaction rate (for consistency with DNA - strands) - - - Events: Nothing - Interactions: - Nothing - Modules: Nothing -"; - - -%feature("docstring") getSymbolRateRulesOfType " - Returns the equations associated with the rate rule for symbols of - the given return type. - Species: The rate rule for - the species in question - Formulas and operators: The rate rule of - the formula in question - Compartments: The rate rule for - the compartment - DNA Strands: The rate rule or reaction - rate at the end of the strand. - Reactions and genes: Nothing - - Events: Nothing - Interactions: Nothing - - Modules: Nothing -"; - - -%feature("docstring") getSymbolCompartmentsOfType " - Returns the compartments associated with the symbols of the given - return type. Note that unlike in SBML, any symbol of any type may - have an associated compartment, including compartments themselves. - Rules about compartments in Antimony can be found in the Tutorial.pdf - document included with this documentation. -"; - - -%feature("docstring") getNthSymbolNameOfType " - Returns the name of the Nth symbol of the given type. If no such - symbol exists, None is returned and an error is set. (In SBML, this - is the 'id' of the element.) -"; - - -%feature("docstring") getNthSymbolDisplayNameOfType " - Returns the 'display name' of the Nth symbol of the given type. If - no such symbol exists, None is returned and an error is set. (In - SBML, this is the 'name' of the element.) -"; - - -%feature("docstring") getNthSymbolEquationOfType " - Returns the equation associated with the Nth symbol of the given - type. If no equation is set for the symbol in question, an empty - string is returned. If no symbol can be found, None is returned and - an error is set. -"; - - -%feature("docstring") getNthSymbolInitialAssignmentOfType " - Returns the initial assignment associated with the Nth symbol of the - given type. If no initial assignment is set for the symbol in - question, an empty string is returned. If no symbol can be found, - None is returned and an error is set. -"; - - -%feature("docstring") getNthSymbolAssignmentRuleOfType " - Returns the assignment rule associated with the Nth symbol of the - given type. If no assignment rule is set for the symbol in question, - an empty string is returned. If no symbol can be found, None is - returned and an error is set. -"; - - -%feature("docstring") getNthSymbolRateRuleOfType " - Returns the rate rule associated with the Nth symbol of the given - type. If no rate rule is set for the symbol in question, an empty - string is returned. If no symbol can be found, None is returned and - an error is set. -"; - - -%feature("docstring") getNthSymbolCompartmentOfType " - Returns the name of the compartment associated with the nth symbol of - the given type. If no compartment is explicitly set in the file, the - string 'default_compartment' is returned. If no symbol can be found, - None is returned and an error is set. -"; - - -%feature("docstring") getTypeOfSymbol " - Returns the most specific return type available for the given - symbolName. A symbol defined to be a gene, for example, will return - 'allGenes' and not 'allReactions', though the symbol does indeed - qualify as a reaction. -"; - - -%feature("docstring") getTypeOfEquationForSymbol " - Returns the type of the 'main' equation associated with the given - symbolName. All reactions will return 'formulaKINETIC', and all - events will return 'formulaTRIGGER'. All DNA elements that are not - genes will return 'formulaASSIGNMENT', as DNA elements are defined by - assignment rules and kinetic laws. All other symbols will return - 'formulaINITIAL' by default (i.e. in the case where no equation at - all is associated with the symbol in question), and otherwise will - return formulaINITIAL for symbols defined by initial assignments - only, formulaASSIGNMENT for symbols defined by assignment rules, and - formulaRATE for symbols defined by both initial assignments and rate - rules (or just rate rules; it is valid though not simulatable to have - a symbol with a rate rule but no initial assignment). In the case of - rate rules, the initial assignment is found in the 'Equation' - associated with the symbol, and the rate rule is found in the - 'RateRule' associated with the symbol. -"; - - -%feature("docstring") getCompartmentForSymbol " - Returns the name of the compartment the given symbol is a member of. - In antimony, all symbols may have compartments, not just species. If - a symbol has no set compartment, and is not a member of a symbol with - a set compartment, this will return 'default_compartment' -"; - - -%feature("docstring") getNumReactions " - Returns the number of reactions (including genes) in the named - module. Useful when looping over all reactions in the arrays - returned by subsequent functions. -"; - - -%feature("docstring") getNumReactants " - Returns the number of reactants (species on the left side of the - reaction) for the given reaction. If no such reaction is present, - '0' is returned and an error is set. Sadly, if there are no - reactants, '0' is also returned, though no error is set. So you'll - have to keep track of this one on your own, most likely. -"; - - -%feature("docstring") getNumProducts " - Returns the number of products (species on the right side of the - reaction) for the given reaction. If no such reaction is present, - '0' is returned and an error is set. Sadly, if there are no - products, '0' is also returned, though no error is set. So you'll - have to keep track of this one on your own, too. -"; - - -%feature("docstring") getReactantNames " - Returns all the reactant names for all reactions in the given module. - The dimensions of the included arrays can be found with - 'getNumReactions' and 'getNumReactants' (the array is not 'square'-- - each sub array may have a different length). -"; - - -%feature("docstring") getNthReactionReactantNames " - Returns an array of all the reactant names for the given reaction. - The length of the array can be obtained with 'getNumReactants'. If - no such reaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getNthReactionMthReactantName " - Returns the mth reactant name of the mth reaction. If no such - reaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getProductNames " - Returns all the product names for all reactions in the given module. - The dimensions of the included arrays can be found with - 'getNumReactions' and 'getNumProducts' (the array is not 'square'-- - each sub array may have a different length). -"; - - -%feature("docstring") getNthReactionProductNames " - Returns an array of all the product names for the given reaction. - The length of the array can be obtained with 'getNumProducts'. If no - such reaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getNthReactionMthProductName " - Returns the mth product name of the given reaction. If no such - reaction or product is present, None is returned and an error is set. -"; - - -%feature("docstring") getReactantStoichiometries " - Returns a two-dimensional array of the stoichiometries for all - reactants in all reactions in the given module. -"; - - -%feature("docstring") getProductStoichiometries " - Returns a two-dimensional array of the stoichiometries for all - products in all reactions in the given module. -"; - - -%feature("docstring") getNthReactionReactantStoichiometries " - Returns an array of the stoichiometries for the reactants of the Nth - reaction in the module. If no such reaction exists, an error is set - and None is returned. -"; - - -%feature("docstring") getNthReactionProductStoichiometries " - Returns an array of the stoichiometries for the products of the Nth - reaction in the module. If no such reaction exists, an error is set - and None is returned. -"; - - -%feature("docstring") getNthReactionMthReactantStoichiometries " - Returns the stoichiometry for the Mth reactant of the Nth reaction in - the module. If no such reactant or reaction exists, an error is set - and 0 is returned. -"; - - -%feature("docstring") getNthReactionMthProductStoichiometries " - Returns the stoichiometries for the Mth product of the Nth reaction - in the module. If no such product or reaction exists, an error is - set and 0 is returned. -"; - - -%feature("docstring") getNumInteractions " - Returns the number of interactions in the named module. Useful when - looping over all interactions in the arrays returned by subsequent - functions. -"; - - -%feature("docstring") getNumInteractors " - Returns the number of interactors (species on the left side of the - interaction) for the given interaction. If no such interaction is - present, '0' is returned and an error is set. Sadly, if there are no - interactors, '0' is also returned, though no error is set. So you'll - have to keep track of this one on your own, most likely. -"; - - -%feature("docstring") getNumInteractees " - Returns the number of interactees (reactions on the right side of the - interaction) for the given interaction. If no such interaction is - present, '0' is returned and an error is set. Sadly, if there are no - interactees, '0' is also returned, though no error is set. So you'll - have to keep track of this one on your own, too. -"; - - -%feature("docstring") getInteractorNames " - Returns all the interactor names for all interactions in the given - module. The dimensions of the included arrays can be found with - 'getNumInteractions' and 'getNumInteractors' (the array is not - 'square'--each sub array may have a different length). -"; - - -%feature("docstring") getNthInteractionInteractorNames " - Returns an array of all the interactor names for the given - interaction. The length of the array can be obtained with - 'getNumInteractors'. If no such interaction is present, None is - returned and an error is set. -"; - - -%feature("docstring") getNthInteractionMthInteractorName " - Returns the Mth interactor names for the given interaction. If no - such interactor or interaction is present, None is returned and an - error is set. -"; - - -%feature("docstring") getInteracteeNames " - Returns all the interactee names for all interactions in the given - module. The dimensions of the included arrays can be found with - 'getNumInteractions' and 'getNumInteractees' (the array is not - 'square'--each sub array may have a different length). -"; - - -%feature("docstring") getNthInteractionInteracteeNames " - Returns an array of all the interactee names for the given - interaction. The length of the array can be obtained with - 'getNumInteractees'. If no such interaction is present, None is - returned and an error is set. -"; - - -%feature("docstring") getNthInteractionMthInteracteeName " - Returns the Mth interactee name for the given interaction. If no - such interactee or interaction is present, None is returned and an - error is set. -"; - - -%feature("docstring") getInteractionDividers " - Returns an array of all the interaction dividers in the given module. - The length of the array can be obtained with 'getNumInteractions'. -"; - - -%feature("docstring") getNthInteractionDivider " - Returns the Nth interaction divider in the module. If no such - interaction is present, 0 is returned, which is 'rdBecomes, which is - an invalid Interaction divider (since it's used for reactions - instead). -"; - - -%feature("docstring") getStoichiometryMatrix " - Returns an N x M stoichiometry matrix where N is the number of - reactions in the model, and M is the number of variable species (or - 'floating species'). -"; - - -%feature("docstring") getStoichiometryMatrixRowLabels " - The row labels for the stoichiometry matrix. Is exactly the same as - calling 'getSymbolNamesOfType(moduleName, varSpecies)', but provided - here so you don't have to think about it. -"; - - -%feature("docstring") getStoichiometryMatrixColumnLabels " - The column labels for the stoichiometry matrix. Is exactly the same - as calling 'getSymbolNamesOfType(moduleName, allReactions)' but - provided here so you don't have to think about it. -"; - - -%feature("docstring") getStoichiometryMatrixNumRows " - The number of rows in the stoichiometry matrix (or, the number of - 'varSpecies'). -"; - - -%feature("docstring") getStoichiometryMatrixNumColumns " - The number of columns in the stoichiometry matrix (or, the number of - 'allReactions'). -"; - - -%feature("docstring") getNumReactionRates " - Returns the number of reactions (and hence reaction rates) in the - module. Useful for looping over all reaction rates in the following - function. -"; - - -%feature("docstring") getReactionRates " - Returns an array of the reaction rates for the given module. Is the - same as 'getSymbolEquationsOfType(moduleName, allReactions)', but is - provided for convenience. -"; - - -%feature("docstring") getNthReactionRate " - Returns the reaction rate for the Nth reaction in the module. If the - reaction exists, but its reaction rate has not been set, returns an - empty string. If the reaction does not exist, an error is set, and - None is returned. -"; - - -%feature("docstring") getNumEvents " - Returns the number of events in the given module. Useful for - subsequent functions that return arrays of information for all - events. -"; - - -%feature("docstring") getEventNames " - Returns the names of the events in the module. Is the same as - 'getSymbolNamesOfType(moduleName, allEvents)', but is provided for - convenience. -"; - - -%feature("docstring") getNthEventName " - Returns the name of the nth event in the module. -"; - - -%feature("docstring") getNumAssignmentsForEvent " - Returns the number of assignments stored in the given event. Useful - when looping through those assignements in functions below. -"; - - -%feature("docstring") getTriggerForEvent " - Returns the trigger for the given event, as an equation that can be - interpreted in a boolean context. -"; - - -%feature("docstring") getDelayForEvent " - Returns the delay for the given event, as an equation (if present; if - the event has no delay, '' is returned. If no such module or event - is present, None is returned and an error is set.). -"; - - -%feature("docstring") getEventHasDelay " - Returns 'true' if the given event has a delay; 'false' otherwise. -"; - - -%feature("docstring") getPriorityForEvent " - Returns the priority for the given event, as an equation (if present; - if the event has no priority, '' is returned. If no such module or - event is present, None is returned and an error is set.). -"; - - -%feature("docstring") getEventHasPriority " - Returns 'true' if the given event has a priority; 'false' otherwise. -"; - - -%feature("docstring") getPersistenceForEvent " - Returns the value of the persistence flag for the given event - (default is 'false'). Unable to return an error if there is no such - event or module, so will simply return 'false' in those situations, - as well. -"; - - -%feature("docstring") getT0ForEvent " - Returns the value at time 0 for the given event trigger (default is - 'true'). Unable to return an error if there is no such event or - module, so will simply return 'true' in those situations, as well. -"; - - -%feature("docstring") getFromTriggerForEvent " - Returns the value of the 'fromTrigger' flag for the given event - trigger (default is 'true'). Unable to return an error if there is - no such event or module, so will simply return 'true' in those - situations, as well. -"; - - -%feature("docstring") getNthAssignmentVariableForEvent " - Each assignment for an event assigns a formula to a variable. This - function returns the variable in question for the given event and - assignment. -"; - - -%feature("docstring") getNthAssignmentEquationForEvent " - Each assignment for an event assigns a formula to a variable. This - function returns the in question in question for the given event and - assignment. -"; - - -%feature("docstring") getNumDNAStrands " - Returns the number of unique DNA strands in the module, as defined in - the Antimony documentation (or, the number of physical cassettes of - DNA present in the module). Useful in looping over the arrays - returned by functions below. -"; - - -%feature("docstring") getDNAStrandSizes " - Returns an array of DNA strand sizes for all strands in the module. - Useful for looping over the arrays returned by 'getDNAStrands' -"; - - -%feature("docstring") getSizeOfNthDNAStrand " - Returns just the size (in number of components) of the nth DNA strand - in the given module. If no such strand exists, sets an error and - returns 0. This is actually useful here, since all DNA strands - otherwise have a size of at least 1. -"; - - -%feature("docstring") getDNAStrands " - Returns an array of all DNA strands in the given module as lists of - their components. All components are either Operator objects or Gene - objects, depending on whether they have an associated reaction. -"; - - -%feature("docstring") getNthDNAStrand " - Returns an array of names of the components in the nth DNA strand in - the given module. If no such strand exists, sets an error and - returns None. -"; - - -%feature("docstring") getIsNthDNAStrandOpen " - Returns whether the given DNA strand was defined to be 'open' (that - is, have an attachable end) at the upstream end (if 'upstream' is - true) or at the downstream end (if 'upstream' is false). This allows - reproduction of a strand defined by '--X--Y--' vs. 'X--Y', etc. -"; - - -%feature("docstring") getNumModularDNAStrands " - Returns the sizes (in number of components) of all modular - (separately-defined) DNA strands. Modular strands may contain genes, - operators, and other DNA strands. Useful for looping over the - strands in the array returned by getModularDNAStrands. -"; - - -%feature("docstring") getModularDNAStrandSizes " - Returns an array of Modular DNA strand sizes for the given module. - Useful for looping over the components in the sub-arrays returned by - getModularDNAStrands. -"; - - -%feature("docstring") getModularDNAStrands " - Returns an array of strands, each of which has an array of the names - of the components of that strand. The components may be operators, - genes, and other modular DNA strands. -"; - - -%feature("docstring") getNthModularDNAStrand " - Returns an array of names of the components in the nth modular DNA - strand in the given module. If no such strand exists, an error is - set, and None is returned. -"; - - -%feature("docstring") getIsNthModularDNAStrandOpen " - Returns whether the given modular DNA strand was defined to be 'open' - (that is, have an attachable end) at the upstream end (if 'upstream' - is true) or at the downstream end (if 'upstream' is false). This - allows reproduction of a strand defined by '--X--Y--' vs. 'X--Y', - etc. -"; - - -%feature("docstring") freeAll " - Frees all pointers handed to you by libAntimony. All libAntimony - functions above that return pointers return malloc'ed pointers that - you now own. If you wish, you can ignore this and never free - anything, as long as you call 'freeAll' at the very end of your - program. If you freeanything yourself, however, calling this - function will cause the program to crash! It won't know that you - already freed that pointer, and will attempt to free it again. So - either keep track of all memory management yourself, or use this - function after you're completely done. - - Note that this function only frees pointers handed to you by other - antimony_api functions. The models themselves are still in memory - and are available. (To clear that memory, use clearPreviousLoads() ) -"; - - -%feature("docstring") OStream " - Wrapper class for the C++ standard streams cout, cerr, and clog. - - A few libSBML methods accept an argument for indicating where to send - text string output. An example is the SBMLDocument.printErrors() - method. However, the methods use C++ style streams and not Java - stream objects. The OStream object exists to bridge the Java and - underlying native implementation. It is a simple wrapper around the - underlying stream object and provides a few basic methods for - manipulating it. -"; - - -%feature("docstring") OFStream " - Wrapper class for the C++ standard file stream ofstream. - - The C++ ofstream ('output file stream') provides an interface for - writing data to files as output streams. This class, OFStream, - wraps the C++ ofstream and provides an OStream interface to it. The - file to be associated with the stream can be specified as a - parameter to the constructors in this class. - - This class may be useful because some libSBML methods accept an - argument for indicating where to send text string output. An - example is the SBMLDocument.printErrors() method. The methods use - C++ style streams and not Java stream objects. The OStream object - exists to bridge the Java and underlying native implementation. It - is a simple wrapper around the underlying stream object and provides - a few basic methods for manipulating it. -"; - - -%feature("docstring") OStringStream " - Wrapper class for the C++ standard stream ostringstream. - - The C++ ostringstream ('output string stream class') provides an - interface to manipulating strings as if they were output streams. - This class class, OStringStream, wraps the ostringstream and - provides an OStream interface to it. - - This class may be useful because some libSBML methods accept an - argument for indicating where to send text string output. An - example is the SBMLDocument.printErrors() method. The methods use - C++ style streams and not Java stream objects. The OStream object - exists to bridge the Java and underlying native implementation. It - is a simple wrapper around the underlying stream object and provides - a few basic methods for manipulating it. -"; - - -%feature("docstring") OStream::OStream " - Creates a new OStream object with one of standard output stream - objects. - - Parameter 'sot' is a value from the StdOSType enumeration(COUT, CERR, - or CLOG) indicating the type of stream to create. -"; - - -%feature("docstring") OStream::get_ostream " - Returns the stream object. - - Returns the stream object -"; - - -%feature("docstring") OStream::endl " - Writes an end-of-line character on this tream. -"; - - -%feature("docstring") OFStream::OFStream " - Creates a new OFStream object for a file. - - This opens the given file 'filename' with the 'is_append' flag - (default is false), and creates an OFStream object instance that - associates the file's content with an OStream object. - - Parameter 'filename' is the name of the file to open Parameter - 'is_append' is whether to open the file for appending (default: - false, meaning overwrite the content instead) -"; - - -%feature("docstring") OFStream::open " - Opens a file and associates this stream object with it. - - This method opens a given file 'filename' with the given 'is_append' - flag (whose default value is false), and associates this stream - object with the file's content. - - Parameter 'filename' is the name of the file to open Parameter - 'is_append' is whether to open the file for appending (default: - false, meaning overwrite the content instead) -"; - - -%feature("docstring") OFStream::close " - Closes the file currently associated with this stream object. -"; - - -%feature("docstring") OFStream::is_open " - Returns true if this stream object is currently associated with a - file. - - Returns true if the stream object is currently associated with a - file, false otherwise -"; - - -%feature("docstring") OStringStream::OStringStream " - Creates a new OStringStream object -"; - - -%feature("docstring") OStringStream::str " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - str() - - Returns the copy of the string object currently assosiated with - this ostringstream buffer. - - Returns a copy of the string object for this stream - - ______________________________________________________________________ - Method variant with the following signature: - - str(string s) - - Sets string 's' to the string object currently assosiated with this - stream buffer. - - Parameter 's' is the string to write to this stream -"; - - +%feature("docstring") loadFile " + Load a file of any format libAntimony knows about (potentially + Antimony, SBML, or CellML). If all attempts fail, the errors from + the attempt to read the file in the Antimony format are saved, so if + the file is actually SBML or CellML, the error is likely to be 'but + contains errors, the reported errors will be from the attempt to read + it as Antimony, and a '-1' is returned. + + NOTE: This function will not attempt to parse the file as SBML if + libAntimony is compiled with the '-NSBML' flag, and will not attempt + to parse the file as CellML if compiled with the '-NCELLML' flag. + + Returns a long integer indicating the index of the file read and + stored. On an error, returns -1 and no information is stored. + + Parameter 'filename' is The filename as a character string. May be + either absolute or relative to the directory the executable is being + run from. + + See also getLastError(). +"; + + +%feature("docstring") loadString " + Load a string of any format libAntimony knows about (potentially + Antimony, SBML, or CellML). The first attempts to read the string as + SBML, and if this results in an error, then reads it as Antimony. If + this, too, results in an error, the second error is saved, and a '-1' + is returned. + + NOTE: This function will not attempt to parse the string as SBML if + libAntimony is compiled with the '-NSBML' flag, and will not attempt + to parse the string as CellML if compiled with the '-NCELLML' flag. + + Returns a long integer indicating the index of the string read and + stored. On an error, returns -1 and no information is stored. + + Parameter 'model' is The model, in (potentially) Antimony, SBML, or + CellML format. + + See also getLastError(). +"; + + +%feature("docstring") loadAntimonyFile " + Loads a file and parses it as an Antimony file. On an error, the + error is saved, -1 is returned, and no information is stored. + + Returns a long integer indicating the index of the file read and + stored. On an error, returns -1 and no information is stored. + + Parameter 'filename' is The filename as a character string. May be + either absolute or relative to the directory the executable is being + run from. + + See also getLastError(). +"; + + +%feature("docstring") loadAntimonyString " + Loads a string and parses it as an Antimony set of modules. On an + error, the error is saved, -1 is returned, and no information is + stored. + + Returns a long integer indicating the index of the string read and + stored. On an error, returns -1 and no information is stored. + + Parameter 'model' is The model in Antimony format. + + See also getLastError(). +"; + + +%feature("docstring") loadSBMLFile " + @brief Load a file known to be SBML. + + Loads a file and parses it (using libSBML) as an SBML file. On an + error, the error is saved, -1 is returned, and no information is + stored. Returns a long integer indicating the index of the file read + and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with + the '-NSBML' flag. + + Parameter 'filename' is The filename as a character string. May be + either absolute or relative to the directory the executable is being + run from. + + See also getLastError(). +"; + + +%feature("docstring") loadSBMLString " + @brief Load a string known to be SBML. + + Loads a string and parses it (using libSBML) as an SBML file. On an + error, the error is saved, -1 is returned, and no information is + stored. Returns a long integer indicating the index of the string + read and stored. On an error, returns -1 and no information is + stored. NOTE: This function is unavailable when libAntimony is + compiled with the '-NSBML' flag. + + Parameter 'model' is The model, in SBML format. + + See also getLastError(). +"; + + +%feature("docstring") loadSBMLStringWithLocation " + @brief Load a string known to be SBML with its file location. + + Loads a string and parses it (using libSBML) as an SBML file. On an + error, the error is saved, -1 is returned, and no information is + stored. This function additionally allows you to set the location of + the string, in case there are relative file references in the file + (as there can be in some hierarchical models). Returns a long + integer indicating the index of the string read and stored. On an + error, returns -1 and no information is stored. NOTE: This function + is unavailable when libAntimony is compiled with the '-NSBML' flag. + + Parameter 'model' is The model, in SBML format. Parameter 'location' + is The location of the file (i.e. 'file1.xml' or + '/home/user/sbml/models/file.xml') + + See also getLastError(). +"; + + +%feature("docstring") loadCellMLFile " + @brief Load a file known to be CellML. + + Loads a file and parses it (using libCellML) as a CellML file. On an + error, the error is saved, -1 is returned, and no information is + stored. Returns a long integer indicating the index of the file read + and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with + the '-NCELLML' flag. + + Parameter 'filename' is The filename as a character string. May be + either absolute or relative to the directory the executable is being + run from. + + See also getLastError(). +"; + + +%feature("docstring") loadCellMLString " + @brief Load a string known to be CellML. + + Loads a string and parses it (using libCellML) as a CellML file. On + an error, the error is saved, -1 is returned, and no information is + stored. Returns a long integer indicating the index of the string + read and stored. On an error, returns -1 and no information is + stored. NOTE: This function is unavailable when libAntimony is + compiled with the '-NCELLML' flag. + + Parameter 'model' is The model, in CellML format. + + See also getLastError(). +"; + + +%feature("docstring") getNumFiles " + @brief Returns the number of files loaded into memory so far. + + Every time 'load' is called successfully, the module(s) + in those files are saved. This function will tell you how many sets + of modules from successful reads are resident in memory. Returns The + number of files currently stored in memory. +"; + + +%feature("docstring") revertTo " + Change the 'active' set of modules to the ones from the given index + (as received from 'load'). Attempting to revert to a + negative or nonexistent index returns 'false' and the previous active + set of modules is retained. A successful change return 'true'. +"; + + +%feature("docstring") clearPreviousLoads " + Clears memory of all files loaded. The next successful call to + 'load' will return 0 as the first valid index. +"; + + +%feature("docstring") addDirectory " + Add a directory in which imported files may be found, and in which to + look for a '.antimony' file (which contains rules about where to look + locally for imported antimony and sbml files). +"; + + +%feature("docstring") clearDirectories " + Clears the list of directories added with the 'addDirectory' + function. +"; + + +%feature("docstring") writeAntimonyFile " + Writes out an antimony-formatted file containing the given module. + If no module name is given, all modules in the current set are + returned. If the module depends on any sub-modules, those modules + are written out as well, also in the antimony format. Returns 0 on + failure (and sets an error), 1 on success. +"; + + +%feature("docstring") getAntimonyString " + Returns the same output as writeAntimonyFile, but to a char array + instead of to a file. Returns None on failure, and sets an error. +"; + + +%feature("docstring") writeSBMLFile " + Writes out a SBML-formatted XML file to the file indicated. The + output is 'flattened', that is, all components of sub-modules are re- + named and placed in a single model. Returns the output of libSBML's + 'writeSBML', which 'Returns non-zero on success and zero if the + filename could not be opened for writing.' An error indicating this + is set on returning zero. NOTE: This function is unavailable when + libAntimony is compiled with the '-NSBML' flag. + +See also getSBMLString. +"; + + +%feature("docstring") getSBMLString " + Returns the same output as writeSBMLFile, but to a char array instead + of to a file. The output is 'flattened', that is, all components of + sub-modules are re-named and placed in a single model. Returns the + output of libSBML's 'writeSBMLToString', which 'Returns the string on + success and None if one of the underlying parser components fail + (rare).' NOTE: This function is unavailable when libAntimony is + compiled with the '-NSBML' flag. + +See also writeSBMLFile. +"; + + +%feature("docstring") writeCompSBMLFile " + Writes out a SBML-formatted XML file to the file indicated, using the + 'Hierarchichal Model Composition' package. This retains Antimony's + modularity in the SBML format. Returns the output of libSBML's + 'writeSBML', which 'Returns non-zero on success and zero if the + filename could not be opened for writing.' An error indicating this + is set on returning zero. NOTE: This function is unavailable when + libAntimony is compiled with the '-NSBML' flag, or if compiled + without the USE_COMP flag. + +See also getSBMLString. +"; + + +%feature("docstring") getCompSBMLString " + Returns the same output as writeSBMLFile, but to a char array instead + of to a file, using the 'Hierarchichal Model Composition' package. + This retains Antimony's modularity in the SBML format. Returns the + output of libSBML's 'writeSBMLToString', which 'Returns the string on + success and None if one of the underlying parser components fail + (rare).' NOTE: This function is unavailable when libAntimony is + compiled with the '-NSBML' flag, or if compiled without the USE_COMP + flag. + +See also writeSBMLFile. +"; + + +%feature("docstring") writeCellMLFile " + Writes out a CellML-formatted XML file to the file indicated, + retaining the same Antimony hierarchy using the CellML 'component' + hieararchy. Returns one on success and zero on failure. NOTE: This + function is unavailable when libAntimony is compiled with the + '-NCELLML' flag. + +See also getCellMLString. +"; + + +%feature("docstring") getCellMLString " + Returns the same output as writeCellMLFile, but to a char array + instead of to a file. Returns the string on success (as translated + to 'char' from CellML's native 'wchar') and None on failure.' NOTE: + This function is unavailable when libAntimony is compiled with the + '-NCELLML' flag. + +See also writeCellMLToString. +"; + + +%feature("docstring") printAllDataFor " + An example function that will print to stdout all the information in + the given module. This function probably isn't as useful to call as + it is to examine and copy for your own purposes: it only calls + functions defined here in antimony_api.h. +"; + + +%feature("docstring") checkModule " + Returns 'true' if the submitted module name exists in the current + active set, 'false' if not. +"; + + +%feature("docstring") getLastError " + When any function returns an error condition, a longer description of + the problem is stored in memory, and is obtainable with this + function. In most cases, this means that a call that returns a + pointer returned 'None' (or 0). +"; + + +%feature("docstring") getWarnings " + When translating some other format to Antimony, elements that are + unable to be translated are saved as warnings, retrievable with this + function (returns None if no warnings present). Warnings may also be + generated by problems discovered in '.antimony' files. +"; + + +%feature("docstring") getSBMLInfoMessages " + Returns the 'info' messages from libSBML. libAntimony always + translates its modules into SBML to check for errors. If SBML finds + errors, libAntimony gives up, passes on the error message, and does + not save the model. However, libSBML may discover other things about + your model it wants to tell you about, in 'info' and 'warning' + messages. Info messages are just things it found it thinks you might + want to know; warning messages are things it found which it feels + violates 'best practices' in biological modelling, but not to the + extent that it feels you did something actually wrong. Since + Antimony is unitless, for example, you will always find warnings + about how you didn't set any units. This function returns the 'info' + messages from libSBML. If there are no info messages, returns an + empty string. NOTE: This function is unavailable when libAntimony + is compiled with the '-NSBML' flag. See also getSBMLWarnings. +"; + + +%feature("docstring") getSBMLWarnings " + Returns the 'warning' messages from libSBML. If there are no warning + messages (an unlikely occurrence), returns an empty string. NOTE: + This function is unavailable when libAntimony is compiled with the + '-NSBML' flag. See also getSBMLInfoMessages. +"; + + +%feature("docstring") getNumModules " + Returns the number of modules in the current active set (the last + file successfully loaded, or whichever file was returned to with + 'revertTo'). +"; + + +%feature("docstring") getModuleNames " + Returns an array of all the current module names. +"; + + +%feature("docstring") getNthModuleName " + Returns the nth module name. Returns None and sets an error if there + is no such module n. +"; + + +%feature("docstring") getMainModuleName " + Returns the 'main' module name. In Antimony, this is either the + module marked by an asterisk ('modelmainModel()') or the last module + defined in the file. In translated SBML models, this is the model + child of thelt;sbmlgt; object. In translated CellML models, this is + the 'containing' model that the translator creates to hold all the + CellML components. Returns None only if there are no modules at all. +"; + + +%feature("docstring") getNumSymbolsInInterfaceOf " + Returns the number of symbols defined to be in the interface of the + given module. In other words, if a module is defined 'module M(x, y, + z)', this returns '3'. (Modules with no interface symbols return + '0'.) +"; + + +%feature("docstring") getSymbolNamesInInterfaceOf " + Returns the names of the symbols defined to be in the interface of + the given module. In other words, if a module is defined 'module + M(x, y, z)', this returns the list 'x, y, z'. A module with no + symbols defined in its interface would return a pointer to an empty + string. +"; + + +%feature("docstring") getNthSymbolNameInInterfaceOf " + Returns the Nth symbol name defined to be in the interface of the + given module. If a module is defined 'module M(x, y, z)', calling + this with n=0 returns 'x'. If no such symbol is found, None is + returned and an error is set. +"; + + +%feature("docstring") getNumReplacedSymbolNames " + Returns the Nth replacement symbol name of a symbol that has replaced + a different symbol in the given module, through the use of an 'is' + construct, or through the use of a module's interface. See also + getNthFormerSymbolName, getNthReplacementSymbolName. +"; + + +%feature("docstring") getAllReplacementSymbolPairs " + Returns a list of pairs of symbol names that have been synchronized + with each other--the first the symbol that was replaced, and the + second the symbol used as the replacement. These replacements are + created when 'is' is used, and when a module's 'interface' (the + symbols listed in parentheses) is used. See also + getNthFormerSymbolName, getNthReplacementSymbolName, + getNthReplacementSymbolPair. +"; + + +%feature("docstring") getNthReplacementSymbolPair " + Returns the Nth pair of symbol names that have been synchronized with + each other--the first the symbol that was replaced, and the second + the symbol used as the replacement. These replacements are created + when 'is' is used, and when a module's 'interface' (the symbols + listed in parentheses) is used. See also getNthFormerSymbolName, + getNthReplacementSymbolName. +"; + + +%feature("docstring") getNthFormerSymbolName " + Returns the Nth symbol name that has been replaced by a new symbol + name in the given module, through the use of an 'is' construct, or + through the use of a module's interface. See also + getNthReplacementSymbolName, GetNumReplacedSymbolNames. +"; + + +%feature("docstring") getNthReplacementSymbolName " + Returns the Nth replacement symbol name of a symbol that has replaced + a different symbol in the given module, through the use of an 'is' + construct, or through the use of a module's interface. See also + getNthFormerSymbolName, GetNumReplacedSymbolNames. +"; + + +%feature("docstring") getNumReplacedSymbolNamesBetween " + Returns the Nth replacement symbol name of a symbol that has replaced + a different symbol in the given module, through the use of an 'is' + construct, or through the use of a module's interface, between the + given submodules, with the variable in the first submodule being the + former variable name, and the variable in the second being the + replacement variable name. If an empty string is used as one of the + submodule names, those synchronized variables that are not part of + any submodule are searched for. See also getNthFormerSymbolName, + getNthReplacementSymbolName. +"; + + +%feature("docstring") getAllReplacementSymbolPairsBetween " + Returns a list of pairs of symbol names that have been synchronized + with each other--the first the symbol that was replaced, and the + second the symbol used as the replacement, between the given + submodules, with the variable in the first submodule being the former + variable name, and the variable in the second being the replacement + variable name. These replacements are created when 'is' is used, and + when a module's 'interface' (the symbols listed in parentheses) is + used. See also getNthFormerSymbolName, getNthReplacementSymbolName, + getNthReplacementSymbolPair. +"; + + +%feature("docstring") getNthReplacementSymbolPairBetween " + Returns the Nth pair of symbol names that have been synchronized with + each other--the first the symbol that was replaced, and the second + the symbol used as the replacement, between the given submodules, + with the variable in the first submodule being the former variable + name, and the variable in the second being the replacement variable + name. These replacements are created when 'is' is used, and when a + module's 'interface' (the symbols listed in parentheses) is used. + See also getNthFormerSymbolName, getNthReplacementSymbolName. +"; + + +%feature("docstring") getNthFormerSymbolNameBetween " + Returns the Nth symbol name that has been replaced by a new symbol + name in the given module, through the use of an 'is' construct, or + through the use of a module's interface, between the given + submodules, with the variable in the first submodule being the former + variable name, and the variable in the second being the replacement + variable name. See also getNthReplacementSymbolName, + GetNumReplacedSymbolNames. +"; + + +%feature("docstring") getNthReplacementSymbolNameBetween " + Returns the Nth replacement symbol name of a symbol that has replaced + a different symbol in the given module, through the use of an 'is' + construct, or through the use of a module's interface, between the + given submodules, with the variable in the first submodule being the + former variable name, and the variable in the second being the + replacement variable name. See also getNthFormerSymbolName, + GetNumReplacedSymbolNames. +"; + + +%feature("docstring") getNumSymbolsOfType " + Returns the number of symbols of the given return type. Useful when + looping over the arrays in the subsequent functions. See also get(). +"; + + +%feature("docstring") getSymbolNamesOfType " + Returns the names of the symbols of the given return type. (In SBML, + these are the 'id's.) +"; + + +%feature("docstring") getSymbolDisplayNamesOfType " + Returns the 'display names' of the symbols of the given return type. + (In SBML, these are the 'name's.) +"; + + +%feature("docstring") getSymbolEquationsOfType " + Returns the equations associated with the symbols of the given return + type. - Species: The initial assignment or + assignment rule for the species in question - Formulas and + operators: The initial assignment or assignment rule for the formula + in question - Compartments: The initial assignment or + assignment rule for the compartment in question - DNA elements: + The assignment rule or reaction rate of the element in question (no + DNA element is defined by an initial assignment or by a rate rule + with an initial assignment) - DNA Strands: The + assignment rule or reaction rate for the last element of the strand + - Reactions and genes: The reaction rate - Events: + The trigger condition - Interactions: Nothing - Modules: + Nothing + + For elements that could have either initial assignments or assignment + rules, use getTypeOfEquationForSymbol, or just use + getSymbolInitialAssignmentsOfType and getSymbolAssignmentRulesOfType + explicitly. +"; + + +%feature("docstring") getSymbolInitialAssignmentsOfType " + Returns the equations associated with the initial assignment for + symbols of the given return type. - Species: The + initial assignment for the species in question - Formulas and + operators: The initial assignment of the formula in question - + Compartments: The initial assignment for the compartment + + - DNA Strands: Nothing - Reactions and genes: + Nothing - Events: Nothing - Interactions: + Nothing - Modules: Nothing +"; + + +%feature("docstring") getSymbolAssignmentRulesOfType " + Returns the equations associated with the assignment rule for symbols + of the given return type. - Species: The assignment + rule for the species in question - Formulas and operators: The + assignment rule of the formula in question - Compartments: + The assignment rule for the compartment - DNA Strands: + The assignment rule or reaction rate at the end of the strand. - + Reactions and genes: The reaction rate (for consistency with DNA + strands) + + - Events: Nothing - Interactions: + Nothing - Modules: Nothing +"; + + +%feature("docstring") getSymbolRateRulesOfType " + Returns the equations associated with the rate rule for symbols of + the given return type. - Species: The rate rule for + the species in question - Formulas and operators: The rate rule of + the formula in question - Compartments: The rate rule for + the compartment - DNA Strands: The rate rule or reaction + rate at the end of the strand. - Reactions and genes: Nothing - + Events: Nothing - Interactions: Nothing + - Modules: Nothing +"; + + +%feature("docstring") getSymbolCompartmentsOfType " + Returns the compartments associated with the symbols of the given + return type. Note that unlike in SBML, any symbol of any type may + have an associated compartment, including compartments themselves. + Rules about compartments in Antimony can be found in the Tutorial.pdf + document included with this documentation. +"; + + +%feature("docstring") getNthSymbolNameOfType " + Returns the name of the Nth symbol of the given type. If no such + symbol exists, None is returned and an error is set. (In SBML, this + is the 'id' of the element.) +"; + + +%feature("docstring") getNthSymbolDisplayNameOfType " + Returns the 'display name' of the Nth symbol of the given type. If + no such symbol exists, None is returned and an error is set. (In + SBML, this is the 'name' of the element.) +"; + + +%feature("docstring") getNthSymbolEquationOfType " + Returns the equation associated with the Nth symbol of the given + type. If no equation is set for the symbol in question, an empty + string is returned. If no symbol can be found, None is returned and + an error is set. +"; + + +%feature("docstring") getNthSymbolInitialAssignmentOfType " + Returns the initial assignment associated with the Nth symbol of the + given type. If no initial assignment is set for the symbol in + question, an empty string is returned. If no symbol can be found, + None is returned and an error is set. +"; + + +%feature("docstring") getNthSymbolAssignmentRuleOfType " + Returns the assignment rule associated with the Nth symbol of the + given type. If no assignment rule is set for the symbol in question, + an empty string is returned. If no symbol can be found, None is + returned and an error is set. +"; + + +%feature("docstring") getNthSymbolRateRuleOfType " + Returns the rate rule associated with the Nth symbol of the given + type. If no rate rule is set for the symbol in question, an empty + string is returned. If no symbol can be found, None is returned and + an error is set. +"; + + +%feature("docstring") getNthSymbolCompartmentOfType " + Returns the name of the compartment associated with the nth symbol of + the given type. If no compartment is explicitly set in the file, the + string 'default_compartment' is returned. If no symbol can be found, + None is returned and an error is set. +"; + + +%feature("docstring") getTypeOfSymbol " + Returns the most specific return type available for the given + symbolName. A symbol defined to be a gene, for example, will return + 'allGenes' and not 'allReactions', though the symbol does indeed + qualify as a reaction. +"; + + +%feature("docstring") getTypeOfEquationForSymbol " + Returns the type of the 'main' equation associated with the given + symbolName. All reactions will return 'formulaKINETIC', and all + events will return 'formulaTRIGGER'. All DNA elements that are not + genes will return 'formulaASSIGNMENT', as DNA elements are defined by + assignment rules and kinetic laws. All other symbols will return + 'formulaINITIAL' by default (i.e. in the case where no equation at + all is associated with the symbol in question), and otherwise will + return formulaINITIAL for symbols defined by initial assignments + only, formulaASSIGNMENT for symbols defined by assignment rules, and + formulaRATE for symbols defined by both initial assignments and rate + rules (or just rate rules; it is valid though not simulatable to have + a symbol with a rate rule but no initial assignment). In the case of + rate rules, the initial assignment is found in the 'Equation' + associated with the symbol, and the rate rule is found in the + 'RateRule' associated with the symbol. +"; + + +%feature("docstring") getCompartmentForSymbol " + Returns the name of the compartment the given symbol is a member of. + In antimony, all symbols may have compartments, not just species. If + a symbol has no set compartment, and is not a member of a symbol with + a set compartment, this will return 'default_compartment' +"; + + +%feature("docstring") getNumReactions " + Returns the number of reactions (including genes) in the named + module. Useful when looping over all reactions in the arrays + returned by subsequent functions. +"; + + +%feature("docstring") getNumReactants " + Returns the number of reactants (species on the left side of the + reaction) for the given reaction. If no such reaction is present, + '0' is returned and an error is set. Sadly, if there are no + reactants, '0' is also returned, though no error is set. So you'll + have to keep track of this one on your own, most likely. +"; + + +%feature("docstring") getNumProducts " + Returns the number of products (species on the right side of the + reaction) for the given reaction. If no such reaction is present, + '0' is returned and an error is set. Sadly, if there are no + products, '0' is also returned, though no error is set. So you'll + have to keep track of this one on your own, too. +"; + + +%feature("docstring") getReactantNames " + Returns all the reactant names for all reactions in the given module. + The dimensions of the included arrays can be found with + 'getNumReactions' and 'getNumReactants' (the array is not 'square'-- + each sub array may have a different length). +"; + + +%feature("docstring") getNthReactionReactantNames " + Returns an array of all the reactant names for the given reaction. + The length of the array can be obtained with 'getNumReactants'. If + no such reaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getNthReactionMthReactantName " + Returns the mth reactant name of the mth reaction. If no such + reaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getProductNames " + Returns all the product names for all reactions in the given module. + The dimensions of the included arrays can be found with + 'getNumReactions' and 'getNumProducts' (the array is not 'square'-- + each sub array may have a different length). +"; + + +%feature("docstring") getNthReactionProductNames " + Returns an array of all the product names for the given reaction. + The length of the array can be obtained with 'getNumProducts'. If no + such reaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getNthReactionMthProductName " + Returns the mth product name of the given reaction. If no such + reaction or product is present, None is returned and an error is set. +"; + + +%feature("docstring") getReactantStoichiometries " + Returns a two-dimensional array of the stoichiometries for all + reactants in all reactions in the given module. +"; + + +%feature("docstring") getProductStoichiometries " + Returns a two-dimensional array of the stoichiometries for all + products in all reactions in the given module. +"; + + +%feature("docstring") getNthReactionReactantStoichiometries " + Returns an array of the stoichiometries for the reactants of the Nth + reaction in the module. If no such reaction exists, an error is set + and None is returned. +"; + + +%feature("docstring") getNthReactionProductStoichiometries " + Returns an array of the stoichiometries for the products of the Nth + reaction in the module. If no such reaction exists, an error is set + and None is returned. +"; + + +%feature("docstring") getNthReactionMthReactantStoichiometries " + Returns the stoichiometry for the Mth reactant of the Nth reaction in + the module. If no such reactant or reaction exists, an error is set + and 0 is returned. +"; + + +%feature("docstring") getNthReactionMthProductStoichiometries " + Returns the stoichiometries for the Mth product of the Nth reaction + in the module. If no such product or reaction exists, an error is + set and 0 is returned. +"; + + +%feature("docstring") getNumInteractions " + Returns the number of interactions in the named module. Useful when + looping over all interactions in the arrays returned by subsequent + functions. +"; + + +%feature("docstring") getNumInteractors " + Returns the number of interactors (species on the left side of the + interaction) for the given interaction. If no such interaction is + present, '0' is returned and an error is set. Sadly, if there are no + interactors, '0' is also returned, though no error is set. So you'll + have to keep track of this one on your own, most likely. +"; + + +%feature("docstring") getNumInteractees " + Returns the number of interactees (reactions on the right side of the + interaction) for the given interaction. If no such interaction is + present, '0' is returned and an error is set. Sadly, if there are no + interactees, '0' is also returned, though no error is set. So you'll + have to keep track of this one on your own, too. +"; + + +%feature("docstring") getInteractorNames " + Returns all the interactor names for all interactions in the given + module. The dimensions of the included arrays can be found with + 'getNumInteractions' and 'getNumInteractors' (the array is not + 'square'--each sub array may have a different length). +"; + + +%feature("docstring") getNthInteractionInteractorNames " + Returns an array of all the interactor names for the given + interaction. The length of the array can be obtained with + 'getNumInteractors'. If no such interaction is present, None is + returned and an error is set. +"; + + +%feature("docstring") getNthInteractionMthInteractorName " + Returns the Mth interactor names for the given interaction. If no + such interactor or interaction is present, None is returned and an + error is set. +"; + + +%feature("docstring") getInteracteeNames " + Returns all the interactee names for all interactions in the given + module. The dimensions of the included arrays can be found with + 'getNumInteractions' and 'getNumInteractees' (the array is not + 'square'--each sub array may have a different length). +"; + + +%feature("docstring") getNthInteractionInteracteeNames " + Returns an array of all the interactee names for the given + interaction. The length of the array can be obtained with + 'getNumInteractees'. If no such interaction is present, None is + returned and an error is set. +"; + + +%feature("docstring") getNthInteractionMthInteracteeName " + Returns the Mth interactee name for the given interaction. If no + such interactee or interaction is present, None is returned and an + error is set. +"; + + +%feature("docstring") getInteractionDividers " + Returns an array of all the interaction dividers in the given module. + The length of the array can be obtained with 'getNumInteractions'. +"; + + +%feature("docstring") getNthInteractionDivider " + Returns the Nth interaction divider in the module. If no such + interaction is present, 0 is returned, which is 'rdBecomes, which is + an invalid Interaction divider (since it's used for reactions + instead). +"; + + +%feature("docstring") getStoichiometryMatrix " + Returns an N x M stoichiometry matrix where N is the number of + reactions in the model, and M is the number of variable species (or + 'floating species'). +"; + + +%feature("docstring") getStoichiometryMatrixRowLabels " + The row labels for the stoichiometry matrix. Is exactly the same as + calling 'getSymbolNamesOfType(moduleName, varSpecies)', but provided + here so you don't have to think about it. +"; + + +%feature("docstring") getStoichiometryMatrixColumnLabels " + The column labels for the stoichiometry matrix. Is exactly the same + as calling 'getSymbolNamesOfType(moduleName, allReactions)' but + provided here so you don't have to think about it. +"; + + +%feature("docstring") getStoichiometryMatrixNumRows " + The number of rows in the stoichiometry matrix (or, the number of + 'varSpecies'). +"; + + +%feature("docstring") getStoichiometryMatrixNumColumns " + The number of columns in the stoichiometry matrix (or, the number of + 'allReactions'). +"; + + +%feature("docstring") getNumReactionRates " + Returns the number of reactions (and hence reaction rates) in the + module. Useful for looping over all reaction rates in the following + function. +"; + + +%feature("docstring") getReactionRates " + Returns an array of the reaction rates for the given module. Is the + same as 'getSymbolEquationsOfType(moduleName, allReactions)', but is + provided for convenience. +"; + + +%feature("docstring") getNthReactionRate " + Returns the reaction rate for the Nth reaction in the module. If the + reaction exists, but its reaction rate has not been set, returns an + empty string. If the reaction does not exist, an error is set, and + None is returned. +"; + + +%feature("docstring") getNumEvents " + Returns the number of events in the given module. Useful for + subsequent functions that return arrays of information for all + events. +"; + + +%feature("docstring") getEventNames " + Returns the names of the events in the module. Is the same as + 'getSymbolNamesOfType(moduleName, allEvents)', but is provided for + convenience. +"; + + +%feature("docstring") getNthEventName " + Returns the name of the nth event in the module. +"; + + +%feature("docstring") getNumAssignmentsForEvent " + Returns the number of assignments stored in the given event. Useful + when looping through those assignements in functions below. +"; + + +%feature("docstring") getTriggerForEvent " + Returns the trigger for the given event, as an equation that can be + interpreted in a boolean context. +"; + + +%feature("docstring") getDelayForEvent " + Returns the delay for the given event, as an equation (if present; if + the event has no delay, '' is returned. If no such module or event + is present, None is returned and an error is set.). +"; + + +%feature("docstring") getEventHasDelay " + Returns 'true' if the given event has a delay; 'false' otherwise. +"; + + +%feature("docstring") getPriorityForEvent " + Returns the priority for the given event, as an equation (if present; + if the event has no priority, '' is returned. If no such module or + event is present, None is returned and an error is set.). +"; + + +%feature("docstring") getEventHasPriority " + Returns 'true' if the given event has a priority; 'false' otherwise. +"; + + +%feature("docstring") getPersistenceForEvent " + Returns the value of the persistence flag for the given event + (default is 'false'). Unable to return an error if there is no such + event or module, so will simply return 'false' in those situations, + as well. +"; + + +%feature("docstring") getT0ForEvent " + Returns the value at time 0 for the given event trigger (default is + 'true'). Unable to return an error if there is no such event or + module, so will simply return 'true' in those situations, as well. +"; + + +%feature("docstring") getFromTriggerForEvent " + Returns the value of the 'fromTrigger' flag for the given event + trigger (default is 'true'). Unable to return an error if there is + no such event or module, so will simply return 'true' in those + situations, as well. +"; + + +%feature("docstring") getNthAssignmentVariableForEvent " + Each assignment for an event assigns a formula to a variable. This + function returns the variable in question for the given event and + assignment. +"; + + +%feature("docstring") getNthAssignmentEquationForEvent " + Each assignment for an event assigns a formula to a variable. This + function returns the in question in question for the given event and + assignment. +"; + + +%feature("docstring") getNumDNAStrands " + Returns the number of unique DNA strands in the module, as defined in + the Antimony documentation (or, the number of physical cassettes of + DNA present in the module). Useful in looping over the arrays + returned by functions below. +"; + + +%feature("docstring") getDNAStrandSizes " + Returns an array of DNA strand sizes for all strands in the module. + Useful for looping over the arrays returned by 'getDNAStrands' +"; + + +%feature("docstring") getSizeOfNthDNAStrand " + Returns just the size (in number of components) of the nth DNA strand + in the given module. If no such strand exists, sets an error and + returns 0. This is actually useful here, since all DNA strands + otherwise have a size of at least 1. +"; + + +%feature("docstring") getDNAStrands " + Returns an array of all DNA strands in the given module as lists of + their components. All components are either Operator objects or Gene + objects, depending on whether they have an associated reaction. +"; + + +%feature("docstring") getNthDNAStrand " + Returns an array of names of the components in the nth DNA strand in + the given module. If no such strand exists, sets an error and + returns None. +"; + + +%feature("docstring") getIsNthDNAStrandOpen " + Returns whether the given DNA strand was defined to be 'open' (that + is, have an attachable end) at the upstream end (if 'upstream' is + true) or at the downstream end (if 'upstream' is false). This allows + reproduction of a strand defined by '--X--Y--' vs. 'X--Y', etc. +"; + + +%feature("docstring") getNumModularDNAStrands " + Returns the sizes (in number of components) of all modular + (separately-defined) DNA strands. Modular strands may contain genes, + operators, and other DNA strands. Useful for looping over the + strands in the array returned by getModularDNAStrands. +"; + + +%feature("docstring") getModularDNAStrandSizes " + Returns an array of Modular DNA strand sizes for the given module. + Useful for looping over the components in the sub-arrays returned by + getModularDNAStrands. +"; + + +%feature("docstring") getModularDNAStrands " + Returns an array of strands, each of which has an array of the names + of the components of that strand. The components may be operators, + genes, and other modular DNA strands. +"; + + +%feature("docstring") getNthModularDNAStrand " + Returns an array of names of the components in the nth modular DNA + strand in the given module. If no such strand exists, an error is + set, and None is returned. +"; + + +%feature("docstring") getIsNthModularDNAStrandOpen " + Returns whether the given modular DNA strand was defined to be 'open' + (that is, have an attachable end) at the upstream end (if 'upstream' + is true) or at the downstream end (if 'upstream' is false). This + allows reproduction of a strand defined by '--X--Y--' vs. 'X--Y', + etc. +"; + + +%feature("docstring") freeAll " + Frees all pointers handed to you by libAntimony. All libAntimony + functions above that return pointers return malloc'ed pointers that + you now own. If you wish, you can ignore this and never free + anything, as long as you call 'freeAll' at the very end of your + program. If you freeanything yourself, however, calling this + function will cause the program to crash! It won't know that you + already freed that pointer, and will attempt to free it again. So + either keep track of all memory management yourself, or use this + function after you're completely done. + + Note that this function only frees pointers handed to you by other + antimony_api functions. The models themselves are still in memory + and are available. (To clear that memory, use clearPreviousLoads() ) +"; + + +%feature("docstring") OStream " + Wrapper class for the C++ standard streams cout, cerr, and clog. + + A few libSBML methods accept an argument for indicating where to send + text string output. An example is the SBMLDocument.printErrors() + method. However, the methods use C++ style streams and not Java + stream objects. The OStream object exists to bridge the Java and + underlying native implementation. It is a simple wrapper around the + underlying stream object and provides a few basic methods for + manipulating it. +"; + + +%feature("docstring") OFStream " + Wrapper class for the C++ standard file stream ofstream. + + The C++ ofstream ('output file stream') provides an interface for + writing data to files as output streams. This class, OFStream, + wraps the C++ ofstream and provides an OStream interface to it. The + file to be associated with the stream can be specified as a + parameter to the constructors in this class. + + This class may be useful because some libSBML methods accept an + argument for indicating where to send text string output. An + example is the SBMLDocument.printErrors() method. The methods use + C++ style streams and not Java stream objects. The OStream object + exists to bridge the Java and underlying native implementation. It + is a simple wrapper around the underlying stream object and provides + a few basic methods for manipulating it. +"; + + +%feature("docstring") OStringStream " + Wrapper class for the C++ standard stream ostringstream. + + The C++ ostringstream ('output string stream class') provides an + interface to manipulating strings as if they were output streams. + This class class, OStringStream, wraps the ostringstream and + provides an OStream interface to it. + + This class may be useful because some libSBML methods accept an + argument for indicating where to send text string output. An + example is the SBMLDocument.printErrors() method. The methods use + C++ style streams and not Java stream objects. The OStream object + exists to bridge the Java and underlying native implementation. It + is a simple wrapper around the underlying stream object and provides + a few basic methods for manipulating it. +"; + + +%feature("docstring") OStream::OStream " + Creates a new OStream object with one of standard output stream + objects. + + Parameter 'sot' is a value from the StdOSType enumeration(COUT, CERR, + or CLOG) indicating the type of stream to create. +"; + + +%feature("docstring") OStream::get_ostream " + Returns the stream object. + + Returns the stream object +"; + + +%feature("docstring") OStream::endl " + Writes an end-of-line character on this tream. +"; + + +%feature("docstring") OFStream::OFStream " + Creates a new OFStream object for a file. + + This opens the given file 'filename' with the 'is_append' flag + (default is false), and creates an OFStream object instance that + associates the file's content with an OStream object. + + Parameter 'filename' is the name of the file to open Parameter + 'is_append' is whether to open the file for appending (default: + false, meaning overwrite the content instead) +"; + + +%feature("docstring") OFStream::open " + Opens a file and associates this stream object with it. + + This method opens a given file 'filename' with the given 'is_append' + flag (whose default value is false), and associates this stream + object with the file's content. + + Parameter 'filename' is the name of the file to open Parameter + 'is_append' is whether to open the file for appending (default: + false, meaning overwrite the content instead) +"; + + +%feature("docstring") OFStream::close " + Closes the file currently associated with this stream object. +"; + + +%feature("docstring") OFStream::is_open " + Returns true if this stream object is currently associated with a + file. + + Returns true if the stream object is currently associated with a + file, false otherwise +"; + + +%feature("docstring") OStringStream::OStringStream " + Creates a new OStringStream object +"; + + +%feature("docstring") OStringStream::str " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + str() + + Returns the copy of the string object currently assosiated with + this ostringstream buffer. + + Returns a copy of the string object for this stream + + ______________________________________________________________________ + Method variant with the following signature: + + str(string s) + + Sets string 's' to the string object currently assosiated with this + stream buffer. + + Parameter 's' is the string to write to this stream +"; + + diff --git a/bindings/python/doc-converter/pydoc-doxygen.i b/bindings/python/doc-converter/pydoc-doxygen.i index 4dd97f2..9673040 100644 --- a/bindings/python/doc-converter/pydoc-doxygen.i +++ b/bindings/python/doc-converter/pydoc-doxygen.i @@ -1,916 +1,916 @@ -%feature("docstring") loadFile " - Load a file of any format libAntimony knows about (potentially Antimony, SBML, or CellML). If all attempts fail, the errors from the attempt to read the file in the Antimony format are saved, so if the file is actually SBML or CellML, the error is likely to be \'but contains errors, the reported errors will be from the attempt to read it as Antimony, and a \'-1\' is returned. - - NOTE: This function will not attempt to parse the file as SBML if libAntimony is compiled with the \'-NSBML\' flag, and will not attempt to parse the file as CellML if compiled with the \'-NCELLML\' flag. - - @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. - - @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. - - @see getLastError() -"; - - -%feature("docstring") loadString " - Load a string of any format libAntimony knows about (potentially Antimony, SBML, or CellML). The first attempts to read the string as SBML, and if this results in an error, then reads it as Antimony. If this, too, results in an error, the second error is saved, and a \'-1\' is returned. - - NOTE: This function will not attempt to parse the string as SBML if libAntimony is compiled with the \'-NSBML\' flag, and will not attempt to parse the string as CellML if compiled with the \'-NCELLML\' flag. - - @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. - - @param model The model, in (potentially) Antimony, SBML, or CellML format. - - @see getLastError() -"; - - -%feature("docstring") loadAntimonyFile " - Loads a file and parses it as an Antimony file. On an error, the error is saved, -1 is returned, and no information is stored. - - @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. - - @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. - - @see getLastError() -"; - - -%feature("docstring") loadAntimonyString " - Loads a string and parses it as an Antimony set of modules. On an error, the error is saved, -1 is returned, and no information is stored. - - @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. - - @param model The model in Antimony format. - - @see getLastError() -"; - - -%feature("docstring") loadSBMLFile " - @brief Load a file known to be SBML. - - Loads a file and parses it (using libSBML) as an SBML file. On an error, the error is saved, -1 is returned, and no information is stored. - @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - - @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. - - @see getLastError() -"; - - -%feature("docstring") loadSBMLString " - @brief Load a string known to be SBML. - - Loads a string and parses it (using libSBML) as an SBML file. On an error, the error is saved, -1 is returned, and no information is stored. - @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - - @param model The model, in SBML format. - - @see getLastError() -"; - - -%feature("docstring") loadSBMLStringWithLocation " - @brief Load a string known to be SBML with its file location. - - Loads a string and parses it (using libSBML) as an SBML file. On an error, the error is saved, -1 is returned, and no information is stored. This function additionally allows you to set the location of the string, in case there are relative file references in the file (as there can be in some hierarchical models). - @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - - @param model The model, in SBML format. - @param location The location of the file (i.e. \'file1.xml\' or \'/home/user/sbml/models/file.xml\') - - @see getLastError() -"; - - -%feature("docstring") loadCellMLFile " - @brief Load a file known to be CellML. - - Loads a file and parses it (using libCellML) as a CellML file. On an error, the error is saved, -1 is returned, and no information is stored. - @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. - - @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. - - @see getLastError() -"; - - -%feature("docstring") loadCellMLString " - @brief Load a string known to be CellML. - - Loads a string and parses it (using libCellML) as a CellML file. On an error, the error is saved, -1 is returned, and no information is stored. - @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. - - @param model The model, in CellML format. - - @see getLastError() -"; - - -%feature("docstring") getNumFiles " - @brief Returns the number of files loaded into memory so far. - - Every time \'load\' is called successfully, the module(s) in those files are saved. This function will tell you how many sets of modules from successful reads are resident in memory. - @return The number of files currently stored in memory. -"; - - -%feature("docstring") revertTo " - Change the \'active\' set of modules to the ones from the given index (as received from \'load\'). Attempting to revert to a negative or nonexistent index returns \'false\' and the previous active set of modules is retained. A successful change return \'true\'. -"; - - -%feature("docstring") clearPreviousLoads " - Clears memory of all files loaded. The next successful call to \'load\' will return 0 as the first valid index. -"; - - -%feature("docstring") addDirectory " - Add a directory in which imported files may be found, and in which to look for a \'.antimony\' file (which contains rules about where to look locally for imported antimony and sbml files). -"; - - -%feature("docstring") clearDirectories " - Clears the list of directories added with the \'addDirectory\' function. -"; - - -%feature("docstring") writeAntimonyFile " - Writes out an antimony-formatted file containing the given module. If no module name is given, all modules in the current set are returned. If the module depends on any sub-modules, those modules are written out as well, also in the antimony format. Returns 0 on failure (and sets an error), 1 on success. -"; - - -%feature("docstring") getAntimonyString " - Returns the same output as writeAntimonyFile, but to a char array instead of to a file. Returns None on failure, and sets an error. -"; - - -%feature("docstring") writeSBMLFile " - Writes out a SBML-formatted XML file to the file indicated. The output is \'flattened\', that is, all components of sub-modules are re-named and placed in a single model. Returns the output of libSBML\'s \'writeSBML\', which \'Returns non-zero on success and zero if the filename could not be opened for writing.\' An error indicating this is set on returning zero. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - -@see getSBMLString -"; - - -%feature("docstring") getSBMLString " - Returns the same output as writeSBMLFile, but to a char array instead of to a file. The output is \'flattened\', that is, all components of sub-modules are re-named and placed in a single model. Returns the output of libSBML\'s \'writeSBMLToString\', which \'Returns the string on success and None if one of the underlying parser components fail (rare).\' - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - -@see writeSBMLFile -"; - - -%feature("docstring") writeCompSBMLFile " - Writes out a SBML-formatted XML file to the file indicated, using the \'Hierarchichal Model Composition\' package. This retains Antimony\'s modularity in the SBML format. Returns the output of libSBML\'s \'writeSBML\', which \'Returns non-zero on success and zero if the filename could not be opened for writing.\' An error indicating this is set on returning zero. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag, or if compiled without the USE_COMP flag. - -@see getSBMLString -"; - - -%feature("docstring") getCompSBMLString " - Returns the same output as writeSBMLFile, but to a char array instead of to a file, using the \'Hierarchichal Model Composition\' package. This retains Antimony\'s modularity in the SBML format. Returns the output of libSBML\'s \'writeSBMLToString\', which \'Returns the string on success and None if one of the underlying parser components fail (rare).\' - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag, or if compiled without the USE_COMP flag. - -@see writeSBMLFile -"; - - -%feature("docstring") writeCellMLFile " - Writes out a CellML-formatted XML file to the file indicated, retaining the same Antimony hierarchy using the CellML \'component\' hieararchy. Returns one on success and zero on failure. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. - -@see getCellMLString -"; - - -%feature("docstring") getCellMLString " - Returns the same output as writeCellMLFile, but to a char array instead of to a file. Returns the string on success (as translated to \'char\' from CellML\'s native \'wchar\') and None on failure.\' - NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. - -@see writeCellMLToString -"; - - -%feature("docstring") printAllDataFor " - An example function that will print to stdout all the information in the given module. This function probably isn\'t as useful to call as it is to examine and copy for your own purposes: it only calls functions defined here in antimony_api.h. -"; - - -%feature("docstring") checkModule " - Returns \'true\' if the submitted module name exists in the current active set, \'false\' if not. -"; - - -%feature("docstring") getLastError " - When any function returns an error condition, a longer description of the problem is stored in memory, and is obtainable with this function. In most cases, this means that a call that returns a pointer returned \'None\' (or 0). -"; - - -%feature("docstring") getWarnings " - When translating some other format to Antimony, elements that are unable to be translated are saved as warnings, retrievable with this function (returns None if no warnings present). Warnings may also be generated by problems discovered in \'.antimony\' files. -"; - - -%feature("docstring") getSBMLInfoMessages " - Returns the \'info\' messages from libSBML. libAntimony always translates its modules into SBML to check for errors. If SBML finds errors, libAntimony gives up, passes on the error message, and does not save the model. However, libSBML may discover other things about your model it wants to tell you about, in \'info\' and \'warning\' messages. Info messages are just things it found it thinks you might want to know; warning messages are things it found which it feels violates \'best practices\' in biological modelling, but not to the extent that it feels you did something actually wrong. Since Antimony is unitless, for example, you will always find warnings about how you didn\'t set any units. This function returns the \'info\' messages from libSBML. If there are no info messages, returns an empty string. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - @see getSBMLWarnings -"; - - -%feature("docstring") getSBMLWarnings " - Returns the \'warning\' messages from libSBML. If there are no warning messages (an unlikely occurrence), returns an empty string. - NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. - @see getSBMLInfoMessages -"; - - -%feature("docstring") getNumModules " - Returns the number of modules in the current active set (the last file successfully loaded, or whichever file was returned to with \'revertTo\'). -"; - - -%feature("docstring") getModuleNames " - Returns an array of all the current module names. -"; - - -%feature("docstring") getNthModuleName " - Returns the nth module name. Returns None and sets an error if there is no such module n. -"; - - -%feature("docstring") getMainModuleName " - Returns the \'main\' module name. In Antimony, this is either the module marked by an asterisk (\'modelmainModel()\') or the last module defined in the file. In translated SBML models, this is the model child of thelt;sbmlgt; object. In translated CellML models, this is the \'containing\' model that the translator creates to hold all the CellML components. Returns None only if there are no modules at all. -"; - - -%feature("docstring") getNumSymbolsInInterfaceOf " - Returns the number of symbols defined to be in the interface of the given module. In other words, if a module is defined \'module M(x, y, z)\', this returns \'3\'. (Modules with no interface symbols return \'0\'.) -"; - - -%feature("docstring") getSymbolNamesInInterfaceOf " - Returns the names of the symbols defined to be in the interface of the given module. In other words, if a module is defined \'module M(x, y, z)\', this returns the list \'x, y, z\'. A module with no symbols defined in its interface would return a pointer to an empty string. -"; - - -%feature("docstring") getNthSymbolNameInInterfaceOf " - Returns the Nth symbol name defined to be in the interface of the given module. If a module is defined \'module M(x, y, z)\', calling this with n=0 returns \'x\'. If no such symbol is found, None is returned and an error is set. -"; - - -%feature("docstring") getNumReplacedSymbolNames " - Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface. - @see getNthFormerSymbolName - @see getNthReplacementSymbolName -"; - - -%feature("docstring") getAllReplacementSymbolPairs " - Returns a list of pairs of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. - @see getNthFormerSymbolName - @see getNthReplacementSymbolName - @see getNthReplacementSymbolPair -"; - - -%feature("docstring") getNthReplacementSymbolPair " - Returns the Nth pair of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. - @see getNthFormerSymbolName - @see getNthReplacementSymbolName -"; - - -%feature("docstring") getNthFormerSymbolName " - Returns the Nth symbol name that has been replaced by a new symbol name in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface. - @see getNthReplacementSymbolName - @see GetNumReplacedSymbolNames -"; - - -%feature("docstring") getNthReplacementSymbolName " - Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface. - @see getNthFormerSymbolName - @see GetNumReplacedSymbolNames -"; - - -%feature("docstring") getNumReplacedSymbolNamesBetween " - Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. If an empty string is used as one of the submodule names, those synchronized variables that are not part of any submodule are searched for. - @see getNthFormerSymbolName - @see getNthReplacementSymbolName -"; - - -%feature("docstring") getAllReplacementSymbolPairsBetween " - Returns a list of pairs of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. - @see getNthFormerSymbolName - @see getNthReplacementSymbolName - @see getNthReplacementSymbolPair -"; - - -%feature("docstring") getNthReplacementSymbolPairBetween " - Returns the Nth pair of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. - @see getNthFormerSymbolName - @see getNthReplacementSymbolName -"; - - -%feature("docstring") getNthFormerSymbolNameBetween " - Returns the Nth symbol name that has been replaced by a new symbol name in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. - @see getNthReplacementSymbolName - @see GetNumReplacedSymbolNames -"; - - -%feature("docstring") getNthReplacementSymbolNameBetween " - Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. - @see getNthFormerSymbolName - @see GetNumReplacedSymbolNames -"; - - -%feature("docstring") getNumSymbolsOfType " - Returns the number of symbols of the given return type. Useful when looping over the arrays in the subsequent functions. - @see get() -"; - - -%feature("docstring") getSymbolNamesOfType " - Returns the names of the symbols of the given return type. (In SBML, these are the \'id\'s.) -"; - - -%feature("docstring") getSymbolDisplayNamesOfType " - Returns the \'display names\' of the symbols of the given return type. (In SBML, these are the \'name\'s.) -"; - - -%feature("docstring") getSymbolEquationsOfType " - Returns the equations associated with the symbols of the given return type. - - Species: The initial assignment or assignment rule for the species in question - - Formulas and operators: The initial assignment or assignment rule for the formula in question - - Compartments: The initial assignment or assignment rule for the compartment in question - - DNA elements: The assignment rule or reaction rate of the element in question (no DNA element is defined by an initial assignment or by a rate rule with an initial assignment) - - DNA Strands: The assignment rule or reaction rate for the last element of the strand - - Reactions and genes: The reaction rate - - Events: The trigger condition - - Interactions: Nothing - - Modules: Nothing - - For elements that could have either initial assignments or assignment rules, use getTypeOfEquationForSymbol, or just use getSymbolInitialAssignmentsOfType and getSymbolAssignmentRulesOfType explicitly. -"; - - -%feature("docstring") getSymbolInitialAssignmentsOfType " - Returns the equations associated with the initial assignment for symbols of the given return type. - - Species: The initial assignment for the species in question - - Formulas and operators: The initial assignment of the formula in question - - Compartments: The initial assignment for the compartment - - - DNA Strands: Nothing - - Reactions and genes: Nothing - - Events: Nothing - - Interactions: Nothing - - Modules: Nothing -"; - - -%feature("docstring") getSymbolAssignmentRulesOfType " - Returns the equations associated with the assignment rule for symbols of the given return type. - - Species: The assignment rule for the species in question - - Formulas and operators: The assignment rule of the formula in question - - Compartments: The assignment rule for the compartment - - DNA Strands: The assignment rule or reaction rate at the end of the strand. - - Reactions and genes: The reaction rate (for consistency with DNA strands) - - - Events: Nothing - - Interactions: Nothing - - Modules: Nothing -"; - - -%feature("docstring") getSymbolRateRulesOfType " - Returns the equations associated with the rate rule for symbols of the given return type. - - Species: The rate rule for the species in question - - Formulas and operators: The rate rule of the formula in question - - Compartments: The rate rule for the compartment - - DNA Strands: The rate rule or reaction rate at the end of the strand. - - Reactions and genes: Nothing - - Events: Nothing - - Interactions: Nothing - - Modules: Nothing -"; - - -%feature("docstring") getSymbolCompartmentsOfType " - Returns the compartments associated with the symbols of the given return type. Note that unlike in SBML, any symbol of any type may have an associated compartment, including compartments themselves. Rules about compartments in Antimony can be found in the Tutorial.pdf document included with this documentation. -"; - - -%feature("docstring") getNthSymbolNameOfType " - Returns the name of the Nth symbol of the given type. If no such symbol exists, None is returned and an error is set. (In SBML, this is the \'id\' of the element.) -"; - - -%feature("docstring") getNthSymbolDisplayNameOfType " - Returns the \'display name\' of the Nth symbol of the given type. If no such symbol exists, None is returned and an error is set. (In SBML, this is the \'name\' of the element.) -"; - - -%feature("docstring") getNthSymbolEquationOfType " - Returns the equation associated with the Nth symbol of the given type. If no equation is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. -"; - - -%feature("docstring") getNthSymbolInitialAssignmentOfType " - Returns the initial assignment associated with the Nth symbol of the given type. If no initial assignment is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. -"; - - -%feature("docstring") getNthSymbolAssignmentRuleOfType " - Returns the assignment rule associated with the Nth symbol of the given type. If no assignment rule is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. -"; - - -%feature("docstring") getNthSymbolRateRuleOfType " - Returns the rate rule associated with the Nth symbol of the given type. If no rate rule is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. -"; - - -%feature("docstring") getNthSymbolCompartmentOfType " - Returns the name of the compartment associated with the nth symbol of the given type. If no compartment is explicitly set in the file, the string \'default_compartment\' is returned. If no symbol can be found, None is returned and an error is set. -"; - - -%feature("docstring") getTypeOfSymbol " - Returns the most specific return type available for the given symbolName. A symbol defined to be a gene, for example, will return \'allGenes\' and not \'allReactions\', though the symbol does indeed qualify as a reaction. -"; - - -%feature("docstring") getTypeOfEquationForSymbol " - Returns the type of the \'main\' equation associated with the given symbolName. All reactions will return \'formulaKINETIC\', and all events will return \'formulaTRIGGER\'. All DNA elements that are not genes will return \'formulaASSIGNMENT\', as DNA elements are defined by assignment rules and kinetic laws. All other symbols will return \'formulaINITIAL\' by default (i.e. in the case where no equation at all is associated with the symbol in question), and otherwise will return formulaINITIAL for symbols defined by initial assignments only, formulaASSIGNMENT for symbols defined by assignment rules, and formulaRATE for symbols defined by both initial assignments and rate rules (or just rate rules; it is valid though not simulatable to have a symbol with a rate rule but no initial assignment). In the case of rate rules, the initial assignment is found in the \'Equation\' associated with the symbol, and the rate rule is found in the \'RateRule\' associated with the symbol. -"; - - -%feature("docstring") getCompartmentForSymbol " - Returns the name of the compartment the given symbol is a member of. In antimony, all symbols may have compartments, not just species. If a symbol has no set compartment, and is not a member of a symbol with a set compartment, this will return \'default_compartment\' -"; - - -%feature("docstring") getNumReactions " - Returns the number of reactions (including genes) in the named module. Useful when looping over all reactions in the arrays returned by subsequent functions. -"; - - -%feature("docstring") getNumReactants " - Returns the number of reactants (species on the left side of the reaction) for the given reaction. If no such reaction is present, \'0\' is returned and an error is set. Sadly, if there are no reactants, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, most likely. -"; - - -%feature("docstring") getNumProducts " - Returns the number of products (species on the right side of the reaction) for the given reaction. If no such reaction is present, \'0\' is returned and an error is set. Sadly, if there are no products, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, too. -"; - - -%feature("docstring") getReactantNames " - Returns all the reactant names for all reactions in the given module. The dimensions of the included arrays can be found with \'getNumReactions\' and \'getNumReactants\' (the array is not \'square\'--each sub array may have a different length). -"; - - -%feature("docstring") getNthReactionReactantNames " - Returns an array of all the reactant names for the given reaction. The length of the array can be obtained with \'getNumReactants\'. If no such reaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getNthReactionMthReactantName " - Returns the mth reactant name of the mth reaction. If no such reaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getProductNames " - Returns all the product names for all reactions in the given module. The dimensions of the included arrays can be found with \'getNumReactions\' and \'getNumProducts\' (the array is not \'square\'--each sub array may have a different length). -"; - - -%feature("docstring") getNthReactionProductNames " - Returns an array of all the product names for the given reaction. The length of the array can be obtained with \'getNumProducts\'. If no such reaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getNthReactionMthProductName " - Returns the mth product name of the given reaction. If no such reaction or product is present, None is returned and an error is set. -"; - - -%feature("docstring") getReactantStoichiometries " - Returns a two-dimensional array of the stoichiometries for all reactants in all reactions in the given module. -"; - - -%feature("docstring") getProductStoichiometries " - Returns a two-dimensional array of the stoichiometries for all products in all reactions in the given module. -"; - - -%feature("docstring") getNthReactionReactantStoichiometries " - Returns an array of the stoichiometries for the reactants of the Nth reaction in the module. If no such reaction exists, an error is set and None is returned. -"; - - -%feature("docstring") getNthReactionProductStoichiometries " - Returns an array of the stoichiometries for the products of the Nth reaction in the module. If no such reaction exists, an error is set and None is returned. -"; - - -%feature("docstring") getNthReactionMthReactantStoichiometries " - Returns the stoichiometry for the Mth reactant of the Nth reaction in the module. If no such reactant or reaction exists, an error is set and 0 is returned. -"; - - -%feature("docstring") getNthReactionMthProductStoichiometries " - Returns the stoichiometries for the Mth product of the Nth reaction in the module. If no such product or reaction exists, an error is set and 0 is returned. -"; - - -%feature("docstring") getNumInteractions " - Returns the number of interactions in the named module. Useful when looping over all interactions in the arrays returned by subsequent functions. -"; - - -%feature("docstring") getNumInteractors " - Returns the number of interactors (species on the left side of the interaction) for the given interaction. If no such interaction is present, \'0\' is returned and an error is set. Sadly, if there are no interactors, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, most likely. -"; - - -%feature("docstring") getNumInteractees " - Returns the number of interactees (reactions on the right side of the interaction) for the given interaction. If no such interaction is present, \'0\' is returned and an error is set. Sadly, if there are no interactees, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, too. -"; - - -%feature("docstring") getInteractorNames " - Returns all the interactor names for all interactions in the given module. The dimensions of the included arrays can be found with \'getNumInteractions\' and \'getNumInteractors\' (the array is not \'square\'--each sub array may have a different length). -"; - - -%feature("docstring") getNthInteractionInteractorNames " - Returns an array of all the interactor names for the given interaction. The length of the array can be obtained with \'getNumInteractors\'. If no such interaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getNthInteractionMthInteractorName " - Returns the Mth interactor names for the given interaction. If no such interactor or interaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getInteracteeNames " - Returns all the interactee names for all interactions in the given module. The dimensions of the included arrays can be found with \'getNumInteractions\' and \'getNumInteractees\' (the array is not \'square\'--each sub array may have a different length). -"; - - -%feature("docstring") getNthInteractionInteracteeNames " - Returns an array of all the interactee names for the given interaction. The length of the array can be obtained with \'getNumInteractees\'. If no such interaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getNthInteractionMthInteracteeName " - Returns the Mth interactee name for the given interaction. If no such interactee or interaction is present, None is returned and an error is set. -"; - - -%feature("docstring") getInteractionDividers " - Returns an array of all the interaction dividers in the given module. The length of the array can be obtained with \'getNumInteractions\'. -"; - - -%feature("docstring") getNthInteractionDivider " - Returns the Nth interaction divider in the module. If no such interaction is present, 0 is returned, which is \'rdBecomes, which is an invalid Interaction divider (since it\'s used for reactions instead). -"; - - -%feature("docstring") getStoichiometryMatrix " - Returns an N x M stoichiometry matrix where N is the number of reactions in the model, and M is the number of variable species (or \'floating species\'). -"; - - -%feature("docstring") getStoichiometryMatrixRowLabels " - The row labels for the stoichiometry matrix. Is exactly the same as calling \'getSymbolNamesOfType(moduleName, varSpecies)\', but provided here so you don\'t have to think about it. -"; - - -%feature("docstring") getStoichiometryMatrixColumnLabels " - The column labels for the stoichiometry matrix. Is exactly the same as calling \'getSymbolNamesOfType(moduleName, allReactions)\' but provided here so you don\'t have to think about it. -"; - - -%feature("docstring") getStoichiometryMatrixNumRows " - The number of rows in the stoichiometry matrix (or, the number of \'varSpecies\'). -"; - - -%feature("docstring") getStoichiometryMatrixNumColumns " - The number of columns in the stoichiometry matrix (or, the number of \'allReactions\'). -"; - - -%feature("docstring") getNumReactionRates " - Returns the number of reactions (and hence reaction rates) in the module. Useful for looping over all reaction rates in the following function. -"; - - -%feature("docstring") getReactionRates " - Returns an array of the reaction rates for the given module. Is the same as \'getSymbolEquationsOfType(moduleName, allReactions)\', but is provided for convenience. -"; - - -%feature("docstring") getNthReactionRate " - Returns the reaction rate for the Nth reaction in the module. If the reaction exists, but its reaction rate has not been set, returns an empty string. If the reaction does not exist, an error is set, and None is returned. -"; - - -%feature("docstring") getNumEvents " - Returns the number of events in the given module. Useful for subsequent functions that return arrays of information for all events. -"; - - -%feature("docstring") getEventNames " - Returns the names of the events in the module. Is the same as \'getSymbolNamesOfType(moduleName, allEvents)\', but is provided for convenience. -"; - - -%feature("docstring") getNthEventName " - Returns the name of the nth event in the module. -"; - - -%feature("docstring") getNumAssignmentsForEvent " - Returns the number of assignments stored in the given event. Useful when looping through those assignements in functions below. -"; - - -%feature("docstring") getTriggerForEvent " - Returns the trigger for the given event, as an equation that can be interpreted in a boolean context. -"; - - -%feature("docstring") getDelayForEvent " - Returns the delay for the given event, as an equation (if present; if the event has no delay, \'\' is returned. If no such module or event is present, None is returned and an error is set.). -"; - - -%feature("docstring") getEventHasDelay " - Returns \'true\' if the given event has a delay; \'false\' otherwise. -"; - - -%feature("docstring") getPriorityForEvent " - Returns the priority for the given event, as an equation (if present; if the event has no priority, \'\' is returned. If no such module or event is present, None is returned and an error is set.). -"; - - -%feature("docstring") getEventHasPriority " - Returns \'true\' if the given event has a priority; \'false\' otherwise. -"; - - -%feature("docstring") getPersistenceForEvent " - Returns the value of the persistence flag for the given event (default is \'false\'). Unable to return an error if there is no such event or module, so will simply return \'false\' in those situations, as well. -"; - - -%feature("docstring") getT0ForEvent " - Returns the value at time 0 for the given event trigger (default is \'true\'). Unable to return an error if there is no such event or module, so will simply return \'true\' in those situations, as well. -"; - - -%feature("docstring") getFromTriggerForEvent " - Returns the value of the \'fromTrigger\' flag for the given event trigger (default is \'true\'). Unable to return an error if there is no such event or module, so will simply return \'true\' in those situations, as well. -"; - - -%feature("docstring") getNthAssignmentVariableForEvent " - Each assignment for an event assigns a formula to a variable. This function returns the variable in question for the given event and assignment. -"; - - -%feature("docstring") getNthAssignmentEquationForEvent " - Each assignment for an event assigns a formula to a variable. This function returns the in question in question for the given event and assignment. -"; - - -%feature("docstring") getNumDNAStrands " - Returns the number of unique DNA strands in the module, as defined in the Antimony documentation (or, the number of physical cassettes of DNA present in the module). Useful in looping over the arrays returned by functions below. -"; - - -%feature("docstring") getDNAStrandSizes " - Returns an array of DNA strand sizes for all strands in the module. Useful for looping over the arrays returned by \'getDNAStrands\' -"; - - -%feature("docstring") getSizeOfNthDNAStrand " - Returns just the size (in number of components) of the nth DNA strand in the given module. If no such strand exists, sets an error and returns 0. This is actually useful here, since all DNA strands otherwise have a size of at least 1. -"; - - -%feature("docstring") getDNAStrands " - Returns an array of all DNA strands in the given module as lists of their components. All components are either Operator objects or Gene objects, depending on whether they have an associated reaction. -"; - - -%feature("docstring") getNthDNAStrand " - Returns an array of names of the components in the nth DNA strand in the given module. If no such strand exists, sets an error and returns None. -"; - - -%feature("docstring") getIsNthDNAStrandOpen " - Returns whether the given DNA strand was defined to be \'open\' (that is, have an attachable end) at the upstream end (if \'upstream\' is true) or at the downstream end (if \'upstream\' is false). This allows reproduction of a strand defined by \'--X--Y--\' vs. \'X--Y\', etc. -"; - - -%feature("docstring") getNumModularDNAStrands " - Returns the sizes (in number of components) of all modular (separately-defined) DNA strands. Modular strands may contain genes, operators, and other DNA strands. Useful for looping over the strands in the array returned by getModularDNAStrands. -"; - - -%feature("docstring") getModularDNAStrandSizes " - Returns an array of Modular DNA strand sizes for the given module. Useful for looping over the components in the sub-arrays returned by getModularDNAStrands. -"; - - -%feature("docstring") getModularDNAStrands " - Returns an array of strands, each of which has an array of the names of the components of that strand. The components may be operators, genes, and other modular DNA strands. -"; - - -%feature("docstring") getNthModularDNAStrand " - Returns an array of names of the components in the nth modular DNA strand in the given module. If no such strand exists, an error is set, and None is returned. -"; - - -%feature("docstring") getIsNthModularDNAStrandOpen " - Returns whether the given modular DNA strand was defined to be \'open\' (that is, have an attachable end) at the upstream end (if \'upstream\' is true) or at the downstream end (if \'upstream\' is false). This allows reproduction of a strand defined by \'--X--Y--\' vs. \'X--Y\', etc. -"; - - -%feature("docstring") freeAll " - Frees all pointers handed to you by libAntimony. - All libAntimony functions above that return pointers return malloc\'ed pointers that you now own. If you wish, you can ignore this and never free anything, as long as you call \'freeAll\' at the very end of your program. If you freeanything yourself, however, calling this function will cause the program to crash! It won\'t know that you already freed that pointer, and will attempt to free it again. So either keep track of all memory management yourself, or use this function after you\'re completely done. - - Note that this function only frees pointers handed to you by other antimony_api functions. The models themselves are still in memory and are available. (To clear that memory, use clearPreviousLoads() ) -"; - - -%feature("docstring") OStream " - Wrapper class for the C++ standard streams cout, - cerr, and clog. - - A few libSBML methods accept an argument for indicating where to send - text string output. An example is the SBMLDocument.printErrors() method. However, the methods use C++ style streams and not Java - stream objects. The OStream object exists to bridge the Java and - underlying native implementation. It is a simple wrapper around the - underlying stream object and provides a few basic methods for - manipulating it. -"; - - -%feature("docstring") OFStream " - Wrapper class for the C++ standard file stream ofstream. - - The C++ ofstream (\'output file stream\') provides an - interface for writing data to files as output streams. This class, - OFStream, wraps the C++ ofstream and provides an OStream - interface to it. The file to be associated with the stream can be - specified as a parameter to the constructors in this class. - - This class may be useful because some libSBML methods accept an argument - for indicating where to send text string output. An example is the - SBMLDocument.printErrors() method. The methods use C++ style streams - and not Java stream objects. The OStream object exists to bridge the - Java and underlying native implementation. It is a simple wrapper - around the underlying stream object and provides a few basic methods for - manipulating it. -"; - - -%feature("docstring") OStringStream " - Wrapper class for the C++ standard stream ostringstream. - - The C++ ostringstream (\'output string stream class\') - provides an interface to manipulating strings as if they were output - streams. This class class, OStringStream, wraps the - ostringstream and provides an OStream interface to it. - - This class may be useful because some libSBML methods accept an argument - for indicating where to send text string output. An example is the - SBMLDocument.printErrors() method. The methods use - C++ style streams and not Java stream objects. The OStream object - exists to bridge the Java and underlying native implementation. It is a - simple wrapper around the underlying stream object and provides a few - basic methods for manipulating it. -"; - - -%feature("docstring") OStream::OStream " - Creates a new OStream object with one of standard output stream objects. - - @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) - indicating the type of stream to create. -"; - - -%feature("docstring") OStream::get_ostream " - Returns the stream object. -

- @return the stream object -"; - - -%feature("docstring") OStream::endl " - Writes an end-of-line character on this tream. -"; - - -%feature("docstring") OFStream::OFStream " - Creates a new OFStream object for a file. -

- This opens the given file @p filename with the @p is_append flag - (default is false), and creates an OFStream object - instance that associates the file\'s content with an OStream object. -

- @param filename the name of the file to open - @param is_append whether to open the file for appending (default: - false, meaning overwrite the content instead) - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif -"; - - -%feature("docstring") OFStream::open " - Opens a file and associates this stream object with it. -

- This method opens a given file @p filename with the given - @p is_append flag (whose default value is false), - and associates this stream object with the file\'s content. -

- @param filename the name of the file to open - @param is_append whether to open the file for appending (default: - false, meaning overwrite the content instead) - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif -"; - - -%feature("docstring") OFStream::close " - Closes the file currently associated with this stream object. -"; - - -%feature("docstring") OFStream::is_open " - Returns true if this stream object is currently - associated with a file. -

- @return true if the stream object is currently - associated with a file, false otherwise -"; - - -%feature("docstring") OStringStream::OStringStream " - Creates a new OStringStream object -"; - - -%feature("docstring") OStringStream::str " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -


- Method variant with the following signature: -
str()
- - Returns the copy of the string object currently assosiated - with this ostringstream buffer. -

- @return a copy of the string object for this stream - - -


- Method variant with the following signature: -
str(string s)
- - Sets string @p s to the string object currently assosiated with - this stream buffer. -

- @param s the string to write to this stream -"; - - +%feature("docstring") loadFile " + Load a file of any format libAntimony knows about (potentially Antimony, SBML, or CellML). If all attempts fail, the errors from the attempt to read the file in the Antimony format are saved, so if the file is actually SBML or CellML, the error is likely to be \'but contains errors, the reported errors will be from the attempt to read it as Antimony, and a \'-1\' is returned. + + NOTE: This function will not attempt to parse the file as SBML if libAntimony is compiled with the \'-NSBML\' flag, and will not attempt to parse the file as CellML if compiled with the \'-NCELLML\' flag. + + @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. + + @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. + + @see getLastError() +"; + + +%feature("docstring") loadString " + Load a string of any format libAntimony knows about (potentially Antimony, SBML, or CellML). The first attempts to read the string as SBML, and if this results in an error, then reads it as Antimony. If this, too, results in an error, the second error is saved, and a \'-1\' is returned. + + NOTE: This function will not attempt to parse the string as SBML if libAntimony is compiled with the \'-NSBML\' flag, and will not attempt to parse the string as CellML if compiled with the \'-NCELLML\' flag. + + @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. + + @param model The model, in (potentially) Antimony, SBML, or CellML format. + + @see getLastError() +"; + + +%feature("docstring") loadAntimonyFile " + Loads a file and parses it as an Antimony file. On an error, the error is saved, -1 is returned, and no information is stored. + + @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. + + @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. + + @see getLastError() +"; + + +%feature("docstring") loadAntimonyString " + Loads a string and parses it as an Antimony set of modules. On an error, the error is saved, -1 is returned, and no information is stored. + + @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. + + @param model The model in Antimony format. + + @see getLastError() +"; + + +%feature("docstring") loadSBMLFile " + @brief Load a file known to be SBML. + + Loads a file and parses it (using libSBML) as an SBML file. On an error, the error is saved, -1 is returned, and no information is stored. + @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + + @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. + + @see getLastError() +"; + + +%feature("docstring") loadSBMLString " + @brief Load a string known to be SBML. + + Loads a string and parses it (using libSBML) as an SBML file. On an error, the error is saved, -1 is returned, and no information is stored. + @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + + @param model The model, in SBML format. + + @see getLastError() +"; + + +%feature("docstring") loadSBMLStringWithLocation " + @brief Load a string known to be SBML with its file location. + + Loads a string and parses it (using libSBML) as an SBML file. On an error, the error is saved, -1 is returned, and no information is stored. This function additionally allows you to set the location of the string, in case there are relative file references in the file (as there can be in some hierarchical models). + @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + + @param model The model, in SBML format. + @param location The location of the file (i.e. \'file1.xml\' or \'/home/user/sbml/models/file.xml\') + + @see getLastError() +"; + + +%feature("docstring") loadCellMLFile " + @brief Load a file known to be CellML. + + Loads a file and parses it (using libCellML) as a CellML file. On an error, the error is saved, -1 is returned, and no information is stored. + @return a long integer indicating the index of the file read and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. + + @param filename The filename as a character string. May be either absolute or relative to the directory the executable is being run from. + + @see getLastError() +"; + + +%feature("docstring") loadCellMLString " + @brief Load a string known to be CellML. + + Loads a string and parses it (using libCellML) as a CellML file. On an error, the error is saved, -1 is returned, and no information is stored. + @return a long integer indicating the index of the string read and stored. On an error, returns -1 and no information is stored. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. + + @param model The model, in CellML format. + + @see getLastError() +"; + + +%feature("docstring") getNumFiles " + @brief Returns the number of files loaded into memory so far. + + Every time \'load\' is called successfully, the module(s) in those files are saved. This function will tell you how many sets of modules from successful reads are resident in memory. + @return The number of files currently stored in memory. +"; + + +%feature("docstring") revertTo " + Change the \'active\' set of modules to the ones from the given index (as received from \'load\'). Attempting to revert to a negative or nonexistent index returns \'false\' and the previous active set of modules is retained. A successful change return \'true\'. +"; + + +%feature("docstring") clearPreviousLoads " + Clears memory of all files loaded. The next successful call to \'load\' will return 0 as the first valid index. +"; + + +%feature("docstring") addDirectory " + Add a directory in which imported files may be found, and in which to look for a \'.antimony\' file (which contains rules about where to look locally for imported antimony and sbml files). +"; + + +%feature("docstring") clearDirectories " + Clears the list of directories added with the \'addDirectory\' function. +"; + + +%feature("docstring") writeAntimonyFile " + Writes out an antimony-formatted file containing the given module. If no module name is given, all modules in the current set are returned. If the module depends on any sub-modules, those modules are written out as well, also in the antimony format. Returns 0 on failure (and sets an error), 1 on success. +"; + + +%feature("docstring") getAntimonyString " + Returns the same output as writeAntimonyFile, but to a char array instead of to a file. Returns None on failure, and sets an error. +"; + + +%feature("docstring") writeSBMLFile " + Writes out a SBML-formatted XML file to the file indicated. The output is \'flattened\', that is, all components of sub-modules are re-named and placed in a single model. Returns the output of libSBML\'s \'writeSBML\', which \'Returns non-zero on success and zero if the filename could not be opened for writing.\' An error indicating this is set on returning zero. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + +@see getSBMLString +"; + + +%feature("docstring") getSBMLString " + Returns the same output as writeSBMLFile, but to a char array instead of to a file. The output is \'flattened\', that is, all components of sub-modules are re-named and placed in a single model. Returns the output of libSBML\'s \'writeSBMLToString\', which \'Returns the string on success and None if one of the underlying parser components fail (rare).\' + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + +@see writeSBMLFile +"; + + +%feature("docstring") writeCompSBMLFile " + Writes out a SBML-formatted XML file to the file indicated, using the \'Hierarchichal Model Composition\' package. This retains Antimony\'s modularity in the SBML format. Returns the output of libSBML\'s \'writeSBML\', which \'Returns non-zero on success and zero if the filename could not be opened for writing.\' An error indicating this is set on returning zero. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag, or if compiled without the USE_COMP flag. + +@see getSBMLString +"; + + +%feature("docstring") getCompSBMLString " + Returns the same output as writeSBMLFile, but to a char array instead of to a file, using the \'Hierarchichal Model Composition\' package. This retains Antimony\'s modularity in the SBML format. Returns the output of libSBML\'s \'writeSBMLToString\', which \'Returns the string on success and None if one of the underlying parser components fail (rare).\' + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag, or if compiled without the USE_COMP flag. + +@see writeSBMLFile +"; + + +%feature("docstring") writeCellMLFile " + Writes out a CellML-formatted XML file to the file indicated, retaining the same Antimony hierarchy using the CellML \'component\' hieararchy. Returns one on success and zero on failure. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. + +@see getCellMLString +"; + + +%feature("docstring") getCellMLString " + Returns the same output as writeCellMLFile, but to a char array instead of to a file. Returns the string on success (as translated to \'char\' from CellML\'s native \'wchar\') and None on failure.\' + NOTE: This function is unavailable when libAntimony is compiled with the \'-NCELLML\' flag. + +@see writeCellMLToString +"; + + +%feature("docstring") printAllDataFor " + An example function that will print to stdout all the information in the given module. This function probably isn\'t as useful to call as it is to examine and copy for your own purposes: it only calls functions defined here in antimony_api.h. +"; + + +%feature("docstring") checkModule " + Returns \'true\' if the submitted module name exists in the current active set, \'false\' if not. +"; + + +%feature("docstring") getLastError " + When any function returns an error condition, a longer description of the problem is stored in memory, and is obtainable with this function. In most cases, this means that a call that returns a pointer returned \'None\' (or 0). +"; + + +%feature("docstring") getWarnings " + When translating some other format to Antimony, elements that are unable to be translated are saved as warnings, retrievable with this function (returns None if no warnings present). Warnings may also be generated by problems discovered in \'.antimony\' files. +"; + + +%feature("docstring") getSBMLInfoMessages " + Returns the \'info\' messages from libSBML. libAntimony always translates its modules into SBML to check for errors. If SBML finds errors, libAntimony gives up, passes on the error message, and does not save the model. However, libSBML may discover other things about your model it wants to tell you about, in \'info\' and \'warning\' messages. Info messages are just things it found it thinks you might want to know; warning messages are things it found which it feels violates \'best practices\' in biological modelling, but not to the extent that it feels you did something actually wrong. Since Antimony is unitless, for example, you will always find warnings about how you didn\'t set any units. This function returns the \'info\' messages from libSBML. If there are no info messages, returns an empty string. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + @see getSBMLWarnings +"; + + +%feature("docstring") getSBMLWarnings " + Returns the \'warning\' messages from libSBML. If there are no warning messages (an unlikely occurrence), returns an empty string. + NOTE: This function is unavailable when libAntimony is compiled with the \'-NSBML\' flag. + @see getSBMLInfoMessages +"; + + +%feature("docstring") getNumModules " + Returns the number of modules in the current active set (the last file successfully loaded, or whichever file was returned to with \'revertTo\'). +"; + + +%feature("docstring") getModuleNames " + Returns an array of all the current module names. +"; + + +%feature("docstring") getNthModuleName " + Returns the nth module name. Returns None and sets an error if there is no such module n. +"; + + +%feature("docstring") getMainModuleName " + Returns the \'main\' module name. In Antimony, this is either the module marked by an asterisk (\'modelmainModel()\') or the last module defined in the file. In translated SBML models, this is the model child of thelt;sbmlgt; object. In translated CellML models, this is the \'containing\' model that the translator creates to hold all the CellML components. Returns None only if there are no modules at all. +"; + + +%feature("docstring") getNumSymbolsInInterfaceOf " + Returns the number of symbols defined to be in the interface of the given module. In other words, if a module is defined \'module M(x, y, z)\', this returns \'3\'. (Modules with no interface symbols return \'0\'.) +"; + + +%feature("docstring") getSymbolNamesInInterfaceOf " + Returns the names of the symbols defined to be in the interface of the given module. In other words, if a module is defined \'module M(x, y, z)\', this returns the list \'x, y, z\'. A module with no symbols defined in its interface would return a pointer to an empty string. +"; + + +%feature("docstring") getNthSymbolNameInInterfaceOf " + Returns the Nth symbol name defined to be in the interface of the given module. If a module is defined \'module M(x, y, z)\', calling this with n=0 returns \'x\'. If no such symbol is found, None is returned and an error is set. +"; + + +%feature("docstring") getNumReplacedSymbolNames " + Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface. + @see getNthFormerSymbolName + @see getNthReplacementSymbolName +"; + + +%feature("docstring") getAllReplacementSymbolPairs " + Returns a list of pairs of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. + @see getNthFormerSymbolName + @see getNthReplacementSymbolName + @see getNthReplacementSymbolPair +"; + + +%feature("docstring") getNthReplacementSymbolPair " + Returns the Nth pair of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. + @see getNthFormerSymbolName + @see getNthReplacementSymbolName +"; + + +%feature("docstring") getNthFormerSymbolName " + Returns the Nth symbol name that has been replaced by a new symbol name in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface. + @see getNthReplacementSymbolName + @see GetNumReplacedSymbolNames +"; + + +%feature("docstring") getNthReplacementSymbolName " + Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface. + @see getNthFormerSymbolName + @see GetNumReplacedSymbolNames +"; + + +%feature("docstring") getNumReplacedSymbolNamesBetween " + Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. If an empty string is used as one of the submodule names, those synchronized variables that are not part of any submodule are searched for. + @see getNthFormerSymbolName + @see getNthReplacementSymbolName +"; + + +%feature("docstring") getAllReplacementSymbolPairsBetween " + Returns a list of pairs of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. + @see getNthFormerSymbolName + @see getNthReplacementSymbolName + @see getNthReplacementSymbolPair +"; + + +%feature("docstring") getNthReplacementSymbolPairBetween " + Returns the Nth pair of symbol names that have been synchronized with each other--the first the symbol that was replaced, and the second the symbol used as the replacement, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. These replacements are created when \'is\' is used, and when a module\'s \'interface\' (the symbols listed in parentheses) is used. + @see getNthFormerSymbolName + @see getNthReplacementSymbolName +"; + + +%feature("docstring") getNthFormerSymbolNameBetween " + Returns the Nth symbol name that has been replaced by a new symbol name in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. + @see getNthReplacementSymbolName + @see GetNumReplacedSymbolNames +"; + + +%feature("docstring") getNthReplacementSymbolNameBetween " + Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given module, through the use of an \'is\' construct, or through the use of a module\'s interface, between the given submodules, with the variable in the first submodule being the former variable name, and the variable in the second being the replacement variable name. + @see getNthFormerSymbolName + @see GetNumReplacedSymbolNames +"; + + +%feature("docstring") getNumSymbolsOfType " + Returns the number of symbols of the given return type. Useful when looping over the arrays in the subsequent functions. + @see get() +"; + + +%feature("docstring") getSymbolNamesOfType " + Returns the names of the symbols of the given return type. (In SBML, these are the \'id\'s.) +"; + + +%feature("docstring") getSymbolDisplayNamesOfType " + Returns the \'display names\' of the symbols of the given return type. (In SBML, these are the \'name\'s.) +"; + + +%feature("docstring") getSymbolEquationsOfType " + Returns the equations associated with the symbols of the given return type. + - Species: The initial assignment or assignment rule for the species in question + - Formulas and operators: The initial assignment or assignment rule for the formula in question + - Compartments: The initial assignment or assignment rule for the compartment in question + - DNA elements: The assignment rule or reaction rate of the element in question (no DNA element is defined by an initial assignment or by a rate rule with an initial assignment) + - DNA Strands: The assignment rule or reaction rate for the last element of the strand + - Reactions and genes: The reaction rate + - Events: The trigger condition + - Interactions: Nothing + - Modules: Nothing + + For elements that could have either initial assignments or assignment rules, use getTypeOfEquationForSymbol, or just use getSymbolInitialAssignmentsOfType and getSymbolAssignmentRulesOfType explicitly. +"; + + +%feature("docstring") getSymbolInitialAssignmentsOfType " + Returns the equations associated with the initial assignment for symbols of the given return type. + - Species: The initial assignment for the species in question + - Formulas and operators: The initial assignment of the formula in question + - Compartments: The initial assignment for the compartment + + - DNA Strands: Nothing + - Reactions and genes: Nothing + - Events: Nothing + - Interactions: Nothing + - Modules: Nothing +"; + + +%feature("docstring") getSymbolAssignmentRulesOfType " + Returns the equations associated with the assignment rule for symbols of the given return type. + - Species: The assignment rule for the species in question + - Formulas and operators: The assignment rule of the formula in question + - Compartments: The assignment rule for the compartment + - DNA Strands: The assignment rule or reaction rate at the end of the strand. + - Reactions and genes: The reaction rate (for consistency with DNA strands) + + - Events: Nothing + - Interactions: Nothing + - Modules: Nothing +"; + + +%feature("docstring") getSymbolRateRulesOfType " + Returns the equations associated with the rate rule for symbols of the given return type. + - Species: The rate rule for the species in question + - Formulas and operators: The rate rule of the formula in question + - Compartments: The rate rule for the compartment + - DNA Strands: The rate rule or reaction rate at the end of the strand. + - Reactions and genes: Nothing + - Events: Nothing + - Interactions: Nothing + - Modules: Nothing +"; + + +%feature("docstring") getSymbolCompartmentsOfType " + Returns the compartments associated with the symbols of the given return type. Note that unlike in SBML, any symbol of any type may have an associated compartment, including compartments themselves. Rules about compartments in Antimony can be found in the Tutorial.pdf document included with this documentation. +"; + + +%feature("docstring") getNthSymbolNameOfType " + Returns the name of the Nth symbol of the given type. If no such symbol exists, None is returned and an error is set. (In SBML, this is the \'id\' of the element.) +"; + + +%feature("docstring") getNthSymbolDisplayNameOfType " + Returns the \'display name\' of the Nth symbol of the given type. If no such symbol exists, None is returned and an error is set. (In SBML, this is the \'name\' of the element.) +"; + + +%feature("docstring") getNthSymbolEquationOfType " + Returns the equation associated with the Nth symbol of the given type. If no equation is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. +"; + + +%feature("docstring") getNthSymbolInitialAssignmentOfType " + Returns the initial assignment associated with the Nth symbol of the given type. If no initial assignment is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. +"; + + +%feature("docstring") getNthSymbolAssignmentRuleOfType " + Returns the assignment rule associated with the Nth symbol of the given type. If no assignment rule is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. +"; + + +%feature("docstring") getNthSymbolRateRuleOfType " + Returns the rate rule associated with the Nth symbol of the given type. If no rate rule is set for the symbol in question, an empty string is returned. If no symbol can be found, None is returned and an error is set. +"; + + +%feature("docstring") getNthSymbolCompartmentOfType " + Returns the name of the compartment associated with the nth symbol of the given type. If no compartment is explicitly set in the file, the string \'default_compartment\' is returned. If no symbol can be found, None is returned and an error is set. +"; + + +%feature("docstring") getTypeOfSymbol " + Returns the most specific return type available for the given symbolName. A symbol defined to be a gene, for example, will return \'allGenes\' and not \'allReactions\', though the symbol does indeed qualify as a reaction. +"; + + +%feature("docstring") getTypeOfEquationForSymbol " + Returns the type of the \'main\' equation associated with the given symbolName. All reactions will return \'formulaKINETIC\', and all events will return \'formulaTRIGGER\'. All DNA elements that are not genes will return \'formulaASSIGNMENT\', as DNA elements are defined by assignment rules and kinetic laws. All other symbols will return \'formulaINITIAL\' by default (i.e. in the case where no equation at all is associated with the symbol in question), and otherwise will return formulaINITIAL for symbols defined by initial assignments only, formulaASSIGNMENT for symbols defined by assignment rules, and formulaRATE for symbols defined by both initial assignments and rate rules (or just rate rules; it is valid though not simulatable to have a symbol with a rate rule but no initial assignment). In the case of rate rules, the initial assignment is found in the \'Equation\' associated with the symbol, and the rate rule is found in the \'RateRule\' associated with the symbol. +"; + + +%feature("docstring") getCompartmentForSymbol " + Returns the name of the compartment the given symbol is a member of. In antimony, all symbols may have compartments, not just species. If a symbol has no set compartment, and is not a member of a symbol with a set compartment, this will return \'default_compartment\' +"; + + +%feature("docstring") getNumReactions " + Returns the number of reactions (including genes) in the named module. Useful when looping over all reactions in the arrays returned by subsequent functions. +"; + + +%feature("docstring") getNumReactants " + Returns the number of reactants (species on the left side of the reaction) for the given reaction. If no such reaction is present, \'0\' is returned and an error is set. Sadly, if there are no reactants, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, most likely. +"; + + +%feature("docstring") getNumProducts " + Returns the number of products (species on the right side of the reaction) for the given reaction. If no such reaction is present, \'0\' is returned and an error is set. Sadly, if there are no products, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, too. +"; + + +%feature("docstring") getReactantNames " + Returns all the reactant names for all reactions in the given module. The dimensions of the included arrays can be found with \'getNumReactions\' and \'getNumReactants\' (the array is not \'square\'--each sub array may have a different length). +"; + + +%feature("docstring") getNthReactionReactantNames " + Returns an array of all the reactant names for the given reaction. The length of the array can be obtained with \'getNumReactants\'. If no such reaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getNthReactionMthReactantName " + Returns the mth reactant name of the mth reaction. If no such reaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getProductNames " + Returns all the product names for all reactions in the given module. The dimensions of the included arrays can be found with \'getNumReactions\' and \'getNumProducts\' (the array is not \'square\'--each sub array may have a different length). +"; + + +%feature("docstring") getNthReactionProductNames " + Returns an array of all the product names for the given reaction. The length of the array can be obtained with \'getNumProducts\'. If no such reaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getNthReactionMthProductName " + Returns the mth product name of the given reaction. If no such reaction or product is present, None is returned and an error is set. +"; + + +%feature("docstring") getReactantStoichiometries " + Returns a two-dimensional array of the stoichiometries for all reactants in all reactions in the given module. +"; + + +%feature("docstring") getProductStoichiometries " + Returns a two-dimensional array of the stoichiometries for all products in all reactions in the given module. +"; + + +%feature("docstring") getNthReactionReactantStoichiometries " + Returns an array of the stoichiometries for the reactants of the Nth reaction in the module. If no such reaction exists, an error is set and None is returned. +"; + + +%feature("docstring") getNthReactionProductStoichiometries " + Returns an array of the stoichiometries for the products of the Nth reaction in the module. If no such reaction exists, an error is set and None is returned. +"; + + +%feature("docstring") getNthReactionMthReactantStoichiometries " + Returns the stoichiometry for the Mth reactant of the Nth reaction in the module. If no such reactant or reaction exists, an error is set and 0 is returned. +"; + + +%feature("docstring") getNthReactionMthProductStoichiometries " + Returns the stoichiometries for the Mth product of the Nth reaction in the module. If no such product or reaction exists, an error is set and 0 is returned. +"; + + +%feature("docstring") getNumInteractions " + Returns the number of interactions in the named module. Useful when looping over all interactions in the arrays returned by subsequent functions. +"; + + +%feature("docstring") getNumInteractors " + Returns the number of interactors (species on the left side of the interaction) for the given interaction. If no such interaction is present, \'0\' is returned and an error is set. Sadly, if there are no interactors, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, most likely. +"; + + +%feature("docstring") getNumInteractees " + Returns the number of interactees (reactions on the right side of the interaction) for the given interaction. If no such interaction is present, \'0\' is returned and an error is set. Sadly, if there are no interactees, \'0\' is also returned, though no error is set. So you\'ll have to keep track of this one on your own, too. +"; + + +%feature("docstring") getInteractorNames " + Returns all the interactor names for all interactions in the given module. The dimensions of the included arrays can be found with \'getNumInteractions\' and \'getNumInteractors\' (the array is not \'square\'--each sub array may have a different length). +"; + + +%feature("docstring") getNthInteractionInteractorNames " + Returns an array of all the interactor names for the given interaction. The length of the array can be obtained with \'getNumInteractors\'. If no such interaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getNthInteractionMthInteractorName " + Returns the Mth interactor names for the given interaction. If no such interactor or interaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getInteracteeNames " + Returns all the interactee names for all interactions in the given module. The dimensions of the included arrays can be found with \'getNumInteractions\' and \'getNumInteractees\' (the array is not \'square\'--each sub array may have a different length). +"; + + +%feature("docstring") getNthInteractionInteracteeNames " + Returns an array of all the interactee names for the given interaction. The length of the array can be obtained with \'getNumInteractees\'. If no such interaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getNthInteractionMthInteracteeName " + Returns the Mth interactee name for the given interaction. If no such interactee or interaction is present, None is returned and an error is set. +"; + + +%feature("docstring") getInteractionDividers " + Returns an array of all the interaction dividers in the given module. The length of the array can be obtained with \'getNumInteractions\'. +"; + + +%feature("docstring") getNthInteractionDivider " + Returns the Nth interaction divider in the module. If no such interaction is present, 0 is returned, which is \'rdBecomes, which is an invalid Interaction divider (since it\'s used for reactions instead). +"; + + +%feature("docstring") getStoichiometryMatrix " + Returns an N x M stoichiometry matrix where N is the number of reactions in the model, and M is the number of variable species (or \'floating species\'). +"; + + +%feature("docstring") getStoichiometryMatrixRowLabels " + The row labels for the stoichiometry matrix. Is exactly the same as calling \'getSymbolNamesOfType(moduleName, varSpecies)\', but provided here so you don\'t have to think about it. +"; + + +%feature("docstring") getStoichiometryMatrixColumnLabels " + The column labels for the stoichiometry matrix. Is exactly the same as calling \'getSymbolNamesOfType(moduleName, allReactions)\' but provided here so you don\'t have to think about it. +"; + + +%feature("docstring") getStoichiometryMatrixNumRows " + The number of rows in the stoichiometry matrix (or, the number of \'varSpecies\'). +"; + + +%feature("docstring") getStoichiometryMatrixNumColumns " + The number of columns in the stoichiometry matrix (or, the number of \'allReactions\'). +"; + + +%feature("docstring") getNumReactionRates " + Returns the number of reactions (and hence reaction rates) in the module. Useful for looping over all reaction rates in the following function. +"; + + +%feature("docstring") getReactionRates " + Returns an array of the reaction rates for the given module. Is the same as \'getSymbolEquationsOfType(moduleName, allReactions)\', but is provided for convenience. +"; + + +%feature("docstring") getNthReactionRate " + Returns the reaction rate for the Nth reaction in the module. If the reaction exists, but its reaction rate has not been set, returns an empty string. If the reaction does not exist, an error is set, and None is returned. +"; + + +%feature("docstring") getNumEvents " + Returns the number of events in the given module. Useful for subsequent functions that return arrays of information for all events. +"; + + +%feature("docstring") getEventNames " + Returns the names of the events in the module. Is the same as \'getSymbolNamesOfType(moduleName, allEvents)\', but is provided for convenience. +"; + + +%feature("docstring") getNthEventName " + Returns the name of the nth event in the module. +"; + + +%feature("docstring") getNumAssignmentsForEvent " + Returns the number of assignments stored in the given event. Useful when looping through those assignements in functions below. +"; + + +%feature("docstring") getTriggerForEvent " + Returns the trigger for the given event, as an equation that can be interpreted in a boolean context. +"; + + +%feature("docstring") getDelayForEvent " + Returns the delay for the given event, as an equation (if present; if the event has no delay, \'\' is returned. If no such module or event is present, None is returned and an error is set.). +"; + + +%feature("docstring") getEventHasDelay " + Returns \'true\' if the given event has a delay; \'false\' otherwise. +"; + + +%feature("docstring") getPriorityForEvent " + Returns the priority for the given event, as an equation (if present; if the event has no priority, \'\' is returned. If no such module or event is present, None is returned and an error is set.). +"; + + +%feature("docstring") getEventHasPriority " + Returns \'true\' if the given event has a priority; \'false\' otherwise. +"; + + +%feature("docstring") getPersistenceForEvent " + Returns the value of the persistence flag for the given event (default is \'false\'). Unable to return an error if there is no such event or module, so will simply return \'false\' in those situations, as well. +"; + + +%feature("docstring") getT0ForEvent " + Returns the value at time 0 for the given event trigger (default is \'true\'). Unable to return an error if there is no such event or module, so will simply return \'true\' in those situations, as well. +"; + + +%feature("docstring") getFromTriggerForEvent " + Returns the value of the \'fromTrigger\' flag for the given event trigger (default is \'true\'). Unable to return an error if there is no such event or module, so will simply return \'true\' in those situations, as well. +"; + + +%feature("docstring") getNthAssignmentVariableForEvent " + Each assignment for an event assigns a formula to a variable. This function returns the variable in question for the given event and assignment. +"; + + +%feature("docstring") getNthAssignmentEquationForEvent " + Each assignment for an event assigns a formula to a variable. This function returns the in question in question for the given event and assignment. +"; + + +%feature("docstring") getNumDNAStrands " + Returns the number of unique DNA strands in the module, as defined in the Antimony documentation (or, the number of physical cassettes of DNA present in the module). Useful in looping over the arrays returned by functions below. +"; + + +%feature("docstring") getDNAStrandSizes " + Returns an array of DNA strand sizes for all strands in the module. Useful for looping over the arrays returned by \'getDNAStrands\' +"; + + +%feature("docstring") getSizeOfNthDNAStrand " + Returns just the size (in number of components) of the nth DNA strand in the given module. If no such strand exists, sets an error and returns 0. This is actually useful here, since all DNA strands otherwise have a size of at least 1. +"; + + +%feature("docstring") getDNAStrands " + Returns an array of all DNA strands in the given module as lists of their components. All components are either Operator objects or Gene objects, depending on whether they have an associated reaction. +"; + + +%feature("docstring") getNthDNAStrand " + Returns an array of names of the components in the nth DNA strand in the given module. If no such strand exists, sets an error and returns None. +"; + + +%feature("docstring") getIsNthDNAStrandOpen " + Returns whether the given DNA strand was defined to be \'open\' (that is, have an attachable end) at the upstream end (if \'upstream\' is true) or at the downstream end (if \'upstream\' is false). This allows reproduction of a strand defined by \'--X--Y--\' vs. \'X--Y\', etc. +"; + + +%feature("docstring") getNumModularDNAStrands " + Returns the sizes (in number of components) of all modular (separately-defined) DNA strands. Modular strands may contain genes, operators, and other DNA strands. Useful for looping over the strands in the array returned by getModularDNAStrands. +"; + + +%feature("docstring") getModularDNAStrandSizes " + Returns an array of Modular DNA strand sizes for the given module. Useful for looping over the components in the sub-arrays returned by getModularDNAStrands. +"; + + +%feature("docstring") getModularDNAStrands " + Returns an array of strands, each of which has an array of the names of the components of that strand. The components may be operators, genes, and other modular DNA strands. +"; + + +%feature("docstring") getNthModularDNAStrand " + Returns an array of names of the components in the nth modular DNA strand in the given module. If no such strand exists, an error is set, and None is returned. +"; + + +%feature("docstring") getIsNthModularDNAStrandOpen " + Returns whether the given modular DNA strand was defined to be \'open\' (that is, have an attachable end) at the upstream end (if \'upstream\' is true) or at the downstream end (if \'upstream\' is false). This allows reproduction of a strand defined by \'--X--Y--\' vs. \'X--Y\', etc. +"; + + +%feature("docstring") freeAll " + Frees all pointers handed to you by libAntimony. + All libAntimony functions above that return pointers return malloc\'ed pointers that you now own. If you wish, you can ignore this and never free anything, as long as you call \'freeAll\' at the very end of your program. If you freeanything yourself, however, calling this function will cause the program to crash! It won\'t know that you already freed that pointer, and will attempt to free it again. So either keep track of all memory management yourself, or use this function after you\'re completely done. + + Note that this function only frees pointers handed to you by other antimony_api functions. The models themselves are still in memory and are available. (To clear that memory, use clearPreviousLoads() ) +"; + + +%feature("docstring") OStream " + Wrapper class for the C++ standard streams cout, + cerr, and clog. + + A few libSBML methods accept an argument for indicating where to send + text string output. An example is the SBMLDocument.printErrors() method. However, the methods use C++ style streams and not Java + stream objects. The OStream object exists to bridge the Java and + underlying native implementation. It is a simple wrapper around the + underlying stream object and provides a few basic methods for + manipulating it. +"; + + +%feature("docstring") OFStream " + Wrapper class for the C++ standard file stream ofstream. + + The C++ ofstream (\'output file stream\') provides an + interface for writing data to files as output streams. This class, + OFStream, wraps the C++ ofstream and provides an OStream + interface to it. The file to be associated with the stream can be + specified as a parameter to the constructors in this class. + + This class may be useful because some libSBML methods accept an argument + for indicating where to send text string output. An example is the + SBMLDocument.printErrors() method. The methods use C++ style streams + and not Java stream objects. The OStream object exists to bridge the + Java and underlying native implementation. It is a simple wrapper + around the underlying stream object and provides a few basic methods for + manipulating it. +"; + + +%feature("docstring") OStringStream " + Wrapper class for the C++ standard stream ostringstream. + + The C++ ostringstream (\'output string stream class\') + provides an interface to manipulating strings as if they were output + streams. This class class, OStringStream, wraps the + ostringstream and provides an OStream interface to it. + + This class may be useful because some libSBML methods accept an argument + for indicating where to send text string output. An example is the + SBMLDocument.printErrors() method. The methods use + C++ style streams and not Java stream objects. The OStream object + exists to bridge the Java and underlying native implementation. It is a + simple wrapper around the underlying stream object and provides a few + basic methods for manipulating it. +"; + + +%feature("docstring") OStream::OStream " + Creates a new OStream object with one of standard output stream objects. + + @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) + indicating the type of stream to create. +"; + + +%feature("docstring") OStream::get_ostream " + Returns the stream object. +

+ @return the stream object +"; + + +%feature("docstring") OStream::endl " + Writes an end-of-line character on this tream. +"; + + +%feature("docstring") OFStream::OFStream " + Creates a new OFStream object for a file. +

+ This opens the given file @p filename with the @p is_append flag + (default is false), and creates an OFStream object + instance that associates the file\'s content with an OStream object. +

+ @param filename the name of the file to open + @param is_append whether to open the file for appending (default: + false, meaning overwrite the content instead) + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif +"; + + +%feature("docstring") OFStream::open " + Opens a file and associates this stream object with it. +

+ This method opens a given file @p filename with the given + @p is_append flag (whose default value is false), + and associates this stream object with the file\'s content. +

+ @param filename the name of the file to open + @param is_append whether to open the file for appending (default: + false, meaning overwrite the content instead) + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif +"; + + +%feature("docstring") OFStream::close " + Closes the file currently associated with this stream object. +"; + + +%feature("docstring") OFStream::is_open " + Returns true if this stream object is currently + associated with a file. +

+ @return true if the stream object is currently + associated with a file, false otherwise +"; + + +%feature("docstring") OStringStream::OStringStream " + Creates a new OStringStream object +"; + + +%feature("docstring") OStringStream::str " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + +


+ Method variant with the following signature: +
str()
+ + Returns the copy of the string object currently assosiated + with this ostringstream buffer. +

+ @return a copy of the string object for this stream + + +


+ Method variant with the following signature: +
str(string s)
+ + Sets string @p s to the string object currently assosiated with + this stream buffer. +

+ @param s the string to write to this stream +"; + + diff --git a/bindings/python/local.i b/bindings/python/local.i index f4193de..6168c02 100644 --- a/bindings/python/local.i +++ b/bindings/python/local.i @@ -1,12 +1,12 @@ -/** - * @file local-normal.i - * @brief Python-specific SWIG directives for wrapping the antimony API - * @author Lucian Smith, from libsbml - */ - - -/** - * Turn on (minimal) Python docstrings and then append our own. - */ -%feature("autodoc", "1"); -%include "pydoc.i" +/** + * @file local-normal.i + * @brief Python-specific SWIG directives for wrapping the antimony API + * @author Lucian Smith, from libsbml + */ + + +/** + * Turn on (minimal) Python docstrings and then append our own. + */ +%feature("autodoc", "1"); +%include "pydoc.i" diff --git a/bindings/python/pydoc-doxygen.i b/bindings/python/pydoc-doxygen.i index 36bb5d8..d2f70fa 100644 --- a/bindings/python/pydoc-doxygen.i +++ b/bindings/python/pydoc-doxygen.i @@ -1,44104 +1,44104 @@ -%feature("docstring") getLibSBMLVersion " - Returns the version number of this copy of libSBML as an integer. - - @return the libSBML version as an integer; version 1.2.3 becomes 10203. -"; - - -%feature("docstring") getLibSBMLDottedVersion " - Returns the version number of this copy of libSBML as a string. - - @return the libSBML version as a string; version 1.2.3 becomes - \'1.2.3\'. - - @see getLibSBMLVersionString() -"; - - -%feature("docstring") getLibSBMLVersionString " - Returns the version number of this copy of libSBML as a string without - periods. - - @return the libSBML version as a string: version 1.2.3 becomes \'10203\'. - - @see getLibSBMLDottedVersion() -"; - - -%feature("docstring") SBMLReader " - @ingroup Core - Methods for reading SBML from files and text strings. - - @htmlinclude not-sbml-warning.html - - The SBMLReader class provides the main interface for reading SBML - content from files and strings. The methods for reading SBML all return - an SBMLDocument object representing the results. - - In the case of failures (such as if the SBML contains errors or a file - cannot be read), the errors will be recorded with the SBMLErrorLog - object kept in the SBMLDocument returned by SBMLReader. Consequently, - immediately after calling a method on SBMLReader, callers should always - check for errors and warnings using the methods for this purpose - provided by SBMLDocument. - - For convenience as well as easy access from other languages besides C++, - this file also defines two global functions, - libsbml.readSBML() - and libsbml.readSBMLFromString(). - They are equivalent to creating an SBMLReader - object and then calling the - SBMLReader.readSBML() or - SBMLReader.readSBMLFromString() - methods, respectively. - - @section compression Support for reading compressed files - - LibSBML provides support for reading (as well as writing) compressed - SBML files. The process is transparent to the calling - application—the application does not need to do anything - deliberate to invoke the functionality. If a given SBML filename ends - with an extension for the @em gzip, @em zip or @em bzip2 compression - formats (respectively, @c .gz, @c .zip, or @c .bz2), then the methods - SBMLReader.readSBML() and - SBMLWriter.writeSBML() - will automatically decompress and compress the file while writing and - reading it. If the filename has no such extension, it - will be read and written uncompressed as normal. - - The compression feature requires that the @em zlib (for @em gzip and @em - zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the - system running libSBML, and that libSBML was configured with their - support compiled-in. Please see the libSBML @if clike installation instructions @endif@if python installation instructions @endif@if java installation instructions @endif@~ for more information about this. The methods - @if java SBMLReader.hasZlib()@else hasZlib()@endif@~ and - @if java SBMLReader.hasBzip2()@else hasBzip2()@endif@~ - can be used by an application to query at run-time whether support - for the compression libraries is available in the present copy of - libSBML. - - Support for compression is not mandated by the SBML standard, but - applications may find it helpful, particularly when large SBML models - are being communicated across data links of limited bandwidth. -"; - - -%feature("docstring") SBMLReader::SBMLReader " - Creates a new SBMLReader and returns it. - - The libSBML SBMLReader objects offer methods for reading SBML in - XML form from files and text strings. -"; - - -%feature("docstring") SBMLReader::readSBML " - Reads an SBML document from a file. - - This method is identical to SBMLReader.readSBMLFromFile(). - - If the file named @p filename does not exist or its content is not - valid SBML, one or more errors will be logged with the SBMLDocument - object returned by this method. Callers can use the methods on - SBMLDocument such as SBMLDocument.getNumErrors() and - SBMLDocument.getError() to get the errors. The object returned by - SBMLDocument.getError() is an SBMLError object, and it has methods to - get the error code, category, and severity level of the problem, as - well as a textual description of the problem. The possible severity - levels range from informational messages to fatal errors; see the - documentation for SBMLError for more information. - - If the file @p filename could not be read, the file-reading error will - appear first. The error code @if clike (a value drawn from the enumeration - #XMLErrorCode_t) @endif@~ can provide a clue about what happened. For example, - a file might be unreadable (either because it does not actually exist - or because the user does not have the necessary access priviledges to - read it) or some sort of file operation error may have been reported - by the underlying operating system. Callers can check for these - situations using a program fragment such as the following: - @if clike - @verbatim - SBMLReader reader; - SBMLDocument doc = reader.readSBMLFromFile(filename); - - if (doc->getNumErrors() > 0) - { - if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable) - { - // Handle case of unreadable file here. - } - else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError) - { - // Handle case of other file operation error here. - } - else - { - // Handle other cases -- see error codes defined in XMLErrorCode_t - // for other possible cases to check. - } - } - @endverbatim - @endif@if java - @verbatim - SBMLReader reader = new SBMLReader(); - SBMLDocument doc = reader.readSBMLFromFile(filename); - - if (doc.getNumErrors() > 0) - { - if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable) - { - // Handle case of unreadable file here. - } - else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError) - { - // Handle case of other file operation error here. - } - else - { - // Handle other error cases. - } - } - @endverbatim - @endif@if python - @verbatim - reader = SBMLReader() - doc = reader.readSBMLFromFile(filename) - - if doc.getNumErrors() > 0: - if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: - # Handle case of unreadable file here. - elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: - # Handle case of other file error here. - else: - # Handle other error cases here. - - @endverbatim - @endif@if csharp - @verbatim - SBMLReader reader = new SBMLReader(); - SBMLDocument doc = reader.readSBMLFromFile(filename); - - if (doc.getNumErrors() > 0) - { - if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable) - { - // Handle case of unreadable file here. - } - else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError) - { - // Handle case of other file operation error here. - } - else - { - // Handle other cases -- see error codes defined in XMLErrorCode_t - // for other possible cases to check. - } - } - @endverbatim - @endif@~ - - If the given filename ends with the suffix @c \'.gz\' (for example, @c - \'myfile.xml.gz\'), the file is assumed to be compressed in @em gzip - format and will be automatically decompressed upon reading. - Similarly, if the given filename ends with @c \'.zip\' or @c \'.bz2\', the - file is assumed to be compressed in @em zip or @em bzip2 format - (respectively). Files whose names lack these suffixes will be read - uncompressed. Note that if the file is in @em zip format but the - archive contains more than one file, only the first file in the - archive will be read and the rest ignored. - - @htmlinclude note-reading-zipped-files.html - - @param filename the name or full pathname of the file to be read. - - @return a pointer to the SBMLDocument created from the SBML content. - - @note LibSBML versions 2.x and later versions behave differently in - error handling in several respects. One difference is how early some - errors are caught and whether libSBML continues processing a file in - the face of some early errors. In general, libSBML versions after 2.x - stop parsing SBML inputs sooner than libSBML version 2.x in the face - of XML errors, because the errors may invalidate any further SBML - content. For example, a missing XML declaration at the beginning of - the file was ignored by libSBML 2.x but in version 3.x and later, it - will cause libSBML to stop parsing the rest of the input altogether. - While this behavior may seem more severe and intolerant, it was - necessary in order to provide uniform behavior regardless of which - underlying XML parser (Expat, Xerces, libxml2) is being used by - libSBML. The XML parsers themselves behave differently in their error - reporting, and sometimes libSBML has to resort to the lowest common - denominator. - - @see SBMLError -"; - - -%feature("docstring") SBMLReader::readSBMLFromFile " - Reads an SBML document from a file. - - This method is identical to SBMLReader.readSBML(). - - If the file named @p filename does not exist or its content is not - valid SBML, one or more errors will be logged with the SBMLDocument - object returned by this method. Callers can use the methods on - SBMLDocument such as SBMLDocument.getNumErrors() and - SBMLDocument.getError() to get the errors. The object returned by - SBMLDocument.getError() is an SBMLError object, and it has methods to - get the error code, category, and severity level of the problem, as - well as a textual description of the problem. The possible severity - levels range from informational messages to fatal errors; see the - documentation for SBMLError for more information. - - If the file @p filename could not be read, the file-reading error will - appear first. The error code @if clike (a value drawn from the enumeration - #XMLErrorCode_t)@endif@~ can provide a clue about what happened. For example, - a file might be unreadable (either because it does not actually exist - or because the user does not have the necessary access priviledges to - read it) or some sort of file operation error may have been reported - by the underlying operating system. Callers can check for these - situations using a program fragment such as the following: - @if clike - @verbatim - SBMLReader reader = new SBMLReader(); - SBMLDocument doc = reader.readSBML(filename); - - if (doc->getNumErrors() > 0) - { - if (doc->getError(0)->getErrorId() == XMLError::FileUnreadable) - { - // Handle case of unreadable file here. - } - else if (doc->getError(0)->getErrorId() == XMLError::FileOperationError) - { - // Handle case of other file operation error here. - } - else - { - // Handle other cases -- see error codes defined in XMLErrorCode_t - // for other possible cases to check. - } - } - @endverbatim - @endif@if java - @verbatim - SBMLReader reader = new SBMLReader(); - SBMLDocument doc = reader.readSBMLFromFile(filename); - - if (doc.getNumErrors() > 0) - { - if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable) - { - // Handle case of unreadable file here. - } - else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError) - { - // Handle case of other file operation error here. - } - else - { - // Handle other error cases. - } - } - @endverbatim - @endif@if python - @verbatim - reader = SBMLReader() - doc = reader.readSBMLFromFile(filename) - - if doc.getNumErrors() > 0: - if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: - # Handle case of unreadable file here. - elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: - # Handle case of other file error here. - else: - # Handle other error cases here. - - @endverbatim - @endif@~ - - If the given filename ends with the suffix @c \'.gz\' (for example, @c - \'myfile.xml.gz\'), the file is assumed to be compressed in @em gzip - format and will be automatically decompressed upon reading. - Similarly, if the given filename ends with @c \'.zip\' or @c \'.bz2\', the - file is assumed to be compressed in @em zip or @em bzip2 format - (respectively). Files whose names lack these suffixes will be read - uncompressed. Note that if the file is in @em zip format but the - archive contains more than one file, only the first file in the - archive will be read and the rest ignored. - - @htmlinclude note-reading-zipped-files.html - - @param filename the name or full pathname of the file to be read. - - @return a pointer to the SBMLDocument created from the SBML content. - - @note LibSBML versions 2.x and later versions behave differently in - error handling in several respects. One difference is how early some - errors are caught and whether libSBML continues processing a file in - the face of some early errors. In general, libSBML versions after 2.x - stop parsing SBML inputs sooner than libSBML version 2.x in the face - of XML errors, because the errors may invalidate any further SBML - content. For example, a missing XML declaration at the beginning of - the file was ignored by libSBML 2.x but in version 3.x and later, it - will cause libSBML to stop parsing the rest of the input altogether. - While this behavior may seem more severe and intolerant, it was - necessary in order to provide uniform behavior regardless of which - underlying XML parser (Expat, Xerces, libxml2) is being used by - libSBML. The XML parsers themselves behave differently in their error - reporting, and sometimes libSBML has to resort to the lowest common - denominator. - - @see SBMLError - @see SBMLDocument -"; - - -%feature("docstring") SBMLReader::readSBMLFromString " - Reads an SBML document from the given XML string. - - This method is flexible with respect to the presence of an XML - declaration at the beginning of the string. In particular, if the - string in @p xml does not begin with the XML declaration - <?xml version=\'1.0\' encoding=\'UTF-8\'?>, then this - method will automatically prepend the declaration to @p xml. - - This method will log a fatal error if the content given in the - parameter @p xml is not SBML. See the method documentation for - SBMLReader.readSBML() - for an example of code for testing the returned error code. - - @param xml a string containing a full SBML model - - @return a pointer to the SBMLDocument created from the SBML content. - - @see SBMLReader.readSBML() -"; - - -%feature("docstring") SBMLReader::hasZlib " - Static method; returns @c True if this copy of libSBML supports - gzip and zip format compression. - - @return @c True if libSBML has been linked with the zlib - library, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLReader), and the other - will be a standalone top-level function with the name - SBMLReader_hasZlib(). They are functionally identical. @endif@~ - - @see @if clike hasBzip2() @else SBMLReader.hasBzip2() @endif@~ -"; - - -%feature("docstring") SBMLReader::hasBzip2 " - Static method; returns @c True if this copy of libSBML supports - bzip2 format compression. - - @return @c True if libSBML is linked with the bzip2 - libraries, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLReader), and the other - will be a standalone top-level function with the name - SBMLReader_hasBzip2(). They are functionally identical. @endif@~ - - @see @if clike hasZlib() @else SBMLReader.hasZlib() @endif@~ -"; - - -%feature("docstring") SBMLReader::readInternal " - @internal - Used by readSBML() and readSBMLFromString(). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") readSBML " - Reads an SBML document from the given file @p filename. - - If @p filename does not exist, or it is not an SBML file, an error will - be logged in the error log of the SBMLDocument object returned by this - method. Calling programs can inspect this error log to determine - the nature of the problem. Please refer to the definition of - SBMLDocument for more information about the error reporting mechanism. - - @return a pointer to the SBMLDocument read. -"; - - -%feature("docstring") readSBMLFromFile " - Reads an SBML document from the given file @p filename. - - If @p filename does not exist, or it is not an SBML file, an error will - be logged in the error log of the SBMLDocument object returned by this - method. Calling programs can inspect this error log to determine - the nature of the problem. Please refer to the definition of - SBMLDocument for more information about the error reporting mechanism. - - @return a pointer to the SBMLDocument read. -"; - - -%feature("docstring") readSBMLFromString " - Reads an SBML document from a string assumed to be in XML format. - - If the string does not begin with XML declaration, - @verbatim - - @endverbatim - - an XML declaration string will be prepended. - - This method will report an error if the given string @p xml is not SBML. - The error will be logged in the error log of the SBMLDocument object - returned by this method. Calling programs can inspect this error log to - determine the nature of the problem. Please refer to the definition of - SBMLDocument for more information about the error reporting mechanism. - - @return a pointer to the SBMLDocument read. -"; - - -%feature("docstring") SBMLWriter " - @ingroup Core - Methods for writing SBML to files and text strings. - - @htmlinclude not-sbml-warning.html - - The SBMLWriter class is the converse of SBMLReader, and provides the - main interface for serializing SBML models into XML and writing the - result to an output stream or to files and text strings. The methods - for writing SBML all take an SBMLDocument object and a destination. - They return a boolean or integer value to indicate success or failure. - - @section compression Support for writing compressed files - - LibSBML provides support for writing (as well as reading) compressed - SBML files. The process is transparent to the calling - application—the application does not need to do anything - deliberate to invoke the functionality. If a given SBML filename ends - with an extension for the @em gzip, @em zip or @em bzip2 compression - formats (respectively, ".gz", - ".zip", or ".bz2"), - then the methods - SBMLWriter.writeSBML() - and SBMLReader.readSBML() - will automatically compress and decompress the file while writing and - reading it. If the filename has no such extension, it - will be written and read uncompressed as normal. - - The compression feature requires that the @em zlib (for @em gzip and @em - zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the - system running libSBML, and that libSBML was configured with their - support compiled-in. Please see the libSBML @if clike installation instructions@endif@if python installation instructions@endif@if java installation instructions@endif@~ for - more information about this. The methods - SBMLWriter.hasZlib() and - SBMLWriter.hasBzip2() - can be used by an application to query at run-time whether support - for the compression libraries is available in the present copy of - libSBML. - - Support for compression is not mandated by the SBML standard, but - applications may find it helpful, particularly when large SBML models - are being communicated across data links of limited bandwidth. -"; - - -%feature("docstring") SBMLWriter::SBMLWriter " - Creates a new SBMLWriter. - - The libSBML SBMLWriter objects offer methods for writing SBML in - XML form to files and text strings. -"; - - -%feature("docstring") SBMLWriter::setProgramName " - Sets the name of this program, i.e., the program that is about to - write out the SBMLDocument. - - If the program name and version are set (see - SBMLWriter.setProgramVersion()), the - following XML comment, intended for human consumption, will be written - at the beginning of the XML document: - @verbatim - - @endverbatim - - If the program name and version are not set at some point before - calling the writeSBML() methods, no such comment is written out. - - @param name the name of this program (where \'this program\' refers to - program in which libSBML is embedded, not libSBML itself!) - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see setProgramVersion() -"; - - -%feature("docstring") SBMLWriter::setProgramVersion " - Sets the version of this program, i.e., the program that is about to - write out the SBMLDocument. - - If the program version and name are set (see - SBMLWriter.setProgramName()), the - following XML comment, intended for human consumption, will be written - at the beginning of the document: - @verbatim - - @endverbatim - - If the program version and name are not set at some point before - calling the writeSBML() methods, no such comment is written out. - - @param version the version of this program (where \'this program\' - refers to program in which libSBML is embedded, not libSBML itself!) - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see setProgramName() -"; - - -%feature("docstring") SBMLWriter::writeSBML " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -


- Method variant with the following signature: -
writeSBML(SBMLDocument d, string filename)
- - Writes the given SBML document to filename. - - @htmlinclude assuming-compressed-file.html - - @param d the SBML document to be written - - @param filename the name or full pathname of the file where the SBML - is to be written. - - @return @c True on success and @c False if the filename could not be - opened for writing. - - @note @htmlinclude note-writing-zipped-files.html - - @see setProgramVersion() - @see setProgramName() - - -
- Method variant with the following signature: -
writeSBML(SBMLDocument d, std::ostream& stream)
- - Writes the given SBML document to the output stream. - - @param d the SBML document to be written - - @param stream the stream object where the SBML is to be written. - - @return @c True on success and @c False if one of the underlying - parser components fail (rare). - - @see setProgramVersion() - @see setProgramName() -"; - - -%feature("docstring") SBMLWriter::writeToString " - @internal - Writes the given SBML document to an in-memory string and returns a - pointer to it. - - The string is owned by the caller and should be freed (with @c free()) - when no longer needed. - - @param d the SBML document to be written - - @return the string on success and @c 0 if one of the underlying parser - components fail. - - @see setProgramVersion() - @see setProgramName() -"; - - -%feature("docstring") SBMLWriter::writeSBMLToFile " - Writes the given SBML document to filename. - - @htmlinclude assuming-compressed-file.html - - @param d the SBML document to be written - - @param filename the name or full pathname of the file where the SBML - is to be written. - - @return @c True on success and @c False if the filename could not be - opened for writing. - - @note @htmlinclude note-writing-zipped-files.html - - @see setProgramVersion() - @see setProgramName() -"; - - -%feature("docstring") SBMLWriter::writeSBMLToString " - Writes the given SBML document to an in-memory string and returns a - pointer to it. - - The string is owned by the caller and should be freed (with @c free()) - when no longer needed. - - @param d the SBML document to be written - - @return the string on success and @c 0 if one of the underlying parser - components fail. - - @see setProgramVersion() - @see setProgramName() -"; - - -%feature("docstring") SBMLWriter::hasZlib " - Predicate returning @c True if this copy of libSBML has been linked - with the zlib library. - - LibSBML supports reading and writing files compressed with either - bzip2 or zip/gzip compression. The facility depends on libSBML having - been compiled with the necessary support libraries. This method - allows a calling program to inquire whether that is the case for the - copy of libSBML it is using. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLWriter), and the other - will be a standalone top-level function with the name - SBMLWriter_hasZlib(). They are functionally identical. @endif@~ - - @return @c True if libSBML is linked with zlib, @c False otherwise. - - @see @if clike hasBzip2() @else SBMLWriter.hasBzip2() @endif@~ -"; - - -%feature("docstring") SBMLWriter::hasBzip2 " - Predicate returning @c True if this copy of libSBML has been linked - with the bzip2 library. - - LibSBML supports reading and writing files compressed with either - bzip2 or zip/gzip compression. The facility depends on libSBML having - been compiled with the necessary support libraries. This method - allows a calling program to inquire whether that is the case for the - copy of libSBML it is using. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLWriter), and the other - will be a standalone top-level function with the name - SBMLWriter_hasZlib(). They are functionally identical. @endif@~ - - @return @c True if libSBML is linked with bzip2, @c False otherwise. - - @see @if clike hasZlib() @else SBMLWriter.hasZlib() @endif@~ -"; - - -%feature("docstring") writeSBML " - Writes the given SBML document @p d to the file named by @p filename. - - This function is identical to @if clike SBMLWriter.writeSBMLToFile ()@endif@if java writeSBMLToFile(SBMLDocument d, String filename)@endif. - - @htmlinclude assuming-compressed-file.html - - @param d the SBMLDocument object to be written out in XML format - - @param filename a string giving the path to a file where the XML - content is to be written. - - @return @c 1 on success and @c 0 (zero) if @p filename could not be - written. Some possible reasons for failure include (a) being unable to - open the file, and (b) using a filename that indicates a compressed SBML - file (i.e., a filename ending in ".zip" or - similar) when the compression functionality has not been enabled in - the underlying copy of libSBML. - - @if clike @warning Note that the string is owned by the caller and - should be freed (with the normal string free() C++ - function) after it is no longer needed.@endif@~ - - @see SBMLWriter.hasZlib() - @see SBMLWriter.hasBzip2() -"; - - -%feature("docstring") writeSBMLToString " - Writes the given SBML document @p d to an in-memory string and - returns the string. - - This is a convenience function that uses the - SBMLWriter.writeSBMLToString() method internally, - yet does not require the caller to create an SBMLWriter object first. - - @param d an SBMLDocument object to be written out in XML format - - @return the string on success and @c None if one of the underlying parser - components fail. - - @if clike @warning Note that the string is owned by the caller and - should be freed (with the normal string free() C++ - function) after it is no longer needed.@endif@~ -"; - - -%feature("docstring") writeSBMLToFile " - Writes the given SBML document @p d to the file @p filename. - - This is a convenience function that uses the - SBMLWriter.writeSBMLToFile() method internally, yet does not require the caller to create - an SBMLWriter object first. - - @htmlinclude assuming-compressed-file.html - - @param d an SBMLDocument object to be written out in XML format - - @param filename a string giving the path to a file where the XML - content is to be written. - - @return @c 1 on success and @c 0 (zero) if @p filename could not be - written. Some possible reasons for failure include (a) being unable to - open the file, and (b) using a filename that indicates a compressed SBML - file (i.e., a filename ending in ".zip" or - similar) when the compression functionality has not been enabled in - the underlying copy of libSBML. - - @if clike @warning Note that the string is owned by the caller and - should be freed (with the normal string free() C++ - function) after it is no longer needed.@endif@~ - - @see SBMLWriter.hasZlib() - @see SBMLWriter.hasBzip2() -"; - - -%feature("docstring") SBMLTypeCode_toString " - This method takes an SBML type code and returns a string representing - the code. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return a human readable name for the given - @if clike #SBMLTypeCode_t value@else SBML type code@endif. - - @note The caller does not own the returned string and is therefore not - allowed to modify it. -"; - - -%feature("docstring") SBase " - @ingroup Core - Implementation of %SBase, the base class of most SBML objects. - - Most components in SBML are derived from a single abstract base type, - SBase. In addition to serving as the parent class for most other - classes of objects in SBML, this base type is designed to allow a - modeler or a software package to attach arbitrary information to each - major element or list in an SBML model. - - SBase has an optional subelement called \'notes\'. It is intended to - serve as a place for storing optional information intended to be seen by - humans. An example use of the \'notes\' element would be to contain - formatted user comments about the model element in which the \'notes\' - element is enclosed. There are certain conditions on the XHTML content - permitted inside the \'notes\' element; please consult the SBML - specification document corresponding to the SBML Level and Version - of your model for more information about the requirements for \'notes\' - content. - - SBase has another optional subelement called \'annotation\'. Whereas the - \'notes\' element described above is a container for content to be shown - directly to humans, the \'annotation\' element is a container for optional - software-generated content @em not meant to be shown to humans. The - element\'s content type is XML type - \'any\', allowing essentially arbitrary data content. SBML places - only a few restrictions on the organization of the content; these are - intended to help software tools read and write the data as well as help - reduce conflicts between annotations added by different tools. As is - the case with \'notes\', it is important to refer to the SBML - specification document corresponding to the SBML Level and Version - of your model for more information about the requirements for - \'annotation\' content. - - It is worth pointing out that the \'annotation\' element in the definition - of SBase exists in order that software developers may attach optional - application-specific data to the elements in an SBML model. However, it - is important that this facility not be misused. In particular, it is - critical that data essential to a model definition or that can - be encoded in existing SBML elements is not stored in - \'annotation\'. Parameter values, functional dependencies between model - elements, etc., should not be recorded as annotations. It is crucial to - keep in mind the fact that data placed in annotations can be freely - ignored by software applications. If such data affects the - interpretation of a model, then software interoperability is greatly - impeded. - - SBML Level 2 introduced an optional SBase attribute named \'metaid\' for - supporting metadata annotations using RDF (Resource Description Format). The - attribute value has the data type XML ID, the XML identifier - type, which means each \'metaid\' value must be globally unique within an - SBML file. (Importantly, this uniqueness criterion applies across any - attribute with type XML - ID, not just the \'metaid\' attribute used by SBML—something to - be aware of if your application-specific XML content inside the - \'annotation\' subelement happens to use XML ID.) The \'metaid\' value - serves to identify a model component for purposes such as referencing - that component from metadata placed within \'annotation\' subelements. - - Beginning with SBML Level 2 Version 3, SBase also has an optional - attribute named \'sboTerm\' for supporting the use of the Systems Biology - Ontology. In SBML proper, the data type of the attribute is a string of - the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a seven digit integer number; - libSBML simplifies the representation by only storing the \'NNNNNNN\' - integer portion. Thus, in libSBML, the \'sboTerm\' attribute on SBase has - data type @c int, and SBO identifiers are stored simply as integers. - (For convenience, SBase offers methods for returning both the integer - form and a text-string form of the SBO identifier.) SBO terms are a - type of optional annotation, and each different class of SBML object - derived from SBase imposes its own requirements about the values - permitted for \'sboTerm\'. Please consult the SBML Level 2 - Version 4 specification for more information about the use of SBO - and the \'sboTerm\' attribute. - - Finally, note that, in the list of methods on SBase, there is no public - constructor because SBase is an abstract class. The constructors reside - in the subclasses derived from SBase. - - - @section sbase-miriam Standard format for annotations linking data resources - - SBML Level 2 Versions 2, 3 and 4, and Level 3, define a proposed - regular format for encoding two particular categories of annotations: - (a) references to controlled vocabulary terms and database identifiers - which define and describe biological and biochemical entities in a - model; and (b) descriptions of the provenance of a model, including its - author(s) and modification history. -"; - - -%feature("docstring") SBase::accept " - Accepts the given SBMLVisitor for this SBase object. - - @param v the SBMLVisitor instance to be used - - @return the result of calling v.visit(). -"; - - -%feature("docstring") SBase::clone " - Creates and returns a deep copy of this SBase object. - - @return a (deep) copy of this SBase object. -"; - - -%feature("docstring") SBase::getElementBySId " - Returns the first child element found that has the given @p id in the - model-wide @c SId namespace, or @c None if no such object is found. - - @param id string representing the \'id\' attribute value of the object - to find. - - @return pointer to the first element found with the given identifier. -"; - - -%feature("docstring") SBase::getElementByMetaId " - Returns the first child element it can find with a specific \'metaid\' - attribute value, or @c None if no such object is found. - - @htmlinclude what-is-metaid.html - - @param metaid string representing the \'metaid\' attribute value of the - object to find. - - @return pointer to the first element found with the given meta-identifier. -"; - - -%feature("docstring") SBase::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth. - - @return a pointer to a List of pointers to all children objects. -"; - - -%feature("docstring") SBase::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML content (if such exists). - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") SBase::renameMetaIdRefs " - Renames all the meta-identifier attributes on this element. - - @htmlinclude what-is-metaidref.html - - This method works by looking at all meta-identifier attribute values, - comparing the identifiers to the value of @p oldid. If any matches are - found, the matching identifiers are replaced with @p newid. The method - does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") SBase::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") SBase::replaceSIDWithFunction " - @internal - If this object has a child \'math\' object (or anything with ASTNodes in - general), replace all nodes with the name \'id\' with the provided - function. - - @note This function does nothing itself—subclasses with ASTNode - subelements must override this function. -"; - - -%feature("docstring") SBase::divideAssignmentsToSIdByFunction " - @internal - If the function of this object is to assign a value has a child \'math\' - object (or anything with ASTNodes in general), replace the \'math\' - object with the function (existing/function). - - @note This function does nothing itself—subclasses with ASTNode - subelements must override this function. -"; - - -%feature("docstring") SBase::multiplyAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). -"; - - -%feature("docstring") SBase::getElementFromPluginsBySId " - @internal - Returns the first child element found that has the given @p id in the - model-wide SId namespace from all plug-ins associated with this - element, or @c None if no such object is found. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") SBase::getElementFromPluginsByMetaId " - @internal - Returns the first child element it can find with the given @p metaid from - all plug-ins associated with this element, or @c None if no such object - is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") SBase::hasNonstandardIdentifierBeginningWith " - @internal - Check to see if the given prefix is used by any of the IDs defined by - extension elements *excluding* \'id\' and \'metaid\' attributes (as, for - example, the spatial id attributes \'spid\'). -"; - - -%feature("docstring") SBase::prependStringToAllIdentifiers " - @internal - Add the given string to all identifiers in the object. If the string - is added to anything other than an id or a metaid, this code is - responsible for tracking down and renaming all *idRefs in the package - extention that identifier comes from. -"; - - -%feature("docstring") SBase::transformIdentifiers " - @internal - Add the given string to all identifiers in the object. If the string - is added to anything other than an id or a metaid, this code is - responsible for tracking down and renaming all *idRefs in the package - extention that identifier comes from. -"; - - -%feature("docstring") SBase::getAllElementsFromPlugins " - Returns a List of all child SBase objects contained in SBML package - plug-ins. - - @htmlinclude what-are-plugins.html - - This method walks down the list of all SBML Level 3 packages used - by this object and returns all child objects defined by those packages. - - @return a pointer to a List of pointers to all children objects from - plug-ins. -"; - - -%feature("docstring") SBase::getMetaId " - Returns the value of the \'metaid\' attribute of this object. - - @htmlinclude what-is-metaid.html - - @return the meta-identifier of this SBML object. - - @see isSetMetaId() - @see setMetaId() -"; - - -%feature("docstring") SBase::getId " - @internal - Returns the value of the \'metaid\' attribute of this object. - - @htmlinclude what-is-metaid.html - - @return the meta-identifier of this SBML object, as a string. - - @see isSetMetaId() - @see setMetaId() -"; - - -%feature("docstring") SBase::getName " - @internal - Returns the value of the \'metaid\' attribute of this object. - - @htmlinclude what-is-metaid.html - - @return the meta-identifier of this SBML object, as a string. - - @see isSetMetaId() - @see setMetaId() -"; - - -%feature("docstring") SBase::getNotes " - Returns the content of the \'notes\' subelement of this object as - a tree of XMLNode objects. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - The \'notes\' element content returned by this method will be in XML - form, but libSBML does not provide an object model specifically for - the content of notes. Callers will need to traverse the XML tree - structure using the facilities available on XMLNode and related - objects. For an alternative method of accessing the notes, see - getNotesString(). - - @return the content of the \'notes\' subelement of this SBML object as a - tree structure composed of XMLNode objects. - - @see getNotesString() - @see isSetNotes() - @see setNotes() - @see setNotes() - @see appendNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() -"; - - -%feature("docstring") SBase::getNotesString " - Returns the content of the \'notes\' subelement of this object as a - string. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - For an alternative method of accessing the notes, see getNotes(), - which returns the content as an XMLNode tree structure. Depending on - an application\'s needs, one or the other method may be more - convenient. - - @return the content of the \'notes\' subelement of this SBML object as a - string. - - @see getNotes() - @see isSetNotes() - @see setNotes() - @see setNotes() - @see appendNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() -"; - - -%feature("docstring") SBase::getAnnotation " - Returns the content of the \'annotation\' subelement of this object as - a tree of XMLNode objects. - - Whereas the SBML \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type - \'any\', allowing essentially arbitrary well-formed XML data - content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - The annotations returned by this method will be in XML form. LibSBML - provides an object model and related interfaces for certain specific - kinds of annotations, namely model history information and RDF - content. See the ModelHistory, CVTerm and RDFAnnotationParser classes - for more information about the facilities available. - - @return the annotation of this SBML object as a tree of XMLNode objects. - - @see getAnnotationString() - @see isSetAnnotation() - @see setAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see appendAnnotation() - @see unsetAnnotation() -"; - - -%feature("docstring") SBase::getAnnotationString " - Returns the content of the \'annotation\' subelement of this object as a - character string. - - Whereas the SBML \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type - \'any\', allowing essentially arbitrary well-formed XML data - content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - The annotations returned by this method will be in string form. - - @return the annotation of this SBML object as a character string. - - @see getAnnotation() - @see isSetAnnotation() - @see setAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see appendAnnotation() - @see unsetAnnotation() -"; - - -%feature("docstring") SBase::getNamespaces " - Returns a list of the XML Namespaces declared on this SBML document. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in SBML Level 3) packages used in addition to SBML Level 3 - Core. - - @return the XML Namespaces associated with this SBML object - - @see getLevel() - @see getVersion() -"; - - -%feature("docstring") SBase::getSBMLDocument " - Returns the SBMLDocument object containing @em this object instance. - - LibSBML uses the class SBMLDocument as a top-level container for - storing SBML content and data associated with it (such as warnings and - error messages). An SBML model in libSBML is contained inside an - SBMLDocument object. SBMLDocument corresponds roughly to the class - SBML defined in the SBML Level 3 and Level 2 - specifications, but it does not have a direct correspondence in SBML - Level 1. (But, it is created by libSBML no matter whether the - model is Level 1, Level 2 or Level 3.) - - This method allows the caller to obtain the SBMLDocument for the - current object. - - @return the parent SBMLDocument object of this SBML object. - - @see getParentSBMLObject() - @see getModel() -"; - - -%feature("docstring") SBase::getParentSBMLObject " - Returns the parent SBML object containing this object. - - This returns the immediately-containing object. This method is - convenient when holding an object nested inside other objects in an - SBML model. - - @return the parent SBML object of this SBML object. - - @see getSBMLDocument() - @see getModel() -"; - - -%feature("docstring") SBase::getAncestorOfType " - Returns the first ancestor object that has the given SBML type code. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - This method searches the tree of objects that are parents of this - object, and returns the first one that has the given SBML type code. - If the optional argument @p pkgName is given, it will cause the search - to be limited to the SBML Level 3 package given. - - @param type the SBML type code of the object sought - - @param pkgName (optional) the short name of an SBML Level 3 - package to which the sought-after object must belong - - @return the ancestor SBML object of this SBML object that corresponds - to the given @if clike #SBMLTypeCode_t value@else SBML object type - code@endif, or @c None if no ancestor exists. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SBase::getSBOTerm " - Returns the integer portion of the value of the \'sboTerm\' attribute of - this object. - - Beginning with SBML Level 2 Version 3, objects derived from SBase have - an optional attribute named \'sboTerm\' for supporting the use of the - Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a - seven digit integer number; libSBML simplifies the representation by - only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the - \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers - are stored simply as integers. (For convenience, libSBML offers - methods for returning both the integer form and a text-string form of - the SBO identifier.) - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for \'sboTerm\'. Please consult the SBML - Level 2 Version 4 specification for more information about - the use of SBO and the \'sboTerm\' attribute. - - @return the value of the \'sboTerm\' attribute as an integer, or @c -1 - if the value is not set. -"; - - -%feature("docstring") SBase::getSBOTermID " - Returns the string representation of the \'sboTerm\' attribute of - this object. - - Beginning with SBML Level 2 Version 3, objects derived from SBase have - an optional attribute named \'sboTerm\' for supporting the use of the - Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a - seven digit integer number; libSBML simplifies the representation by - only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the - \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers - are stored simply as integers. This method returns the entire SBO - identifier as a text string in the form \'SBO:NNNNNNN\'. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for \'sboTerm\'. Please consult the SBML - Level 2 Version 4 specification for more information about - the use of SBO and the \'sboTerm\' attribute. - - @return the value of the \'sboTerm\' attribute as a string (its value - will be of the form \'SBO:NNNNNNN\'), or an empty string if - the value is not set. -"; - - -%feature("docstring") SBase::getSBOTermAsURL " - Returns the identifiers.org URL representation of the \'sboTerm\' attribute of - this object. - - This method returns the entire SBO - identifier as a text string in the form - \'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN\'. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for \'sboTerm\'. Please consult the SBML - Level 2 Version 4 specification for more information about - the use of SBO and the \'sboTerm\' attribute. - - @return the value of the \'sboTerm\' attribute as an identifiers.org URL - (its value will be of the form - \'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN\'), or an empty string if - the value is not set. -"; - - -%feature("docstring") SBase::getLine " - Returns the line number on which this object first appears in the XML - representation of the SBML document. - - @return the line number of this SBML object. - - @note The line number for each construct in an SBML model is set upon - reading the model. The accuracy of the line number depends on the - correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real line number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100% accurate in all situations. (At this - time, libSBML supports the use of libxml2, Expat and Xerces.) - - @see getColumn() -"; - - -%feature("docstring") SBase::getColumn " - Returns the column number on which this object first appears in the XML - representation of the SBML document. - - @return the column number of this SBML object. - - @note The column number for each construct in an SBML model is set - upon reading the model. The accuracy of the column number depends on - the correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real column number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100% accurate in all situations. (At this - time, libSBML supports the use of libxml2, Expat and Xerces.) - - @see getLine() -"; - - -%feature("docstring") SBase::getModelHistory " - Returns the ModelHistory object, if any, attached to this object. - - @return the ModelHistory object attached to this object, or @c None if - none exist. - - @note In SBML Level 2, model history annotations were only - permitted on the Model element. In SBML Level 3, they are - permitted on all SBML components derived from SBase. -"; - - -%feature("docstring") SBase::isSetMetaId " - Predicate returning @c True if this object\'s \'metaid\' attribute is set. - - @htmlinclude what-is-metaid.html - - @return @c True if the \'metaid\' attribute of this SBML object is - set, @c False otherwise. - - @see getMetaId() - @see setMetaId() -"; - - -%feature("docstring") SBase::isSetId " - @internal - Predicate returning @c True if this object\'s \'metaid\' attribute is set. - - @htmlinclude what-is-metaid.html - - @return @c True if the \'metaid\' attribute of this SBML object is - set, @c False otherwise. - - @see getMetaId() - @see setMetaId() -"; - - -%feature("docstring") SBase::isSetName " - @internal - Predicate returning @c True if this object\'s \'metaid\' attribute is set. - - @htmlinclude what-is-metaid.html - - @return @c True if the \'metaid\' attribute of this SBML object is - set, @c False otherwise. - - @see getMetaId() - @see setMetaId() -"; - - -%feature("docstring") SBase::isSetNotes " - Predicate returning @c True if this - object\'s \'notes\' subelement exists and has content. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - @return @c True if a \'notes\' subelement exists, @c False otherwise. - - @see getNotes() - @see getNotesString() - @see setNotes() - @see setNotes() - @see appendNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() -"; - - -%feature("docstring") SBase::isSetAnnotation " - Predicate returning @c True if this - object\'s \'annotation\' subelement exists and has content. - - Whereas the SBase \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type - \'any\', allowing essentially arbitrary well-formed XML data - content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - @return @c True if a \'annotation\' subelement exists, @c False - otherwise. - - @see getAnnotation() - @see getAnnotationString() - @see setAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see appendAnnotation() - @see unsetAnnotation() -"; - - -%feature("docstring") SBase::isSetSBOTerm " - Predicate returning @c True if this - object\'s \'sboTerm\' attribute is set. - - @return @c True if the \'sboTerm\' attribute of this SBML object is - set, @c False otherwise. -"; - - -%feature("docstring") SBase::setMetaId " - Sets the value of the meta-identifier attribute of this object. - - @htmlinclude what-is-metaid.html - - The string @p metaid is copied. - - @param metaid the identifier string to use as the value of the - \'metaid\' attribute - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @see getMetaId() - @see isSetMetaId() -"; - - -%feature("docstring") SBase::isSetModelHistory " - Predicate returning @c True if this - object has a ModelHistory object attached to it. - - @return @c True if the ModelHistory of this object is set, @c - false otherwise. - - @note In SBML Level 2, model history annotations were only - permitted on the Model element. In SBML Level 3, they are - permitted on all SBML components derived from SBase. -"; - - -%feature("docstring") SBase::setId " - @internal - Predicate returning @c True if this - object has a ModelHistory object attached to it. - - @return @c True if the ModelHistory of this object is set, @c - false otherwise. - - @note In SBML Level 2, model history annotations were only - permitted on the Model element. In SBML Level 3, they are - permitted on all SBML components derived from SBase. -"; - - -%feature("docstring") SBase::setName " - @internal - Predicate returning @c True if this - object has a ModelHistory object attached to it. - - @return @c True if the ModelHistory of this object is set, @c - false otherwise. - - @note In SBML Level 2, model history annotations were only - permitted on the Model element. In SBML Level 3, they are - permitted on all SBML components derived from SBase. -"; - - -%feature("docstring") SBase::setAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setAnnotation(XMLNode annotation)
- - Sets the value of the \'annotation\' subelement of this SBML object. - - The content of @p annotation is copied, and any previous content of - this object\'s \'annotation\' subelement is deleted. - - Whereas the SBase \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type - \'any\', allowing essentially arbitrary well-formed XML data - content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - Call this method will result in any existing content of the - \'annotation\' subelement to be discarded. Unless you have taken steps - to first copy and reconstitute any existing annotations into the @p - annotation that is about to be assigned, it is likely that performing - such wholesale replacement is unfriendly towards other software - applications whose annotations are discarded. An alternative may be - to use SBase.appendAnnotation() or - SBase.appendAnnotation(). - - @param annotation an XML structure that is to be used as the new content - of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see getAnnotationString() - @see isSetAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see appendAnnotation() - @see unsetAnnotation() - - -
- Method variant with the following signature: -
setAnnotation(string annotation)
- - Sets the value of the \'annotation\' subelement of this SBML object. - - The content of @p annotation is copied, and any previous content of - this object\'s \'annotation\' subelement is deleted. - - Whereas the SBase \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type - \'any\', allowing essentially arbitrary well-formed XML data - content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - Call this method will result in any existing content of the - \'annotation\' subelement to be discarded. Unless you have taken steps - to first copy and reconstitute any existing annotations into the @p - annotation that is about to be assigned, it is likely that performing - such wholesale replacement is unfriendly towards other software - applications whose annotations are discarded. An alternative may be - to use SBase.appendAnnotation() or - SBase.appendAnnotation(). - - @param annotation an XML string that is to be used as the content - of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getAnnotationString() - @see isSetAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see appendAnnotation() - @see unsetAnnotation() -"; - - -%feature("docstring") SBase::appendAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
appendAnnotation(XMLNode annotation)
- - Appends the given @p annotation to the \'annotation\' subelement of this - object. - - Whereas the SBase \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type \'any\', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - Unlike SBase.setAnnotation() or - SBase.setAnnotation(), this method - allows other annotations to be preserved when an application adds its - own data. - - @param annotation an XML structure that is to be copied and appended - to the content of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getAnnotationString() - @see isSetAnnotation() - @see setAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see unsetAnnotation() - - -
- Method variant with the following signature: -
appendAnnotation(string annotation)
- - Appends the given @p annotation to the \'annotation\' subelement of this - object. - - Whereas the SBase \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type \'any\', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - Unlike SBase.setAnnotation() or - SBase.setAnnotation(), this method - allows other annotations to be preserved when an application adds its - own data. - - @param annotation an XML string that is to be copied and appended - to the content of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getAnnotationString() - @see isSetAnnotation() - @see setAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see unsetAnnotation() -"; - - -%feature("docstring") SBase::removeTopLevelAnnotationElement " - Removes the top-level element within the \'annotation\' subelement of this - SBML object with the given name and optional URI. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - Calling this method allows a particular annotation element to be removed - whilst the remaining annotations remain intact. - - @param elementName a string representing the name of the top level - annotation element that is to be removed - @param elementURI an optional string that is used to check both the name - and URI of the top level element to be removed - @param removeEmpty if after removing of the element, the annotation is - empty, and the removeEmpty argument is true, the annotation node will be - deleted (default). - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND @endlink - @li @link libsbml.LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND @endlink - - @see replaceTopLevelAnnotationElement() - @see replaceTopLevelAnnotationElement() -"; - - -%feature("docstring") SBase::replaceTopLevelAnnotationElement " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
replaceTopLevelAnnotationElement(XMLNode annotation)
- - Replaces the given top-level element within the \'annotation\' - subelement of this SBML object and with the annotation element supplied. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - This method determines the name of the element to be replaced from the - annotation argument. Functionally it is equivalent to calling - removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name); - with the exception that the placement of the annotation element remains - the same. - - @param annotation XMLNode representing the replacement top level annotation - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @see removeTopLevelAnnotationElement() - @see replaceTopLevelAnnotationElement() - - -
- Method variant with the following signature: -
replaceTopLevelAnnotationElement(string annotation)
- - Replaces the given top-level element within the \'annotation\' - subelement of this SBML object and with the annotation element supplied. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - This method determines the name of the element to be replaced from the - annotation argument. Functionally it is equivalent to calling - removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name); - with the exception that the placement of the annotation element remains - the same. - - @param annotation string representing the replacement top level annotation - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @see removeTopLevelAnnotationElement() - @see replaceTopLevelAnnotationElement() -"; - - -%feature("docstring") SBase::setNotes " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setNotes(string notes, bool addXHTMLMarkup = false)
- - Sets the value of the \'notes\' subelement of this SBML object to a copy - of the string @p notes. - - The content of @p notes is copied, and any existing content of this - object\'s \'notes\' subelement is deleted. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - The following code illustrates a very simple way of setting the notes - using this method. Here, the object being annotated is the whole SBML - document, but that is for illustration purposes only; you could of - course use this same approach to annotate any other SBML component. - @if clike - @verbatim - SBMLDocument s = new SBMLDocument(3, 1); - s->setNotes(\'

here is my note

\'); - @endverbatim - @endif@if java - @verbatim - SBMLDocument s = new SBMLDocument(3, 1); - s.setNotes(\'

here is my note

\'); - @endverbatim - @endif@if csharp - @verbatim - SBMLDocument s = new SBMLDocument(3, 1); - s.setNotes(\'

here is my note

\'); - @endverbatim - @endif@~ - - @param notes an XML string that is to be used as the content of the - \'notes\' subelement of this object - - @param addXHTMLMarkup a boolean indicating whether to wrap the contents - of the @p notes argument with XHTML paragraph (<p>) - tags. This is appropriate when the string in @p notes does not already - containg the appropriate XHTML markup. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getNotesString() - @see isSetNotes() - @see setNotes() - @see appendNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() - - -
- Method variant with the following signature: -
setNotes(XMLNode notes)
- - Sets the value of the \'notes\' subelement of this SBML object. - - The content of @p notes is copied, and any existing content of this - object\'s \'notes\' subelement is deleted. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - @param notes an XML structure that is to be used as the content of the - \'notes\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @see getNotesString() - @see isSetNotes() - @see setNotes() - @see appendNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() -"; - - -%feature("docstring") SBase::appendNotes " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
appendNotes(string notes)
- - Appends the given @p notes to the \'notes\' subelement of this object. - - The content of the parameter @p notes is copied. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - @param notes an XML string that is to appended to the content of - the \'notes\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getNotesString() - @see isSetNotes() - @see setNotes() - @see setNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() - - -
- Method variant with the following signature: -
appendNotes(XMLNode notes)
- - Appends the given @p notes to the \'notes\' subelement of this object. - - The content of @p notes is copied. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - @param notes an XML node structure that is to appended to the content - of the \'notes\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getNotesString() - @see isSetNotes() - @see setNotes() - @see setNotes() - @see appendNotes() - @see unsetNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() -"; - - -%feature("docstring") SBase::setModelHistory " - Sets the ModelHistory of this object. - - The content of @p history is copied, and this object\'s existing model - history content is deleted. - - @param history ModelHistory of this object. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note In SBML Level 2, model history annotations were only - permitted on the Model element. In SBML Level 3, they are - permitted on all SBML components derived from SBase. -"; - - -%feature("docstring") SBase::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. - - @param d the SBMLDocument object to use - - @see connectToChild() - @if clike - @see enablePackageInternal() - @endif@~ -"; - - -%feature("docstring") SBase::connectToParent " - @internal - Sets the parent SBML object of this SBML object. - (Creates a child-parent relationship by the child) - This function is called when a child element is - set/added/created by its parent element (e.g. by setXXX, - addXXX, createXXX, and connectToChild functions of the - parent element). - - @param parent the SBML object to use -"; - - -%feature("docstring") SBase::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor, assignment operator. - - @if clike - @see setSBMLDocument() - @see enablePackageInternal() - @endif@~ -"; - - -%feature("docstring") SBase::setSBOTerm " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setSBOTerm(int value)
- - Sets the value of the \'sboTerm\' attribute. - - Beginning with SBML Level 2 Version 3, objects derived from SBase have - an optional attribute named \'sboTerm\' for supporting the use of the - Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a - seven digit integer number; libSBML simplifies the representation by - only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the - \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers - are stored simply as integers. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for \'sboTerm\'. Please consult the SBML - Level 2 Version 4 specification for more information about - the use of SBO and the \'sboTerm\' attribute. - - @param value the NNNNNNN integer portion of the SBO identifier - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @see setSBOTerm() - - -
- Method variant with the following signature: -
setSBOTerm(string &sboid)
- - Sets the value of the \'sboTerm\' attribute by string. - - Beginning with SBML Level 2 Version 3, objects derived from SBase have - an optional attribute named \'sboTerm\' for supporting the use of the - Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a - seven digit integer number; libSBML simplifies the representation by - only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the - \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers - are stored simply as integers. This method lets you set the value of - \'sboTerm\' as a complete string of the form \'SBO:NNNNNNN\', whereas - setSBOTerm(int value) allows you to set it using the integer form. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for \'sboTerm\'. Please consult the SBML - Level 2 Version 4 specification for more information about - the use of SBO and the \'sboTerm\' attribute. - - @param sboid the SBO identifier string of the form \'SBO:NNNNNNN\' - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @see setSBOTerm() -"; - - -%feature("docstring") SBase::setNamespaces " - Sets the namespaces relevant of this SBML object. - - The content of @p xmlns is copied, and this object\'s existing - namespace content is deleted. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - - @param xmlns the namespaces to set - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") SBase::unsetMetaId " - Unsets the value of the \'metaid\' attribute of this SBML object. - - @htmlinclude what-is-metaid.html - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBase::unsetId " - Unsets the value of the \'id\' attribute of this SBML object. - - Most (but not all) objects in SBML include two common attributes: \'id\' - and \'name\'. The identifier given by an object\'s \'id\' attribute value - is used to identify the object within the SBML model definition. - Other objects can refer to the component using this identifier. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBase::unsetName " - Unsets the value of the \'name\' attribute of this SBML object. - - Most (but not all) objects in SBML include two common attributes: \'id\' - and \'name\'. In contrast to the \'id\' attribute, the \'name\' attribute is - optional and is not intended to be used for cross-referencing purposes - within a model. Its purpose instead is to provide a human-readable - label for the component. The data type of \'name\' is the type - string defined in XML Schema. SBML imposes no - restrictions as to the content of \'name\' attributes beyond those - restrictions defined by the string type in XML Schema. - - The recommended practice for handling \'name\' is as follows. If a - software tool has the capability for displaying the content of \'name\' - attributes, it should display this content to the user as a - component\'s label instead of the component\'s \'id\'. If the user - interface does not have this capability (e.g., because it cannot - display or use special characters in symbol names), or if the \'name\' - attribute is missing on a given component, then the user interface - should display the value of the \'id\' attribute instead. (Script - language interpreters are especially likely to display \'id\' instead of - \'name\'.) - - As a consequence of the above, authors of systems that automatically - generate the values of \'id\' attributes should be aware some systems - may display the \'id\'\'s to the user. Authors therefore may wish to - take some care to have their software create \'id\' values that are: (a) - reasonably easy for humans to type and read; and (b) likely to be - meaningful, for example by making the \'id\' attribute be an abbreviated - form of the name attribute value. - - An additional point worth mentioning is although there are - restrictions on the uniqueness of \'id\' values, there are no - restrictions on the uniqueness of \'name\' values in a model. This - allows software applications leeway in assigning component identifiers. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBase::unsetNotes " - Unsets the value of the \'notes\' subelement of this SBML object. - - The optional SBML element named \'notes\', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - \'notes\' element would be to contain formatted user comments about the - model element in which the \'notes\' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for \'notes\', allowing users considerable freedom when adding - comments to their models. - - The format of \'notes\' elements must be XHTML 1.0. To help - verify the formatting of \'notes\' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more - in-depth explanations. The SBML Level 2 and  3 - specifications have considerable detail about how \'notes\' element - content must be structured. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see getNotesString() - @see isSetNotes() - @see setNotes() - @see setNotes() - @see appendNotes() - @see appendNotes() - @see SyntaxChecker.hasExpectedXHTMLSyntax() -"; - - -%feature("docstring") SBase::unsetAnnotation " - Unsets the value of the \'annotation\' subelement of this SBML object. - - Whereas the SBase \'notes\' subelement is a container for content to be - shown directly to humans, the \'annotation\' element is a container for - optional software-generated content @em not meant to be shown to - humans. Every object derived from SBase can have its own value for - \'annotation\'. The element\'s content type is XML type - \'any\', allowing essentially arbitrary well-formed XML data - content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added by - different tools. Please see the SBML specifications for more details. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see getAnnotation() - @see getAnnotationString() - @see isSetAnnotation() - @see setAnnotation() - @see setAnnotation() - @see appendAnnotation() - @see appendAnnotation() -"; - - -%feature("docstring") SBase::unsetSBOTerm " - Unsets the value of the \'sboTerm\' attribute of this SBML object. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") SBase::addCVTerm " - Adds a copy of the given CVTerm object to this SBML object. - - @param term the CVTerm to assign. - - @param newBag if @c True, creates a new RDF bag with the same identifier - as a previous bag, and if @c False, adds the term to an existing - RDF bag with the same type of qualifier as the term being added. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink, if - this object lacks a \'metaid\' attribute - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note Since the CV Term uses the \'metaid\' attribute of the object as a - reference, if the object has no \'metaid\' attribute value set, then the - CVTerm will not be added. - - @warning The fact that this method @em copies the object passed to it - means that the caller will be left holding a physically different - object instance than the one contained in @em this object. Changes - made to the original object instance (such as resetting attribute - values) will not affect the instance added here. In - addition, the caller should make sure to free the original object if - it is no longer being used, or else a memory leak will result. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SBase::getCVTerms " - Returns a list of CVTerm objects in the annotations of this SBML - object. - - @return the list of CVTerms for this SBML object. -"; - - -%feature("docstring") SBase::getNumCVTerms " - Returns the number of CVTerm objects in the annotations of this SBML - object. - - @return the number of CVTerms for this SBML object. -"; - - -%feature("docstring") SBase::getCVTerm " - Returns the nth CVTerm in the list of CVTerms of this SBML - object. - - @param n long the index of the CVTerm to retrieve - - @return the nth CVTerm in the list of CVTerms for this SBML object. -"; - - -%feature("docstring") SBase::unsetCVTerms " - Clears the list of CVTerm objects attached to this SBML object. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBase::unsetModelHistory " - Unsets the ModelHistory object attached to this object. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note In SBML Level 2, model history annotations were only - permitted on the Model element. In SBML Level 3, they are - permitted on all SBML components derived from SBase. -"; - - -%feature("docstring") SBase::getResourceBiologicalQualifier " - Returns the MIRIAM biological qualifier associated with the - given resource. - - In MIRIAM, - qualifiers are an optional means of indicating the relationship - between a model component and its annotations. There are two broad - kinds of annotations: model and biological. The - latter kind is used to qualify the relationship between a model - component and a biological entity which it represents. Examples of - relationships include \'is\' and \'has part\', but many others are - possible. MIRIAM defines numerous - relationship qualifiers to enable different software tools to - qualify biological annotations in the same standardized way. In - libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model - element are represented using lists of CVTerm objects, and the - the MIRIAM biological qualifiers are represented using - values @if clike from the enumeration - type #BiolQualifierType_t.@endif@if python whose - names begin with BQB_ in the interface class - @link libsbml libsbml@endlink.@endif@if java whose - names begin with BQB_ in the interface class - {@link libsbmlConstants}.@endif@if csharp whose - names begin with BQB_ in the interface class - @link libsbmlcs.libsbml libsbml@endlink.@endif@~ - - This method searches the controlled-vocabulary annotations - (i.e., the list of CVTerm objects) on the present object, then out of - those that have biological qualifiers, looks for an annotation to the - given @p resource. If such an annotation is found, it returns the - type of biological qualifier associated with that resource as a - value @if clike from the enumeration type - #BiolQualifierType_t.@endif@if python whose name begins with - BQB_ from the interface - class @link libsbml libsbml@endlink.@endif@if java whose name - begins with BQB_ from the interface - class {@link libsbmlConstants}.@endif@if csharp whose - names begin with BQB_ in the interface class - @link libsbmlcs.libsbml libsbml@endlink.@endif@~ - - @param resource string representing the resource; e.g., - \'http://www.geneontology.org/#GO:0005892\'. - - @return the qualifier associated with the resource, - or @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink if the - resource does not exist. - - @if clike - @note The set of MIRIAM biological qualifiers grows over - time, although relatively slowly. The values in the enumeration - #BiolQualifierType_t are up to date with MIRIAM at the time of a given - libSBML release. The set of values may be expanded in later libSBML - releases, to match the values defined by MIRIAM at that later time. - @endif@if python - @note The set of MIRIAM biological qualifiers grows over - time, although relatively slowly. The values are up to date with - MIRIAM at the time of a given libSBML release. The set of values in - list of BQB_ constants defined in @link libsbml - libsbml@endlink may be expanded in later libSBML releases, to match - the values defined by MIRIAM at that later time. - @endif@if java - @note The set of MIRIAM biological qualifiers grows over - time, although relatively slowly. The values are up to date with - MIRIAM at the time of a given libSBML release. The set of values in - list of BQB_ constants defined in {@link libsbmlConstants} - may be expanded in later libSBML releases, to match - the values defined by MIRIAM at that later time. - @endif@if csharp - @note The set of MIRIAM biological qualifiers grows over - time, although relatively slowly. The values are up to date with - MIRIAM at the time of a given libSBML release. The set of values in - list of BQB_ constants defined in @link libsbmlcs.libsbml libsbml@endlink - may be expanded in later libSBML releases, to match - the values defined by MIRIAM at that later time. - @endif@~ -"; - - -%feature("docstring") SBase::getResourceModelQualifier " - Returns the MIRIAM model qualifier associated with the - given resource. - - In MIRIAM, - qualifiers are an optional means of indicating the relationship - between a model component and its annotations. There are two broad - kinds of annotations: model and biological. The - former kind is used to qualify the relationship between a model - component and another modeling object. An example qualifier is - \'isDerivedFrom\', to indicate that a given component of the model is - derived from the modeling object represented by the referenced - resource. MIRIAM defines numerous - relationship qualifiers to enable different software tools to - qualify model annotations in the same standardized way. In libSBML, - the MIRIAM controlled-vocabulary annotations on an SBML model element - are represented using lists of CVTerm objects, and the - the MIRIAM model qualifiers are represented using - values @if clike from the enumeration - type #ModelQualifierType_t.@endif@if python whose - names begin with BQM_ in the interface class - @link libsbml libsbml@endlink.@endif@if java whose - names begin with BQM_ in the interface class - {@link libsbmlConstants}.@endif@if csharp whose - names begin with BQB_ in the interface class - @link libsbmlcs.libsbml libsbml@endlink.@endif@~ - - This method method searches the controlled-vocabulary annotations - (i.e., the list of CVTerm objects) on the present object, then out of - those that have model qualifiers, looks for an annotation to the given - @p resource. If such an annotation is found, it returns the type of - type of model qualifier associated with that resource as a - value @if clike from the enumeration type - #ModelQualifierType_t.@endif@if python whose name begins with - BQM_ from the interface - class @link libsbml libsbml@endlink.@endif@if java whose name - begins with BQM_ from the interface - class {@link libsbmlConstants}.@endif@if csharp whose - names begin with BQB_ in the interface class - @link libsbmlcs.libsbml libsbml@endlink.@endif@~ - - @param resource string representing the resource; e.g., - \'http://www.geneontology.org/#GO:0005892\'. - - @return the @if clike #ModelQualifierType_t value@else model qualifier - type@endif@~ associated with the resource, or @link - libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink if the resource - does not exist. - - @if clike - @note The set of MIRIAM biological qualifiers grows over - time, although relatively slowly. The values in the enumeration - #ModelQualifierType_t are up to date with MIRIAM at the time of a given - libSBML release. The set of values may be expanded in later libSBML - releases, to match the values defined by MIRIAM at that later time. - @endif@if python - @note The set of MIRIAM model qualifiers grows over - time, although relatively slowly. The values are up to date with - MIRIAM at the time of a given libSBML release. The set of values in - list of BQM_ constants defined in @link libsbml - libsbml@endlink may be expanded in later libSBML releases, to match - the values defined by MIRIAM at that later time. - @endif@if java - @note The set of MIRIAM model qualifiers grows over - time, although relatively slowly. The values are up to date with - MIRIAM at the time of a given libSBML release. The set of values in - list of BQM_ constants defined in {@link libsbmlConstants} - may be expanded in later libSBML releases, to match - the values defined by MIRIAM at that later time. - @endif@if csharp - @note The set of MIRIAM model qualifiers grows over - time, although relatively slowly. The values are up to date with - MIRIAM at the time of a given libSBML release. The set of values in - list of BQM_ constants defined in @link libsbmlcs.libsbml libsbml@endlink - may be expanded in later libSBML releases, to match - the values defined by MIRIAM at that later time. - @endif@~ -"; - - -%feature("docstring") SBase::getModel " - Returns the Model object in which the current object is located. - - @return the parent Model of this SBML object. - - @see getParentSBMLObject() - @see getSBMLDocument() -"; - - -%feature("docstring") SBase::getLevel " - Returns the SBML Level of the SBMLDocument object containing this - object. - - @return the SBML level of this SBML object. - - @see getVersion() - @see getNamespaces() - @see getPackageVersion() -"; - - -%feature("docstring") SBase::getVersion " - Returns the Version within the SBML Level of the SBMLDocument object - containing this object. - - @return the SBML version of this SBML object. - - @see getLevel() - @see getNamespaces() -"; - - -%feature("docstring") SBase::getPackageVersion " - Returns the Version of the SBML Level 3 package to which this - element belongs to. - - @return the version of the SBML Level 3 package to which this - element belongs. The value @c 0 will be returned if this element - belongs to the SBML Level 3 Core package. - - @see getLevel() - @see getVersion() -"; - - -%feature("docstring") SBase::getPackageName " - Returns the name of the SBML Level 3 package in which this - element is defined. - - @return the name of the SBML package in which this element is defined. - The string "core" will be returned if this - element is defined in SBML Level 3 Core. The string - "unknown" will be returned if this element is - not defined in any SBML package. -"; - - -%feature("docstring") SBase::getTypeCode " - Returns the libSBML type code for this object. - - This method may return the type code of this SBML object, or it may - return @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink. This - is because subclasses of SBase are not required to implement this - method to return a type code. This method is meant primarily for the - LibSBML C interface, in which class and subclass information is not - readily available. - - @return the @if clike #SBMLTypeCode_t value@else SBML object type code@endif@~ - of this SBML object or - @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (the default). - - @see getElementName() - @see getPackageName() -"; - - -%feature("docstring") SBase::getElementName " - Returns the XML element name of this object. - - This is overridden by subclasses to return a string appropriate to the - SBML component. For example, Model defines it as returning @c - \'model\', CompartmentType defines it as returning @c \'compartmentType\', - and so on. -"; - - -%feature("docstring") SBase::toSBML " - Returns a string consisting of a partial SBML corresponding to just - this object. - - @return the partial SBML that describes this SBML object. - - @warning This is primarily provided for testing and debugging - purposes. It may be removed in a future version of libSBML. -"; - - -%feature("docstring") SBase::toXMLNode " - Returns this element as an XMLNode. - - @return this element as an XMLNode. - - @warning This operation is computationally expensive, because the - element has to be fully serialized to a string and then parsed into the - XMLNode structure. Attempting to convert a large tree structure (e.g., - a large Model) may consume significant computer memory and time. -"; - - -%feature("docstring") SBase::getPlugin " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getPlugin(long n)
- - Returns the nth plug-in object (extension interface) for an SBML Level 3 - package extension. - - @htmlinclude what-are-plugins.html - - @param n the index of the plug-in to return - - @return the plug-in object (the libSBML extension interface) of a - package extension with the given package name or URI. - - -
- Method variant with the following signature: -
getPlugin(string package)
- - Returns a plug-in object (extension interface) for an SBML Level 3 - package extension with the given package name or URI. - - @htmlinclude what-are-plugins.html - - @param package the name or URI of the package - - @return the plug-in object (the libSBML extension interface) of a - package extension with the given package name or URI. -"; - - -%feature("docstring") SBase::getNumPlugins " - Returns the number of plug-in objects (extenstion interfaces) for SBML - Level 3 package extensions known. - - @htmlinclude what-are-plugins.html - - @return the number of plug-in objects (extension interfaces) of - package extensions known by this instance of libSBML. -"; - - -%feature("docstring") SBase::enablePackage " - Enables or disables the given SBML Level 3 package - - This method enables or disables the specified package on this object - and other objects connected by child-parent links in the same - SBMLDocument object. - - @param pkgURI the URI of the package - - @param pkgPrefix the XML prefix of the package - - @param flag whether to enable (@c True) or disable (@c False) the package - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN @endlink - @li @link libsbml.LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION @endlink -"; - - -%feature("docstring") SBase::disablePackage " - Disables the given SBML Level 3 package - - This method enables or disables the specified package on this object - and other objects connected by child-parent links in the same - SBMLDocument object. - - @param pkgURI the URI of the package - - @param pkgPrefix the XML prefix of the package - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN @endlink - @li @link libsbml.LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION @endlink -"; - - -%feature("docstring") SBase::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses in which one or more child elements are defined - must override this function. - - @if clike - @see setSBMLDocument() - @endif@~ - @see connectToChild() -"; - - -%feature("docstring") SBase::isPackageURIEnabled " - Predicate returning @c True if an SBML Level 3 package with the - given URI is enabled with this object. - - @param pkgURI the URI of the package - - @return @c True if the given package is enabled within this object, @c - false otherwise. - - @see isPackageEnabled() -"; - - -%feature("docstring") SBase::isPackageEnabled " - Predicate returning @c True if the given SBML Level 3 package is - enabled with this object. - - The search ignores the package version. - - @param pkgName the name of the package - - @return @c True if the given package is enabled within this object, @c - false otherwise. - - @see isPackageURIEnabled() -"; - - -%feature("docstring") SBase::isPkgURIEnabled " - Predicate returning @c True if an SBML Level 3 package with the - given URI is enabled with this object. - - @param pkgURI the URI of the package - - @return @c True if the given package is enabled within this object, @c - false otherwise. - - @see isPkgEnabled() - - @deprecated Replaced in libSBML 5.2.0 by - isPackageURIEnabled(@if java String pkgURI@endif) -"; - - -%feature("docstring") SBase::isPkgEnabled " - Predicate returning @c True if the given SBML Level 3 package is - enabled with this object. - - The search ignores the package version. - - @param pkgName the name of the package - - @return @c True if the given package is enabled within this object, @c - false otherwise. - - @see isPkgURIEnabled() - - @deprecated Replaced in libSBML 5.2.0 by - isPackageEnabled(@if java String pkgName@endif) -"; - - -%feature("docstring") SBase::writeExtensionElements " - @internal - Writes out contained SBML objects of package extensions (if any) - as XML elements. -"; - - -%feature("docstring") SBase::write " - @internal - Writes (serializes) this SBML object by writing it to XMLOutputStream. -"; - - -%feature("docstring") SBase::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::hasRequiredAttributes " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::hasRequiredElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::checkCompatibility " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::setSBMLNamespaces " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::setSBMLNamespacesAndOwn " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::getSBMLNamespaces " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::removeDuplicateAnnotations " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::checkMathMLNamespace " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. For example:@if clike -
-   SBase.writeElements();
-   mReactants.write(stream);
-   mProducts.write(stream);
-   ...
- 
@endif@~ -"; - - -%feature("docstring") SBase::removeFromParentAndDelete " - Removes this object from its parent. - - If the parent was storing this object as a pointer, it is deleted. If - not, it is simply cleared (as in ListOf objects). This is a pure - virtual method, as every SBase element has different parents, and - therefore different methods of removing itself. Will fail (and not - delete itself) if it has no parent object. This function is designed to - be overridden, but for all objects whose parent is of the class ListOf, - the default implementation will work. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBase::matchesSBMLNamespaces " - Returns @c True if this object\'s set of XML namespaces are the same - as the given object\'s XML namespaces. - - @param sb an object to compare with respect to namespaces - - @return boolean, @c True if this object\'s collection of namespaces is - the same as @p sb\'s, @c False otherwise. -"; - - -%feature("docstring") SBase::matchesRequiredSBMLNamespacesForAddition " - Returns @c True if this object\'s set of XML namespaces are a subset - of the given object\'s XML namespaces. - - @param sb an object to compare with respect to namespaces - - @return boolean, @c True if this object\'s collection of namespaces is - a subset of @p sb\'s, @c False otherwise. -"; - - -%feature("docstring") SBase::setUserData " - Sets the user data of this element. - - @htmlinclude what-is-user-data.html - - @param userData specifies the new user data. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBase::*getUserData " - Returns the user data that has been previously set via setUserData(). - - @htmlinclude what-is-user-data.html - - @return the user data of this node, or @c None if no user data has been set. - - @if clike - @see ASTNode.setUserData() - @endif@~ -"; - - -%feature("docstring") SBase::getURI " - Gets the namespace URI to which this element belongs to. - - For example, all elements that belong to SBML Level 3 Version 1 Core - must would have the URI \'http://www.sbml.org/sbml/level3/version1/core\'; - all elements that belong to Layout Extension Version 1 for SBML Level 3 - Version 1 Core must would have the URI - \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' - - Unlike getElementNamespace(), this function first returns the URI for - this element by looking into the SBMLNamespaces object of the document - with the its package name. if not found it will return the result of - getElementNamespace(). - - @return the URI of this element - - @see getPackageName() - @see getElementNamespace() - @see getSBMLDocument() -"; - - -%feature("docstring") SBase::getPrefix " - Returns the namespace prefix of this element. -"; - - -%feature("docstring") SBase::setElementText " - When overridden allows SBase elements to use the text included in between - the elements tags. The default implementation does nothing. - - @param text the text string found between the element tags. -"; - - -%feature("docstring") SBase::matchesCoreSBMLNamespace " - @internal - When overridden allows SBase elements to use the text included in between - the elements tags. The default implementation does nothing. - - @param text the text string found between the element tags. -"; - - -%feature("docstring") SBase::createObject " - @internal - Subclasses should override this method to create, store, and then - return an SBML object corresponding to the next XMLToken in the - XMLInputStream. - - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") SBase::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") SBase::getElementPosition " - @internal - The SBML XML Schema is written such that the order of child elements - is significant. LibSBML can read elements out of order. If you - override this method to indicate the ordinal position of element with - respect to its siblings, libSBML will log an error if the element is - read out of order. - - @return the ordinal position of the element with respect to its - siblings or @c -1 (the default) to indicate the position is not - significant. -"; - - -%feature("docstring") SBase::getErrorLog " - @internal - @return the SBMLErrorLog used to log errors during while reading and - validating SBML. -"; - - -%feature("docstring") SBase::logError " - @internal - Convenience method for easily logging problems from within method - implementations. - - This is essentially a short form of getErrorLog()->logError(...) - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SBase::logUnknownAttribute " - @internal - Helper to log a common type of error. -"; - - -%feature("docstring") SBase::logUnknownElement " - @internal - Helper to log a common type of error. -"; - - -%feature("docstring") SBase::logEmptyString " - @internal - Helper to log a common type of error. -"; - - -%feature("docstring") SBase::addExpectedAttributes " - @internal - Subclasses should override this method to add the list of - expected attributes. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SBase::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SBase::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. For example: - - SBase.writeAttributes(); - stream.writeAttribute( \'id\' , mId ); - stream.writeAttribute( \'name\', mName ); - ... - - (NOTICE) this function doesn\'t write xmlns attributes. - Be sure to implement wirteXMLNS() function to write xmlns attributes. -"; - - -%feature("docstring") SBase::writeXMLNS " - @internal - - Subclasses should override this method to write their xmlns attriubutes - (if any) to the XMLOutputStream. -"; - - -%feature("docstring") SBase::syncAnnotation " - @internal - Synchronizes the annotation of this SBML object. - - Annotation element (XMLNode mAnnotation) is synchronized with the - current CVTerm objects (List mCVTerm). - Currently, this method is called in getAnnotation, isSetAnnotation, - and writeElements methods. -"; - - -%feature("docstring") SBase::reconstructRDFAnnotation " - @internal - Synchronizes the annotation of this SBML object. - - Annotation element (XMLNode mAnnotation) is synchronized with the - current CVTerm objects (List mCVTerm). - Currently, this method is called in getAnnotation, isSetAnnotation, - and writeElements methods. -"; - - -%feature("docstring") SBase::checkOrderAndLogError " - @internal - Checks that the SBML element appears in the expected order. - - If @p object is not in the expected position, an error is logged. -"; - - -%feature("docstring") SBase::checkListOfPopulated " - @internal - Checks that an SBML ListOf element is populated. - If a listOf element has been declared with no elements, - an error is logged. -"; - - -%feature("docstring") SBase::checkUnitSyntax " - @internal - Checks the syntax of the unit attribute. - The syntax of an unit is of type UnitSId which is defined as: - - - letter ::= \'a\'..\'z\',\'A\'..\'Z\' - - digit ::= \'0\'..\'9\' - - idChar ::= letter | digit | \'_\' - - UnitSId ::= ( letter | \'_\' ) idChar* - - If the syntax of the unit attribute of this object is incorrect, - an error is logged - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SBase::checkDefaultNamespace " - @internal - Checks that the given default namespace in the given element is valid. - If the given default namespace is not valid, an error is logged. -"; - - -%feature("docstring") SBase::checkAnnotation " - @internal - Checks the annotation does not declare an sbml namespace. - If the annotation declares an sbml namespace an error is logged. -"; - - -%feature("docstring") SBase::checkXHTML " - @internal - Checks that the XHTML is valid. - If the xhtml does not conform to the specification of valid xhtml within - an sbml document, an error is logged. -"; - - -%feature("docstring") SBase::loadPlugins " - @internal - Checks that the XHTML is valid. - If the xhtml does not conform to the specification of valid xhtml within - an sbml document, an error is logged. -"; - - -%feature("docstring") SBase::createExtensionObject " - @internal - Create, store, and then return an SBML object of package extensions - corresponding to the next XMLToken in the XMLInputStream. - - @return the SBML object of package extensions corresponding to next - XMLToken in the XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") SBase::setElementNamespace " - @internal - Sets the XML namespace to which this element belongs to. - For example, all elements that belong to SBML Level 3 Version 1 Core - must set the namespace to \'http://www.sbml.org/sbml/level3/version1/core\'; - all elements that belong to Layout Extension Version 1 for SBML Level 3 - Version 1 Core must set the namespace to - \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SBase::getElementNamespace " - @internal - Gets the XML namespace (URI) to which this element belongs to. -"; - - -%feature("docstring") SBase::readExtensionAttributes " - @internal - Read attributes of package extensions from the given XMLAttributes - set into their specific fields. - - Be sure to call your parents implementation of this function as well. - For example: - @if clike - @verbatim - SBase.readExtensionAttributes(); - @endverbatim - @endif@if java - @verbatim - SBase.readExtensionAttributes(attributes, expectedAttributes); - @endverbatim - @endif@if java - @verbatim - SBase.readExtensionAttributes(attributes, expectedAttributes); - @endverbatim - @endif@if python - @verbatim - SBase.readExtensionAttributes(attributes, expectedAttributes); - @endverbatim - @endif@~ -"; - - -%feature("docstring") SBase::writeExtensionAttributes " - @internal - Write attributes of package extensions to the XMLOutputStream. - - Be sure to call your parents implementation of this function as well. - For example: - - SBase.writeExtensionAttributes(); -"; - - -%feature("docstring") SBase::storeUnknownExtAttribute " - @internal - Stores the given attribute to the list of ignored attributes if - the given attribute belongs to some unknown package extension. - Unknown attribute error will be logged if the \'required\' attribute - of the package is \'true\' in SBMLDocument element. - - The stored attributes will be written out as-is when writing the - SBMLDocument to a string or a file (i.e. Attributes and elements of - unknown package extensions will not be lost when reading/writing - a file/sting containing them.) - - @param element the string of element which contains the given attribute - @param xattr the XMLAttributes object which is contained in the given - element - @param index the index of the target attribute in the given XMLAttributes - object. - - @return true will be returned if the given attribute belongs - to some unknown package extension, otherwise false will be returned. -"; - - -%feature("docstring") SBase::storeUnknownExtElement " - @internal - Stores the element of next token if the element belongs to some - unknown package extension. Unknown element error will be logged if - the \'required\' attribute of the package is \'true\' in SBMLDocument - element. - - The stored elements will be written out as-is when writing the - SBMLDocument to a string or a file (i.e. Attributes and elements of - unknown package extensions will not be lost when reading/writing - a file/sting containing them.) - - @return true will be returned if the element of next token belongs - to some unknown package extension, otherwise false will be returned. -"; - - -%feature("docstring") SBase::getSBMLPrefix " - @internal - Return the SBML prefix of this element. This will be the same as getPrefix() - unless the element in question is an element of an SBML extension class. -"; - - -%feature("docstring") SBase::getRootElement " - @internal - Returns the root element of the node tree to which this element is connected. - - @note The root element may not be an SBMLDocument element. For example, - this element is the root element if this element doesn\'t have a parent - SBML object (i.e. mParentSBMLObject is None) - - @see enablePackageInternal -"; - - -%feature("docstring") SBase::getHasBeenDeleted " - @internal - Returns the root element of the node tree to which this element is connected. - - @note The root element may not be an SBMLDocument element. For example, - this element is the root element if this element doesn\'t have a parent - SBML object (i.e. mParentSBMLObject is None) - - @see enablePackageInternal -"; - - -%feature("docstring") SBase::setSBaseFields " - @internal - Stores the location (line and column) and any XML namespaces (for - roundtripping) declared on this SBML (XML) element. -"; - - -%feature("docstring") SBase::readAnnotation " - @internal - @return true if read an element from the stream -"; - - -%feature("docstring") SBase::removeDuplicatedResources " - @internal - removes resources from the term object that alread exist on this object -"; - - -%feature("docstring") SBase::addTermToExistingBag " - @internal - adds the given term to an existing bag. Returns 1 if added, 0 otherwise. -"; - - -%feature("docstring") SBase::readNotes " - @internal - @return true if read a element from the stream -"; - - -%feature("docstring") ListOf " - @ingroup Core - Parent class for the various SBML \'ListOfXYZ\' classes. - - @htmlinclude not-sbml-warning.html - - SBML defines various ListOf___ classes that are containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the attributes and subelements of - SBase, such as \'metaid\' as and \'annotation\'. The ListOf___ classes do - not add any attributes of their own. - - The ListOf class in libSBML is a utility class that serves as the parent - class for implementing the ListOf__ classes. It provides methods for - working generically with the various SBML lists of objects in a program. - LibSBML uses this separate list class rather than ordinary - @if clike C++ @endif@if java Java@endif@if python Python@endif@~ lists, - so that it can provide the methods and features associated with SBase. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") ListOf::ListOf " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOf(SBMLNamespaces sbmlns)
- - Creates a new ListOf with SBMLNamespaces object. - - @param sbmlns the set of namespaces that this ListOf should contain. - - -
- Method variant with the following signature: -
ListOf(long level   = SBML_DEFAULT_LEVEL, long version = SBML_DEFAULT_VERSION)
- - Creates a new ListOf object. - - @param level the SBML Level; if not assigned, defaults to the - value of SBML_DEFAULT_LEVEL. - - @param version the Version within the SBML Level; if not assigned, - defaults to the value of SBML_DEFAULT_VERSION. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - -
- Method variant with the following signature: -
ListOf(ListOf orig)
- - Copy constructor; creates a copy of this ListOf. - - @param orig the ListOf instance to copy. -"; - - -%feature("docstring") ListOf::accept " - Accepts the given SBMLVisitor. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next item in the - list. -"; - - -%feature("docstring") ListOf::clone " - Creates and returns a deep copy of this ListOf. - - @return a (deep) copy of this ListOf. -"; - - -%feature("docstring") ListOf::append " - Adds item to the end of this ListOf. - - This variant of the method makes a clone of the @p item handed to it. - This means that when the ListOf is destroyed, the original items will - not be destroyed. - - @param item the item to be added to the list. - - @see appendAndOwn() -"; - - -%feature("docstring") ListOf::appendAndOwn " - Adds item to the end of this ListOf. - - This variant of the method does not clone the @p item handed to it; - instead, it assumes ownership of it. This means that when the ListOf - is destroyed, the item will be destroyed along with it. - - @param item the item to be added to the list. - - @see append() -"; - - -%feature("docstring") ListOf::appendFrom " - Adds a clone of all items in the provided ListOf to this object. This means that when this ListOf is destroyed, the original items will not be destroyed. - - @param list A list of items to be added. - - @see append() -"; - - -%feature("docstring") ListOf::insert " - Inserts the item at the given position of this ListOf - - This variant of the method makes a clone of the @p item handet to it. - This means that when the ListOf is destroyed, the original items will - not be destroyed. - - @param location the location where to insert the item - @param item the item to be inserted to the list - - @see insertAndOwn() -"; - - -%feature("docstring") ListOf::insertAndOwn " - Inserts the item at the given position of this ListOf - - This variant of the method makes a clone of the @p item handet to it. - This means that when the ListOf is destroyed, the original items will - not be destroyed. - - @param location the location where to insert the item - @param item the item to be inserted to the list - - @see insert() -"; - - -%feature("docstring") ListOf::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get an item from the list. - - @param n the index number of the item to get. - - @return the nth item in this ListOf items. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get an item from the list based on its identifier. - - @param sid a string representing the the identifier of the item to get. - - @return item in this ListOf items with the given @p sid or @c None if no such - item exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOf::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") ListOf::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") ListOf::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") ListOf::clear " - Removes all items in this ListOf object. - - If parameter @p doDelete is @c True (default), all items in this ListOf - object are deleted and cleared, and thus the caller doesn\'t have to - delete those items. Otherwise, all items are just cleared from this - ListOf object and the caller is responsible for deleting all items. (In - that case, pointers to all items should be stored elsewhere before - calling this function.) - - @param doDelete if @c True (default), all items are deleted and cleared. - Otherwise, all items are just cleared and not deleted. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") ListOf::removeFromParentAndDelete " - Because ListOf objects typically live as object children of their parent object and not as pointer children, this function clears itself, but does not attempt to do anything else. If a particular ListOf subclass does indeed exist as a pointer only, this function will need to be overridden. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ListOf::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOf items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOf items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOf::size " - Get the size of this ListOf. - - @return the number of items in this ListOf items. -"; - - -%feature("docstring") ListOf::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. - - @param d the SBMLDocument that should become the parent of this - ListOf. -"; - - -%feature("docstring") ListOf::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") ListOf::getTypeCode " - Returns the libSBML type code for this object, namely, @c - SBML_LIST_OF. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOf::getItemTypeCode " - Get the type code of the objects contained in this ListOf. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). -"; - - -%feature("docstring") ListOf::getElementName " - Returns the XML element name of this object, which for ListOf, is - always @c \'listOf\'. - - @return the XML name of this element. -"; - - -%feature("docstring") ListOf::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") ListOf::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") ListOf::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") ListOf::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") ListOf::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. For example: - - SBase.writeAttributes(); - stream.writeAttribute( \'id\' , mId ); - stream.writeAttribute( \'name\', mName ); - ... -"; - - -%feature("docstring") ListOf::isValidTypeForList " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. For example: - - SBase.writeAttributes(); - stream.writeAttribute( \'id\' , mId ); - stream.writeAttribute( \'name\', mName ); - ... -"; - - -%feature("docstring") Model " - @ingroup Core - Implementation of %SBML\'s %Model construct. - - In an SBML model definition, a single object of class Model serves as - the overall container for the lists of the various model components. - All of the lists are optional, but if a given list container is present - within the model, the list must not be empty; that is, it must have - length one or more. The following are the components and lists - permitted in different Levels and Versions of SBML in - version @htmlinclude libsbml-version.html - of libSBML: -
    -
  • In SBML Level 1, the components are: UnitDefinition, Compartment, - Species, Parameter, Rule, and Reaction. Instances of the classes are - placed inside instances of classes ListOfUnitDefinitions, - ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and - ListOfReactions. - -
  • In SBML Level 2 Version 1, the components are: FunctionDefinition, - UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and - Event. Instances of the classes are placed inside instances of classes - ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and - ListOfEvents. - -
  • In SBML Level 2 Versions 2, 3 and 4, the components are: - FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType, - Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, - Reaction and Event. Instances of the classes are placed inside - instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules, - ListOfConstraints, ListOfReactions, and ListOfEvents. - -
  • In SBML Level 3 Version 1, the components are: FunctionDefinition, - UnitDefinition, Compartment, Species, Parameter, InitialAssignment, - Rule, Constraint, Reaction and Event. Instances of the classes are - placed inside instances of classes ListOfFunctionDefinitions, - ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, - ListOfParameters, ListOfInitialAssignments, ListOfRules, - ListOfConstraints, ListOfReactions, and ListOfEvents. -
- - Although all the lists are optional, there are dependencies between SBML - components such that defining some components requires defining others. - An example is that defining a species requires defining a compartment, - and defining a reaction requires defining a species. The dependencies - are explained in more detail in the SBML specifications. - - In addition to the above lists and attributes, the Model class in both - SBML Level 2 and Level 3 has the usual two attributes of \'id\' - and \'name\', and both are optional. As is the case for other SBML - components with \'id\' and \'name\' attributes, they must be used according - to the guidelines described in the SBML specifications. (Within the - frameworks of SBML Level 2 and Level 3 Version 1 Core, a - Model object identifier has no assigned meaning, but extension packages - planned for SBML Level 3 are likely to make use of this - identifier.) - - Finally, SBML Level 3 has introduced a number of additional Model - attributes. They are discussed in a separate section below. - - - @section approaches Approaches to creating objects using the libSBML API - - LibSBML provides two main mechanisms for creating objects: class - constructors - (e.g., @if java Species() @else Species.Species() @endif), - and createObject() - methods (such as Model.createSpecies()) provided by certain Object classes such as Model. These - multiple mechanisms are provided by libSBML for flexibility and to - support different use-cases, but they also have different implications - for the overall model structure. - - In general, the recommended approach is to use the createObject() methods. These - methods both create an object @em and link it to the parent in one step. - Here is an example:@if clike - @verbatim - // Create an SBMLDocument object in Level 3 Version 1 format: - - SBMLDocument sbmlDoc = new SBMLDocument(3, 1); - - // Create a Model object inside the SBMLDocument object and set - // its identifier. The call returns a pointer to the Model object - // created, and methods called on that object affect the attributes - // of the object attached to the model (as expected). - - Model model = sbmlDoc->createModel(); - model->setId(\'BestModelEver\'); - - // Create a Species object inside the Model and set its identifier. - // Similar to the lines above, this call returns a pointer to the Species - // object created, and methods called on that object affect the attributes - // of the object attached to the model (as expected). - - Speciessp = model->createSpecies(); - sp->setId(\'MySpecies\'); - @endverbatim - @endif@if java - @verbatim - // Create an SBMLDocument object in Level 3 Version 1 format: - - SBMLDocument sbmlDoc = new SBMLDocument(3, 1); - - // Create a Model object inside the SBMLDocument object and set - // its identifier. The call returns a pointer to the Model object - // created, and methods called on that object affect the attributes - // of the object attached to the model (as expected). Note that - // the call to setId() returns a status code, and a real program - // should check this status code to make sure everything went okay. - - Model model = sbmlDoc.createModel(); - model.setId("BestModelEver"); - - // Create a Species object inside the Model and set its identifier. - // Similar to the lines above, this call returns a pointer to the Species - // object created, and methods called on that object affect the attributes - // of the object attached to the model (as expected). Note that, like - // with Model, the call to setId() returns a status code, and a real program - // should check this status code to make sure everything went okay. - - Species sp = model.createSpecies(); - sp.setId("BestSpeciesEver"); - @endverbatim - @endif@if python - @verbatim - # Create an SBMLDocument object in Level 3 Version 1 format: - - sbmlDoc = SBMLDocument(3, 1) - - # Create a Model object inside the SBMLDocument object and set - # its identifier. The call to setId() returns a status code - # to indicate whether the assignment was successful. Code 0 - # means success; see the documentation for Model\'s setId() for - # more information. - - model = sbmlDoc.createModel() - model.setId("BestModelEver") - - # Create a Species object inside the Model and set its identifier. - # Again, the setId() returns a status code to indicate whether the - # assignment was successful. Code 0 means success; see the - # documentation for Specie\'s setId() for more information. - - sp = model.createSpecies() - sp.setId("BestSpeciesEver") - @endverbatim - @endif@if csharp - @verbatim - // Create an SBMLDocument object in Level 3 Version 1 format: - - SBMLDocument sbmlDoc = new SBMLDocument(3, 1); - - // Create a Model object inside the SBMLDocument object and set - // its identifier. The call returns a pointer to the Model object - // created, and methods called on that object affect the attributes - // of the object attached to the model (as expected). - - Model model = sbmlDoc.createModel(); - model.setId(\'BestModelEver\'); - - // Create a Species object inside the Model and set its identifier. - // Similar to the lines above, this call returns a pointer to the Species - // object created, and methods called on that object affect the attributes - // of the object attached to the model (as expected). - - Species sp = model.createSpecies(); - sp.setId(\'MySpecies\'); - @endverbatim - @endif@~ - - The createObject() methods return a - pointer to the object created, but they also add the object to the - relevant list of object instances contained in the parent. (These lists - become the <listOfObjects> elements in the - finished XML rendition of SBML.) In the example above, - Model.createSpecies() adds the created species directly to the - <listOfSpecies> list in the model. Subsequently, - methods called on the species change the species in the model (which is - what is expected in most situations). - - @section checking Consistency and adherence to SBML specifications - - To make it easier for applications to do whatever they need, - libSBML version @htmlinclude libsbml-version.html - is relatively lax when it comes to enforcing correctness and - completeness of models @em during model construction and editing. - Essentially, libSBML @em will @em not in most cases check automatically - that a model\'s components have valid attribute values, or that the - overall model is consistent and free of errors—even obvious errors - such as duplication of identifiers. This allows applications great - leeway in how they build their models, but it means that software - authors must take deliberate steps to ensure that the model will be, in - the end, valid SBML. These steps include such things as keeping track - of the identifiers used in a model, manually performing updates in - certain situations where an entity is referenced in more than one place - (e.g., a species that is referenced by multiple SpeciesReference - objects), and so on. - - That said, libSBML does provide powerful features for deliberately - performing validation of SBML when an application decides it is time to - do so. The interfaces to these facilities are on the SBMLDocument - class, in the form of SBMLDocument.checkInternalConsistency() and - SBMLDocument.checkConsistency(). Please refer to the documentation for - SBMLDocument for more information about this. - - While applications may play fast and loose and live like free spirits - during the construction and editing of SBML models, they should always - make sure to call SBMLDocument.checkInternalConsistency() and/or - SBMLDocument.checkConsistency() before writing out the final version of - an SBML model. - - - @section model-l3-attrib Model attributes introduced in SBML Level 3 - - As mentioned above, the Model class has a number of optional attributes - in SBML Level 3 Version 1 Core. These are \'substanceUnits\', - \'timeUnits\', \'volumeUnits\', \'areaUnits\', \'lengthUnits\', \'extentUnits\', - and \'conversionFactor. The following provide more information about - them. - - @subsection model-l3-substanceunits The \'substanceUnits\' attribute - - The \'substanceUnits\' attribute is used to specify the unit of - measurement associated with substance quantities of Species objects that - do not specify units explicitly. If a given Species object definition - does not specify its unit of substance quantity via the \'substanceUnits\' - attribute on the Species object instance, then that species inherits the - value of the Model \'substanceUnits\' attribute. If the Model does not - define a value for this attribute, then there is no unit to inherit, and - all species that do not specify individual \'substanceUnits\' attribute - values then have no declared units for their quantities. The - SBML Level 3 Version 1 Core specification provides more - details. - - Note that when the identifier of a species appears in a model\'s - mathematical expressions, the unit of measurement associated with that - identifier is not solely determined by setting \'substanceUnits\' - on Model or Species. Please see the discussion about units given in - the documentation for the Species class. - - - @subsection model-l3-timeunits The \'timeUnits\' attribute - - The \'timeUnits\' attribute on SBML Level 3\'s Model object is used to - specify the unit in which time is measured in the model. This attribute - on Model is the only way to specify a unit for time in a model. - It is a global attribute; time is measured in the model everywhere in - the same way. This is particularly relevant to Reaction and RateRule - objects in a model: all Reaction and RateRule objects in SBML define - per-time values, and the unit of time is given by the \'timeUnits\' - attribute on the Model object instance. If the Model \'timeUnits\' - attribute has no value, it means that the unit of time is not defined - for the model\'s reactions and rate rules. Leaving it unspecified in an - SBML model does not result in an invalid model in SBML Level 3; - however, as a matter of best practice, we strongly recommend that all - models specify units of measurement for time. - - - @subsection model-l3-voletc The \'volumeUnits\', \'areaUnits\', and \'lengthUnits\' attributes - - The attributes \'volumeUnits\', \'areaUnits\' and \'lengthUnits\' together are - used to set the units of measurements for the sizes of Compartment - objects in an SBML Level 3 model when those objects do not - otherwise specify units. The three attributes correspond to the most - common cases of compartment dimensions: \'volumeUnits\' for compartments - having a \'spatialDimensions\' attribute value of @c \'3\', \'areaUnits\' for - compartments having a \'spatialDimensions\' attribute value of @c \'2\', and - \'lengthUnits\' for compartments having a \'spatialDimensions\' attribute - value of @c \'1\'. The attributes are not applicable to compartments - whose \'spatialDimensions\' attribute values are @em not one of @c \'1\', @c - \'2\' or @c \'3\'. - - If a given Compartment object instance does not provide a value for its - \'units\' attribute, then the unit of measurement of that compartment\'s - size is inherited from the value specified by the Model \'volumeUnits\', - \'areaUnits\' or \'lengthUnits\' attribute, as appropriate based on the - Compartment object\'s \'spatialDimensions\' attribute value. If the Model - object does not define the relevant attribute, then there are no units - to inherit, and all Compartment objects that do not set a value for - their \'units\' attribute then have no units associated with - their compartment sizes. - - The use of three separate attributes is a carry-over from SBML - Level 2. Note that it is entirely possible for a model to define a - value for two or more of the attributes \'volumeUnits\', \'areaUnits\' and - \'lengthUnits\' simultaneously, because SBML models may contain - compartments with different numbers of dimensions. - - - @subsection model-l3-extentunits The \'extentUnits\' attribute - - Reactions are processes that occur over time. These processes involve - events of some sort, where a single ``reaction event\'\' is one in which - some set of entities (known as reactants, products and modifiers in - SBML) interact, once. The extent of a reaction is a measure of - how many times the reaction has occurred, while the time derivative of - the extent gives the instantaneous rate at which the reaction is - occurring. Thus, what is colloquially referred to as the \'rate of the - reaction\' is in fact equal to the rate of change of reaction extent. - - In SBML Level 3, the combination of \'extentUnits\' and \'timeUnits\' - defines the units of kinetic laws in SBML and establishes how the - numerical value of each KineticLaw object\'s mathematical formula is - meant to be interpreted in a model. The units of the kinetic laws are - taken to be \'extentUnits\' divided by \'timeUnits\'. - - Note that this embodies an important principle in SBML Level 3 - models: all reactions in an SBML model must have the same units - for the rate of change of extent. In other words, the units of all - reaction rates in the model must be the same. There is only - one global value for \'extentUnits\' and one global value for \'timeUnits\'. - - - @subsection model-l3-convfactor The \'conversionFactor\' attribute - - The attribute \'conversionFactor\' in SBML Level 3\'s Model object - defines a global value inherited by all Species object instances that do - not define separate values for their \'conversionFactor\' attributes. The - value of this attribute must refer to a Parameter object instance - defined in the model. The Parameter object in question must be a - constant; ie it must have its \'constant\' attribute value set to @c - \'true\'. - - If a given Species object definition does not specify a conversion - factor via the \'conversionFactor\' attribute on Species, then the species - inherits the conversion factor specified by the Model \'conversionFactor\' - attribute. If the Model does not define a value for this attribute, - then there is no conversion factor to inherit. More information about - conversion factors is provided in the SBML Level 3 Version 1 - specification. -"; - - -%feature("docstring") Model::Model " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Model(SBMLNamespaces sbmlns)
- - Creates a new Model using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Model object to an SBMLDocument (e.g., - using SBMLDocument.setModel()), the SBML XML namespace of the document @em - overrides the value used when creating the Model object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Model is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
Model(long level, long version)
- - Creates a new Model using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Model - - @param version a long integer, the SBML Version to assign to this - Model - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Model object to an SBMLDocument - (e.g., using SBMLDocument.setModel()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the Model object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a Model is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Model(Model orig)
- - Copy constructor; creates a (deep) copy of the given Model object. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Model::accept " - Accepts the given SBMLVisitor for this instance of Constraint. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") Model::clone " - Creates and returns a deep copy of this Model object. - - @return a (deep) copy of this Model. -"; - - -%feature("docstring") Model::getElementBySId " - Returns the first child element found that has the given @p id in the - model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find. - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") Model::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or - None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") Model::getAllElements " - Returns a List of all child SBase objects, including those nested to an - arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") Model::getId " - Returns the value of the \'id\' attribute of this Model. - - @return the id of this Model. -"; - - -%feature("docstring") Model::getName " - Returns the value of the \'name\' attribute of this Model. - - @return the name of this Model. -"; - - -%feature("docstring") Model::getSubstanceUnits " - Returns the value of the \'substanceUnits\' attribute of this Model. - - @return the substanceUnits of this Model. - - @note The \'substanceUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getTimeUnits " - Returns the value of the \'timeUnits\' attribute of this Model. - - @return the timeUnits of this Model. - - @note The \'timeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getVolumeUnits " - Returns the value of the \'volumeUnits\' attribute of this Model. - - @return the volumeUnits of this Model. - - @note The \'volumeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getAreaUnits " - Returns the value of the \'areaUnits\' attribute of this Model. - - @return the areaUnits of this Model. - - @note The \'areaUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getLengthUnits " - Returns the value of the \'lengthUnits\' attribute of this Model. - - @return the lengthUnits of this Model. - - @note The \'lengthUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getExtentUnits " - Returns the value of the \'extentUnits\' attribute of this Model. - - @return the extentUnits of this Model. - - @note The \'extentUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getConversionFactor " - Returns the value of the \'conversionFactor\' attribute of this Model. - - @return the conversionFactor of this Model. - - @note The \'conversionFactor\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetId " - Predicate returning @c True if this - Model\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this Model is - set, @c False otherwise. -"; - - -%feature("docstring") Model::isSetName " - Predicate returning @c True if this - Model\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this Model is - set, @c False otherwise. -"; - - -%feature("docstring") Model::isSetSubstanceUnits " - Predicate returning @c True if this - Model\'s \'substanceUnits\' attribute is set. - - @return @c True if the \'substanceUnits\' attribute of this Model is - set, @c False otherwise. - - @note The \'substanceUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetTimeUnits " - Predicate returning @c True if this - Model\'s \'timeUnits\' attribute is set. - - @return @c True if the \'timeUnits\' attribute of this Model is - set, @c False otherwise. - - @note The \'substanceUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetVolumeUnits " - Predicate returning @c True if this - Model\'s \'volumeUnits\' attribute is set. - - @return @c True if the \'volumeUnits\' attribute of this Model is - set, @c False otherwise. - - @note The \'volumeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetAreaUnits " - Predicate returning @c True if this - Model\'s \'areaUnits\' attribute is set. - - @return @c True if the \'areaUnits\' attribute of this Model is - set, @c False otherwise. - - @note The \'areaUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetLengthUnits " - Predicate returning @c True if this - Model\'s \'lengthUnits\' attribute is set. - - @return @c True if the \'lengthUnits\' attribute of this Model is - set, @c False otherwise. - - @note The \'lengthUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetExtentUnits " - Predicate returning @c True if this - Model\'s \'extentUnits\' attribute is set. - - @return @c True if the \'extentUnits\' attribute of this Model is - set, @c False otherwise. - - @note The \'extentUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetConversionFactor " - Predicate returning @c True if this - Model\'s \'conversionFactor\' attribute is set. - - @return @c True if the \'conversionFactor\' attribute of this Model is - set, @c False otherwise. - - @note The \'conversionFactor\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setId " - Sets the value of the \'id\' attribute of this Model. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Model::setName " - Sets the value of the \'name\' attribute of this Model. - - The string in @p name is copied. - - @param name the new name for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Model::setSubstanceUnits " - Sets the value of the \'substanceUnits\' attribute of this Model. - - The string in @p units is copied. - - @param units the new substanceUnits for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'substanceUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setTimeUnits " - Sets the value of the \'timeUnits\' attribute of this Model. - - The string in @p units is copied. - - @param units the new timeUnits for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'timeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setVolumeUnits " - Sets the value of the \'volumeUnits\' attribute of this Model. - - The string in @p units is copied. - - @param units the new volumeUnits for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'volumeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setAreaUnits " - Sets the value of the \'areaUnits\' attribute of this Model. - - The string in @p units is copied. - - @param units the new areaUnits for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'areaUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setLengthUnits " - Sets the value of the \'lengthUnits\' attribute of this Model. - - The string in @p units is copied. - - @param units the new lengthUnits for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'lengthUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setExtentUnits " - Sets the value of the \'extentUnits\' attribute of this Model. - - The string in @p units is copied. - - @param units the new extentUnits for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'extentUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setConversionFactor " - Sets the value of the \'conversionFactor\' attribute of this Model. - - The string in @p units is copied. - - @param units the new conversionFactor for the Model - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'conversionFactor\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetId " - Unsets the value of the \'id\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Model::unsetName " - Unsets the value of the \'name\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Model::unsetSubstanceUnits " - Unsets the value of the \'substanceUnits\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'substanceUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetTimeUnits " - Unsets the value of the \'timeUnits\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'timeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetVolumeUnits " - Unsets the value of the \'volumeUnits\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'volumeUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetAreaUnits " - Unsets the value of the \'areaUnits\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'areaUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetLengthUnits " - Unsets the value of the \'lengthUnits\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'lengthUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetExtentUnits " - Unsets the value of the \'extentUnits\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'extentUnits\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetConversionFactor " - Unsets the value of the \'conversionFactor\' attribute of this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'conversionFactor\' attribute is available in - SBML Level 3 but is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::addFunctionDefinition " - Adds a copy of the given FunctionDefinition object to this Model. - - @param fd the FunctionDefinition to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createFunctionDefinition() - for a method that does not lead to these issues. - - @see createFunctionDefinition() -"; - - -%feature("docstring") Model::addUnitDefinition " - Adds a copy of the given UnitDefinition object to this Model. - - @param ud the UnitDefinition object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createUnitDefinition() for - a method that does not lead to these issues. - - @see createUnitDefinition() -"; - - -%feature("docstring") Model::addCompartmentType " - Adds a copy of the given CompartmentType object to this Model. - - @param ct the CompartmentType object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createCompartmentType() - for a method that does not lead to these issues. - - @note The CompartmentType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. - - @see createCompartmentType() -"; - - -%feature("docstring") Model::addSpeciesType " - Adds a copy of the given SpeciesType object to this Model. - - @param st the SpeciesType object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createSpeciesType() for a - method that does not lead to these issues. - - @note The SpeciesType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. - - @see createSpeciesType() -"; - - -%feature("docstring") Model::addCompartment " - Adds a copy of the given Compartment object to this Model. - - @param c the Compartment object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createCompartment() for a - method that does not lead to these issues. - - @see createCompartment() -"; - - -%feature("docstring") Model::addSpecies " - Adds a copy of the given Species object to this Model. - - @param s the Species object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createSpecies() for a - method that does not lead to these issues. - - @see createSpecies() -"; - - -%feature("docstring") Model::addParameter " - Adds a copy of the given Parameter object to this Model. - - @param p the Parameter object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createParameter() for a - method that does not lead to these issues. - - @see createParameter() -"; - - -%feature("docstring") Model::addInitialAssignment " - Adds a copy of the given InitialAssignment object to this Model. - - @param ia the InitialAssignment object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createInitialAssignment() - for a method that does not lead to these issues. - - @see createInitialAssignment() -"; - - -%feature("docstring") Model::addRule " - Adds a copy of the given Rule object to this Model. - - @param r the Rule object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see the methods - Model.createAlgebraicRule(), Model.createAssignmentRule() and - Model.createRateRule() for methods that do not lead to these issues. - - @see createAlgebraicRule() - @see createAssignmentRule() - @see createRateRule() -"; - - -%feature("docstring") Model::addConstraint " - Adds a copy of the given Constraint object to this Model. - - @param c the Constraint object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createConstraint() for a - method that does not lead to these issues. - - @see createConstraint() -"; - - -%feature("docstring") Model::addReaction " - Adds a copy of the given Reaction object to this Model. - - @param r the Reaction object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createReaction() for a - method that does not lead to these issues. - - @see createReaction() -"; - - -%feature("docstring") Model::addEvent " - Adds a copy of the given Event object to this Model. - - @param e the Event object to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createEvent() for a method - that does not lead to these issues. - - @see createEvent() -"; - - -%feature("docstring") Model::createFunctionDefinition " - Creates a new FunctionDefinition inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the FunctionDefinition object created - - @see addFunctionDefinition() -"; - - -%feature("docstring") Model::createUnitDefinition " - Creates a new UnitDefinition inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the UnitDefinition object created - - @see addUnitDefinition() -"; - - -%feature("docstring") Model::createUnit " - Creates a new Unit object within the last UnitDefinition object - created in this model and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the UnitDefinition was created is not - significant. If a UnitDefinition object does not exist in this model, - a new Unit is @em not created and @c None is returned instead. - - @return the Unit object created - - @see addUnitDefinition() -"; - - -%feature("docstring") Model::createCompartmentType " - Creates a new CompartmentType inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the CompartmentType object created - - @note The CompartmentType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. - - @see addCompartmentType() -"; - - -%feature("docstring") Model::createSpeciesType " - Creates a new SpeciesType inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the SpeciesType object created - - @note The SpeciesType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. - - @see addSpeciesType() -"; - - -%feature("docstring") Model::createCompartment " - Creates a new Compartment inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the Compartment object created - - @see addCompartment() -"; - - -%feature("docstring") Model::createSpecies " - Creates a new Species inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the Species object created - - @see addSpecies() -"; - - -%feature("docstring") Model::createParameter " - Creates a new Parameter inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the Parameter object created - - @see addParameter() -"; - - -%feature("docstring") Model::createInitialAssignment " - Creates a new InitialAssignment inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the InitialAssignment object created - - @see addInitialAssignment() -"; - - -%feature("docstring") Model::createAlgebraicRule " - Creates a new AlgebraicRule inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the AlgebraicRule object created - - @see addRule() -"; - - -%feature("docstring") Model::createAssignmentRule " - Creates a new AssignmentRule inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the AssignmentRule object created - - @see addRule() -"; - - -%feature("docstring") Model::createRateRule " - Creates a new RateRule inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the RateRule object created - - @see addRule() -"; - - -%feature("docstring") Model::createConstraint " - Creates a new Constraint inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the Constraint object created - - @see addConstraint() -"; - - -%feature("docstring") Model::createReaction " - Creates a new Reaction inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the Reaction object created - - @see addReaction() -"; - - -%feature("docstring") Model::createReactant " - Creates a new SpeciesReference object for a reactant inside the last - Reaction object in this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, a new SpeciesReference is @em not - created and @c None is returned instead. - - @return the SpeciesReference object created -"; - - -%feature("docstring") Model::createProduct " - Creates a new SpeciesReference object for a product inside the last - Reaction object in this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, a new SpeciesReference is @em not - created and @c None is returned instead. - - @return the SpeciesReference object created -"; - - -%feature("docstring") Model::createModifier " - Creates a new ModifierSpeciesReference object for a modifier species - inside the last Reaction object in this Model, and returns a pointer - to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, a new ModifierSpeciesReference is @em - not created and @c None is returned instead. - - @return the SpeciesReference object created -"; - - -%feature("docstring") Model::createKineticLaw " - Creates a new KineticLaw inside the last Reaction object created in - this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, or a Reaction exists but already has a - KineticLaw, a new KineticLaw is @em not created and @c None is returned - instead. - - @return the KineticLaw object created -"; - - -%feature("docstring") Model::createKineticLawParameter " - Creates a new local Parameter inside the KineticLaw object of the last - Reaction created inside this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The last KineticLaw object in this Model could have been created in a - variety of ways. For example, it could have been added using - createKineticLaw(), or it could be the result of using - Reaction.createKineticLaw() on the Reaction object created by a - createReaction(). If a Reaction does not exist for this model, or the - last Reaction does not contain a KineticLaw object, a new Parameter is - @em not created and @c None is returned instead. - - @return the Parameter object created -"; - - -%feature("docstring") Model::createKineticLawLocalParameter " - Creates a new LocalParameter inside the KineticLaw object of the last - Reaction created inside this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The last KineticLaw object in this Model could have been created in a - variety of ways. For example, it could have been added using - createKineticLaw(), or it could be the result of using - Reaction.createKineticLaw() on the Reaction object created by a - createReaction(). If a Reaction does not exist for this model, or the - last Reaction does not contain a KineticLaw object, a new Parameter is - @em not created and @c None is returned instead. - - @return the Parameter object created -"; - - -%feature("docstring") Model::createEvent " - Creates a new Event inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - @return the Event object created -"; - - -%feature("docstring") Model::createEventAssignment " - Creates a new EventAssignment inside the last Event object created in - this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Event object in this model was created - is not significant. It could have been created in a variety of ways, - for example by using createEvent(). If no Event object exists in this - Model object, a new EventAssignment is @em not created and @c None is - returned instead. - - @return the EventAssignment object created -"; - - -%feature("docstring") Model::createTrigger " - Creates a new Trigger inside the last Event object created in - this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Event object in this model was created - is not significant. It could have been created in a variety of ways, - for example by using createEvent(). If no Event object exists in this - Model object, a new Trigger is @em not created and @c None is - returned instead. - - @return the Trigger object created -"; - - -%feature("docstring") Model::createDelay " - Creates a new Delay inside the last Event object created in - this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this - object\'s corresponding attributes. - - The mechanism by which the last Event object in this model was created - is not significant. It could have been created in a variety of ways, - for example by using createEvent(). If no Event object exists in this - Model object, a new Delay is @em not created and @c None is - returned instead. - - @return the Delay object created -"; - - -%feature("docstring") Model::setAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setAnnotation(XMLNode annotation)
- - Sets the value of the \'annotation\' subelement of this SBML object to a - copy of @p annotation. - - Any existing content of the \'annotation\' subelement is discarded. - Unless you have taken steps to first copy and reconstitute any - existing annotations into the @p annotation that is about to be - assigned, it is likely that performing such wholesale replacement is - unfriendly towards other software applications whose annotations are - discarded. An alternative may be to use appendAnnotation(). - - @param annotation an XML structure that is to be used as the content - of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see appendAnnotation() - - -
- Method variant with the following signature: -
setAnnotation(string annotation)
- - Sets the value of the \'annotation\' subelement of this SBML object to a - copy of @p annotation. - - Any existing content of the \'annotation\' subelement is discarded. - Unless you have taken steps to first copy and reconstitute any - existing annotations into the @p annotation that is about to be - assigned, it is likely that performing such wholesale replacement is - unfriendly towards other software applications whose annotations are - discarded. An alternative may be to use appendAnnotation(). - - @param annotation an XML string that is to be used as the content - of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see appendAnnotation() -"; - - -%feature("docstring") Model::appendAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
appendAnnotation(XMLNode annotation)
- - Appends annotation content to any existing content in the \'annotation\' - subelement of this object. - - The content in @p annotation is copied. Unlike setAnnotation(), this - method allows other annotations to be preserved when an application - adds its own data. - - @param annotation an XML structure that is to be copied and appended - to the content of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see setAnnotation() - - -
- Method variant with the following signature: -
appendAnnotation(string annotation)
- - Appends annotation content to any existing content in the \'annotation\' - subelement of this object. - - The content in @p annotation is copied. Unlike setAnnotation(), this - method allows other annotations to be preserved when an application - adds its own data. - - @param annotation an XML string that is to be copied and appended - to the content of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see setAnnotation() -"; - - -%feature("docstring") Model::getListOfFunctionDefinitions " - Get the ListOfFunctionDefinitions object in this Model. - - @return the list of FunctionDefinitions for this Model. -"; - - -%feature("docstring") Model::getListOfUnitDefinitions " - Get the ListOfUnitDefinitions object in this Model. - - @return the list of UnitDefinitions for this Model. -"; - - -%feature("docstring") Model::getListOfCompartmentTypes " - Get the ListOfCompartmentTypes object in this Model. - - @return the list of CompartmentTypes for this Model. - - @note The CompartmentType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getListOfSpeciesTypes " - Get the ListOfSpeciesTypes object in this Model. - - @return the list of SpeciesTypes for this Model. - - @note The SpeciesType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getListOfCompartments " - Get the ListOfCompartments object in this Model. - - @return the list of Compartments for this Model. -"; - - -%feature("docstring") Model::getListOfSpecies " - Get the ListOfSpecies object in this Model. - - @return the list of Species for this Model. -"; - - -%feature("docstring") Model::getListOfParameters " - Get the ListOfParameters object in this Model. - - @return the list of Parameters for this Model. -"; - - -%feature("docstring") Model::getListOfInitialAssignments " - Get the ListOfInitialAssignments object in this Model. - - @return the list of InitialAssignments for this Model. -"; - - -%feature("docstring") Model::getListOfRules " - Get the ListOfRules object in this Model. - - @return the list of Rules for this Model. -"; - - -%feature("docstring") Model::getListOfConstraints " - Get the ListOfConstraints object in this Model. - - @return the list of Constraints for this Model. -"; - - -%feature("docstring") Model::getListOfReactions " - Get the ListOfReactions object in this Model. - - @return the list of Reactions for this Model. -"; - - -%feature("docstring") Model::getListOfEvents " - Get the ListOfEvents object in this Model. - - @return the list of Events for this Model. -"; - - -%feature("docstring") Model::getFunctionDefinition " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getFunctionDefinition(long n)
- - Get the nth FunctionDefinitions object in this Model. - - @return the nth FunctionDefinition of this Model. - - -
- Method variant with the following signature: -
getFunctionDefinition(string sid)
- - Get a FunctionDefinition object based on its identifier. - - @return the FunctionDefinition in this Model with the identifier - @p sid or @c None if no such FunctionDefinition exists. -"; - - -%feature("docstring") Model::getUnitDefinition " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getUnitDefinition(long n)
- - Get the nth UnitDefinition object in this Model. - - @return the nth UnitDefinition of this Model. - - -
- Method variant with the following signature: -
getUnitDefinition(string sid)
- - Get a UnitDefinition based on its identifier. - - @return the UnitDefinition in this Model with the identifier @p sid or - @c None if no such UnitDefinition exists. -"; - - -%feature("docstring") Model::getCompartmentType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getCompartmentType(long n)
- - Get the nth CompartmentType object in this Model. - - @return the nth CompartmentType of this Model. - - @note The CompartmentType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. - - -
- Method variant with the following signature: -
getCompartmentType(string sid)
- - Get a CompartmentType object based on its identifier. - - @return the CompartmentType in this Model with the identifier @p sid - or @c None if no such CompartmentType exists. - - @note The CompartmentType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getSpeciesType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getSpeciesType(long n)
- - Get the nth SpeciesType object in this Model. - - @return the nth SpeciesType of this Model. - - @note The SpeciesType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. - - -
- Method variant with the following signature: -
getSpeciesType(string sid)
- - Get a SpeciesType object based on its identifier. - - @return the SpeciesType in this Model with the identifier @p sid or - @c None if no such SpeciesType exists. - - @note The SpeciesType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getCompartment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getCompartment(long n)
- - Get the nth Compartment object in this Model. - - @return the nth Compartment of this Model. - - -
- Method variant with the following signature: -
getCompartment(string sid)
- - Get a Compartment object based on its identifier. - - @return the Compartment in this Model with the identifier @p sid or - @c None if no such Compartment exists. -"; - - -%feature("docstring") Model::getSpecies " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getSpecies(long n)
- - Get the nth Species object in this Model. - - @return the nth Species of this Model. - - -
- Method variant with the following signature: -
getSpecies(string sid)
- - Get a Species object based on its identifier. - - @return the Species in this Model with the identifier @p sid or @c None - if no such Species exists. -"; - - -%feature("docstring") Model::getParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getParameter(long n)
- - Get the nth Parameter object in this Model. - - @return the nth Parameter of this Model. - - -
- Method variant with the following signature: -
getParameter(string sid)
- - Get a Parameter object based on its identifier. - - @return the Parameter in this Model with the identifier @p sid or @c None - if no such Parameter exists. -"; - - -%feature("docstring") Model::getInitialAssignment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getInitialAssignment(string symbol)
- - Get an InitialAssignment object based on the symbol to which it - assigns a value. - - @return the InitialAssignment in this Model with the given \'symbol\' - attribute value or @c None if no such InitialAssignment exists. - - -
- Method variant with the following signature: -
getInitialAssignment(long n)
- - Get the nth InitialAssignment object in this Model. - - @return the nth InitialAssignment of this Model. -"; - - -%feature("docstring") Model::getRule " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getRule(string variable)
- - Get a Rule object based on the variable to which it assigns a value. - - @return the Rule in this Model with the given \'variable\' attribute - value or @c None if no such Rule exists. - - -
- Method variant with the following signature: -
getRule(long n)
- - Get the nth Rule object in this Model. - - @return the nth Rule of this Model. -"; - - -%feature("docstring") Model::getConstraint " - Get the nth Constraint object in this Model. - - @return the nth Constraint of this Model. -"; - - -%feature("docstring") Model::getReaction " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getReaction(long n)
- - Get the nth Reaction object in this Model. - - @return the nth Reaction of this Model. - - -
- Method variant with the following signature: -
getReaction(string sid)
- - Get a Reaction object based on its identifier. - - @return the Reaction in this Model with the identifier @p sid or @c None - if no such Reaction exists. -"; - - -%feature("docstring") Model::getSpeciesReference " - Get a SpeciesReference object based on its identifier. - - @return the SpeciesReference in this Model with the identifier @p sid or @c None - if no such SpeciesReference exists. -"; - - -%feature("docstring") Model::getModifierSpeciesReference " - Get a ModifierSpeciesReference object based on its identifier. - - @return the ModifierSpeciesReference in this Model with the - identifier @p sid or @c None - if no such ModifierSpeciesReference exists. -"; - - -%feature("docstring") Model::getEvent " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getEvent(long n)
- - Get the nth Event object in this Model. - - @return the nth Event of this Model. - - -
- Method variant with the following signature: -
getEvent(string sid)
- - Get an Event object based on its identifier. - - @return the Event in this Model with the identifier @p sid or @c None if - no such Event exists. -"; - - -%feature("docstring") Model::getNumFunctionDefinitions " - Get the number of FunctionDefinition objects in this Model. - - @return the number of FunctionDefinitions in this Model. -"; - - -%feature("docstring") Model::getNumUnitDefinitions " - Get the number of UnitDefinition objects in this Model. - - @return the number of UnitDefinitions in this Model. -"; - - -%feature("docstring") Model::getNumCompartmentTypes " - Get the number of CompartmentType objects in this Model. - - @return the number of CompartmentTypes in this Model. - - @note The CompartmentType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getNumSpeciesTypes " - Get the number of SpeciesType objects in this Model. - - @return the number of SpeciesTypes in this Model. - - @note The SpeciesType object class is only available in SBML - Level 2 Versions 2–4. It is not available in - Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getNumCompartments " - Get the number of Compartment objects in this Model. - - @return the number of Compartments in this Model. -"; - - -%feature("docstring") Model::getNumSpecies " - Get the number of Specie objects in this Model. - - @return the number of Species in this Model. -"; - - -%feature("docstring") Model::getNumSpeciesWithBoundaryCondition " - Get the number of Species in this Model having their - \'boundaryCondition\' attribute value set to @c True. - - @return the number of Species in this Model with boundaryCondition set - to true. -"; - - -%feature("docstring") Model::getNumParameters " - Get the number of Parameter objects in this Model. - - @return the number of Parameters in this Model. Parameters defined in - KineticLaws are not included. -"; - - -%feature("docstring") Model::getNumInitialAssignments " - Get the number of InitialAssignment objects in this Model. - - @return the number of InitialAssignments in this Model. -"; - - -%feature("docstring") Model::getNumRules " - Get the number of Rule objects in this Model. - - @return the number of Rules in this Model. -"; - - -%feature("docstring") Model::getNumConstraints " - Get the number of Constraint objects in this Model. - - @return the number of Constraints in this Model. -"; - - -%feature("docstring") Model::getNumReactions " - Get the number of Reaction objects in this Model. - - @return the number of Reactions in this Model. -"; - - -%feature("docstring") Model::getNumEvents " - Get the number of Event objects in this Model. - - @return the number of Events in this Model. -"; - - -%feature("docstring") Model::removeFromParentAndDelete " - Finds this Model\'s parent SBMLDocument and calls setModel(None) on it, - indirectly deleting itself. Overridden from the SBase function since - the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Model::renameAllIds " - Finds this Model\'s parent SBMLDocument and calls setModel(None) on it, - indirectly deleting itself. Overridden from the SBase function since - the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Model::renameIDs " - Finds this Model\'s parent SBMLDocument and calls setModel(None) on it, - indirectly deleting itself. Overridden from the SBase function since - the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Model::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Model::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Model::isBoolean " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertL1ToL2 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertL1ToL3 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertL2ToL3 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertL2ToL1 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertL3ToL1 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertL3ToL2 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::addModifiers " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::addConstantAttribute " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::setSpatialDimensions " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::addDefinitionsForDefaultUnits " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertParametersToLocals " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::setSpeciesReferenceConstantValueAndStoichiometry " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::removeMetaId " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::removeSBOTerms " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::removeHasOnlySubstanceUnits " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::removeSBOTermsNotInL2V2 " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::removeDuplicateTopLevelAnnotations " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::removeParameterRuleUnits " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertStoichiometryMath " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::assignRequiredValues " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::dealWithModelUnits " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::dealWithStoichiometry " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::dealWithEvents " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::convertToL2Strict " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::setSBMLDocument " - @internal - Predicate returning @c True if the - given ASTNode is a boolean. - - Often times, this question can be answered with the ASTNode\'s own - isBoolean() method, but if the AST is an expression that calls a - function defined in the Model\'s ListOfFunctionDefinitions, the model - is needed for lookup context. - - @return true if the given ASTNode is a boolean. -"; - - -%feature("docstring") Model::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") Model::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or - @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Model::getElementName " - Returns the XML element name of this object, which for Model, is - always @c \'model\'. - - @return the name of this element, i.e., @c \'model\'. -"; - - -%feature("docstring") Model::getElementPosition " - @internal - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") Model::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Model::populateListFormulaUnitsData " - Populates the list of FormulaDataUnits with the units derived - for the model. The list contains elements of class - FormulaUnitsData. - - The first element of the list refers to the default units - of \'substance per time\' derived from the model and has the - unitReferenceId \'subs_per_time\'. This facilitates the comparison of units - derived from mathematical formula with the expected units. - - The next elements of the list record the units of the - compartments and species established from either explicitly - declared or default units. - - The next elements record the units of any parameters. - - Subsequent elements of the list record the units derived for - each mathematical expression encountered within the model. - - @note This function is utilised by the Unit Consistency Validator. - The list is populated prior to running the validation and thus - the consistency of units can be checked by accessing the members - of the list and comparing the appropriate data. -"; - - -%feature("docstring") Model::isPopulatedListFormulaUnitsData " - Predicate returning @c True if - the list of FormulaUnitsData is populated. - - @return @c True if the list of FormulaUnitsData is populated, - @c False otherwise. -"; - - -%feature("docstring") Model::addFormulaUnitsData " - @internal - Adds a copy of the given FormulaUnitsData object to this Model. - - @param fud the FormulaUnitsData to add -"; - - -%feature("docstring") Model::createFormulaUnitsData " - @internal - Creates a new FormulaUnitsData inside this Model and returns it. - - @return the FormulaUnitsData object created -"; - - -%feature("docstring") Model::getNumFormulaUnitsData " - @internal - Get the number of FormulaUnitsData objects in this Model. - - @return the number of FormulaUnitsData in this Model. -"; - - -%feature("docstring") Model::getListFormulaUnitsData " - @internal - Get the list of FormulaUnitsData object in this Model. - - @return the list of FormulaUnitsData for this Model. -"; - - -%feature("docstring") Model::hasRequiredElements " - Predicate returning @c True if - all the required elements for this Model object - have been set. - - @note The required elements for a Model object are: - listOfCompartments (L1 only); listOfSpecies (L1V1 only); - listOfReactions(L1V1 only) - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Model::removeFunctionDefinition " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeFunctionDefinition(long n)
- - Removes the nth FunctionDefinition object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the FunctionDefinition object to remove - - @return the FunctionDefinition object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeFunctionDefinition(string sid)
- - Removes the FunctionDefinition object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the FunctionDefinition objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the FunctionDefinition object to remove - - @return the FunctionDefinition object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no FunctionDefinition - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeUnitDefinition " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeUnitDefinition(long n)
- - Removes the nth UnitDefinition object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the UnitDefinition object to remove - - @return the UnitDefinition object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeUnitDefinition(string sid)
- - Removes the UnitDefinition object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the UnitDefinition objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the UnitDefinition object to remove - - @return the UnitDefinition object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no UnitDefinition - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeCompartmentType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeCompartmentType(long n)
- - Removes the nth CompartmentType object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the CompartmentType object to remove - - @return the ComapartmentType object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeCompartmentType(string sid)
- - Removes the CompartmentType object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the CompartmentType objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the object to remove - - @return the CompartmentType object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no CompartmentType - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeSpeciesType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeSpeciesType(long n)
- - Removes the nth SpeciesType object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the SpeciesType object to remove - - @return the SpeciesType object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeSpeciesType(string sid)
- - Removes the SpeciesType object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the SpeciesType objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the SpeciesType object to remove - - @return the SpeciesType object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no SpeciesType - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeCompartment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeCompartment(long n)
- - Removes the nth Compartment object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Compartment object to remove - - @return the Compartment object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeCompartment(string sid)
- - Removes the Compartment object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the Compartment objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the Compartment object to remove - - @return the Compartment object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Compartment - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeSpecies " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeSpecies(long n)
- - Removes the nth Species object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Species object to remove - - @return the Species object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeSpecies(string sid)
- - Removes the Species object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the Species objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the Species object to remove - - @return the Species object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Species - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeParameter(long n)
- - Removes the nth Parameter object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Parameter object to remove - - @return the Parameter object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeParameter(string sid)
- - Removes the Parameter object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the Parameter objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the Parameter object to remove - - @return the Parameter object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Parameter - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeInitialAssignment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeInitialAssignment(string symbol)
- - Removes the InitialAssignment object with the given \'symbol\' attribute - from this Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the InitialAssignment objects in this Model object have the - \'symbol\' attribute @p symbol, then @c None is returned. - - @param symbol the \'symbol\' attribute of the InitialAssignment object to remove - - @return the InitialAssignment object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no InitialAssignment - object with the \'symbol\' attribute exists in this Model object. - - -
- Method variant with the following signature: -
removeInitialAssignment(long n)
- - Removes the nth InitialAssignment object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the InitialAssignment object to remove - - @return the InitialAssignment object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. -"; - - -%feature("docstring") Model::removeRule " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeRule(string variable)
- - Removes the Rule object with the given \'variable\' attribute from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the Rule objects in this Model object have the \'variable\' attribute - @p variable, then @c None is returned. - - @param variable the \'variable\' attribute of the Rule object to remove - - @return the Rule object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Rule - object with the \'variable\' attribute exists in this Model object. - - -
- Method variant with the following signature: -
removeRule(long n)
- - Removes the nth Rule object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Rule object to remove - - @return the Rule object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. -"; - - -%feature("docstring") Model::removeConstraint " - Removes the nth Constraint object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Constraint object to remove - - @return the Constraint object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. -"; - - -%feature("docstring") Model::removeReaction " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeReaction(long n)
- - Removes the nth Reaction object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Reaction object to remove - - @return the Reaction object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeReaction(string sid)
- - Removes the Reaction object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the Reaction objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the Reaction object to remove - - @return the Reaction object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Reaction - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeEvent " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeEvent(long n)
- - Removes the nth Event object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Event object to remove - - @return the Event object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - - -
- Method variant with the following signature: -
removeEvent(string sid)
- - Removes the Event object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the Event objects in this Model object have the identifier - @p sid, then @c None is returned. - - @param sid the identifier of the Event object to remove - - @return the Event object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Event - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::appendFrom " - Takes the contents of the passed-in Model, makes copies of everything, - and appends those copies to the appropriate places in this Model. - - This method also calls the appendFrom method on all libSBML - plug-in objects.  @htmlinclude what-are-plugins.html - - @param model the Model to merge with this one. -"; - - -%feature("docstring") Model::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child elements - (if any). (This is an internal implementation for enablePackage - function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") Model::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") Model::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Model::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Model::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Model::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Model::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Model::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Model::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Model::syncAnnotation " - @internal - Synchronizes the annotation of this SBML object. - - Annotation element (XMLNode mAnnotation) is synchronized with the - current CVTerm objects (List mCVTerm), ModelHistory object - (ModelHistory mHistory) and ListOfLayouts object (ListOfLayouts mLayouts). - Currently, this method is called in getAnnotation, isSetAnnotation, - and writeElements methods. -"; - - -%feature("docstring") Model::checkUnitDefinition " - @internal - Internal function used in populateListFormulaUnitsData -"; - - -%feature("docstring") Model::checkSpeciesReference " - @internal - Internal function used in populateListFormulaUnitsData -"; - - -%feature("docstring") SBMLDocument " - @ingroup Core - Container for an SBML document and interface for global operations - on SBML documents. - - @if clike LibSBML uses the class SBMLDocument as a - top-level container for storing SBML content and data associated with it - (such as warnings and error messages). The two primary means of reading - an SBML model, SBMLReader.readSBML() and - SBMLReader.readSBMLFromString(), both return a pointer to an - SBMLDocument object. From there, callers can inquire about any errors - encountered (e.g., using SBMLDocument.getNumErrors()), access the Model - object, and perform other actions such as consistency-checking and model - translation. - @endif@if python LibSBML uses the class SBMLDocument as a - top-level container for storing SBML content and data associated with it - (such as warnings and error messages). The two primary means of reading - an SBML model, SBMLReader.readSBML() and - SBMLReader.readSBMLFromString(), both return a pointer to an - SBMLDocument object. From there, callers can inquire about any errors - encountered (e.g., using SBMLDocument.getNumErrors()), access the Model - object, and perform other actions such as consistency-checking and model - translation. - @endif@if java LibSBML uses the class SBMLDocument as a top-level - container for storing SBML content and data associated with it (such as - warnings and error messages). The two primary means of reading an SBML - model, SBMLReader.readSBML() and - SBMLReader.readSBMLFromString(), both return an SBMLDocument - object. From there, callers can inquire about any errors encountered - (e.g., using SBMLDocument.getNumErrors()), access the Model object, and - perform other actions such as consistency-checking and model - translation. - @endif@~ - - When creating fresh models programmatically, the starting point is - typically the creation of an SBMLDocument object instance. The - SBMLDocument constructor accepts arguments for the SBML Level and - Version of the model to be created. After creating the SBMLDocument - object, calling programs then typically call SBMLDocument.createModel() - almost immediately, and then proceed to call the methods on the Model - object to fill out the model\'s contents. - - SBMLDocument corresponds roughly to the class Sbml defined in the - SBML Level 2 specification and SBML in the Level 3 - specification. It does not have a direct correspondence in SBML - Level 1. (However, to make matters simpler for applications, - libSBML creates an SBMLDocument no matter whether the model is - Level 1, Level 2 or Level 3.) In its barest form, when written out in - XML format for (e.g.) SBML Level 2 Version 4, the corresponding - structure is the following: - @verbatim - - ... - @endverbatim - - SBMLDocument is derived from SBase, and therefore contains the usual SBase - attributes (in SBML Level 2 and Level 3) of \'metaid\' and \'sboTerm\', as - well as the subelements \'notes\' and \'annotation\'. It also contains the - attributes \'level\' and \'version\' indicating the Level and Version of the - SBML data structure. These can be accessed using the methods defined by - the SBase class for that purpose. - - @section checking Checking consistency and adherence to SBML specifications - - One of the most important features of libSBML is its ability to perform - SBML validation to ensure that a model adheres to the SBML specification - for whatever Level+Version combination the model uses. SBMLDocument - provides the methods for running consistency-checking and validation - rules on the SBML content. - - First, a brief explanation of the rationale is in order. In libSBML - versions up to and including the version 3.3.x series, the - individual methods for creating and setting attributes and other - components were quite lenient, and allowed a caller to compose SBML - entities that might not, in the end, represent valid SBML. This allowed - applications the freedom to do things such as save incomplete models - (which is useful when models are being developed over long periods of - time). In the version 4.x series, libSBML is somewhat stricter, - but still permits structures to be created independently and the results - to be combined in a separate step. In all these cases, it means that a - separate validation step is necessary when a calling program finally - wants to finish a complete SBML document. - - The primary interface to this validation facility is SBMLDocument\'s - SBMLDocument.checkInternalConsistency() and - SBMLDocument.checkConsistency(). The former verifies the basic - internal consistency and syntax of an SBML document, and the latter - implements more elaborate validation rules (both those defined by the - SBML specifications, as well as additional rules offered by libSBML). - - @if clike The checks performed by SBMLDocument.checkInternalConsistency() are - hardwired and cannot be changed by calling programs, but the validation - performed by SBMLDocument.checkConsistency() is under program control - using the method SBMLDocument.setConsistencyChecks(). Applications can - selectively disable specific kinds of checks that they may not be - interested in, by calling SBMLDocument.setConsistencyChecks() with - appropriate parameters. - @endif@if python The checks performed by SBMLDocument.checkInternalConsistency() are - hardwired and cannot be changed by calling programs, but the validation - performed by SBMLDocument.checkConsistency() is under program control - using the method SBMLDocument.setConsistencyChecks(). Applications can - selectively disable specific kinds of checks that they may not be - interested in, by calling SBMLDocument.setConsistencyChecks() with - appropriate parameters. - @endif@if java The checks performed by SBMLDocument.checkInternalConsistency() are - hardwired and cannot be changed by calling programs, but the validation - performed by SBMLDocument.checkConsistency() is under program control - using the method SBMLDocument.setConsistencyChecks(). Applications can selectively disable specific kinds of checks - that they may not be interested by calling - SBMLDocument.setConsistencyChecks() with - appropriate parameters. - @endif@~ - - These methods have slightly different relevance depending on whether a - model is created programmaticaly from scratch, or whether it is read in - from a file or data stream. The following list summarizes the possible - scenarios. - - Scenario 1: Creating a model from scratch. Before writing out - the model, - - @li Call SBMLDocument.checkInternalConsistency(), then inquire about - the results by calling SBMLDocument.getNumErrors() - - @li Call @if java SBMLDocument.setConsistencyChecks() @else SBMLDocument.setConsistencyChecks() @endif@~ to configure - which checks will be performed by SBMLDocument.checkConsistency() - - @li Call SBMLDocument.checkConsistency(), then inquire about the results by - calling SBMLDocument.getNumErrors() - - Scenario 2: Reading a model from a file or data stream. After - reading the model, - - @li Basic consistency checks will have been performed automatically by - libSBML upon reading the content, so you only need to inquire about the - results by using SBMLDocument.getNumErrors() - - @li Call @if java SBMLDocument.setConsistencyChecks() @else SBMLDocument.setConsistencyChecks() @endif@~ to configure - which checks are performed by SBMLDocument.checkConsistency() - - @li Call SBMLDocument.checkConsistency(), then inquire about the results - by calling SBMLDocument.getNumErrors() - - @if clike An example of using the consistency-checking - and validation facilities is provided in this manual in the - section @ref libsbml-example. @endif@~ - - @section converting Converting documents between Levels and Versions of SBML - - LibSBML provides facilities for limited translation of SBML between - Levels and Versions of the SBML specifications. The method for doing is - is @if java SBMLDocument.setLevelAndVersion() @else setLevelAndVersion() @endif. In - general, models can be converted upward without difficulty (e.g., from - SBML Level 1 to Level 2, or from an earlier Version of - Level 2 to the latest Version of Level 2). Sometimes models - can be translated downward as well, if they do not use constructs - specific to more advanced Levels of SBML. - - Calling @if java SBMLDocument.setLevelAndVersion() @else SBMLDocument.setLevelAndVersion() @endif@~ will not @em necessarily lead - to a successful conversion. The method will return a boolean value - to indicate success or failure. Callers must check the error log (see - next section) attached to the SBMLDocument object after calling - @if java SBMLDocument.setLevelAndVersion() @else SBMLDocument.setLevelAndVersion() @endif@~ in order to assess whether any - problems arose. - - If an application is interested in translating to a lower Level and/or - Version of SBML within a Level, the following methods allow for prior - assessment of whether there is sufficient compatibility to make a - translation possible: -
    -
  • SBMLDocument.checkL1Compatibility(), -
  • SBMLDocument.checkL2v1Compatibility(), -
  • SBMLDocument.checkL2v2Compatibility(), -
  • SBMLDocument.checkL2v3Compatibility(), -
  • SBMLDocument.checkL2v4Compatibility(), and -
  • SBMLDocument.checkL3v1Compatibility(). -
- - Some changes between Versions of SBML Level 2 may lead to - unexpected behaviors when attempting conversions in either direction. - For example, SBML Level 2 Version 4 relaxed the requirement - for consistency in units of measurement between expressions annd - quantities in a model. As a result, a model written in Version 4, - if converted to Version 3 with no other changes, may fail - validation as a Version 3 model because Version 3 imposed - stricter requirements on unit consistency. - - Other changes between SBML Level 2 and Level 3 make downward conversions - challenging. In some cases, it means that a model converted to - Level 2 from Level 3 will contain attributes that were not - explicitly given in the Level 3 model, because in Level 2 - these attributes may have been optional or have default values. - - @section errors Error handling - - Upon reading a model, SBMLDocument logs any problems encountered while - reading the model from the file or data stream. The log contains - objects that record diagnostic information about any notable issues that - arose. Whether the problems are warnings or errors, they are both - reported through a single common interface involving the object class - SBMLError. - - The methods SBMLDocument.getNumErrors(), @if java SBMLDocument.getError() @else SBMLDocument.getError() @endif@~ and - SBMLDocument.printErrors() allow callers to interact with the warnings - or errors logged. Alternatively, callers may retrieve the entire log as - an SBMLErrorLog object using the method SBMLDocument.getErrorLog(). - The SBMLErrorLog object provides some alternative methods for - interacting with the set of errors and warnings. In either case, - applications typically should first call SBMLDocument.getNumErrors() to - find out if any issues have been logged after specific libSBML - operations such as the ones discussed in the sections above. If they - have, then an application will should proceed to inspect the individual - reports using either the direct interfaces on SBMLDocument or using the - methods on the SBMLErrorLog object. - - @if clike An example of using the error facility is - provided in this manual in the - section @ref libsbml-example. @endif@~ -"; - - -%feature("docstring") SBMLDocument::getDefaultLevel " - The default SBML Level of new SBMLDocument objects. - - This \'default Level\' corresponds to the most recent SBML specification - Level available at the time libSBML version @htmlinclude libsbml-version.html - was released. For this copy of libSBML, the value is 3. - The default Level is used by SBMLDocument if no Level is explicitly - specified at the time of the construction of an SBMLDocument instance. - - @return an integer indicating the most recent SBML specification Level - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLDocument), and the - other will be a standalone top-level function with the name - SBMLDocument_getDefaultLevel(). They are functionally - identical. @endif@~ - - @see @if clike getDefaultVersion() @else SBMLDocument.getDefaultVersion() @endif@~ -"; - - -%feature("docstring") SBMLDocument::getDefaultVersion " - The default Version of new SBMLDocument objects. - - This \'default Version\' corresponds to the most recent Version - within the most recent Level of SBML available at the time libSBML - version @htmlinclude libsbml-version.html - was released. For this copy of libSBML, the value is 1 - (where the default Level of SBML is 3). The default - Version is used by SBMLDocument if no Version is explicitly specified - at the time of the construction of an SBMLDocument instance. - - @return an integer indicating the most recent SBML specification - Version - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLDocument), and the - other will be a standalone top-level function with the name - SBMLDocument_getDefaultVersion(). They are functionally - identical. @endif@~ - - @see @if clike getDefaultLevel() @else SBMLDocument.getDefaultLevel() @endif@~ -"; - - -%feature("docstring") SBMLDocument::SBMLDocument " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
SBMLDocument(SBMLNamespaces sbmlns)
- - Creates a new SBMLDocument using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - -
- Method variant with the following signature: -
SBMLDocument(long level = 0, long version = 0)
- - Creates a new SBMLDocument, optionally with given values for the SBML - Level and Version. - - If both the SBML Level and Version attributes are not - specified, the SBML document is treated as having the latest Level and - Version of SBML as determined by SBMLDocument.getDefaultLevel() and - SBMLDocument.getDefaultVersion(); however, the SBMLDocument - object is otherwise left blank. In particular, the blank SBMLDocument - object has no associated XML attributes, including (but not limited - to) an XML namespace declaration. The XML namespace declaration is - not added until the model is written out, or the method - SBMLDocument.setLevelAndVersion() - is called. This may be important to keep in mind - if an application needs to add additional XML namespace declarations - on the <sbml> element. Application writers should - either provide values for @p level and @p version on the call to this - constructor, or else call - SBMLDocument.setLevelAndVersion() - shortly after creating the SBMLDocument object. - - @param level an integer for the SBML Level - - @param version an integer for the Version within the SBML Level - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - @see SBMLDocument.setLevelAndVersion() - @see getDefaultLevel() - @see getDefaultVersion() - - -
- Method variant with the following signature: -
SBMLDocument(SBMLDocument orig)
- - Copy constructor; creates a copy of this SBMLDocument. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") SBMLDocument::accept " - Accepts the given SBMLVisitor for this instance of SBMLDocument. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") SBMLDocument::clone " - Creates and returns a deep copy of this SBMLDocument. - - @return a (deep) copy of this SBMLDocument. -"; - - -%feature("docstring") SBMLDocument::getModel " - Returns the Model object stored in this SBMLDocument. - - It is important to note that this method does not create a - Model instance. The model in the SBMLDocument must have been created - at some prior time, for example using SBMLDocument.createModel() - or SBMLDocument.setModel(). - This method returns @c None if a model does not yet exist. - - @return the Model contained in this SBMLDocument. - - @see createModel() -"; - - -%feature("docstring") SBMLDocument::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") SBMLDocument::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or itself if it has the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") SBMLDocument::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") SBMLDocument::expandFunctionDefinitions " - Removes FunctionDefinition constructs from the document and expands - any instances of their use within <math> elements. - - For example, suppose a Model contains a FunctionDefinition with - identifier @c \'f\' representing the math expression: f(x, y) = x * - y. Suppose further that there is a reaction in which the - <math> element of the KineticLaw object contains - f(s, p), where @c s and @c p are other identifiers - defined in the model. The outcome of invoking this method is that the - <math> of the KineticLaw now represents the - expression s * p and the model no longer contains any - FunctionDefinition objects. - - @return bool @c True if the transformation was successful, - @c False, otherwise. - - @note This function will check the consistency of a model before - attemptimg the transformation. If the model is not valid SBML, the - transformation will not be performed and the function will return @c - false. -"; - - -%feature("docstring") SBMLDocument::expandInitialAssignments " - Removes InitialAssignment constructs from the document and - replaces them with appropriate values. - - For example, suppose a Model contains a InitialAssignment to a symbol - @c \'k\' where @c \'k\' is the identifier of a Parameter. The outcome of - invoking this method is that the \'value\' attribute of the Parameter - definition is set to the result calculated using the InitialAssignment - object\'s <math> formula, and the corresponding - InitialAssignment is then removed from the Model. - - @return bool @c True if the transformation was successful, - @c False, otherwise. - - @note This function will check the consistency of a model before - attemptimg the transformation. If the model is not valid SBML, the - transformation will not be performed and the function will return @c - false. As part of that process, this method will check that it has - values for any components referred to by the <math> - elements of InitialAssignment objects. In cases where not all of the - values have been declared (e.g., if the mathematical expression refers - to model entities that have no declared values), the InitialAssignment - in question will @em not be removed and this method will return @c - false. -"; - - -%feature("docstring") SBMLDocument::setLevelAndVersion " - Sets the SBML Level and Version of this SBMLDocument instance, - attempting to convert the model as needed. - - This method is the principal way in libSBML to convert models between - Levels and Versions of SBML. Generally, models can be converted - upward without difficulty (e.g., from SBML Level 1 to - Level 2, or from an earlier Version of Level 2 to the latest - Version of Level 2). Sometimes models can be translated downward - as well, if they do not use constructs specific to more advanced - Levels of SBML. - - Before calling this method, callers may check compatibility directly - using the methods SBMLDocument.checkL1Compatibility(), - SBMLDocument.checkL2v1Compatibility(), - SBMLDocument.checkL2v2Compatibility(), - SBMLDocument.checkL2v3Compatibility(), - SBMLDocument.checkL2v4Compatibility(), and - SBMLDocument.checkL3v1Compatibility(). - - The valid combinations of SBML Level and Version as of this release - of libSBML are the following: -
    -
  • Level 1 Version 2 -
  • Level 2 Version 1 -
  • Level 2 Version 2 -
  • Level 2 Version 3 -
  • Level 2 Version 4 -
  • Level 3 Version 1 -
- - Strict conversion applies the additional criteria that both the - source and the target model must be consistent SBML. Users can - control the consistency checks that are applied using the - SBMLDocument.setConsistencyChecksForConversion() method. If either - the source or the potential target model have validation errors, the - conversion is not performed. When a strict conversion is successful, - the underlying SBML object model is altered to reflect the new level - and version. Thus, information that cannot be converted - (e.g. sboTerms) will be lost. - - @param level the desired SBML Level - - @param version the desired Version within the SBML Level - - @param strict boolean indicating whether to check consistency - of both the source and target model when performing - conversion (defaults to true ) - - @return @c True if the level and version of the document were - successfully set to the requested values (which may have required - conversion of the model), @c False otherwise. - - @note Calling this method will not @em necessarily lead to a successful - conversion. If the conversion fails, it will be logged in the error - list associated with this SBMLDocument. Callers should consult - getNumErrors() to find out if the conversion succeeded without - problems. For conversions from Level 2 to Level 1, callers - can also check the Level of the model after calling this method to - find out whether it is Level 1. (If the conversion to - Level 1 failed, the Level of this model will be left unchanged.) - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - @see checkL1Compatibility() - @see checkL2v1Compatibility() - @see checkL2v2Compatibility() - @see checkL2v3Compatibility() - @see checkL2v4Compatibility() - @see checkL3v1Compatibility() - @see checkL3v1Compatibility() -"; - - -%feature("docstring") SBMLDocument::updateSBMLNamespace " - @internal - @param package - @param level - @param version -"; - - -%feature("docstring") SBMLDocument::setModel " - Sets the Model for this SBMLDocument to a copy of the given Model. - - @param m the new Model to use. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - - @see createModel() - @see getModel() -"; - - -%feature("docstring") SBMLDocument::createModel " - Creates a new Model inside this SBMLDocument, and returns a pointer to - it. - - In SBML Level 2, the use of an identifier on a Model object is - optional. This method takes an optional argument, @p sid, for setting - the identifier. If not supplied, the identifier attribute on the - Model instance is not set. - - @param sid the identifier of the new Model to create. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - @see getModel() - @see SBMLDocument.setModel() -"; - - -%feature("docstring") SBMLDocument::setLocationURI " - Sets the location of this SBMLDocument. Called automatically when - readSBMLFromFile is used, but may be set manually as well. -"; - - -%feature("docstring") SBMLDocument::getLocationURI " - Get the location of this SBMLDocument. If this document was - read from a file or had its location set manually, that filename - or set location will be returned, otherwise, an empty string is returned. -"; - - -%feature("docstring") SBMLDocument::setConsistencyChecks " - Controls the consistency checks that are performed when - SBMLDocument.checkConsistency() is called. - - This method works by adding or subtracting consistency checks from the - set of all possible checks that SBMLDocument.checkConsistency() knows - how to perform. This method may need to be called multiple times in - order to achieve the desired combination of checks. The first - argument (@p category) in a call to this method indicates the category - of consistency/error checks that are to be turned on or off, and the - second argument (@p apply, a boolean) indicates whether to turn it on - (value of @c True) or off (value of @c False). - - @if clike - The possible categories (values to the argument @p category) are the - set of values from the enumeration #SBMLErrorCategory_t. - The following are the possible choices: - @endif@if java - The possible categories (values to the argument @p category) are the - set of constants whose names begin with the characters LIBSBML_CAT_ - in the interface class {@link libsbmlConstants}. - The following are the possible choices: - @endif@if python - The possible categories (values to the argument @p category) are the - set of constants whose names begin with the characters LIBSBML_CAT_ - in the interface class @link libsbml libsbml@endlink. - The following are the possible choices: - @endif@~ -
    -
  • @link libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY - LIBSBML_CAT_GENERAL_CONSISTENCY@endlink: Correctness and consistency - of specific SBML language constructs. Performing this set of checks - is highly recommended. With respect to the SBML specification, these - concern failures in applying the validation rules numbered 2xxxx in - the Level 2 Versions 2–4 and Level 3 Version 1 - specifications. - -
  • @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY - LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink: Correctness and - consistency of identifiers used for model entities. An example of - inconsistency would be using a species identifier in a reaction rate - formula without first having declared the species. With respect to - the SBML specification, these concern failures in applying the - validation rules numbered 103xx in the Level 2 Versions 2–4 - and Level 3 Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_UNITS_CONSISTENCY - LIBSBML_CAT_UNITS_CONSISTENCY@endlink: Consistency of measurement - units associated with quantities in a model. With respect to the SBML - specification, these concern failures in applying the validation rules - numbered 105xx in the Level 2 Versions 2–4 and Level 3 - Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY - LIBSBML_CAT_MATHML_CONSISTENCY@endlink: Syntax of MathML constructs. - With respect to the SBML specification, these concern failures in - applying the validation rules numbered 102xx in the Level 2 - Versions 2–4 and Level 3 Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_SBO_CONSISTENCY - LIBSBML_CAT_SBO_CONSISTENCY@endlink: Consistency and validity of %SBO - identifiers (if any) used in the model. With respect to the SBML - specification, these concern failures in applying the validation rules - numbered 107xx in the Level 2 Versions 2–4 and Level 3 - Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL - LIBSBML_CAT_OVERDETERMINED_MODEL@endlink: Static analysis of whether - the system of equations implied by a model is mathematically - overdetermined. With respect to the SBML specification, this is - validation rule #10601 in the Level 2 Versions 2–4 and - Level 3 Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_MODELING_PRACTICE - LIBSBML_CAT_MODELING_PRACTICE@endlink: Additional checks for - recommended good modeling practice. (These are tests performed by - libSBML and do not have equivalent SBML validation rules.) -
- - By default, all validation checks are applied to the model in - an SBMLDocument object @em unless - SBMLDocument.setConsistencyChecks() - is called to indicate that only a subset should be applied. Further, - this default (i.e., performing all checks) applies separately to - each new SBMLDocument object created. In other words, each - time a model is read using SBMLReader.readSBML(), - SBMLReader.readSBMLFromString(), - or the global functions readSBML() and readSBMLFromString(), a new - SBMLDocument is created and for that document, a call to - SBMLDocument.checkConsistency() will default to applying all possible checks. - Calling programs must invoke - SBMLDocument.setConsistencyChecks() - for each such new model if they wish to change the consistency checks - applied. - - @param category a value drawn from @if clike #SBMLErrorCategory_t@else - the set of SBML error categories@endif@~ indicating the - consistency checking/validation to be turned on or off. - - @param apply a boolean indicating whether the checks indicated by - @p category should be applied or not. - - @see SBMLDocument.checkConsistency() -"; - - -%feature("docstring") SBMLDocument::setConsistencyChecksForConversion " - Controls the consistency checks that are performed when - SBMLDocument.setLevelAndVersion() is called. - - This method works by adding or subtracting consistency checks from the - set of all possible checks that may be performed to avoid conversion - to or from an invalid document. This method may need to be called - multiple times in - order to achieve the desired combination of checks. The first - argument (@p category) in a call to this method indicates the category - of consistency/error checks that are to be turned on or off, and the - second argument (@p apply, a boolean) indicates whether to turn it on - (value of @c True) or off (value of @c False). - - @if clike - The possible categories (values to the argument @p category) are the - set of values from the enumeration #SBMLErrorCategory_t. - The following are the possible choices: - @endif@if java - The possible categories (values to the argument @p category) are the - set of constants whose names begin with the characters LIBSBML_CAT_ - in the interface class {@link libsbmlConstants}. - The following are the possible choices: - @endif@if python - The possible categories (values to the argument @p category) are the - set of constants whose names begin with the characters LIBSBML_CAT_ - in the interface class @link libsbml libsbml@endlink. - The following are the possible choices: - @endif@~ -
    -
  • @link libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY - LIBSBML_CAT_GENERAL_CONSISTENCY@endlink: Correctness and consistency - of specific SBML language constructs. Performing this set of checks - is highly recommended. With respect to the SBML specification, these - concern failures in applying the validation rules numbered 2xxxx in - the Level 2 Versions 2–4 and Level 3 Version 1 - specifications. - -
  • @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY - LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink: Correctness and - consistency of identifiers used for model entities. An example of - inconsistency would be using a species identifier in a reaction rate - formula without first having declared the species. With respect to - the SBML specification, these concern failures in applying the - validation rules numbered 103xx in the Level 2 Versions 2–4 - and Level 3 Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_UNITS_CONSISTENCY - LIBSBML_CAT_UNITS_CONSISTENCY@endlink: Consistency of measurement - units associated with quantities in a model. With respect to the SBML - specification, these concern failures in applying the validation rules - numbered 105xx in the Level 2 Versions 2–4 and Level 3 - Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY - LIBSBML_CAT_MATHML_CONSISTENCY@endlink: Syntax of MathML constructs. - With respect to the SBML specification, these concern failures in - applying the validation rules numbered 102xx in the Level 2 - Versions 2–4 and Level 3 Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_SBO_CONSISTENCY - LIBSBML_CAT_SBO_CONSISTENCY@endlink: Consistency and validity of %SBO - identifiers (if any) used in the model. With respect to the SBML - specification, these concern failures in applying the validation rules - numbered 107xx in the Level 2 Versions 2–4 and Level 3 - Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL - LIBSBML_CAT_OVERDETERMINED_MODEL@endlink: Static analysis of whether - the system of equations implied by a model is mathematically - overdetermined. With respect to the SBML specification, this is - validation rule #10601 in the Level 2 Versions 2–4 and - Level 3 Version 1 specifications. - -
  • @link libsbml.LIBSBML_CAT_MODELING_PRACTICE - LIBSBML_CAT_MODELING_PRACTICE@endlink: Additional checks for - recommended good modeling practice. (These are tests performed by - libSBML and do not have equivalent SBML validation rules.) -
- - By default, all validation checks are applied to the model in - an SBMLDocument object @em unless - SBMLDocument.setConsistencyChecks() - is called to indicate that only a subset should be applied. Further, - this default (i.e., performing all checks) applies separately to - each new SBMLDocument object created. In other words, each - time a model is read using SBMLReader.readSBML(), - SBMLReader.readSBMLFromString(), - or the global functions readSBML() and readSBMLFromString(), a new - SBMLDocument is created and for that document, a call to - SBMLDocument.checkConsistency() will default to applying all possible checks. - Calling programs must invoke - SBMLDocument.setConsistencyChecks() - for each such new model if they wish to change the consistency checks - applied. - - @param category a value drawn from @if clike #SBMLErrorCategory_t@else - the set of SBML error categories@endif@~ indicating the consistency - checking/validation to be turned on or off. - - @param apply a boolean indicating whether the checks indicated by - @p category should be applied or not. - - @see SBMLDocument.setLevelAndVersion() -"; - - -%feature("docstring") SBMLDocument::checkConsistency " - Performs consistency checking and validation on this SBML document. - - If this method returns a nonzero value (meaning, one or more - consistency checks have failed for SBML document), the failures may be - due to warnings @em or errors. Callers should inspect the severity - flag in the individual SBMLError objects returned by - SBMLDocument.getError() to determine the nature of the failures. - - @return the number of failed checks (errors) encountered. - - @see SBMLDocument.checkInternalConsistency() -"; - - -%feature("docstring") SBMLDocument::validateSBML " - Performs consistency checking and validation on this SBML document. - - If this method returns a nonzero value (meaning, one or more - consistency checks have failed for SBML document), the failures may be - due to warnings @em or errors. Callers should inspect the severity - flag in the individual SBMLError objects returned by - SBMLDocument.getError() to determine the nature of the failures. - - @note unlike checkConsistency this method will write the document - in order to determine all errors for the document. This will - also clear the error log. - - @return the number of failed checks (errors) encountered. - - @see SBMLDocument.checkConsistency() -"; - - -%feature("docstring") SBMLDocument::checkInternalConsistency " - Performs consistency checking on libSBML\'s internal representation of - an SBML Model. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. - - The distinction between this method and - SBMLDocument.checkConsistency() is that this method reports on - fundamental syntactic and structural errors that violate the XML - Schema for SBML; by contrast, SBMLDocument.checkConsistency() - performs more elaborate model verifications and also validation - according to the validation rules written in the appendices of the - SBML Level 2 Versions 2–4 specification documents. - - @see SBMLDocument.checkConsistency() -"; - - -%feature("docstring") SBMLDocument::checkL1Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 1 and can be converted - to Level 1. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v1Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 1 and can - be converted to Level 2 Version 1. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v2Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 2 and can - be converted to Level 2 Version 2. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v3Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 3 and can - be converted to Level 2 Version 3. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v4Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 4 and can - be converted to Level 2 Version 4. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL3v1Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 3 Version 1 and can - be converted to Level 3 Version 1. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - @return the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::getError " - Returns the nth error or warning encountered during parsing, - consistency checking, or attempted translation of this model. - - Callers can use method XMLError.getSeverity() on the result to assess - the severity of the problem. The possible severity levels range from - informational messages to fatal errors. - - @return the error or warning indexed by integer @p n, or return @c - None if n > (getNumErrors() - 1). - - @param n the integer index of the error sought. - - @see SBMLDocument.getNumErrors() -"; - - -%feature("docstring") SBMLDocument::getNumErrors " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getNumErrors(long severity)
- - Returns the number of errors or warnings encountered with the given - severity during parsing, - consistency checking, or attempted translation of this model. - - @param severity the severity of the error sought. - - @return the number of errors or warnings encountered - - @see SBMLDocument.getError() - - -
- Method variant with the following signature: -
getNumErrors()
- - Returns the number of errors or warnings encountered during parsing, - consistency checking, or attempted translation of this model. - - @return the number of errors or warnings encountered - - @see SBMLDocument.getError() -"; - - -%feature("docstring") SBMLDocument::printErrors " - Prints all the errors or warnings encountered trying to parse, - check, or translate this SBML document. - - It prints the text to the stream given by the optional parameter @p - stream. If no parameter is given, it prints the output to the - standard error stream. - - If no errors have occurred, i.e., getNumErrors() == 0, no - output will be sent to the stream. - - The format of the output is: - @verbatim - N error(s): - line NNN: (id) message - @endverbatim - - @param stream the ostream or ostringstream object indicating where - the output should be printed. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - @see getNumErrors() - @see getErrorLog() - @see SBMLDocument.getError() -"; - - -%feature("docstring") SBMLDocument::setSBMLDocument " - @internal - No-op; it is provided for consistency with the method available on - other libSBML object classes but has no effect on SBMLDocument. -"; - - -%feature("docstring") SBMLDocument::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") SBMLDocument::convert " - @internal - Converts this document using the converter that best matches - the given conversion properties. - - @param props the conversion properties to use - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_CONV_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_CONVERSION_NOT_AVAILABLE @endlink -"; - - -%feature("docstring") SBMLDocument::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") SBMLDocument::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see SBMLDocument.getElementName() -"; - - -%feature("docstring") SBMLDocument::getElementName " - Returns the XML element name of this object, which for SBMLDocument, - is always @c \'sbml\'. - - @return the name of this element, i.e., @c \'sbml\'. -"; - - -%feature("docstring") SBMLDocument::getErrorLog " - Returns the list of errors or warnings logged during parsing, - consistency checking, or attempted translation of this model. - - @return the SBMLErrorLog used for this SBMLDocument - - @see SBMLDocument.getNumErrors() -"; - - -%feature("docstring") SBMLDocument::getNamespaces " - Returns a list of XML Namespaces associated with the XML content - of this SBML document. - - @return the XML Namespaces associated with this SBML object -"; - - -%feature("docstring") SBMLDocument::enableDefaultNS " - Set/unset default namespace to each top-level element defined in the - given package extension. - - This works by adding a xmlns="..." attribute. No - prefix will be written when writing elements defined in the given - package extension if @c True is given as second argument. - - @param package the name or URI of the package extension. - @param flag boolean value to indicate whether to write a namespace - prefix. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION @endlink -"; - - -%feature("docstring") SBMLDocument::isEnabledDefaultNS " - Returns @c True if a default namespace is added to each top-level - element defined in the given package extension, otherwise returns - @c False. - - This basically checks if the attribute - xmlns="..." is present. - - @param package the name or URI of the package extension. - - @return a boolean -"; - - -%feature("docstring") SBMLDocument::setPackageRequired " - Sets the required attribute value of the given package - extension. - - @note The name of package must not be given if the package is not - enabled. - - @param package the name or URI of the package extension. - @param flag Boolean value indicating whether the package is required. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION @endlink -"; - - -%feature("docstring") SBMLDocument::getPackageRequired " - Returns the required attribute of the given package - extension. - - @note The name of package must not be given if the package is not - enabled. - - @param package the name or URI of the package extension. - - @return Boolean flag indicating whether the package is flagged as - being required. -"; - - -%feature("docstring") SBMLDocument::isSetPackageRequired " - Returns @c True if the required attribute of the given package extension - is defined, otherwise returns @c False. - - @note The name of package must not be given if the package is not - enabled. - - @param package the name or URI of the package extension. - - @return a Boolean -"; - - -%feature("docstring") SBMLDocument::isIgnoredPackage " - Returns @c True if the given package extension is one of an ignored - packages, otherwise returns @c False. - - An ignored package is one that is defined to be used in this SBML - document, but the package is not enabled in this copy of libSBML. - - @param pkgURI the URI of the package extension. - - @return a Boolean, @c True if the package is being ignored and - @c False otherwise. -"; - - -%feature("docstring") SBMLDocument::setPkgRequired " - Sets the value of the required attribute for the given - package. - - @note The name of package must not be given if the package is not - enabled. - - @param package the name or URI of the package extension. - @param flag a Boolean value. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION @endlink - - @deprecated Replaced in libSBML 5.2.0 by - setPackageRequired(@if java String package, boolean flag@endif) -"; - - -%feature("docstring") SBMLDocument::getPkgRequired " - Returns the required attribute of the given package - extension. - - @note The name of package must not be given if the package is not - enabled. - - @param package the name or URI of the package extension. - - @return a Boolean value indicating whether the package is flagged as - being required in this SBML document. - - @deprecated Replaced in libSBML 5.2.0 by - getPackageRequired(@if java String package flag@endif) -"; - - -%feature("docstring") SBMLDocument::isSetPkgRequired " - Returns @c True if the required attribute of the given package extension - is defined, otherwise returns @c False. - - @note The name of package must not be given if the package is not - enabled. - - @param package the name or URI of the package extension. - - @return a Boolean value. - - @deprecated Replaced in libSBML 5.2.0 by - isSetPackageRequired(@if java String package flag@endif) -"; - - -%feature("docstring") SBMLDocument::isIgnoredPkg " - Returns @c True if the given package extension is one of ignored - packages, otherwise returns @c False. - - An ignored package is one that is defined to be used in this SBML - document, but the package is not enabled in this copy of libSBML. - - @param pkgURI the URI of the package extension. - - @return a boolean - - @deprecated Replaced in libSBML 5.2.0 by - isIgnoredPackage(@if java String pkgURI flag@endif) -"; - - -%feature("docstring") SBMLDocument::getElementPosition " - @internal - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") SBMLDocument::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") SBMLDocument::getApplicableValidators " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::getConversionValidators " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::setApplicableValidators " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::setConversionValidators " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::getNumValidators " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::clearValidators " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::addValidator " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::getValidator " - @internal - Validation system. -"; - - -%feature("docstring") SBMLDocument::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") SBMLDocument::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") SBMLDocument::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SBMLDocument::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SBMLDocument::writeXMLNS " - @internal - - Subclasses should override this method to write their xmlns attriubutes - (if any) to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") FunctionDefinition " - @ingroup Core - Implementation of %SBML\'s %FunctionDefinition construct. - - The FunctionDefinition structure associates an identifier with a - function definition. This identifier can then be used as the function - called in subsequent MathML content elsewhere in an SBML model. - - FunctionDefinition has one required attribute, \'id\', to give the - function a unique identifier by which other parts of an SBML model - definition can refer to it. A FunctionDefinition instance can also have - an optional \'name\' attribute of type @c string. Identifiers and names - must be used according to the guidelines described in the %SBML - specification (e.g., Section 3.3 in the Level 2 Version 4 - specification). - - FunctionDefinition has a required \'math\' subelement containing a MathML - expression defining the function body. The content of this element can - only be a MathML \'lambda\' element. The \'lambda\' element must begin with - zero or more \'bvar\' elements, followed by any other of the elements in - the MathML subset allowed in SBML Level 2 @em except \'lambda\' (i.e., a - \'lambda\' element cannot contain another \'lambda\' element). This is the - only place in SBML where a \'lambda\' element can be used. The function - defined by a FunctionDefinition is only available for use in other - MathML elements that @em follow the FunctionDefinition definition in the - model. (These restrictions prevent recursive and mutually-recursive - functions from being expressed.) - - A further restriction on the content of \'math\' is that it cannot contain - references to variables other than the variables declared to the - \'lambda\' itself. That is, the contents of MathML \'ci\' elements inside - the body of the \'lambda\' can only be the variables declared by its - \'bvar\' elements, or the identifiers of other FunctionDefinition - instances in the model. This means must be written so that all - variables or parameters used in the MathML content are passed to them - via their function parameters. In SBML Level 2, this restriction - applies also to the MathML @c csymbol elements for @em time and @em - delay; in SBML Level 3, it additionally applies to the @c csymbol - element for @em avogadro. - - @note Function definitions (also informally known as user-defined - functions) were introduced in SBML Level 2. They have purposefully - limited capabilities. A function cannot reference parameters or other - model quantities outside of itself; values must be passed as parameters - to the function. Moreover, recursive and mutually-recursive functions - are not permitted. The purpose of these limitations is to balance power - against complexity of implementation. With the restrictions as they - are, function definitions could be implemented as textual - substitutions—they are simply macros. Software implementations - therefore do not need the full function-definition machinery typically - associated with programming languages. -

- Another important point to note is FunctionDefinition does not - have a separate attribute for defining the units of the value returned - by the function. The units associated with the function\'s return value, - when the function is called from within MathML expressions elsewhere in - SBML, are simply the overall units of the expression in - FunctionDefinition\'s \'math\' subelement when applied to the arguments - supplied in the call to the function. Ascertaining these units requires - performing dimensional analysis on the expression. (Readers may wonder - why there is no attribute. The reason is that having a separate - attribute for declaring the units would not only be redundant, but also - lead to the potential for having conflicting information. In the case - of a conflict between the declared units and those of the value actually - returned by the function, the only logical resolution rule would be to - assume that the correct units are those of the expression anyway.) - - -"; - - -%feature("docstring") ListOfFunctionDefinitions " - @ingroup Core - Implementation of SBML\'s %ListOfFunctionDefinitions construct. - - The various ListOf___ classes in %SBML are merely containers used for - organizing the main components of an %SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an %SBML model is - illustrated by the following (for %SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") FunctionDefinition::FunctionDefinition " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
FunctionDefinition(SBMLNamespaces sbmlns)
- - Creates a new FunctionDefinition using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a FunctionDefinition object to an - SBMLDocument (e.g., using Model.addFunctionDefinition()), the SBML - XML namespace of the document @em overrides the value used when - creating the FunctionDefinition object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a FunctionDefinition is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
FunctionDefinition(long level, long version)
- - Creates a new FunctionDefinition using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this FunctionDefinition - - @param version a long integer, the SBML Version to assign to this - FunctionDefinition - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a FunctionDefinition object to an - SBMLDocument (e.g., using Model.addFunctionDefinition()), the SBML - Level, SBML Version and XML namespace of the document @em - override the values used when creating the FunctionDefinition object - via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a FunctionDefinition is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
FunctionDefinition(FunctionDefinition orig)
- - Copy constructor; creates a copy of this FunctionDefinition. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") FunctionDefinition::accept " - Accepts the given SBMLVisitor for this instance of FunctionDefinition. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next FunctionDefinition in - the list of function definitions. -"; - - -%feature("docstring") FunctionDefinition::clone " - Creates and returns a deep copy of this FunctionDefinition. - - @return a (deep) copy of this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getId " - Returns the value of the \'id\' attribute of this FunctionDefinition. - - @return the id of this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getName " - Returns the value of the \'name\' attribute of this FunctionDefinition. - - @return the name of this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getMath " - Get the mathematical formula of this FunctionDefinition. - - @return an ASTNode, the value of the \'math\' subelement of this - FunctionDefinition -"; - - -%feature("docstring") FunctionDefinition::isSetId " - Predicate returning @c True if this - FunctionDefinition\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this FunctionDefinition is - set, @c False otherwise. -"; - - -%feature("docstring") FunctionDefinition::isSetName " - Predicate returning @c True if this - FunctionDefinition\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this FunctionDefinition is - set, @c False otherwise. -"; - - -%feature("docstring") FunctionDefinition::isSetMath " - Predicate returning @c True if this - FunctionDefinition\'s \'math\' subelement contains a value. - - @return @c True if the \'math\' for this FunctionDefinition is set, - @c False otherwise. -"; - - -%feature("docstring") FunctionDefinition::setId " - Sets the value of the \'id\' attribute of this FunctionDefinition. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this FunctionDefinition - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") FunctionDefinition::setName " - Sets the value of the \'name\' attribute of this FunctionDefinition. - - The string in @p name is copied. - - @param name the new name for the FunctionDefinition - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") FunctionDefinition::setMath " - Sets the \'math\' subelement of this FunctionDefinition to the Abstract - Syntax Tree given in @p math. - - @param math an AST containing the mathematical expression to - be used as the formula for this FunctionDefinition. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") FunctionDefinition::unsetName " - Unsets the value of the \'name\' attribute of this FunctionDefinition. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") FunctionDefinition::getArgument " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getArgument(long n)
- - Get the nth argument to this function. - - Callers should first find out the number of arguments to the function - by calling getNumArguments(). - - @param n an integer index for the argument sought. - - @return the nth argument (bound variable) passed to this - FunctionDefinition. - - @see getNumArguments() - - -
- Method variant with the following signature: -
getArgument(string name)
- - Get the argument named @p name to this FunctionDefinition. - - @param name the exact name (case-sensitive) of the sought-after - argument - - @return the argument (bound variable) having the given name, or @c None if - no such argument exists. -"; - - -%feature("docstring") FunctionDefinition::getBody " - Get the mathematical expression that is the body of this - FunctionDefinition object. - - @return the body of this FunctionDefinition as an Abstract Syntax - Tree, or @c None if no body is defined. -"; - - -%feature("docstring") FunctionDefinition::isSetBody " - Predicate returning @c True if the body of this - FunctionDefinition has set. - - @return @c True if the body of this FunctionDefinition is - set, @c False otherwise. -"; - - -%feature("docstring") FunctionDefinition::getNumArguments " - Get the number of arguments (bound variables) taken by this - FunctionDefinition. - - @return the number of arguments (bound variables) that must be passed - to this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") FunctionDefinition::getElementName " - Returns the XML element name of this object, which for - FunctionDefinition, is always @c \'functionDefinition\'. - - @return the name of this element, i.e., @c \'functionDefinition\'. -"; - - -%feature("docstring") FunctionDefinition::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") FunctionDefinition::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this FunctionDefinition object - have been set. - - @note The required attributes for a FunctionDefinition object are: - @li \'id\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") FunctionDefinition::hasRequiredElements " - Predicate returning @c True if - all the required elements for this FunctionDefinition object - have been set. - - @note The required elements for a FunctionDefinition object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") FunctionDefinition::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") FunctionDefinition::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") FunctionDefinition::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") FunctionDefinition::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") FunctionDefinition::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") FunctionDefinition::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") FunctionDefinition::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfFunctionDefinitions::ListOfFunctionDefinitions " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfFunctionDefinitions(SBMLNamespaces sbmlns)
- - Creates a new ListOfFunctionDefinitions object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfFunctionDefinitions object to be created. - - -
- Method variant with the following signature: -
ListOfFunctionDefinitions(long level, long version)
- - Creates a new ListOfFunctionDefinitions object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfFunctionDefinitions::clone " - Creates and returns a deep copy of this ListOfFunctionDefinitions instance. - - @return a (deep) copy of this ListOfFunctionDefinitions. -"; - - -%feature("docstring") ListOfFunctionDefinitions::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfFunctionDefinitions::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., FunctionDefinition objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfFunctionDefinitions::getElementName " - Returns the XML element name of this object. - - For ListOfFunctionDefinitions, the XML element name is @c - \'listOfFunctionDefinitions\'. - - @return the name of this element, i.e., @c \'listOfFunctionDefinitions\'. -"; - - -%feature("docstring") ListOfFunctionDefinitions::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a FunctionDefinition from the ListOfFunctionDefinitions. - - @param n the index number of the FunctionDefinition to get. - - @return the nth FunctionDefinition in this ListOfFunctionDefinitions. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a FunctionDefinition from the ListOfFunctionDefinitions - based on its identifier. - - @param sid a string representing the identifier - of the FunctionDefinition to get. - - @return FunctionDefinition in this ListOfFunctionDefinitions - with the given @p sid or @c None if no such - FunctionDefinition exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfFunctionDefinitions::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfFunctionDefinitions items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfFunctionDefinitions items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfFunctionDefinitions::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of %SBML is generally fixed - for most components in %SBML. So, for example, the - ListOfFunctionDefinitions in a model is (in %SBML Level 2 Version 4) - the first ListOf___. (However, it differs for different Levels and - Versions of SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfFunctionDefinitions::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") UnitKind_equals " - Tests for logical equality between two given UNIT_KIND_ - code values. - - This function behaves exactly like C\'s == operator, except - for the following two cases: -
    -
  • @link libsbml.UNIT_KIND_LITER UNIT_KIND_LITER@endlink == @link libsbml.UNIT_KIND_LITRE UNIT_KIND_LITRE@endlink -
  • @link libsbml.UNIT_KIND_METER UNIT_KIND_METER@endlink == @link libsbml.UNIT_KIND_METRE UNIT_KIND_METRE@endlink -
- - In the two cases above, C equality comparison would yield @c False - (because each of the above is a distinct enumeration value), but - this function returns @c True. - - @param uk1 a UNIT_KIND_ value - @param uk2 a second UNIT_KIND_ value to compare to @p uk1 - - @return nonzero (for @c True) if @p uk1 is logically equivalent to @p - uk2, zero (for @c False) otherwise. - - @note For more information about the libSBML unit codes, please refer to - the class documentation for Unit. -"; - - -%feature("docstring") UnitKind_forName " - Converts a text string naming a kind of unit to its corresponding - libSBML UNIT_KIND_ constant/enumeration value. - - @param name a string, the name of a predefined base unit in SBML - - @return @if clike a value from UnitKind_t corresponding to the given - string @p name (determined in a case-insensitive manner). - @endif@if python a value the set of UNIT_KIND_ codes - defined in class @link libsbml libsbml@endlink, corresponding to the - string @p name (determined in a case-insensitive - manner).@endif@if java a value the set of UNIT_KIND_ codes - defined in class {@link libsbmlConstants}, corresponding to the string - @p name (determined in a case-insensitive manner).@endif@~ - - @note For more information about the libSBML unit codes, please refer to - the class documentation for Unit. -"; - - -%feature("docstring") UnitKind_toString " - Converts a unit code to a text string equivalent. - - @param uk @if clike a value from the UnitKind_t enumeration - @endif@if python a value from the set of UNIT_KIND_ codes - defined in the class @link libsbml libsbml@endlink - @endif@if java a value from the set of UNIT_KIND_ codes - defined in the class {@link libsbmlConstants} - @endif@~ - - @return the name corresponding to the given unit code. - - @note For more information about the libSBML unit codes, please refer to - the class documentation for Unit. - - @warning The string returned is a static data value. The caller does not - own the returned string and is therefore not allowed to modify it. -"; - - -%feature("docstring") UnitKind_isValidUnitKindString " - Predicate for testing whether a given string corresponds to a - predefined libSBML unit code. - - @param str a text string naming a base unit defined by SBML - @param level the Level of SBML - @param version the Version within the Level of SBML - - @return nonzero (for @c True) if string is the name of a valid - UNIT_KIND_ value, zero (for @c False) otherwise. - - @note For more information about the libSBML unit codes, please refer to - the class documentation for Unit. -"; - - -%feature("docstring") Unit " - @ingroup Core - Implementation of SBML\'s %Unit construct. - - The SBML unit definition facility uses two classes of objects, - UnitDefinition and Unit. The approach to defining units in %SBML is - compositional; for example, meter second –2 is - constructed by combining a Unit object representing meter with - another Unit object representing second –2. - The combination is wrapped inside a UnitDefinition, which provides for - assigning an identifier and optional name to the combination. The - identifier can then be referenced from elsewhere in a model. Thus, the - UnitDefinition class is the container, and Unit instances are placed - inside UnitDefinition instances. - - A Unit structure has four attributes named \'kind\', \'exponent\', \'scale\' - and \'multiplier\'. It represents a (possibly transformed) reference to a - base unit. The attribute \'kind\' on Unit indicates the chosen base unit. - Its value must be one of the text strings listed below; this list - corresponds to SBML Level 3 Version 1 Core: - - @htmlinclude base-units.html - - A few small differences exist between the Level 3 list of base - units and the list defined in other Level/Version combinations of SBML. - Specifically, Levels of SBML before Level 3 do not define @c - avogadro; conversely, Level 2 Version 1 defines @c Celsius, - and Level 1 defines @c celsius, @c meter, and @c liter, none of - which are available in Level 3. In libSBML, each of the predefined - base unit names is represented by an enumeration value @if clike in - #UnitKind_t@else whose name begins with the characters - UNIT_KIND_@endif, discussed in a separate section below. - - The attribute named \'exponent\' on Unit represents an exponent on the - unit. In SBML Level 2, the attribute is optional and has a default - value of @c 1 (one); in SBML Level 3, the attribute is mandatory - and there is no default value. A Unit structure also has an attribute - called \'scale\'; its value must be an integer exponent for a power-of-ten - multiplier used to set the scale of the unit. For example, a unit - having a \'kind\' value of @c gram and a \'scale\' value of @c -3 signifies - 10 –3 * gram, or milligrams. In SBML - Level 2, the attribute is optional and has a default value of @c 0 - (zero), because 10 0 = 1; in SBML Level 3, the attribute - is mandatory and has no default value. Lastly, the attribute named - \'multiplier\' can be used to multiply the unit by a real-numbered factor; - this enables the definition of units that are not power-of-ten multiples - of SI units. For instance, a multiplier of 0.3048 could be used to - define @c foot as a measure of length in terms of a @c metre. The - \'multiplier\' attribute is optional in SBML Level 2, where it has a - default value of @c 1 (one); in SBML Level 3, the attribute is - mandatory and has not default value. - - @if clike -

UnitKind_t

- @else -

%Unit identification codes

- @endif@~ - - As discussed above, SBML defines a set of base units which serves as the - starting point for new unit definitions. This set of base units - consists of the SI units and a small number of additional convenience - units. - - @if clike Until SBML Level 2 Version 3, there - existed a data type in the SBML specifications called @c UnitKind, - enumerating the possible SBML base units. Although SBML Level 2 - Version 3 removed this type from the language specification, - libSBML maintains the corresponding enumeration type #UnitKind_t as a - convenience and as a way to provide backward compatibility to previous - SBML Level/Version specifications. (The removal in SBML Level 2 - Version 3 of the enumeration @c UnitKind was also accompanied by - the redefinition of the data type @c UnitSId to include the previous @c - UnitKind values as reserved symbols in the @c UnitSId space. This - change has no net effect on permissible models, their representation or - their syntax. The purpose of the change in the SBML specification was - simply to clean up an inconsistency about the contexts in which these - values were usable.) - @endif@if java In SBML Level 2 Versions before - Version 3, there existed an enumeration of units called @c - UnitKind. In Version 3, this enumeration was removed and the - identifier class @c UnitSId redefined to include the previous @c - UnitKind values as reserved symbols. This change has no net effect on - permissible models, their representation or their syntax. The purpose - of the change in the SBML specification was simply to clean up an - inconsistency about the contexts in which these values were usable. - However, libSBML maintains UnitKind in the form of of a set of static - integer constants whose names begin with the characters - UNIT_KIND_. These constants are defined in the class - libsbmlConstants. - @endif@if python In SBML Level 2 Versions before - Version 3, there existed an enumeration of units called @c - UnitKind. In Version 3, this enumeration was removed and the - identifier class @c UnitSId redefined to include the previous @c - UnitKind values as reserved symbols. This change has no net effect on - permissible models, their representation or their syntax. The purpose - of the change in the SBML specification was simply to clean up an - inconsistency about the contexts in which these values were usable. - However, libSBML maintains UnitKind in the form of of a set of static - integer constants whose names begin with the characters - UNIT_KIND_. These constants are defined in the class - @link libsbml libsbml@endlink. - @endif@~ - - As a consequence of the fact that libSBML supports models in all Levels - and Versions of SBML, libSBML\'s set of @c UNIT_KIND_ values is a union - of all the possible base unit names defined in the different SBML - specifications. However, not every base unit is allowed in every - Level+Version combination of SBML. Note in particular the following - exceptions: -
    -
  • The alternate spelling @c \'meter\' is included in - addition to the official SI spelling @c \'metre\'. This spelling is only - permitted in SBML Level 1 models. - -
  • The alternate spelling @c \'liter\' is included in addition to the - official SI spelling @c \'litre\'. This spelling is only permitted in - SBML Level 1 models. - -
  • The unit @c \'Celsius\' is included because of its presence in - specifications of SBML prior to SBML Level 2 Version 3. - -
  • The unit @c avogadro was introduced in SBML Level 3, and - is only permitted for use in SBML Level 3 models. -
- - @if clike The table below lists the symbols defined in the - @c UnitKind_t enumeration, and their - meanings. @else The table below lists the unit - constants defined in libSBML, and their meanings. @endif@~ - - @htmlinclude unitkind-table.html - - -"; - - -%feature("docstring") ListOfUnits " - @ingroup Core - Implementation of SBML\'s %ListOfUnits construct. - - The various ListOf___ classes in %SBML are merely containers used for - organizing the main components of an %SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - ListOfUnits is entirely contained within UnitDefinition. -"; - - -%feature("docstring") Unit::Unit " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Unit(SBMLNamespaces sbmlns)
- - Creates a new Unit using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Unit object to an SBMLDocument, the SBML - XML namespace of the document @em overrides the value used when - creating the Unit object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a Unit is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Unit(long level, long version)
- - Creates a new Unit using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Unit - - @param version a long integer, the SBML Version to assign to this - Unit - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Unit object to an SBMLDocument, the SBML - Level, SBML Version and XML namespace of the document @em - override the values used when creating the Unit object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Unit is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
Unit(Unit orig)
- - Copy constructor; creates a copy of this Unit. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Unit::accept " - Accepts the given SBMLVisitor for this instance of Unit. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next Unit in the list - of units within which this Unit is embedded (i.e., in the ListOfUnits - located in the enclosing UnitDefinition instance). -"; - - -%feature("docstring") Unit::clone " - Creates and returns a deep copy of this Unit. - - @return a (deep) copy of this Unit. -"; - - -%feature("docstring") Unit::initDefaults " - Initializes the fields of this Unit object to \'typical\' default - values. - - The SBML Unit component has slightly different aspects and default - attribute values in different SBML Levels and Versions. This method - sets the values to certain common defaults, based mostly on what they - are in SBML Level 2. Specifically: -
    -
  • Sets attribute \'exponent\' to @c 1 -
  • Sets attribute \'scale\' to @c 0 -
  • Sets attribute \'multiplier\' to @c 1.0 -
- - The \'kind\' attribute is left unchanged. -"; - - -%feature("docstring") Unit::getKind " - Returns the \'kind\' of Unit this is. - - @if clike - @return the value of the \'kind\' attribute of this Unit as a - value from the UnitKind_t enumeration. - @endif@if java - @return the value of the \'kind\' attribute of this Unit as a - value from the set of constants whose names begin - with UNIT_KIND_ defined in the class - libsbmlConstants. - @endif@if python - @return the value of the \'kind\' attribute of this Unit as a - value from the set of constants whose names begin - with UNIT_KIND_ defined in the class - @link libsbml libsbml@endlink. - @endif@~ -"; - - -%feature("docstring") Unit::getExponent " - Returns the value of the \'exponent\' attribute of this unit. - - @return the \'exponent\' value of this Unit, as an integer. -"; - - -%feature("docstring") Unit::getExponentAsDouble " - Returns the value of the \'exponent\' attribute of this unit. - - @return the \'exponent\' value of this Unit, as a double. -"; - - -%feature("docstring") Unit::getScale " - Returns the value of the \'scale\' attribute of this unit. - - @return the \'scale\' value of this Unit, as an integer. -"; - - -%feature("docstring") Unit::getMultiplier " - Returns the value of the \'multiplier\' attribute of this Unit. - - @return the \'multiplier\' value of this Unit, as a double. -"; - - -%feature("docstring") Unit::getOffset " - Returns the value of the \'offset\' attribute of this Unit. - - @warning The \'offset\' attribute is only available in SBML Level 2 - Version 1. This attribute is not present in SBML Level 2 - Version 2 or above. When producing SBML models using these later - specifications, modelers and software tools need to account for units - with offsets explicitly. The %SBML specification document offers a - number of suggestions for how to achieve this. LibSBML methods such - as this one related to \'offset\' are retained for compatibility with - earlier versions of SBML Level 2, but their use is strongly - discouraged. - - @return the \'offset\' value of this Unit, as a double. -"; - - -%feature("docstring") Unit::isAmpere " - Predicate for testing whether this Unit is of the kind @c ampere. - - @return @c True if the kind of this Unit is @c ampere, @c False - otherwise. -"; - - -%feature("docstring") Unit::isAvogadro " - Predicate for testing whether this Unit is of the kind @c avogadro. - - @return @c True if the kind of this Unit is @c avogadro, @c False - otherwise. - - @note The unit @c avogadro was introduced in SBML Level 3, and - is only permitted for use in SBML Level 3 models. -"; - - -%feature("docstring") Unit::isBecquerel " - Predicate for testing whether this Unit is of the kind @c becquerel - - @return @c True if the kind of this Unit is @c becquerel, @c False - otherwise. -"; - - -%feature("docstring") Unit::isCandela " - Predicate for testing whether this Unit is of the kind @c candela - - @return @c True if the kind of this Unit is @c candela, @c False - otherwise. -"; - - -%feature("docstring") Unit::isCelsius " - Predicate for testing whether this Unit is of the kind @c Celsius - - @return @c True if the kind of this Unit is @c Celsius, @c False - otherwise. - - @warning The predefined unit @c Celsius was removed from the list of - predefined units in SBML Level 2 Version 2 at the same time - that the \'offset\' attribute was removed from Unit definitions. - LibSBML methods such as this one related to @c Celsius are retained in - order to support SBML Level 2 Version 1, but their use is - strongly discouraged. -"; - - -%feature("docstring") Unit::isCoulomb " - Predicate for testing whether this Unit is of the kind @c coulomb - - @return @c True if the kind of this Unit is @c coulomb, @c False - otherwise. -"; - - -%feature("docstring") Unit::isDimensionless " - Predicate for testing whether this Unit is of the kind @c - dimensionless. - - @return @c True if the kind of this Unit is @c dimensionless, @c False - - otherwise. -"; - - -%feature("docstring") Unit::isFarad " - Predicate for testing whether this Unit is of the kind @c farad - - @return @c True if the kind of this Unit is @c farad, @c False - otherwise. -"; - - -%feature("docstring") Unit::isGram " - Predicate for testing whether this Unit is of the kind @c gram - - @return @c True if the kind of this Unit is @c gram, @c False - otherwise. -"; - - -%feature("docstring") Unit::isGray " - Predicate for testing whether this Unit is of the kind @c gray - - @return @c True if the kind of this Unit is @c gray, @c False - otherwise. -"; - - -%feature("docstring") Unit::isHenry " - Predicate for testing whether this Unit is of the kind @c henry - - @return @c True if the kind of this Unit is @c henry, @c False - otherwise. -"; - - -%feature("docstring") Unit::isHertz " - Predicate for testing whether this Unit is of the kind @c hertz - - @return @c True if the kind of this Unit is @c hertz, @c False - otherwise. -"; - - -%feature("docstring") Unit::isItem " - Predicate for testing whether this Unit is of the kind @c item - - @return @c True if the kind of this Unit is @c item, @c False - otherwise. -"; - - -%feature("docstring") Unit::isJoule " - Predicate for testing whether this Unit is of the kind @c joule - - @return @c True if the kind of this Unit is @c joule, @c False - otherwise. -"; - - -%feature("docstring") Unit::isKatal " - Predicate for testing whether this Unit is of the kind @c katal - - @return @c True if the kind of this Unit is @c katal, @c False - otherwise. -"; - - -%feature("docstring") Unit::isKelvin " - Predicate for testing whether this Unit is of the kind @c kelvin - - @return @c True if the kind of this Unit is @c kelvin, @c False - otherwise. -"; - - -%feature("docstring") Unit::isKilogram " - Predicate for testing whether this Unit is of the kind @c kilogram - - @return @c True if the kind of this Unit is @c kilogram, @c False - otherwise. -"; - - -%feature("docstring") Unit::isLitre " - Predicate for testing whether this Unit is of the kind @c litre - - @return @c True if the kind of this Unit is @c litre or \'liter\', @c - false - otherwise. -"; - - -%feature("docstring") Unit::isLumen " - Predicate for testing whether this Unit is of the kind @c lumen - - @return @c True if the kind of this Unit is @c lumen, @c False - otherwise. -"; - - -%feature("docstring") Unit::isLux " - Predicate for testing whether this Unit is of the kind @c lux - - @return @c True if the kind of this Unit is @c lux, @c False - otherwise. -"; - - -%feature("docstring") Unit::isMetre " - Predicate for testing whether this Unit is of the kind @c metre - - @return @c True if the kind of this Unit is @c metre or \'meter\', @c - false - otherwise. -"; - - -%feature("docstring") Unit::isMole " - Predicate for testing whether this Unit is of the kind @c mole - - @return @c True if the kind of this Unit is @c mole, @c False - otherwise. -"; - - -%feature("docstring") Unit::isNewton " - Predicate for testing whether this Unit is of the kind @c newton - - @return @c True if the kind of this Unit is @c newton, @c False - otherwise. -"; - - -%feature("docstring") Unit::isOhm " - Predicate for testing whether this Unit is of the kind @c ohm - - @return @c True if the kind of this Unit is @c ohm, @c False - otherwise. -"; - - -%feature("docstring") Unit::isPascal " - Predicate for testing whether this Unit is of the kind @c pascal - - @return @c True if the kind of this Unit is @c pascal, @c False - otherwise. -"; - - -%feature("docstring") Unit::isRadian " - Predicate for testing whether this Unit is of the kind @c radian - - @return @c True if the kind of this Unit is @c radian, @c False - otherwise. -"; - - -%feature("docstring") Unit::isSecond " - Predicate for testing whether this Unit is of the kind @c second - - @return @c True if the kind of this Unit is @c second, @c False - otherwise. -"; - - -%feature("docstring") Unit::isSiemens " - Predicate for testing whether this Unit is of the kind @c siemens - - @return @c True if the kind of this Unit is @c siemens, @c False - otherwise. -"; - - -%feature("docstring") Unit::isSievert " - Predicate for testing whether this Unit is of the kind @c sievert - - @return @c True if the kind of this Unit is @c sievert, @c False - otherwise. -"; - - -%feature("docstring") Unit::isSteradian " - Predicate for testing whether this Unit is of the kind @c steradian - - @return @c True if the kind of this Unit is @c steradian, @c False - otherwise. -"; - - -%feature("docstring") Unit::isTesla " - Predicate for testing whether this Unit is of the kind @c tesla - - @return @c True if the kind of this Unit is @c tesla, @c False - otherwise. -"; - - -%feature("docstring") Unit::isVolt " - Predicate for testing whether this Unit is of the kind @c volt - - @return @c True if the kind of this Unit is @c volt, @c False - otherwise. -"; - - -%feature("docstring") Unit::isWatt " - Predicate for testing whether this Unit is of the kind @c watt - - @return @c True if the kind of this Unit is @c watt, @c False - otherwise. -"; - - -%feature("docstring") Unit::isWeber " - Predicate for testing whether this Unit is of the kind @c weber - - @return @c True if the kind of this Unit is @c weber, @c False - otherwise. -"; - - -%feature("docstring") Unit::isSetKind " - Predicate to test whether the \'kind\' attribute of this Unit is set. - - @return @c True if the \'kind\' attribute of this Unit is set, @c - false otherwise. -"; - - -%feature("docstring") Unit::isSetExponent " - Predicate to test whether the \'exponent\' attribute of this Unit - is set. - - @return @c True if the \'exponent\' attribute of this Unit is set, - @c False otherwise. -"; - - -%feature("docstring") Unit::isSetScale " - Predicate to test whether the \'scale\' attribute of this Unit - is set. - - @return @c True if the \'scale\' attribute of this Unit is set, - @c False otherwise. -"; - - -%feature("docstring") Unit::isSetMultiplier " - Predicate to test whether the \'multiplier\' attribute of this Unit - is set. - - @return @c True if the \'multiplier\' attribute of this Unit is set, - @c False otherwise. -"; - - -%feature("docstring") Unit::setKind " - Sets the \'kind\' attribute value of this Unit. - - @if clike - @param kind a value from the UnitKind_t enumeration. - @endif@if java - @param kind a unit identifier chosen from the set of constants whose - names begin with UNIT_KIND_ in libsbmlConstants. - @endif@if python - @param kind a unit identifier chosen from the set of constants whose - names begin with UNIT_KIND_ in @link libsbml libsbml@endlink. - @endif@~ - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Unit::setExponent " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setExponent(int value)
- - Sets the \'exponent\' attribute value of this Unit. - - @param value the integer to which the attribute \'exponent\' should be set - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - -
- Method variant with the following signature: -
setExponent(double value)
- - Sets the \'exponent\' attribute value of this Unit. - - @param value the double to which the attribute \'exponent\' should be set - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") Unit::setScale " - Sets the \'scale\' attribute value of this Unit. - - @param value the integer to which the attribute \'scale\' should be set - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") Unit::setMultiplier " - Sets the \'multipler\' attribute value of this Unit. - - @param value the floating-point value to which the attribute - \'multiplier\' should be set - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Unit::setOffset " - Sets the \'offset\' attribute value of this Unit. - - @param value the float-point value to which the attribute \'offset\' - should set - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @warning The \'offset\' attribute is only available in SBML Level 2 - Version 1. This attribute is not present in SBML Level 2 - Version 2 or above. When producing SBML models using these later - specifications, modelers and software tools need to account for units - with offsets explicitly. The %SBML specification document offers a - number of suggestions for how to achieve this. LibSBML methods such - as this one related to \'offset\' are retained for compatibility with - earlier versions of SBML Level 2, but their use is strongly - discouraged. -"; - - -%feature("docstring") Unit::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Unit::getElementName " - Returns the XML element name of this object, which for Unit, is - always @c \'unit\'. - - @return the name of this element, i.e., @c \'unit\'. -"; - - -%feature("docstring") Unit::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Unit::isBuiltIn " - Predicate to test whether a given string is the name of a - predefined SBML unit. - - @param name a string to be tested against the predefined unit names - - @param level the Level of SBML for which the determination should be - made. This is necessary because there are a few small differences - in allowed units between SBML Level 1 and Level 2. - - @return @c True if @p name is one of the five SBML predefined unit - identifiers (@c \'substance\', @c \'volume\', @c \'area\', @c \'length\' or @c - \'time\'), @c False otherwise. - - @note The predefined unit identifiers @c \'length\' and @c \'area\' were - added in Level 2 Version 1. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_isBuiltIn(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") Unit::isUnitKind " - Predicate to test whether a given string is the name of a valid - base unit in SBML (such as @c \'gram\' or @c \'mole\'). - - This method exists because prior to SBML Level 2 Version 3, - an enumeration called @c UnitKind was defined by SBML. This enumeration - was removed in SBML Level 2 Version 3 and its values were - folded into the space of values of a type called @c UnitSId. This method - therefore has less significance in SBML Level 2 Version 3 - and Level 2 Version 4, but remains for backward - compatibility and support for reading models in older Versions of - Level 2. - - @param name a string to be tested - - @param level a long integer representing the SBML specification - Level - - @param version a long integer representing the SBML specification - Version - - @return @c True if name is a valid SBML UnitKind, @c False otherwise - - @note The allowed unit names differ between SBML Levels 1 - and 2 and again slightly between Level 2 Versions 1 - and 2. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_isUnitKind(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") Unit::areIdentical " - Predicate returning @c True if two - Unit objects are identical. - - Two Unit objects are considered to be @em identical if they match in - all attributes. (Contrast this to the method areEquivalent(@if java - Unit u1, %Unit u2@endif), which compares Unit objects only with respect - to certain attributes.) - - @param unit1 the first Unit object to compare - @param unit2 the second Unit object to compare - - @return @c True if all the attributes of unit1 are identical - to the attributes of unit2, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_areIdentical(). They are functionally - identical. @endif@~ - - @see @if clike areEquivalent() @else Unit.areEquivalent() @endif@~ -"; - - -%feature("docstring") Unit::areEquivalent " - Predicate returning @c True if - Unit objects are equivalent. - - Two Unit objects are considered to be @em equivalent either if (1) both - have a \'kind\' attribute value of @c dimensionless, or (2) their \'kind\', - \'exponent\' and (for SBML Level 2 Version 1) \'offset\' - attribute values are equal. (Contrast this to the method - areIdentical(@if java Unit u1, %Unit u2@endif), which compares Unit objects with respect to all - attributes, not just the \'kind\' and \'exponent\'.) - - @param unit1 the first Unit object to compare - @param unit2 the second Unit object to compare - - @return @c True if the \'kind\' and \'exponent\' attributes of unit1 are - identical to the kind and exponent attributes of unit2, @c False - otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_areEquivalent(). They are functionally - identical. @endif@~ - - @see @if clike areIdentical() @else Unit.areIdentical() @endif@~ -"; - - -%feature("docstring") Unit::removeScale " - Manipulates the attributes of the Unit to express the unit with the - value of the scale attribute reduced to zero. - - For example, 1 millimetre can be expressed as a Unit with kind=@c - \'metre\' multiplier=@c \'1\' scale=@c \'-3\' exponent=@c \'1\'. It can also be - expressed as a Unit with kind=@c \'metre\' - multiplier=\'0.001\' scale=@c \'0\' exponent=@c \'1\'. - - @param unit the Unit object to manipulate. - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_removeScale(). They are functionally - identical. @endif@~ - - @see @if clike convertToSI() @else Unit.convertToSI() @endif@~ - @see @if clike merge() @else Unit.merge() @endif@~ -"; - - -%feature("docstring") Unit::merge " - Merges two Unit objects with the same \'kind\' attribute value into a - single Unit. - - For example, the following, - @verbatim - - - @endverbatim - would be merged to become - @verbatim - - @endverbatim - - @param unit1 the first Unit object; the result of the operation is - left as a new version of this unit, modified in-place. - - @param unit2 the second Unit object to merge with the first - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_merge(). They are functionally - identical. @endif@~ - - @see @if clike convertToSI() @else Unit.convertToSI() @endif@~ - @see @if clike removeScale() @else Unit.removeScale() @endif@~ -"; - - -%feature("docstring") Unit::convertToSI " - Returns a UnitDefinition object containing the given @p unit converted - to the appropriate SI unit. - - This method exists because some units can be expressed in terms of - others when the same physical dimension is involved. For example, one - hertz is identical to 1 sec-1, one litre is equivalent - to 1 cubic decametre, and so on. - - @param unit the Unit object to convert to SI - - @return a UnitDefinition object containing the SI unit. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., Unit), and the - other will be a standalone top-level function with the name - Unit_convertToSI(). They are functionally - identical. @endif@~ - - @see @if clike merge() @else Unit.merge() @endif@~ -"; - - -%feature("docstring") Unit::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this Unit object - have been set. - - @note The required attributes for a Unit object are: - @li \'kind\' - @li \'exponent\' (required in SBML Level 3; optional in Level 2) - @li \'multiplier\' (required in SBML Level 3; optional in Level 2) - @li \'scale\' (required in SBML Level 3; optional in Level 2) - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Unit::setExponentUnitChecking " - @internal - Predicate returning @c True if - all the required attributes for this Unit object - have been set. - - @note The required attributes for a Unit object are: - @li \'kind\' - @li \'exponent\' (required in SBML Level 3; optional in Level 2) - @li \'multiplier\' (required in SBML Level 3; optional in Level 2) - @li \'scale\' (required in SBML Level 3; optional in Level 2) - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Unit::getExponentUnitChecking " - @internal - Predicate returning @c True if - all the required attributes for this Unit object - have been set. - - @note The required attributes for a Unit object are: - @li \'kind\' - @li \'exponent\' (required in SBML Level 3; optional in Level 2) - @li \'multiplier\' (required in SBML Level 3; optional in Level 2) - @li \'scale\' (required in SBML Level 3; optional in Level 2) - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Unit::isUnitChecking " - @internal - Predicate returning @c True if - all the required attributes for this Unit object - have been set. - - @note The required attributes for a Unit object are: - @li \'kind\' - @li \'exponent\' (required in SBML Level 3; optional in Level 2) - @li \'multiplier\' (required in SBML Level 3; optional in Level 2) - @li \'scale\' (required in SBML Level 3; optional in Level 2) - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Unit::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Unit::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Unit::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Unit::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Unit::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Unit::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Unit::isL1UnitKind " - @internal - Predicate to test whether a given string is the name of a valid - base unit in SBML Level 1 (such as @c \'gram\' or @c \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isL2V1UnitKind " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 2 Version 1 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isL2UnitKind " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 2 Version 2, 3 or 4 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isL3UnitKind " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isExplicitlySetExponent " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isExplicitlySetMultiplier " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isExplicitlySetScale " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") Unit::isExplicitlySetOffset " - @internal - Predicate to test whether a given string is the name of a valid base - unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c - \'mole\') - - @param name a string to be tested - - @return @c True if name is a valid SBML UnitKind, @c False otherwise -"; - - -%feature("docstring") ListOfUnits::ListOfUnits " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfUnits(SBMLNamespaces sbmlns)
- - Creates a new ListOfUnits object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfUnits object to be created. - - -
- Method variant with the following signature: -
ListOfUnits(long level, long version)
- - Creates a new ListOfUnits object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfUnits::clone " - Creates and returns a deep copy of this ListOfUnits. - - @return a (deep) copy of this ListOfUnits. -"; - - -%feature("docstring") ListOfUnits::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfUnits::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Unit objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfUnits::getElementName " - Returns the XML element name of this object. - - For ListOfUnits, the XML element name is @c \'listOfUnits\'. - - @return the name of this element, i.e., @c \'listOfUnits\'. -"; - - -%feature("docstring") ListOfUnits::get " - Get a Unit from the ListOfUnits. - - @param n the index number of the Unit to get. - - @return the nth Unit in this ListOfUnits. - - @see size() -"; - - -%feature("docstring") ListOfUnits::remove " - Removes the nth item from this ListOfUnits items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() -"; - - -%feature("docstring") ListOfUnits::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfUnits::createObject " - @internal - Create a ListOfUnits object corresponding to the next token - in the XML input stream. - - @return the %SBML object corresponding to next XMLToken in the - XMLInputStream, or @c None if the token was not recognized. -"; - - -%feature("docstring") UnitDefinition " - @ingroup Core - Implementation of SBML\'s %UnitDefinition construct. - - Units of measurement may be supplied in a number of contexts in an SBML - model. The SBML unit definition facility uses two classes of objects, - UnitDefinition and Unit. The approach to defining units in SBML is - compositional; for example, meter second –2 is - constructed by combining a Unit object representing meter with - another Unit object representing second –2. - The combination is wrapped inside a UnitDefinition, which provides for - assigning an identifier and optional name to the combination. The - identifier can then be referenced from elsewhere in a model. Thus, the - UnitDefinition class is the container, and Unit instances are placed - inside UnitDefinition instances. - - Two points are worth discussing in the context of SBML units. First, - unit declarations in SBML models are @em optional. The consequence of - this is that a model must be numerically self-consistent independently - of unit declarations, for the benefit of software tools that cannot - interpret or manipulate units. Unit declarations in SBML are thus more - akin to a type of annotation; they can indicate intentions, and can be - used by model readers for checking the consistency of the model, - labeling simulation output, etc., but any transformations of values - implied by different units must be incorporated @em explicitly into a - model. - - Second, the vast majority of situations that require new SBML unit - definitions involve simple multiplicative combinations of base units and - factors. An example is moles per litre per second. What - distinguishes these sorts of unit definitions from more complex ones is - that they may be expressed without the use of an additive offset from a - zero point. The use of offsets complicates all unit definition systems, - yet in the domain of SBML, the real-life cases requiring offsets are few - (and in fact, to the best of our knowledge, only involve temperature). - Consequently, the SBML unit system has been consciously designed to - simplify implementation of unit support for the most common cases in - systems biology. The cost of this simplification is to require units - with offsets to be handled explicitly by the modeler. - - @section unitdef-summary Summary of the UnitDefinition construct - - UnitDefinition has two attributes and one subelement. The two - attributes are \'id\' and \'name\', and the subelement is ListOfUnits. - - The required attribute \'id\' and optional attribute \'name\' are both - strings. The \'id\' attribute is used to give the defined unit a unique - identifier by which other parts of an SBML model definition can refer to - it. The \'name\' attribute is intended to be used for giving the unit - definition an optional human-readable name. Please see the next section for information about the values - permitted for \'id\'. - - A UnitDefinition must contain exactly one ListOfUnits, and this list - must contain one or more Unit definitions; see the definitions of these - other object classes for more information about them. The following - example illustrates a complete unit definition (when written in XML) - when they all the pieces are combined together. This defines \'mmls\' - to be millimoles per litre per second. - @verbatim - - - - - - - - - - @endverbatim - - @section unitdef-id Special considerations for Unit object identifiers - - The attribute \'id\' in UnitDefinition cannot be given simply any value, - and the precise details of the values permitted differ slightly between - Levels of SBML: -
    - -
  • The \'id\' of a UnitDefinition must @em not contain a value from the - list of SBML\'s predefined base unit names (i.e., the strings @c gram, @c - litre, etc.). In SBML Level 3, this list consists of the - following: - - @htmlinclude base-units.html - - This list of predefined base units is nearly identical in SBML - Level 2 Version 4, the exception being that Level 2 does - not define @c avogadro. SBML Level 2 Version 1 (and @em only - this Level+Version combination) provides an additional predefined unit - name, @c Celsius, not available in Level 3. Finally, SBML - Level 1 Versions 2–3 provide two more additional - predefined unit names, @c meter and @c liter. This is explained in - somewhat greater detail in the description of the Unit class. - -
  • In SBML Level 2 (all Versions), there is an additional set of - reserved identifiers: @c substance, @c volume, @c area, @c length, and - @c time. Using one of these values for the attribute \'id\' of a - UnitDefinition has the effect of redefining the model-wide default units - for the corresponding quantities. The list of special unit names in - SBML Level 2 is given in the table below: - - @htmlinclude predefined-units.html - - Also, SBML Level 2 imposes two limitations on redefining the - predefined unit @c substance, @c volume, @c area, @c length, and @c - time: (1) The UnitDefinition of a predefined SBML unit can only contain - a single Unit object within it. (2) The value of the \'kind\' attribute - in a Unit instance must be drawn from one of the values in the second - column of the table above. - - The special unit names @c substance, @c volume, @c area, @c length, and - @c time are not defined by SBML Level 3, which uses a different - approach to setting model-wide inherited units. - -
- - - @section sbml-units-limits Further comments about SBML\'s unit definition system - - The vast majority of modeling situations requiring new SBML unit - definitions involve simple multiplicative combinations of base units and - factors. An example of this might be moles per litre per - second. What distinguishes these sorts of simpler unit definitions - from more complex ones is that they may be expressed without the use of - an additive offset from a zero point. The use of offsets complicates - all unit definition systems, yet in the domain of SBML the real-life - cases requiring offsets are few (and in fact, to the best of our - knowledge, only involve temperature). Consequently, the SBML unit - system has been consciously designed in a way that attempts to simplify - implementation of unit support for the most common cases in systems - biology. - - As of SBML Level 2 Version 2, Unit no longer has the - attribute called \'offset\' introduced in SBML Level 2 - Version 1. It turned out that the general case involving units - with offsets was incorrectly defined, and few (if any) developers even - attempted to support offset-based units in their software. In the - development of Level 2 Version 2, a consensus among SBML - developers emerged that a fully generalized unit scheme is @em so - confusing and complicated that it actually @em impedes interoperability. - SBML Level 2 Version 2, Version 3 and Version 4 acknowledge this - reality by reducing and simplifying the unit system, specifically by - removing the \'offset\' attribute on Unit and @c Celsius as a pre-defined - unit. - - The following guidelines suggest methods for handling units that do - require the use of zero offsets for their definitions: -
    -
  • Handling Celsius. A model in which certain quantities are - temperatures measured in degrees Celsius can be converted - straightforwardly to a model in which those temperatures are in - kelvin. A software tool could do this by performing a straightforward - substitution using the following relationship: T kelvin = - TCelsius + 273.15. In every mathematical formula of the - model where a quantity (call it @em x) in degrees Celsius appears, - replace @em x with xk+ 273.15, where - xk is now in kelvin. An alternative approach would - be to use a FunctionDefinition object to define a function encapsulating this - relationship above and then using that in the rest of the model as - needed. Since Celsius is a commonly-used unit, software tools could - help users by providing users with the ability to express temperatures - in Celsius in the tools\' interfaces, and making substitutions - automatically when writing out the SBML. - -
  • Other units requiring offsets. One approach to handling - other kinds of units is to use a FunctionDefinition to define a function - encapsulating the necessary mathematical relationship, then - substituting a call to this function wherever the original quantity - appeared in the model. For example, here is a possible definition for - converting Fahrenheit to Celsius degrees: - @verbatim - - - - temp_in_fahrenheit - - - - - temp_in_fahrenheit - 459.67 - - 1.8 - - - - - @endverbatim - -
  • An alternative approach not requiring the use of function definitions - is to use an AssignmentRule for each variable in Fahrenheit units. - The AssignmentRule could compute the conversion from Fahrenheit to - (say) kelvin, assign its value to a variable (in Kelvin units), and - then that variable could be used elsewhere in the model. - -
  • Still another approach is to rewrite the mathematical formulas of a - model to directly incorporate the conversion formula wherever the - original quantity appeared. -
- - Please consult the SBML specifications for more information about this - and other issues involving units. - - -"; - - -%feature("docstring") ListOfUnitDefinitions " - @ingroup Core - Implementation of SBML\'s %ListOfUnitDefinitions construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") UnitDefinition::UnitDefinition " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
UnitDefinition(SBMLNamespaces sbmlns)
- - Creates a new UnitDefinition using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a UnitDefinition object to an SBMLDocument - (e.g., using Model.addUnitDefinition()), the SBML XML namespace of - the document @em overrides the value used when creating the - UnitDefinition object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a - UnitDefinition is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
UnitDefinition(long level, long version)
- - Creates a new UnitDefinition using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this UnitDefinition - - @param version a long integer, the SBML Version to assign to this - UnitDefinition - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a UnitDefinition object to an SBMLDocument - (e.g., using Model.addUnitDefinition()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the UnitDefinition object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a UnitDefinition is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
UnitDefinition(UnitDefinition orig)
- - Copy constructor; creates a copy of this UnitDefinition. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") UnitDefinition::accept " - Accepts the given SBMLVisitor for this instance of UnitDefinition. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next UnitDefinition in the - list of units within which this UnitDefinition is embedded (i.e., in - the ListOfUnitDefinitions located in the enclosing Model instance). -"; - - -%feature("docstring") UnitDefinition::clone " - Creates and returns a deep copy of this UnitDefinition. - - @return a (deep) copy of this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find. - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") UnitDefinition::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") UnitDefinition::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") UnitDefinition::getId " - Returns the value of the \'id\' attribute of this UnitDefinition. - - @return the id of this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::getName " - Returns the value of the \'name\' attribute of this UnitDefinition. - - @return the name of this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::isSetId " - Predicate returning @c True if this - UnitDefinition\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this UnitDefinition is - set, @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isSetName " - Predicate returning @c True if this - UnitDefinition\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this UnitDefinition is - set, @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::setId " - Sets the value of the \'id\' attribute of this UnitDefinition. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this UnitDefinition - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") UnitDefinition::setName " - Sets the value of the \'name\' attribute of this UnitDefinition. - - The string in @p name is copied. - - @param name the new name for the UnitDefinition - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") UnitDefinition::unsetName " - Unsets the value of the \'name\' attribute of this UnitDefinition. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") UnitDefinition::isVariantOfArea " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier @c \'area\'. - - @return @c True if this UnitDefinition is a variant of the predefined - unit @c area, meaning square metres with only abritrary variations - in scale or multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfLength " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier @c \'length\'. - - @return @c True if this UnitDefinition is a variant of the predefined - unit @c length, meaning metres with only abritrary variations in scale - or multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfSubstance " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier @c \'substance\'. - - @return @c True if this UnitDefinition is a variant of the predefined - unit @c substance, meaning moles or items (and grams or kilograms from - SBML Level 2 Version 2 onwards) with only abritrary variations - in scale or multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfTime " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier @c \'time\'. - - @return @c True if this UnitDefinition is a variant of the predefined - unit @c time, meaning seconds with only abritrary variations in scale or - multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfVolume " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier @c \'volume\'. - - @return @c True if this UnitDefinition is a variant of the predefined - unit @c volume, meaning litre or cubic metre with only abritrary - variations in scale or multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfDimensionless " - Convenience function for testing if a given unit definition is a - variant of the unit @c \'dimensionless\'. - - @return @c True if this UnitDefinition is a variant of @c - dimensionless, meaning dimensionless with only abritrary variations in - scale or multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfMass " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier @c \'mass\'. - - @return @c True if this UnitDefinition is a variant of mass units, - meaning gram or kilogram with only abritrary variations in scale or - multiplier values; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfSubstancePerTime " - Convenience function for testing if a given unit definition is a - variant of the predefined unit @c \'substance\' divided by the predefined - unit @c \'time\'. - - @return @c True if this UnitDefinition is a variant of the predefined - unit @c substance per predefined unit @c time, meaning it contains two - units one of which is a variant of substance and the other is a - variant of time which an exponent of -1; @c False otherwise. -"; - - -%feature("docstring") UnitDefinition::addUnit " - Adds a copy of the given Unit to this UnitDefinition. - - @param u the Unit instance to add to this UnitDefinition. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this UnitDefinition. Changes made to the original - object instance (such as resetting attribute values) will not - affect the instance in the UnitDefinition. In addition, the - caller should make sure to free the original object if it is no longer - being used, or else a memory leak will result. Please see - UnitDefinition.createUnit() for a method that does not lead to these - issues. - - @see createUnit() -"; - - -%feature("docstring") UnitDefinition::createUnit " - Creates a new and empty Unit, adds it to this UnitDefinition\'s list of - units, and returns it. - - @return a newly constructed (and empty) Unit instance. - - @note It is worth emphasizing that the attribute \'kind\' value of a - Unit is a required attribute for a valid Unit definition. The - createUnit() method does not assign a valid kind to the constructed - unit (instead, it sets the \'kind\' to @link libsbml.UNIT_KIND_INVALID UNIT_KIND_INVALID@endlink). - Callers are cautioned to set the newly-constructed Unit\'s kind using - Unit.setKind() soon after calling this method. - - @see addUnit() -"; - - -%feature("docstring") UnitDefinition::getListOfUnits " - Returns the list of Units for this UnitDefinition instance. - @return the ListOfUnits value for this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::getUnit " - Returns a specific Unit instance belonging to this UnitDefinition. - - @param n an integer, the index of the Unit to be returned. - - @return the nth Unit of this UnitDefinition. - - @see getNumUnits() -"; - - -%feature("docstring") UnitDefinition::getNumUnits " - Returns the number of Unit objects contained within this - UnitDefinition. - - @return an integer representing the number of Units in this - UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::removeUnit " - Removes the nth Unit object from this UnitDefinition object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Unit object to remove - - @return the Unit object removed, or @c None if the given index - is out of range. -"; - - -%feature("docstring") UnitDefinition::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. - - @param d the SBMLDocument to use -"; - - -%feature("docstring") UnitDefinition::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") UnitDefinition::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") UnitDefinition::getTypeCode " - Returns the libSBML type code for this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") UnitDefinition::getElementName " - Returns the XML element name of this object, which for UnitDefinition, - is always @c \'unitDefinition\'. - - @return the name of this element, i.e., @c \'unitDefinition\'. -"; - - -%feature("docstring") UnitDefinition::simplify " - Simplifies the UnitDefinition such that any given kind of Unit object - occurs only once in the ListOfUnits. - - For example, the following definition, - @verbatim - - - - - - - @endverbatim - will be simplified to - @verbatim - - - - - - @endverbatim - - @param ud the UnitDefinition object to be simplified. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_simplify(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") UnitDefinition::reorder " - Alphabetically orders the Unit objects within the ListOfUnits of a - UnitDefinition. - - @param ud the UnitDefinition object whose units are to be reordered. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_reorder(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") UnitDefinition::convertToSI " - Convert a given UnitDefinition into a new UnitDefinition object - that uses SI units. - - @param ud the UnitDefinition object to convert to SI - - @return a new UnitDefinition object representing the results of the - conversion. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_convertToSI(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") UnitDefinition::areIdentical " - Predicate returning @c True if two - UnitDefinition objects are identical. - - For the purposes of performing this comparison, two UnitDefinition - objects are considered identical when they contain identical lists of - Unit objects. Pairs of Unit objects in the lists are in turn - considered identical if they satisfy the predicate - Unit.areIdentical(). - The predicate compares every attribute of the - Unit objects. - - @param ud1 the first UnitDefinition object to compare - @param ud2 the second UnitDefinition object to compare - - @return @c True if all the Unit objects in ud1 are identical to the - Unit objects of ud2, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_areIdentical(). They are functionally identical. @endif@~ - - @see UnitDefinition.areEquivalent() - @see Unit.areIdentical() -"; - - -%feature("docstring") UnitDefinition::areEquivalent " - Predicate returning @c True if two - UnitDefinition objects are equivalent. - - For the purposes of performing this comparison, two UnitDefinition - objects are considered equivalent when they contain @em equivalent - list of Unit objects. Unit objects are in turn considered equivalent - if they satisfy the predicate - Unit.areEquivalent(). - The predicate tests a subset of the objects\'s attributes. - - @param ud1 the first UnitDefinition object to compare - - @param ud2 the second UnitDefinition object to compare - - @return @c True if all the Unit objects in ud1 are equivalent - to the Unit objects in ud2, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_areEquivalent(). They are functionally identical. @endif@~ - - @see UnitDefinition.areIdentical() - @see Unit.areEquivalent() -"; - - -%feature("docstring") UnitDefinition::areIdenticalSIUnits " - @internal - Predicate returning @c True if two - UnitDefinition objects are equivalent. - - For the purposes of performing this comparison, two UnitDefinition - objects are considered equivalent when they contain @em equivalent - list of Unit objects. Unit objects are in turn considered equivalent - if they satisfy the predicate - Unit.areEquivalent(). - The predicate tests a subset of the objects\'s attributes. - - @param ud1 the first UnitDefinition object to compare - - @param ud2 the second UnitDefinition object to compare - - @return @c True if all the Unit objects in ud1 are equivalent - to the Unit objects in ud2, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_areEquivalent(). They are functionally identical. @endif@~ - - @see UnitDefinition.areIdentical() - @see Unit.areEquivalent() -"; - - -%feature("docstring") UnitDefinition::combine " - Combines two UnitDefinition objects into a single UnitDefinition. - - This takes UnitDefinition objects @p ud1 and @p ud2, and creates a - UnitDefinition object that expresses the product of the units of @p - ud1 and @p ud2. - - @param ud1 the first UnitDefinition object - @param ud2 the second UnitDefinition object - - @return a UnitDefinition which represents the product of the - units of the two argument UnitDefinitions. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_combine(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") UnitDefinition::printUnits " - Expresses the given definition in a plain-text form. - - For example, - UnitDefinition.printUnits() - applied to - @verbatim - - - - - - - @endverbatim - will return the string \'metre (exponent = 1, multiplier = 1, - scale = 0) second (exponent = -2, multiplier = 1, scale = 0)\' - or, if the optional parameter @p compact is given the value @c True, - the string \'(1 metre)^1 (1 second)^-2\'. This method may - be useful for printing unit information to human users, or in - debugging software, or other situations. - - @param ud the UnitDefinition object - @param compact boolean indicating whether the compact form - should be used (defaults to false) - - @return a string expressing the unit definition defined by the given - UnitDefinition object @p ud. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., UnitDefinition), and the - other will be a standalone top-level function with the name - UnitDefinition_printUnits(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") UnitDefinition::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") UnitDefinition::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this UnitDefinition object - have been set. - - @note The required attributes for a UnitDefinition object are: - @li \'id\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") UnitDefinition::hasRequiredElements " - Predicate returning @c True if - all the required elements for this UnitDefinition object - have been set. - - @note The required elements for a Constraint object are: - @li \'listOfUnits\' (required in SBML Level 2 only, optional in Level 3) - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") UnitDefinition::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") UnitDefinition::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") UnitDefinition::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") UnitDefinition::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") UnitDefinition::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") UnitDefinition::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") UnitDefinition::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfUnitDefinitions::ListOfUnitDefinitions " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfUnitDefinitions(SBMLNamespaces sbmlns)
- - Creates a new ListOfUnitDefinitions object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfUnitDefinitions object to be created. - - -
- Method variant with the following signature: -
ListOfUnitDefinitions(long level, long version)
- - Creates a new ListOfUnitDefinitions object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfUnitDefinitions::clone " - Creates and returns a deep copy of this ListOfUnitDefinitions instance. - - @return a (deep) copy of this ListOfUnitDefinitions. -"; - - -%feature("docstring") ListOfUnitDefinitions::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfUnitDefinitions::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., UnitDefinition objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfUnitDefinitions::getElementName " - Returns the XML element name of this object. - - For ListOfUnitDefinitions, the XML element name is @c - \'listOfUnitDefinitions\'. - - @return the name of this element, i.e., @c \'listOfUnitDefinitions\'. -"; - - -%feature("docstring") ListOfUnitDefinitions::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a UnitDefinition from the ListOfUnitDefinitions. - - @param n the index number of the UnitDefinition to get. - - @return the nth UnitDefinition in this ListOfUnitDefinitions. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a UnitDefinition from the ListOfUnitDefinitions - based on its identifier. - - @param sid a string representing the identifier - of the UnitDefinition to get. - - @return UnitDefinition in this ListOfUnitDefinitions - with the given @p sid or @c None if no such - UnitDefinition exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfUnitDefinitions::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that UnitDefinitions themselves are in the UnitId namespace, not the SId namespace, so no UnitDefinition object will be returned from this function (and is the reason we override the base ListOf::getElementBySId function here). - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") ListOfUnitDefinitions::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfUnitDefinitions items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfUnitDefinitions items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfUnitDefinitions::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the - ListOfUnitDefinitions in a model is (in SBML Level 2 - Version 4) the second ListOf___. (However, it differs for - different Levels and Versions of SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfUnitDefinitions::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or None if the token was not recognized. -"; - - -%feature("docstring") CompartmentType " - @ingroup Core - Implementation of SBML\'s Level 2\'s %CompartmentType construct. - - SBML Level 2 Versions 2–4 provide the compartment - type as a grouping construct that can be used to establish a - relationship between multiple Compartment objects. A CompartmentType - object only has an identity, and this identity can only be used to - indicate that particular Compartment objects in the model belong to this - type. This may be useful for conveying a modeling intention, such as - when a model contains many similar compartments, either by their - biological function or the reactions they carry. Without a compartment - type construct, it would be impossible within SBML itself to indicate - that all of the compartments share an underlying conceptual relationship - because each SBML compartment must be given a unique and separate - identity. Compartment types have no mathematical meaning in - SBML—they have no effect on a model\'s mathematical interpretation. - Simulators and other numerical analysis software may ignore - CompartmentType definitions and references to them in a model. - - There is no mechanism in SBML Level 2 for representing hierarchies of - compartment types. One CompartmentType instance cannot be the subtype - of another CompartmentType instance; SBML provides no means of defining - such relationships. - - As with other major structures in SBML, CompartmentType has a mandatory - attribute, \'id\', used to give the compartment type an identifier. The - identifier must be a text %string conforming to the identifer syntax - permitted in SBML. CompartmentType also has an optional \'name\' - attribute, of type @c string. The \'id\' and \'name\' must be used - according to the guidelines described in the SBML specification (e.g., - Section 3.3 in the Level 2 Version 4 specification). - - CompartmentType was introduced in SBML Level 2 Version 2. It is not - available in SBML Level 1 nor in Level 3. - - @see Compartment - @see ListOfCompartmentTypes - @see SpeciesType - @see ListOfSpeciesTypes -"; - - -%feature("docstring") ListOfCompartmentTypes " - @ingroup Core - Implementation of SBML\'s %ListOfCompartmentTypes construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") CompartmentType::CompartmentType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
CompartmentType(SBMLNamespaces sbmlns)
- - Creates a new CompartmentType using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the \'id\' - (identifier) attribute of a CompartmentType is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor. Setting the identifier can be accomplished using the - method setId(@if java String id@endif). - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a CompartmentType object to an SBMLDocument - (e.g., using Model.addCompartmentType()), the SBML XML namespace of - the document @em overrides the value used when creating the - CompartmentType object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a - CompartmentType is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
CompartmentType(long level, long version)
- - Creates a new CompartmentType using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this CompartmentType - - @param version a long integer, the SBML Version to assign to this - CompartmentType - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a CompartmentType object to an SBMLDocument - (e.g., using Model.addCompartmentType()), the SBML Level, SBML - Version and XML namespace of the document @em override the - values used when creating the CompartmentType object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a CompartmentType is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
CompartmentType(CompartmentType orig)
- - Copy constructor; creates a copy of this CompartmentType. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") CompartmentType::accept " - Accepts the given SBMLVisitor for this instance of CompartmentType. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next CompartmentType in - the list of compartment types. -"; - - -%feature("docstring") CompartmentType::clone " - Creates and returns a deep copy of this CompartmentType. - - @return a (deep) copy of this CompartmentType. -"; - - -%feature("docstring") CompartmentType::getId " - Returns the value of the \'id\' attribute of this CompartmentType. - - @return the id of this CompartmentType. -"; - - -%feature("docstring") CompartmentType::getName " - Returns the value of the \'name\' attribute of this CompartmentType. - - @return the name of this CompartmentType. -"; - - -%feature("docstring") CompartmentType::isSetId " - Predicate returning @c True if this - CompartmentType\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this CompartmentType is - set, @c False otherwise. -"; - - -%feature("docstring") CompartmentType::isSetName " - Predicate returning @c True if this - CompartmentType\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this CompartmentTypeType is - set, @c False otherwise. -"; - - -%feature("docstring") CompartmentType::setId " - Sets the value of the \'id\' attribute of this CompartmentType. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this CompartmentType - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") CompartmentType::setName " - Sets the value of the \'name\' attribute of this CompartmentType. - - The string in @p name is copied. - - @param name the new name for the CompartmentType - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") CompartmentType::unsetName " - Unsets the value of the \'name\' attribute of this CompartmentType. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") CompartmentType::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") CompartmentType::getElementName " - Returns the XML element name of this object, which for - CompartmentType, is always @c \'compartmentType\'. - - @return the name of this element, i.e., @c \'compartmentType\'. -"; - - -%feature("docstring") CompartmentType::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") CompartmentType::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this CompartmentType object - have been set. - - @note The required attributes for a CompartmentType object are: - @li \'id\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") CompartmentType::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") CompartmentType::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. - - @param attributes the XMLAttributes to use. -"; - - -%feature("docstring") CompartmentType::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. - - @param attributes the XMLAttributes to use. -"; - - -%feature("docstring") CompartmentType::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. - - @param stream the XMLOutputStream to use. -"; - - -%feature("docstring") ListOfCompartmentTypes::ListOfCompartmentTypes " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfCompartmentTypes(SBMLNamespaces sbmlns)
- - Creates a new ListOfCompartmentTypes object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfCompartmentTypes object to be created. - - -
- Method variant with the following signature: -
ListOfCompartmentTypes(long level, long version)
- - Creates a new ListOfCompartmentTypes object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfCompartmentTypes::clone " - Creates and returns a deep copy of this ListOfCompartmentTypes instance. - - @return a (deep) copy of this ListOfCompartmentTypes. -"; - - -%feature("docstring") ListOfCompartmentTypes::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfCompartmentTypes::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., CompartmentType objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfCompartmentTypes::getElementName " - Returns the XML element name of this object. - - For ListOfCompartmentTypes, the XML element name is @c - \'listOfCompartmentTypes\'. - - @return the name of this element, i.e., @c \'listOfCompartmentTypes\'. -"; - - -%feature("docstring") ListOfCompartmentTypes::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a CompartmentType from the ListOfCompartmentTypes. - - @param n the index number of the CompartmentType to get. - - @return the nth CompartmentType in this ListOfCompartmentTypes. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a CompartmentType from the ListOfCompartmentTypes - based on its identifier. - - @param sid a string representing the identifier - of the CompartmentType to get. - - @return CompartmentType in this ListOfCompartmentTypes - with the given @p sid or @c None if no such - CompartmentType exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfCompartmentTypes::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfCompartmentTypes items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfCompartmentTypes items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfCompartmentTypes::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. For example, the - ListOfCompartmentTypes in a model (in SBML Level 2 Version 4) is the - third ListOf___. (However, it differs for different Levels and - Versions of SBML, so calling code should not hardwire this number.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfCompartmentTypes::createObject " - @internal - Create a ListOfCompartmentTypes object corresponding to the next token - in the XML input stream. - - @return the SBML object corresponding to next XMLToken in the - XMLInputStream, or @c None if the token was not recognized. -"; - - -%feature("docstring") SpeciesType " - @ingroup Core - Implementation of SBML Level 2\'s %SpeciesType construct. - - The term @em species @em type refers to reacting entities independent of - location. These include simple ions (e.g., protons, calcium), simple - molecules (e.g., glucose, ATP), large molecules (e.g., RNA, - polysaccharides, and proteins), and others. - - SBML Level 2 Versions 2–4 provide an explicit - SpeciesType class of object to enable Species objects of the same type - to be related together. SpeciesType is a conceptual construct; the - existence of SpeciesType objects in a model has no effect on the model\'s - numerical interpretation. Except for the requirement for uniqueness of - species/species type combinations located in compartments, simulators - and other numerical analysis software may ignore SpeciesType definitions - and references to them in a model. - - There is no mechanism in SBML Level 2 for representing hierarchies of - species types. One SpeciesType object cannot be the subtype of another - SpeciesType object; SBML provides no means of defining such - relationships. - - As with other major structures in SBML, SpeciesType has a mandatory - attribute, \'id\', used to give the species type an identifier. The - identifier must be a text string conforming to the identifer syntax - permitted in SBML. SpeciesType also has an optional \'name\' attribute, - of type @c string. The \'id\' and \'name\' must be used according to the - guidelines described in the SBML specification (e.g., Section 3.3 in - the Level 2 Version 4 specification). - - SpeciesType was introduced in SBML Level 2 Version 2. It is not - available in SBML Level 1 nor in Level 3. - - @see Species - @see ListOfSpeciesTypes - @see CompartmentType - @see ListOfCompartmentTypes - - -"; - - -%feature("docstring") ListOfSpeciesTypes " - @ingroup Core - Implementation of SBML\'s %ListOfSpeciesTypes construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") SpeciesType::SpeciesType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
SpeciesType(SBMLNamespaces sbmlns)
- - Creates a new SpeciesType using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the \'id\' - (identifier) attribute of a SpeciesType object is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor. Setting the identifier can be accomplished using the - method SBase.setId(). - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a SpeciesType object to an SBMLDocument - (e.g., using Model.addSpeciesType()), - the SBML XML namespace of the document @em overrides the value used - when creating the SpeciesType object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a SpeciesType is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
SpeciesType(long level, long version)
- - Creates a new SpeciesType using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this SpeciesType - - @param version a long integer, the SBML Version to assign to this - SpeciesType - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a SpeciesType object to an SBMLDocument - (e.g., using Model.addSpeciesType()), - the SBML Level, SBML Version and XML namespace of the document @em - override the values used when creating the SpeciesType object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a SpeciesType is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
SpeciesType(SpeciesType orig)
- - Copy constructor; creates a copy of this SpeciesType. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") SpeciesType::accept " - Accepts the given SBMLVisitor for this instance of SpeciesType. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next SpeciesType in - the list of compartment types. -"; - - -%feature("docstring") SpeciesType::clone " - Creates and returns a deep copy of this SpeciesType. - - @return a (deep) copy of this SpeciesType. -"; - - -%feature("docstring") SpeciesType::getId " - Returns the value of the \'id\' attribute of this SpeciesType. - - @return the id of this SpeciesType. -"; - - -%feature("docstring") SpeciesType::getName " - Returns the value of the \'name\' attribute of this SpeciesType. - - @return the name of this SpeciesType. -"; - - -%feature("docstring") SpeciesType::isSetId " - Predicate returning @c True if this - SpeciesType\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this SpeciesType is - set, @c False otherwise. -"; - - -%feature("docstring") SpeciesType::isSetName " - Predicate returning @c True if this - SpeciesType\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this SpeciesType is - set, @c False otherwise. -"; - - -%feature("docstring") SpeciesType::setId " - Sets the value of the \'id\' attribute of this SpeciesType. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this SpeciesType - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SpeciesType::setName " - Sets the value of the \'name\' attribute of this SpeciesType. - - The string in @p name is copied. - - @param name the new name for the SpeciesType - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SpeciesType::unsetName " - Unsets the value of the \'name\' attribute of this SpeciesType. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SpeciesType::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") SpeciesType::getElementName " - Returns the XML element name of this object, which for - SpeciesType, is always @c \'compartmentType\'. - - @return the name of this element, i.e., @c \'compartmentType\'. -"; - - -%feature("docstring") SpeciesType::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") SpeciesType::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this SpeciesType object - have been set. - - @note The required attributes for a SpeciesType object are: - @li \'id\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") SpeciesType::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") SpeciesType::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. - - @param attributes the XMLAttributes to use. -"; - - -%feature("docstring") SpeciesType::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. - - @param attributes the XMLAttributes to use. -"; - - -%feature("docstring") SpeciesType::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. - - @param stream the XMLOutputStream to use. -"; - - -%feature("docstring") ListOfSpeciesTypes::ListOfSpeciesTypes " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfSpeciesTypes(SBMLNamespaces sbmlns)
- - Creates a new ListOfSpeciesTypes object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfSpeciesTypes object to be created. - - -
- Method variant with the following signature: -
ListOfSpeciesTypes(long level, long version)
- - Creates a new ListOfSpeciesTypes object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfSpeciesTypes::clone " - Creates and returns a deep copy of this ListOfSpeciesTypes instance. - - @return a (deep) copy of this ListOfSpeciesTypes. -"; - - -%feature("docstring") ListOfSpeciesTypes::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfSpeciesTypes::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., SpeciesType objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfSpeciesTypes::getElementName " - Returns the XML element name of this object. - - For ListOfSpeciesTypes, the XML element name is @c - \'listOfSpeciesTypes\'. - - @return the name of this element, i.e., @c \'listOfSpeciesTypes\'. -"; - - -%feature("docstring") ListOfSpeciesTypes::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a SpeciesType from the ListOfSpeciesTypes. - - @param n the index number of the SpeciesType to get. - - @return the nth SpeciesType in this ListOfSpeciesTypes. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a SpeciesType from the ListOfSpeciesTypes - based on its identifier. - - @param sid a string representing the identifier - of the SpeciesType to get. - - @return SpeciesType in this ListOfSpeciesTypes - with the given @p sid or @c None if no such - SpeciesType exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfSpeciesTypes::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfSpeciesTypes items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfSpeciesTypes items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfSpeciesTypes::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. For example, the - ListOfSpeciesTypes in a model (in SBML Level 2 Version 4) is the - third ListOf___. (However, it differs for different Levels and - Versions of SBML, so calling code should not hardwire this number.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfSpeciesTypes::createObject " - @internal - Create a ListOfSpeciesTypes object corresponding to the next token - in the XML input stream. - - @return the SBML object corresponding to next XMLToken in the - XMLInputStream, or @c None if the token was not recognized. -"; - - -%feature("docstring") Compartment " - @ingroup Core - Implementation of SBML\'s %Compartment construct. - - A compartment in SBML represents a bounded space in which species are - located. Compartments do not necessarily have to correspond to actual - structures inside or outside of a biological cell. - - It is important to note that although compartments are optional in the - overall definition of Model, every species in an SBML model must be - located in a compartment. This in turn means that if a model defines - any species, the model must also define at least one compartment. The - reason is simply that species represent physical things, and therefore - must exist @em somewhere. Compartments represent the @em somewhere. - - Compartment has one required attribute, \'id\', to give the compartment a - unique identifier by which other parts of an SBML model definition can - refer to it. A compartment can also have an optional \'name\' attribute - of type @c string. Identifiers and names must be used according to the - guidelines described in the SBML specifications. - - Compartment also has an optional attribute \'spatialDimensions\' that is - used to indicate the number of spatial dimensions possessed by the - compartment. Most modeling scenarios involve compartments with integer - values of \'spatialDimensions\' of @c 3 (i.e., a three-dimensional - compartment, which is to say, a volume), or 2 (a two-dimensional - compartment, a surface), or @c 1 (a one-dimensional compartment, a - line). In SBML Level 3, the type of this attribute is @c double, - there are no restrictions on the permitted values of the - \'spatialDimensions\' attribute, and there are no default values. In SBML - Level 2, the value must be a positive @c integer, and the default - value is @c 3; the permissible values in SBML Level 2 are @c 3, @c - 2, @c 1, and @c 0 (for a point). - - Another optional attribute on Compartment is \'size\', representing the - @em initial total size of that compartment in the model. The \'size\' - attribute must be a floating-point value and may represent a volume (if - the compartment is a three-dimensional one), or an area (if the - compartment is two-dimensional), or a length (if the compartment is - one-dimensional). There is no default value of compartment size in SBML - Level 2 or Level 3. In particular, a missing \'size\' value - does not imply that the compartment size is 1. (This is unlike - the definition of compartment \'volume\' in SBML Level 1.) When the - compartment\'s \'spatialDimensions\' attribute does not have a value of @c - 0, a missing value of \'size\' for a given compartment signifies that the - value either is unknown, or to be obtained from an external source, or - determined by an InitialAssignment, AssignmentRule, AlgebraicRule or - RateRule elsewhere in the model. In SBML Level 2, there are - additional special requirements on the values of \'size\'; we discuss them - in a separate section below. - - The units associated with a compartment\'s \'size\' attribute value may be - set using the optional attribute \'units\'. The rules for setting and - using compartment size units differ between SBML Level 2 and - Level 3, and are discussed separately below. - - Finally, the optional Compartment attribute named \'constant\' is used to - indicate whether the compartment\'s size stays constant after simulation - begins. A value of @c True indicates the compartment\'s \'size\' cannot be - changed by any other construct except InitialAssignment; a value of @c - false indicates the compartment\'s \'size\' can be changed by other - constructs in SBML. In SBML Level 2, there is an additional - explicit restriction that if \'spatialDimensions\'=@c \'0\', the value - cannot be changed by InitialAssignment either. Further, in - Level 2, \'constant\' has a default value of @c True. In SBML - Level 3, there is no default value for the \'constant\' attribute. - - - @section comp-l2 Additional considerations in SBML Level 2 - - In SBML Level 2, the default units of compartment size, and the - kinds of units allowed as values of the attribute \'units\', interact with - the number of spatial dimensions of the compartment. The value of the - \'units\' attribute of a Compartment object must be one of the base units - (see Unit), or the predefined unit identifiers @c volume, @c area, @c - length or @c dimensionless, or a new unit defined by a UnitDefinition - object in the enclosing Model, subject to the restrictions detailed in - the following table: - - @htmlinclude compartment-size-restrictions.html - - In SBML Level 2, the units of the compartment size, as defined by the - \'units\' attribute or (if \'units\' is not set) the default value listed in - the table above, are used in the following ways when the compartment has - a \'spatialDimensions\' value greater than @c 0: -
    -
  • The value of the \'units\' attribute is used as the units of the - compartment identifier when the identifier appears as a numerical - quantity in a mathematical formula expressed in MathML. - -
  • The @c math element of an AssignmentRule or InitialAssignment - referring to this compartment must have identical units. - -
  • In RateRule objects that set the rate of change of the compartment\'s - size, the units of the rule\'s @c math element must be identical to the - compartment\'s \'units\' attribute divided by the default @em time units. - (In other words, the units for the rate of change of compartment size - are compartment size/time units. - -
  • When a Species is to be treated in terms of concentrations or - density, the units of the spatial size portion of the concentration - value (i.e., the denominator in the units formula @em substance/@em - size) are those indicated by the value of the \'units\' attribute on the - compartment in which the species is located. -
- - Compartments with \'spatialDimensions\'=@c 0 require special treatment in - this framework. As implied above, the \'size\' attribute must not have a - value on an SBML Level 2 Compartment object if the - \'spatialDimensions\' attribute has a value of @c 0. An additional - related restriction is that the \'constant\' attribute must default to or - be set to @c True if the value of the \'spatialDimensions\' attribute is - @c 0, because a zero-dimensional compartment cannot ever have a size. - - If a compartment has no size or dimensional units, how should such a - compartment\'s identifier be interpreted when it appears in mathematical - formulas? The answer is that such a compartment\'s identifier should not - appear in mathematical formulas in the first place—it has no - value, and its value cannot change. Note also that a zero-dimensional - compartment is a point, and species located at points can only be - described in terms of amounts, not spatially-dependent measures such as - concentration. Since SBML KineticLaw formulas are already in terms of - @em substance/@em time and not (say) @em concentration/@em time, volume - or other factors in principle are not needed for species located in - zero-dimensional compartments. - - Finally, in SBML Level 2 Versions 2–4, each compartment in a - model may optionally be designated as belonging to a particular - compartment @em type. The optional attribute \'compartmentType\' is used - identify the compartment type represented by the Compartment structure. - The \'compartmentType\' attribute\'s value must be the identifier of a - CompartmentType instance defined in the model. If the \'compartmentType\' - attribute is not present on a particular compartment definition, a - unique virtual compartment type is assumed for that compartment, and no - other compartment can belong to that compartment type. The values of - \'compartmentType\' attributes on compartments have no effect on the - numerical interpretation of a model. Simulators and other numerical - analysis software may ignore \'compartmentType\' attributes. The - \'compartmentType\' attribute and the CompartmentType class of objects are - not present in SBML Level 3 Core nor in SBML Level 1. - - - @section comp-l3 Additional considerations in SBML Level 3 - - One difference between SBML Level 3 and lower Levels of SBML is - that there are no restrictions on the permissible values of the - \'spatialDimensions\' attribute, and there is no default value defined for - the attribute. The value of \'spatialDimensions\' does not have to be an - integer, either; this is to allow for the possibility of representing - structures with fractal dimensions. - - The number of spatial dimensions possessed by a compartment cannot enter - into mathematical formulas, and therefore cannot directly alter the - numerical interpretation of a model. However, the value of - \'spatialDimensions\' @em does affect the interpretation of the units - associated with a compartment\'s size. Specifically, the value of - \'spatialDimensions\' is used to select among the Model attributes - \'volumeUnits\', \'areaUnits\' and \'lengthUnits\' when a Compartment object - does not define a value for its \'units\' attribute. - - The \'units\' attribute may be left unspecified for a given compartment in - a model; in that case, the compartment inherits the unit of measurement - specified by one of the attributes on the enclosing Model object - instance. The applicable attribute on Model depends on the value of the - compartment\'s \'spatialDimensions\' attribute; the relationship is shown - in the table below. If the Model object does not define the relevant - attribute (\'volumeUnits\', \'areaUnits\' or \'lengthUnits\') for a given - \'spatialDimensions\' value, the unit associated with that Compartment - object\'s size is undefined. If @em both \'spatialDimensions\' and \'units\' - are left unset on a given Compartment object instance, then no unit can - be chosen from among the Model\'s \'volumeUnits\', \'areaUnits\' or - \'lengthUnits\' attributes (even if the Model instance provides values for - those attributes), because there is no basis to select between them and - there is no default value of \'spatialDimensions\'. Leaving the units of - compartments\' sizes undefined in an SBML model does not render the model - invalid; however, as a matter of best practice, we strongly recommend - that all models specify the units of measurement for all compartment - sizes. - - @htmlinclude compartment-size-recommendations.html - - The unit of measurement associated with a compartment\'s size, as defined - by the \'units\' attribute or (if \'units\' is not set) the inherited value - from Model according to the table above, is used in the following ways: - -
    - -
  • When the identifier of the compartment appears as a numerical - quantity in a mathematical formula expressed in MathML, it represents - the size of the compartment, and the unit associated with the size is - the value of the \'units\' attribute. - -
  • When a Species is to be treated in terms of concentrations or - density, the unit associated with the spatial size portion of the - concentration value (i.e., the denominator in the formula - amount/size) is specified by the value of the \'units\' - attribute on the compartment in which the species is located. - -
  • The \'math\' elements of AssignmentRule, InitialAssignment and - EventAssignment objects setting the value of the compartment size - should all have the same units as the unit associated with the - compartment\'s size. - -
  • In a RateRule object that defines a rate of change for a - compartment\'s size, the unit of the rule\'s \'math\' element should be - identical to the compartment\'s \'units\' attribute divided by the - model-wide unit of time. (In other words, {unit of - compartment size}/{unit of time}.) - -
- - - @section comp-other Other aspects of Compartment - - In SBML Level 1 and Level 2, Compartment has an optional - attribute named \'outside\', whose value can be the identifier of another - Compartment object defined in the enclosing Model object. Doing so - means that the other compartment contains it or is outside of it. This - enables the representation of simple topological relationships between - compartments, for those simulation systems that can make use of the - information (e.g., for drawing simple diagrams of compartments). It is - worth noting that in SBML, there is no relationship between compartment - sizes when compartment positioning is expressed using the \'outside\' - attribute. The size of a given compartment does not in any sense - include the sizes of other compartments having it as the value of their - \'outside\' attributes. In other words, if a compartment @em B has the - identifier of compartment @em A as its \'outside\' attribute value, the - size of @em A does not include the size of @em B. The compartment sizes - are separate. - - In Level 2, there are two restrictions on the \'outside\' attribute. - First, because a compartment with \'spatialDimensions\' of @c 0 has no - size, such a compartment cannot act as the container of any other - compartment @em except compartments that @em also have - \'spatialDimensions\' values of @c 0. Second, the directed graph formed - by representing Compartment structures as vertexes and the \'outside\' - attribute values as edges must be acyclic. The latter condition is - imposed to prevent a compartment from being contained inside itself. In - the absence of a value for \'outside\', compartment definitions in SBML - Level 2 do not have any implied spatial relationships between each - other. - - - -"; - - -%feature("docstring") ListOfCompartments " - @ingroup Core - Implementation of SBML Level 2\'s %ListOfCompartments construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Compartment::Compartment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Compartment(SBMLNamespaces sbmlns)
- - Creates a new Compartment using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the \'id\' - (identifier) attribute of a Compartment is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor. Setting the identifier can be accomplished using the - method @if java Compartment.setId()@else setId()@endif. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Compartment object to an SBMLDocument - (e.g., using Model.addCompartment()), the SBML XML namespace of the - document @em overrides the value used when creating the Compartment - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a Compartment is an - important aid to producing valid SBML. Knowledge of the intented SBML - Level and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - -
- Method variant with the following signature: -
Compartment(long level, long version)
- - Creates a new Compartment using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Compartment - - @param version a long integer, the SBML Version to assign to this - Compartment - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Compartment object to an SBMLDocument - (e.g., using Model.addCompartment()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the Compartment object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a Compartment is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Compartment(Compartment orig)
- - Copy constructor; creates a copy of a Compartment. - - @param orig the Compartment instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Compartment::accept " - Accepts the given SBMLVisitor for this instance of Compartment. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next Compartment in the - list of compartments within which this Compartment is embedded (i.e., - the ListOfCompartments in the parent Model). -"; - - -%feature("docstring") Compartment::clone " - Creates and returns a deep copy of this Compartment object. - - @return a (deep) copy of this Compartment. -"; - - -%feature("docstring") Compartment::initDefaults " - Initializes the fields of this Compartment object to \'typical\' default - values. - - The SBML Compartment component has slightly different aspects and - default attribute values in different SBML Levels and Versions. - This method sets the values to certain common defaults, based - mostly on what they are in SBML Level 2. Specifically: -
    -
  • Sets attribute \'spatialDimensions\' to @c 3 -
  • Sets attribute \'constant\' to @c True -
  • (Applies to Level 1 models only) Sets attribute \'volume\' to @c 1.0 -
  • (Applies to Level 3 models only) Sets attribute \'units\' to @c litre -
-"; - - -%feature("docstring") Compartment::getId " - Returns the value of the \'id\' attribute of this Compartment object. - - @return the id of this Compartment. -"; - - -%feature("docstring") Compartment::getName " - Returns the value of the \'name\' attribute of this Compartment object. - - @return the name of this Compartment. -"; - - -%feature("docstring") Compartment::getCompartmentType " - Get the value of the \'compartmentType\' attribute of this Compartment - object. - - @return the value of the \'compartmentType\' attribute of this - Compartment as a string. - - @note The \'compartmentType\' attribute is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Compartment::getSpatialDimensions " - Get the number of spatial dimensions of this Compartment object. - - @note In SBML Level 3, the data type of the \'spatialDimensions\' - attribute is @c double, whereas in Level 2, it is @c integer. - LibSBML provides a separate method for obtaining the value as a double, - for models where it is relevant. - - @return the value of the \'spatialDimensions\' attribute of this - Compartment as a long integereger - - @see getSpatialDimensionsAsDouble() -"; - - -%feature("docstring") Compartment::getSpatialDimensionsAsDouble " - Get the number of spatial dimensions of this Compartment object - as a double. - - @note In SBML Level 3, the data type of the \'spatialDimensions\' - attribute is @c double, whereas in Level 2, it is @c integer. To - avoid backward compatibility issues, libSBML provides a separate - method for obtaining the value as a double, for models where it is - relevant. - - @return the value of the \'spatialDimensions\' attribute of this - Compartment as a double, or @c NaN if this model is not in SBML - Level 3 format. - - @see getSpatialDimensions() -"; - - -%feature("docstring") Compartment::getSize " - Get the size of this Compartment. - - This method is identical to - @if java Compartment.getVolume()@else getVolume()@endif. - In SBML Level 1, compartments are always three-dimensional - constructs and only have volumes, whereas in SBML Level 2, - compartments may be other than three-dimensional and therefore the - \'volume\' attribute is named \'size\' in Level 2. LibSBML provides - both - @if java Compartment.getSize()@else getSize()@endif@~ and - @if java Compartment.getVolume()@else getVolume()@endif@~ for - easier compatibility between SBML Levels. - - @return the value of the \'size\' attribute (\'volume\' in Level 1) of - this Compartment as a float-point number. - - @see isSetSize() - @see getVolume() -"; - - -%feature("docstring") Compartment::getVolume " - Get the volume of this Compartment. - - This method is identical to - @if java Compartment.getSize()@else getSize()@endif. In - SBML Level 1, compartments are always three-dimensional - constructs and only have volumes, whereas in SBML Level 2, - compartments may be other than three-dimensional and therefore the - \'volume\' attribute is named \'size\' in Level 2. LibSBML provides - both - @if java Compartment.getSize()@else getSize()@endif@~ and - @if java Compartment.getVolume()@else getVolume()@endif@~ - for easier compatibility between SBML Levels. - - @return the value of the \'volume\' attribute (\'size\' in Level 2) of - this Compartment, as a floating-point number. - - @note The attribute \'volume\' only exists by that name in SBML - Level 1. In Level 2 and above, the equivalent attribute is - named \'size\'. - - @see isSetVolume() - @see getSize() -"; - - -%feature("docstring") Compartment::getUnits " - Get the units of this compartment\'s size. - - The value of an SBML compartment\'s \'units\' attribute establishes the - unit of measurement associated with the compartment\'s size. - - @return the value of the \'units\' attribute of this Compartment, as a - string. An empty string indicates that no units have been assigned to - the value of the size. - - @note @htmlinclude unassigned-units-are-not-a-default.html - - @see isSetUnits() - @see @if java Compartment.setUnits()@else setUnits()@endif@~ - @see getSize() -"; - - -%feature("docstring") Compartment::getOutside " - Get the identifier, if any, of the compartment that is designated - as being outside of this one. - - @return the value of the \'outside\' attribute of this Compartment. - - @note The \'outside\' attribute is defined in SBML Level 1 and - Level 2, but does not exist in SBML Level 3 Version 1 - Core. -"; - - -%feature("docstring") Compartment::getConstant " - Get the value of the \'constant\' attribute of this Compartment. - - @return @c True if this Compartment\'s size is flagged as being - constant, @c False otherwise. -"; - - -%feature("docstring") Compartment::isSetId " - Predicate returning @c True if this - Compartment\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this Compartment is - set, @c False otherwise. -"; - - -%feature("docstring") Compartment::isSetName " - Predicate returning @c True if this - Compartment\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this Compartment is - set, @c False otherwise. -"; - - -%feature("docstring") Compartment::isSetCompartmentType " - Predicate returning @c True if this - Compartment\'s \'compartmentType\' attribute is set. - - @return @c True if the \'compartmentType\' attribute of this Compartment - is set, @c False otherwise. - - @note The \'compartmentType\' attribute is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Compartment::isSetSize " - Predicate returning @c True if this - Compartment\'s \'size\' attribute is set. - - This method is similar but not identical to - @if java Compartment.isSetVolume()@else isSetVolume()@endif. The latter - should be used in the context of SBML Level 1 models instead of - @if java Compartment.isSetSize()@else isSetSize()@endif@~ - because @if java Compartment.isSetVolume()@else isSetVolume()@endif@~ - performs extra processing to take into account the difference in - default values between SBML Levels 1 and 2. - - @return @c True if the \'size\' attribute (\'volume\' in Level 2) of - this Compartment is set, @c False otherwise. - - @see isSetVolume() - @see setSize() -"; - - -%feature("docstring") Compartment::isSetVolume " - Predicate returning @c True if this Compartment\'s - \'volume\' attribute is set. - - This method is similar but not identical to - @if java Compartment.isSetSize()@else isSetSize()@endif. The latter - should not be used in the context of SBML Level 1 models because this - method performs extra processing to take into account - the difference in default values between SBML Levels 1 and 2. - - @return @c True if the \'volume\' attribute (\'size\' in Level 2 and - above) of this Compartment is set, @c False otherwise. - - @note The attribute \'volume\' only exists by that name in SBML - Level 1. In Level 2 and above, the equivalent attribute is - named \'size\'. In SBML Level 1, a compartment\'s volume has a - default value (@c 1.0) and therefore this method will always return @c - true. In Level 2, a compartment\'s size (the equivalent of SBML - Level 1\'s \'volume\') is optional and has no default value, and - therefore may or may not be set. - - @see isSetSize() - @see @if java Compartment.setVolume()@else setVolume()@endif@~ -"; - - -%feature("docstring") Compartment::isSetUnits " - Predicate returning @c True if this - Compartment\'s \'units\' attribute is set. - - @return @c True if the \'units\' attribute of this Compartment is - set, @c False otherwise. - - @note @htmlinclude unassigned-units-are-not-a-default.html -"; - - -%feature("docstring") Compartment::isSetOutside " - Predicate returning @c True if this - Compartment\'s \'outside\' attribute is set. - - @return @c True if the \'outside\' attribute of this Compartment is - set, @c False otherwise. - - @note The \'outside\' attribute is defined in SBML Level 1 and - Level 2, but does not exist in SBML Level 3 Version 1 - Core. -"; - - -%feature("docstring") Compartment::isSetSpatialDimensions " - Predicate returning @c True if this - Compartment\'s \'spatialDimensions\' attribute is set. - - @return @c True if the \'spatialDimensions\' attribute of this - Compartment is set, @c False otherwise. -"; - - -%feature("docstring") Compartment::isSetConstant " - Predicate returning @c True if this - Compartment\'s \'constant\' attribute is set. - - @return @c True if the \'constant\' attribute of this Compartment is - set, @c False otherwise. -"; - - -%feature("docstring") Compartment::setId " - Sets the value of the \'id\' attribute of this Compartment. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this Compartment - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Compartment::setName " - Sets the value of the \'name\' attribute of this Compartment. - - The string in @p name is copied. - - @param name the new name for the Compartment - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Compartment::setCompartmentType " - Sets the \'compartmentType\' attribute of this Compartment. - - @param sid the identifier of a CompartmentType object defined - elsewhere in this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The \'compartmentType\' attribute is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Compartment::setSpatialDimensions " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setSpatialDimensions(double value)
- - Sets the \'spatialDimensions\' attribute of this Compartment as a double. - - @param value a double indicating the number of dimensions - of this compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - -
- Method variant with the following signature: -
setSpatialDimensions(long value)
- - Sets the \'spatialDimensions\' attribute of this Compartment. - - If @p value is not one of @c 0, @c 1, @c 2, or @c 3, this method will - have no effect (i.e., the \'spatialDimensions\' attribute will not be - set). - - @param value a long integereger indicating the number of dimensions - of this compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Compartment::setSize " - Sets the \'size\' attribute (or \'volume\' in SBML Level 1) of this - Compartment. - - This method is identical to - @if java Compartment.setVolume()@else setVolume()@endif@~ - and is provided for compatibility between - SBML Level 1 and Level 2. - - @param value a @c double representing the size of this compartment - instance in whatever units are in effect for the compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @note The attribute \'volume\' only exists by that name in SBML - Level 1. In Level 2 and above, the equivalent attribute is - named \'size\'. -"; - - -%feature("docstring") Compartment::setVolume " - Sets the \'volume\' attribute (or \'size\' in SBML Level 2) of this - Compartment. - - This method is identical to - @if java Compartment.setVolume()@else setVolume()@endif@~ - and is provided for compatibility between SBML Level 1 and - Level 2. - - @param value a @c double representing the volume of this compartment - instance in whatever units are in effect for the compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @note The attribute \'volume\' only exists by that name in SBML - Level 1. In Level 2 and above, the equivalent attribute is - named \'size\'. -"; - - -%feature("docstring") Compartment::setUnits " - Sets the \'units\' attribute of this Compartment. - - @param sid the identifier of the defined units to use. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Compartment::setOutside " - Sets the \'outside\' attribute of this Compartment. - - @param sid the identifier of a compartment that encloses this one. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'outside\' attribute is defined in SBML Level 1 and - Level 2, but does not exist in SBML Level 3 Version 1 - Core. -"; - - -%feature("docstring") Compartment::setConstant " - Sets the value of the \'constant\' attribute of this Compartment. - - @param value a boolean indicating whether the size/volume of this - compartment should be considered constant (@c True) or variable - (@c False) - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Compartment::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Compartment::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Compartment::unsetName " - Unsets the value of the \'name\' attribute of this Compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Compartment::unsetCompartmentType " - Unsets the value of the \'compartmentType\' - attribute of this Compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The \'compartmentType\' attribute is only available in SBML - Level 2 Versions 2–4. - - @see setCompartmentType() - @see isSetCompartmentType() -"; - - -%feature("docstring") Compartment::unsetSize " - Unsets the value of the \'size\' attribute of this Compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The attribute \'volume\' only exists by that name in SBML - Level 1. In Level 2 and above, the equivalent attribute is - named \'size\'. -"; - - -%feature("docstring") Compartment::unsetVolume " - Unsets the value of the \'volume\' attribute of this - Compartment. - - In SBML Level 1, a Compartment volume has a default value (@c 1.0) and - therefore should always be set. In Level 2, \'size\' is - optional with no default value and as such may or may not be set. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The attribute \'volume\' only exists by that name in SBML - Level 1. In Level 2 and above, the equivalent attribute is - named \'size\'. -"; - - -%feature("docstring") Compartment::unsetUnits " - Unsets the value of the \'units\' attribute of this Compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Compartment::unsetOutside " - Unsets the value of the \'outside\' attribute of this Compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'outside\' attribute is defined in SBML Level 1 and - Level 2, but does not exist in SBML Level 3 Version 1 - Core. -"; - - -%feature("docstring") Compartment::unsetSpatialDimensions " - Unsets the value of the \'spatialDimensions\' attribute of this Compartment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note This function is only valid for SBML Level 3. -"; - - -%feature("docstring") Compartment::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this Compartment\'s designated size. - - Compartments in SBML have an attribute (\'units\') for declaring the - units of measurement intended for the value of the compartment\'s size. - In the absence of a value given for this attribute, the units are - inherited from values either defined on the enclosing Model (in SBML - Level 3) or in defaults (in SBML Level 2). This method - returns a UnitDefinition object based on how this compartment\'s units - are interpreted according to the relevant SBML guidelines, or it - returns @c None if no units have been declared and no defaults are - defined by the relevant SBML specification. - - Note that unit declarations for Compartment objects are specified in - terms of the @em identifier of a unit (e.g., using - @if java Compartment.setUnits()@else setUnits()@endif), but - @em this method returns a UnitDefinition object, not a unit - identifier. It does this by constructing an appropriate - UnitDefinition. For SBML Level 2 models, it will do this even - when the value of the \'units\' attribute is one of the special SBML - Level 2 unit identifiers @c \'substance\', @c \'volume\', @c \'area\', - @c \'length\' or @c \'time\'. Callers may find this useful in conjunction - with the helper methods provided by the UnitDefinition class for - comparing different UnitDefinition objects. - - @return a UnitDefinition that expresses the units of this - Compartment, or @c None if one cannot be constructed. - - @note The libSBML system for unit analysis depends on the model as a - whole. In cases where the Compartment object has not yet been added - to a model, or the model itself is incomplete, unit analysis is not - possible, and consequently this method will return @c None. - - @see isSetUnits() - @see getUnits() -"; - - -%feature("docstring") Compartment::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or - @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Compartment::getElementName " - Returns the XML element name of this object, which for Compartment, is - always @c \'compartment\'. - - @return the name of this element, i.e., @c \'compartment\'. -"; - - -%feature("docstring") Compartment::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Compartment::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this Compartment object - have been set. - - @note The required attributes for a Compartment object are: - @li \'id\' (or \'name\' in SBML Level 1) - @li \'constant\' (in SBML Level 3 only) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Compartment::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Compartment::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Compartment::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Compartment::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Compartment::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Compartment::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Compartment::isExplicitlySetSpatialDimensions " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Compartment::isExplicitlySetConstant " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfCompartments::ListOfCompartments " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfCompartments(SBMLNamespaces sbmlns)
- - Creates a new ListOfCompartments object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfCompartments object to be created. - - -
- Method variant with the following signature: -
ListOfCompartments(long level, long version)
- - Creates a new ListOfCompartments object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfCompartments::clone " - Creates and returns a deep copy of this ListOfCompartments instance. - - @return a (deep) copy of this ListOfCompartments. -"; - - -%feature("docstring") ListOfCompartments::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfCompartments::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Compartment objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfCompartments::getElementName " - Returns the XML element name of this object. - - For ListOfCompartments, the XML element name is @c \'listOfCompartments\'. - - @return the name of this element, i.e., @c \'listOfCompartments\'. -"; - - -%feature("docstring") ListOfCompartments::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a Compartment from the ListOfCompartments. - - @param n the index number of the Compartment to get. - - @return the nth Compartment in this ListOfCompartments. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a Compartment from the ListOfCompartments - based on its identifier. - - @param sid a string representing the identifier - of the Compartment to get. - - @return Compartment in this ListOfCompartments - with the given @p sid or @c None if no such - Compartment exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfCompartments::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfCompartments items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfCompartments items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then - @c None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfCompartments::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the ListOfCompartments - in a model is (in SBML Level 2 Version 4) the fifth - ListOf___. (However, it differs for different Levels and Versions of - SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfCompartments::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Species " - @ingroup Core - Implementation of SBML\'s %Species construct. - - A @em species in SBML refers to a pool of entities that (a) are - considered indistinguishable from each other for the purposes of the - model, (b) participate in reactions, and (c) are located in a specific - @em compartment. The SBML Species object class is intended to represent - these pools. - - As with other major constructs in SBML, Species has a mandatory - attribute, \'id\', used to give the species type an identifier in the - model. The identifier must be a text string conforming to the identifer - syntax permitted in SBML. Species also has an optional \'name\' - attribute, of type @c string. The \'id\' and \'name\' must be used - according to the guidelines described in the SBML specifications. - - The required attribute \'compartment\' is used to identify the compartment - in which the species is located. The attribute\'s value must be the - identifier of an existing Compartment object. It is important to note - that there is no default value for the \'compartment\' attribute on - Species; every species in an SBML model must be assigned a compartment - @em explicitly. (This also implies that every model with one or more - Species objects must define at least one Compartment object.) - - - @section species-amounts The initial amount and concentration of a species - - The optional attributes \'initialAmount\' and \'initialConcentration\', both - having a data type of @c double, can be used to set the @em initial - quantity of the species in the compartment where the species is located. - These attributes are mutually exclusive; i.e., only one can - have a value on any given instance of a Species object. Missing - \'initialAmount\' and \'initialConcentration\' values implies that their - values either are unknown, or to be obtained from an external source, or - determined by an InitialAssignment or other SBML construct elsewhere in - the model. - - A species\' initial quantity in SBML is set by the \'initialAmount\' or - \'initialConcentration\' attribute exactly once. If the \'constant\' - attribute is @c True, then the value of the species\' quantity is fixed - and cannot be changed except by an InitialAssignment. These methods - differ in that the \'initialAmount\' and \'initialConcentration\' attributes - can only be used to set the species quantity to a literal floating-point - number, whereas the use of an InitialAssignment object allows the value - to be set using an arbitrary mathematical expression (which, thanks to - MathML\'s expressiveness, may evaluate to a rational number). If the - species\' \'constant\' attribute is @c False, the species\' quantity value - may be overridden by an InitialAssignment or changed by AssignmentRule - or AlgebraicRule, and in addition, for t > 0, it may also be - changed by a RateRule, Event objects, and as a result of being a - reactant or product in one or more Reaction objects. (However, some - constructs are mutually exclusive; see the SBML specifications for the - precise details.) It is not an error to define \'initialAmount\' or - \'initialConcentration\' on a species and also redefine the value using an - InitialAssignment, but the \'initialAmount\' or \'initialConcentration\' - setting in that case is ignored. The SBML specifications provide - additional information about the semantics of assignments, rules and - values for simulation time t <= 0. - - SBML Level 2 additionally stipulates that in cases where a species\' - compartment has a \'spatialDimensions\' value of @c 0 (zero), the species - cannot have a value for \'initialConcentration\' because the concepts of - concentration and density break down when a container has zero - dimensions. - - @section species-units The units of a species\' amount or concentration - - When the attribute \'initialAmount\' is set, the unit of measurement - associated with the value of \'initialAmount\' is specified by the Species - attribute \'substanceUnits\'. When the \'initialConcentration\' attribute - is set, the unit of measurement associated with this concentration value - is {unit of amount} divided by {unit of size}, where - the {unit of amount} is specified by the Species - \'substanceUnits\' attribute, and the {unit of size} is specified - by the \'units\' attribute of the Compartment object in which the species - is located. Note that in either case, a unit of amount is - involved and determined by the \'substanceUnits\' attribute. Note - these two attributes alone do not determine the units of the - species when the species identifier appears in a mathematical - expression; that aspect is determined by the attribute - \'hasOnlySubstanceUnits\' discussed below. - - In SBML Level 3, if the \'substanceUnits\' attribute is not set on a - given Species object instance, then the unit of amount for that - species is inherited from the \'substanceUnits\' attribute on the - enclosing Model object instance. If that attribute on Model is not set - either, then the unit associated with the species\' quantity is - undefined. - - In SBML Level 2, if the \'substanceUnits\' attribute is not set on a - given Species object instance, then the unit of amount for that - species is taken from the predefined SBML unit identifier @c - \'substance\'. The value assigned to \'substanceUnits\' must be chosen from - one of the following possibilities: one of the base unit identifiers - defined in SBML, the built-in unit identifier @c \'substance\', or the - identifier of a new unit defined in the list of unit definitions in the - enclosing Model object. The chosen units for \'substanceUnits\' must be - be @c \'dimensionless\', @c \'mole\', @c \'item\', @c \'kilogram\', @c \'gram\', - or units derived from these. - - As noted at the beginning of this section, simply setting - \'initialAmount\' or \'initialConcentration\' alone does @em not determine - whether a species identifier represents an amount or a concentration - when it appears elsewhere in an SBML model. The role of the attribute - \'hasOnlySubstanceUnits\' is to indicate whether the units of the species, - when the species identifier appears in mathematical formulas, are - intended to be concentration or amount. The attribute takes on a - boolean value. In SBML Level 3, the attribute has no default value - and must always be set in a model; in SBML Level 2, it has a - default value of @c False. - - The units of the species are used in the following ways: -
    -
  • When the species\' identifier appears in a MathML formula, it - represents the species\' quantity, and the unit of measurement associated - with the quantity is as described above. - -
  • The \'math\' elements of AssignmentRule, InitialAssignment and - EventAssignment objects referring to this species should all have the - same units as the unit of measurement associated with the species - quantity. - -
  • In a RateRule object that defines the rate of change of the - species\' quantity, the unit associated with the rule\'s \'math\' element - should be equal to the unit of the species\' quantity divided by the - model-wide unit of time; in other words, {unit of species - quantity}/{unit of time}. - -
- - - @section species-constant The \'constant\' and \'boundaryCondition\' attributes - - The Species object class has two boolean attributes named \'constant\' and - \'boundaryCondition\', used to indicate whether and how the quantity of - that species can vary during a simulation. In SBML Level 2 they - are optional; in SBML Level 3 they are mandatory. The following - table shows how to interpret the combined values of these attributes. - - @htmlinclude species-boundarycondition.html - - By default, when a species is a product or reactant of one or more - reactions, its quantity is determined by those reactions. In SBML, it - is possible to indicate that a given species\' quantity is not - determined by the set of reactions even when that species occurs as a - product or reactant; i.e., the species is on the boundary of - the reaction system, and its quantity is not determined by the - reactions. The boolean attribute \'boundaryCondition\' can be used to - indicate this. A value of @c False indicates that the species @em is - part of the reaction system. In SBML Level 2, the attribute has a - default value of @c False, while in SBML Level 3, it has no - default. - - The \'constant\' attribute indicates whether the species\' quantity can be - changed at all, regardless of whether by reactions, rules, or constructs - other than InitialAssignment. A value of @c False indicates that the - species\' quantity can be changed. (This is also a common value because - the purpose of most simulations is precisely to calculate changes in - species quantities.) In SBML Level 2, the attribute has a default - value of @c False, while in SBML Level 3, it has no default. Note - that the initial quantity of a species can be set by an - InitialAssignment irrespective of the value of the \'constant\' attribute. - - In practice, a \'boundaryCondition\' value of @c True means a differential - equation derived from the reaction definitions should not be generated - for the species. However, the species\' quantity may still be changed by - AssignmentRule, RateRule, AlgebraicRule, Event, and InitialAssignment - constructs if its \'constant\' attribute is @c False. Conversely, if the - species\' \'constant\' attribute is @c True, then its value cannot be - changed by anything except InitialAssignment. - - A species having \'boundaryCondition\'=@c False and \'constant\'=@c False - can appear as a product and/or reactant of one or more reactions in the - model. If the species is a reactant or product of a reaction, it must - @em not also appear as the target of any AssignmentRule or RateRule - object in the model. If instead the species has \'boundaryCondition\'=@c - false and \'constant\'=@c True, then it cannot appear as a reactant or - product, or as the target of any AssignmentRule, RateRule or - EventAssignment object in the model. - - - @section species-l2-convfactor The conversionFactor attribute in SBML Level 3 - - In SBML Level 3, Species has an additional optional attribute, - \'conversionFactor\', that defines a conversion factor that applies to a - particular species. The value must be the identifier of a Parameter - object instance defined in the model. That Parameter object must be a - constant, meaning its \'constant\' attribute must be set to @c True. - If a given Species object definition defines a value for its - \'conversionFactor\' attribute, it takes precedence over any factor - defined by the Model object\'s \'conversionFactor\' attribute. - - The unit of measurement associated with a species\' quantity can be - different from the unit of extent of reactions in the model. SBML - Level 3 avoids implicit unit conversions by providing an explicit - way to indicate any unit conversion that might be required. The use of - a conversion factor in computing the effects of reactions on a species\' - quantity is explained in detail in the SBML Level 3 specification - document. Because the value of the \'conversionFactor\' attribute is the - identifier of a Parameter object, and because parameters can have units - attached to them, the transformation from reaction extent units to - species units can be completely specified using this approach. - - Note that the unit conversion factor is only applied when - calculating the effect of a reaction on a species. It is not - used in any rules or other SBML constructs that affect the species, and - it is also not used when the value of the species is referenced in a - mathematical expression. - - - @section species-l2-type The speciesType attribute in SBML Level 2 Versions 2–4 - - In SBML Level 2 Versions 2–4, each species in a model - may optionally be designated as belonging to a particular species type. - The optional attribute \'speciesType\' is used to identify the species - type of the chemical entities that make up the pool represented by the - Species objects. The attribute\'s value must be the identifier of an - existing SpeciesType object in the model. If the \'speciesType\' - attribute is not present on a particular species definition, it means - the pool contains chemical entities of a type unique to that pool; in - effect, a virtual species type is assumed for that species, and no other - species can belong to that species type. The value of \'speciesType\' - attributes on species have no effect on the numerical interpretation of - a model; simulators and other numerical analysis software may ignore - \'speciesType\' attributes. - - There can be only one species of a given species type in any given - compartment of a model. More specifically, for all Species objects - having a value for the \'speciesType\' attribute, the pair -
- (\'speciesType\' attribute value, \'compartment\' attribute value) -
- - must be unique across the set of all Species object in a model. - - - @section species-other The spatialSizeUnits attribute in SBML Level 2 Versions 1–2 - - In versions of SBML Level 2 before Version 3, the class - Species included an attribute called \'spatialSizeUnits\', which allowed - explicitly setting the units of size for initial concentration. LibSBML - retains this attribute for compatibility with older definitions of - Level 2, but its use is strongly discouraged because many software - tools do no properly interpret this unit declaration and it is - incompatible with all SBML specifications after Level 2 - Version 3. - - - @section species-math Additional considerations for interpreting the numerical value of a species - - Species are unique in SBML in that they have a kind of duality: a - species identifier may stand for either substance amount (meaning, a - count of the number of individual entities) or a concentration or - density (meaning, amount divided by a compartment size). The previous - sections explain the meaning of a species identifier when it is - referenced in a mathematical formula or in rules or other SBML - constructs; however, it remains to specify what happens to a species - when the compartment in which it is located changes in size. - - When a species definition has a \'hasOnlySubstanceUnits\' attribute value - of @c False and the size of the compartment in which the species is - located changes, the default in SBML is to assume that it is the - concentration that must be updated to account for the size change. This - follows from the principle that, all other things held constant, if a - compartment simply changes in size, the size change does not in itself - cause an increase or decrease in the number of entities of any species - in that compartment. In a sense, the default is that the @em amount of - a species is preserved across compartment size changes. Upon such size - changes, the value of the concentration or density must be recalculated - from the simple relationship concentration = amount / size if - the value of the concentration is needed (for example, if the species - identifier appears in a mathematical formula or is otherwise referenced - in an SBML construct). There is one exception: if the species\' quantity - is determined by an AssignmentRule, RateRule, AlgebraicRule, or an - EventAssignment and the species has a \'hasOnlySubstanceUnits\' attribute - value of @c False, it means that the concentration is assigned - by the rule or event; in that case, the amount must be - calculated when the compartment size changes. (Events also require - additional care in this situation, because an event with multiple - assignments could conceivably reassign both a species quantity and a - compartment size simultaneously. Please refer to the SBML - specifications for the details.) - - Note that the above only matters if a species has a - \'hasOnlySubstanceUnits\' attribute value of @c False, meaning that the - species identifier refers to a concentration wherever the identifier - appears in a mathematical formula. If instead the attribute\'s value is - @c True, then the identifier of the species always stands for - an amount wherever it appears in a mathematical formula or is referenced - by an SBML construct. In that case, there is never a question about - whether an assignment or event is meant to affect the amount or - concentration: it is always the amount. - - A particularly confusing situation can occur when the species has - \'constant\' attribute value of @c True in combination with a - \'hasOnlySubstanceUnits\' attribute value of @c False. Suppose this - species is given a value for \'initialConcentration\'. Does a \'constant\' - value of @c True mean that the concentration is held constant if the - compartment size changes? No; it is still the amount that is kept - constant across a compartment size change. The fact that the species - was initialized using a concentration value is irrelevant. - - - -"; - - -%feature("docstring") ListOfSpecies " - @ingroup Core - Implementation of SBML Level 2\'s %ListOfSpecies construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Species::Species " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Species(SBMLNamespaces sbmlns)
- - Creates a new Species using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the \'id\' - (identifier) attribute of a Species is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor. Setting the identifier can be accomplished using the - method Species.setId(). - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Species object to an SBMLDocument (e.g., - using Model.addSpecies()), the SBML XML namespace of the document @em - overrides the value used when creating the Species object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Species is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
Species(long level, long version)
- - Creates a new Species using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Species - - @param version a long integer, the SBML Version to assign to this - Species - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Species object to an SBMLDocument (e.g., - using Model.addSpecies()), the SBML Level, SBML Version and XML - namespace of the document @em override the values used when creating - the Species object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Species is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Species(Species orig)
- - Copy constructor; creates a copy of this Species object. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Species::accept " - Accepts the given SBMLVisitor for this instance of Species. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") Species::clone " - Creates and returns a deep copy of this Species object. - - @return a (deep) copy of this Species object. -"; - - -%feature("docstring") Species::initDefaults " - Initializes the fields of this Species object to \'typical\' defaults - values. - - The SBML Species component has slightly different aspects and - default attribute values in different SBML Levels and Versions. - This method sets the values to certain common defaults, based - mostly on what they are in SBML Level 2. Specifically: -
    -
  • Sets \'boundaryCondition\' to @c False -
  • Sets \'constant\' to @c False -
  • sets \'hasOnlySubstanceUnits\' to @c False -
  • (Applies to Level 3 models only) Sets attribute \'substanceUnits\' to @c mole -
-"; - - -%feature("docstring") Species::getId " - Returns the value of the \'id\' attribute of this Species object. - - @return the id of this Species object. -"; - - -%feature("docstring") Species::getName " - Returns the value of the \'name\' attribute of this Species object. - - @return the name of this Species object. -"; - - -%feature("docstring") Species::getSpeciesType " - Get the type of this Species object object. - - @return the value of the \'speciesType\' attribute of this - Species as a string. - - @note The \'speciesType\' attribute is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Species::getCompartment " - Get the compartment in which this species is located. - - The compartment is designated by its identifier. - - @return the value of the \'compartment\' attribute of this Species - object, as a string. -"; - - -%feature("docstring") Species::getInitialAmount " - Get the value of the \'initialAmount\' attribute. - - @return the initialAmount of this Species, as a float-point number. -"; - - -%feature("docstring") Species::getInitialConcentration " - Get the value of the \'initialConcentration\' attribute. - - @return the initialConcentration of this Species,, as a float-point - number. - - @note The attribute \'initialConcentration\' is only available in SBML - Level 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::getSubstanceUnits " - Get the value of the \'substanceUnits\' attribute. - - @return the value of the \'substanceUnits\' attribute of this Species, - as a string. An empty string indicates that no units have been - assigned. - - @note @htmlinclude unassigned-units-are-not-a-default.html - - @see isSetSubstanceUnits() - @see setSubstanceUnits() -"; - - -%feature("docstring") Species::getSpatialSizeUnits " - Get the value of the \'spatialSizeUnits\' attribute. - - @return the value of the \'spatialSizeUnits\' attribute of this Species - object, as a string. - - @warning In versions of SBML Level 2 before Version 3, the - class Species included an attribute called \'spatialSizeUnits\', which - allowed explicitly setting the units of size for initial - concentration. This attribute was removed in SBML Level 2 - Version 3. LibSBML retains this attribute for compatibility with - older definitions of Level 2, but its use is strongly discouraged - because it is incompatible with Level 2 Version 3 and - Level 2 Version 4. -"; - - -%feature("docstring") Species::getUnits " - Get the value of the \'units\' attribute. - - @return the units of this Species (L1 only). - - @note The \'units\' attribute is defined only in SBML Level 1. In - SBML Level 2 and Level 3, it has been replaced by a - combination of \'substanceUnits\' and the units of the Compartment - object in which a species is located. In SBML Level 2 - Versions 1–2, an additional attribute \'spatialSizeUnits\' - helps determine the units of the species quantity, but this attribute - was removed in later versions of SBML Level 2. -"; - - -%feature("docstring") Species::getHasOnlySubstanceUnits " - Get the value of the \'hasOnlySubstanceUnits\' attribute. - - @return @c True if this Species\' \'hasOnlySubstanceUnits\' attribute - value is nonzero, @c False otherwise. - - @note The \'hasOnlySubstanceUnits\' attribute does not exist in SBML - Level 1. -"; - - -%feature("docstring") Species::getBoundaryCondition " - Get the value of the \'boundaryCondition\' attribute. - - @return @c True if this Species\' \'boundaryCondition\' attribute value - is nonzero, @c False otherwise. -"; - - -%feature("docstring") Species::getCharge " - Get the value of the \'charge\' attribute. - - @return the charge of this Species object. - - @note Beginning in SBML Level 2 Version 2, the \'charge\' - attribute on Species is deprecated and in SBML Level 3 it does - not exist at all. Its use strongly discouraged. Its presence is - considered a misfeature in earlier definitions of SBML because its - implications for the mathematics of a model were never defined, and in - any case, no known modeling system ever used it. Instead, models take - account of charge values directly in their definitions of species by - (for example) having separate species identities for the charged and - uncharged versions of the same species. This allows the condition to - affect model mathematics directly. LibSBML retains this method for - easier compatibility with SBML Level 1. -"; - - -%feature("docstring") Species::getConstant " - Get the value of the \'constant\' attribute. - - @return @c True if this Species\'s \'constant\' attribute value is - nonzero, @c False otherwise. - - @note The attribute \'constant\' is only available in SBML Levels 2 - and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::getConversionFactor " - Get the value of the \'conversionFactor\' attribute. - - @return the conversionFactor of this Species, as a string. - - @note The \'conversionFactor\' attribute was introduced in SBML - Level 3. It does not exist on Species in SBML Levels 1 - and 2. -"; - - -%feature("docstring") Species::isSetId " - Predicate returning @c True if this - Species object\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this Species is - set, @c False otherwise. -"; - - -%feature("docstring") Species::isSetName " - Predicate returning @c True if this - Species object\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this Species is - set, @c False otherwise. -"; - - -%feature("docstring") Species::isSetSpeciesType " - Predicate returning @c True if this Species object\'s - \'speciesType\' attribute is set. - - @return @c True if the \'speciesType\' attribute of this Species is - set, @c False otherwise. - - @note The \'speciesType\' attribute is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Species::isSetCompartment " - Predicate returning @c True if this - Species object\'s \'compartment\' attribute is set. - - @return @c True if the \'compartment\' attribute of this Species is - set, @c False otherwise. -"; - - -%feature("docstring") Species::isSetInitialAmount " - Predicate returning @c True if this - Species object\'s \'initialAmount\' attribute is set. - - @return @c True if the \'initialAmount\' attribute of this Species is - set, @c False otherwise. - - @note In SBML Level 1, Species\' \'initialAmount\' is required and - therefore should always be set. (However, in Level 1, the - attribute has no default value either, so this method will not return - @c True until a value has been assigned.) In SBML Level 2, - \'initialAmount\' is optional and as such may or may not be set. -"; - - -%feature("docstring") Species::isSetInitialConcentration " - Predicate returning @c True if this - Species object\'s \'initialConcentration\' attribute is set. - - @return @c True if the \'initialConcentration\' attribute of this Species is - set, @c False otherwise. - - @note The attribute \'initialConcentration\' is only available in SBML - Level 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::isSetSubstanceUnits " - Predicate returning @c True if this - Species object\'s \'substanceUnits\' attribute is set. - - @return @c True if the \'substanceUnits\' attribute of this Species is - set, @c False otherwise. -"; - - -%feature("docstring") Species::isSetSpatialSizeUnits " - Predicate returning @c True if this - Species object\'s \'spatialSizeUnits\' attribute is set. - - @return @c True if the \'spatialSizeUnits\' attribute of this Species is - set, @c False otherwise. - - @warning In versions of SBML Level~2 before Version 3, the class - Species included an attribute called \'spatialSizeUnits\', which allowed - explicitly setting the units of size for initial concentration. This - attribute was removed in SBML Level 2 Version 3. LibSBML - retains this attribute for compatibility with older definitions of - Level 2, but its use is strongly discouraged because it is - incompatible with Level 2 Version 3 and Level 2 Version 4. -"; - - -%feature("docstring") Species::isSetUnits " - Predicate returning @c True if - this Species object\'s \'units\' attribute is set. - - @return @c True if the \'units\' attribute of this Species is - set, @c False otherwise. -"; - - -%feature("docstring") Species::isSetCharge " - Predicate returning @c True if this - Species object\'s \'charge\' attribute is set. - - @return @c True if the \'charge\' attribute of this Species is - set, @c False otherwise. - - @note Beginning in SBML Level 2 Version 2, the \'charge\' - attribute on Species in SBML is deprecated and in SBML Level 3 it - does not exist at all. Its use strongly discouraged. Its presence is - considered a misfeature in earlier definitions of SBML because its - implications for the mathematics of a model were never defined, and in - any case, no known modeling system ever used it. Instead, models take - account of charge values directly in their definitions of species by - (for example) having separate species identities for the charged and - uncharged versions of the same species. This allows the condition to - affect model mathematics directly. LibSBML retains this method for - easier compatibility with SBML Level 1. -"; - - -%feature("docstring") Species::isSetConversionFactor " - Predicate returning @c True if this - Species object\'s \'conversionFactor\' attribute is set. - - @return @c True if the \'conversionFactor\' attribute of this Species is - set, @c False otherwise. - - @note The \'conversionFactor\' attribute was introduced in SBML - Level 3. It does not exist on Species in SBML Levels 1 - and 2. -"; - - -%feature("docstring") Species::isSetBoundaryCondition " - Predicate returning @c True if this - Species object\'s \'boundaryCondition\' attribute is set. - - @return @c True if the \'boundaryCondition\' attribute of this Species is - set, @c False otherwise. -"; - - -%feature("docstring") Species::isSetHasOnlySubstanceUnits " - Predicate returning @c True if this - Species object\'s \'hasOnlySubstanceUnits\' attribute is set. - - @return @c True if the \'hasOnlySubstanceUnits\' attribute of this Species is - set, @c False otherwise. - - @note The \'hasOnlySubstanceUnits\' attribute does not exist in SBML - Level 1. -"; - - -%feature("docstring") Species::isSetConstant " - Predicate returning @c True if this - Species object\'s \'constant\' attribute is set. - - @return @c True if the \'constant\' attribute of this Species is - set, @c False otherwise. - - @note The attribute \'constant\' is only available in SBML Levels 2 - and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::setId " - Sets the value of the \'id\' attribute of this Species object. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this Species - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Species::setName " - Sets the value of the \'name\' attribute of this Species object. - - The string in @p name is copied. - - @param name the new name for the Species - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Species::setSpeciesType " - Sets the \'speciesType\' attribute of this Species object. - - @param sid the identifier of a SpeciesType object defined elsewhere - in this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The \'speciesType\' attribute is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Species::setCompartment " - Sets the \'compartment\' attribute of this Species object. - - @param sid the identifier of a Compartment object defined elsewhere - in this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Species::setInitialAmount " - Sets the \'initialAmount\' attribute of this Species and marks the field - as set. - - This method also unsets the \'initialConcentration\' attribute. - - @param value the value to which the \'initialAmount\' attribute should - be set. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") Species::setInitialConcentration " - Sets the \'initialConcentration\' attribute of this Species and marks - the field as set. - - This method also unsets the \'initialAmount\' attribute. - - @param value the value to which the \'initialConcentration\' attribute - should be set. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attribute \'initialConcentration\' is only available in SBML - Level 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::setSubstanceUnits " - Sets the \'substanceUnits\' attribute of this Species object. - - @param sid the identifier of the unit to use. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Species::setSpatialSizeUnits " - (SBML Level 2 Versions 1–2) Sets the \'spatialSizeUnits\' attribute of this Species object. - - @param sid the identifier of the unit to use. - - @warning In versions of SBML Level~2 before Version 3, the class - Species included an attribute called \'spatialSizeUnits\', which allowed - explicitly setting the units of size for initial concentration. This - attribute was removed in SBML Level 2 Version 3. LibSBML - retains this attribute for compatibility with older definitions of - Level 2, but its use is strongly discouraged because it is - incompatible with Level 2 Version 3 and Level 2 Version 4. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Species::setUnits " - (SBML Level 1 only) Sets the units of this Species object. - - @param sname the identifier of the unit to use. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Species::setHasOnlySubstanceUnits " - Sets the \'hasOnlySubstanceUnits\' attribute of this Species object. - - @param value boolean value for the \'hasOnlySubstanceUnits\' attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The \'hasOnlySubstanceUnits\' attribute does not exist in SBML - Level 1. -"; - - -%feature("docstring") Species::setBoundaryCondition " - Sets the \'boundaryCondition\' attribute of this Species object. - - @param value boolean value for the \'boundaryCondition\' attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") Species::setCharge " - Sets the \'charge\' attribute of this Species object. - - @param value an integer to which to set the \'charge\' to. - - @note Beginning in SBML Level 2 Version 2, the \'charge\' - attribute on Species in SBML is deprecated and its use strongly - discouraged, and it does not exist in SBML Level 3 at all. Its - presence is considered a misfeature in earlier definitions of SBML - because its implications for the mathematics of a model were never - defined, and in any case, no known modeling system ever used it. - Instead, models take account of charge values directly in their - definitions of species by (for example) having separate species - identities for the charged and uncharged versions of the same species. - This allows the condition to affect model mathematics directly. - LibSBML retains this method for easier compatibility with SBML - Level 1. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Species::setConstant " - Sets the \'constant\' attribute of this Species object. - - @param value a boolean value for the \'constant\' attribute - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attribute \'constant\' is only available in SBML Levels 2 - and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::setConversionFactor " - Sets the value of the \'conversionFactor\' attribute of this Species object. - - The string in @p sid is copied. - - @param sid the new conversionFactor for the Species - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'conversionFactor\' attribute was introduced in SBML - Level 3. It does not exist on Species in SBML Levels 1 - and 2. -"; - - -%feature("docstring") Species::unsetName " - Unsets the value of the \'name\' attribute of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Species::unsetSpeciesType " - Unsets the \'speciesType\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The attribute \'speciesType\' is only available in SBML - Level 2 Versions 2–4. -"; - - -%feature("docstring") Species::unsetInitialAmount " - Unsets the \'initialAmount\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Species::unsetInitialConcentration " - Unsets the \'initialConcentration\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The attribute \'initialConcentration\' is only available in SBML - Level 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::unsetSubstanceUnits " - Unsets the \'substanceUnits\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Species::unsetSpatialSizeUnits " - Unsets the \'spatialSizeUnits\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @warning In versions of SBML Level~2 before Version 3, the class - Species included an attribute called \'spatialSizeUnits\', which allowed - explicitly setting the units of size for initial concentration. This - attribute was removed in SBML Level 2 Version 3. LibSBML - retains this attribute for compatibility with older definitions of - Level 2, but its use is strongly discouraged because it is - incompatible with Level 2 Version 3 and Level 2 Version 4. -"; - - -%feature("docstring") Species::unsetUnits " - Unsets the \'units\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Species::unsetCharge " - Unsets the \'charge\' attribute - value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note Beginning in SBML Level 2 Version 2, the \'charge\' - attribute on Species in SBML is deprecated and its use strongly - discouraged, and it does not exist in SBML Level 3 at all. Its - presence is considered a misfeature in earlier definitions of SBML - because its implications for the mathematics of a model were never - defined, and in any case, no known modeling system ever used it. - Instead, models take account of charge values directly in their - definitions of species by (for example) having separate species - identities for the charged and uncharged versions of the same species. - This allows the condition to affect model mathematics directly. - LibSBML retains this method for easier compatibility with SBML - Level 1. -"; - - -%feature("docstring") Species::unsetConversionFactor " - Unsets the \'conversionFactor\' attribute value of this Species object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'conversionFactor\' attribute was introduced in SBML - Level 3. It does not exist on Species in SBML Levels 1 - and 2. -"; - - -%feature("docstring") Species::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this Species\' amount or concentration. - - Species in SBML have an attribute (\'substanceUnits\') for declaring the - units of measurement intended for the species\' amount or concentration - (depending on which one applies). In the absence of a value given for - \'substanceUnits\', the units are taken from the enclosing Model\'s - definition of @c \'substance\' or @c \'substance\'/(size of the - compartment) in which the species is located, or finally, if - these are not redefined by the Model, the relevant SBML default units - for those quantities. Following that procedure, the method - @if java Species.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - returns a UnitDefinition based on the - interpreted units of this species\'s amount or concentration. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - Note also that unit declarations for Species are in terms of the @em - identifier of a unit, but this method returns a UnitDefinition object, - not a unit identifier. It does this by constructing an appropriate - UnitDefinition. Callers may find this particularly useful when used - in conjunction with the helper methods on UnitDefinition for comparing - different UnitDefinition objects. - - In SBML Level 2 specifications prior to Version 3, Species - includes an additional attribute named \'spatialSizeUnits\', which - allows explicitly setting the units of size for initial concentration. - The @if java Species.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - takes this into account for models - expressed in SBML Level 2 Versions 1 and 2. - - @return a UnitDefinition that expresses the units of this - Species, or @c None if one cannot be constructed. - - @see getSubstanceUnits() -"; - - -%feature("docstring") Species::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Species::getElementName " - Returns the XML element name of this object, which for Species, is - always @c \'species\'. - - @return the name of this element, i.e., @c \'species\'. -"; - - -%feature("docstring") Species::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Species::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this Species object - have been set. - - @note The required attributes for a Species object are: - @li \'id\' (or \'name\' in SBML Level 1) - @li \'compartment\' - @li \'initialAmount\' (required in SBML Level 1 only; optional otherwise) - @li \'hasOnlySubstanceUnits\' (required in SBML Level 3; optional in SBML Level 2) - @li \'boundaryCondition\' (required in SBML Level 3; optional in Levels 1 and 2) - @li \'constant\' (required in SBML Level 3; optional in SBML Level 2) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Species::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Species::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Species::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Species::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Species::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Species::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Species::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Species::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Species::isExplicitlySetBoundaryCondition " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Species::isExplicitlySetConstant " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Species::isExplicitlySetHasOnlySubsUnits " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfSpecies::ListOfSpecies " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfSpecies(SBMLNamespaces sbmlns)
- - Creates a new ListOfSpecies object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfSpecies object to be created. - - -
- Method variant with the following signature: -
ListOfSpecies(long level, long version)
- - Creates a new ListOfSpecies object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfSpecies::clone " - Creates and returns a deep copy of this ListOfSpeciess instance. - - @return a (deep) copy of this ListOfSpeciess. -"; - - -%feature("docstring") ListOfSpecies::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfSpecies::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Species objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfSpecies::getElementName " - Returns the XML element name of this object. - - For ListOfSpeciess, the XML element name is @c \'listOfSpeciess\'. - - @return the name of this element, i.e., @c \'listOfSpeciess\'. -"; - - -%feature("docstring") ListOfSpecies::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a Species from the ListOfSpecies. - - @param n the index number of the Species to get. - - @return the nth Species in this ListOfSpecies. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a Species from the ListOfSpecies - based on its identifier. - - @param sid a string representing the identifier - of the Species to get. - - @return Species in this ListOfSpecies - with the given @p sid or @c None if no such - Species exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfSpecies::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfSpeciess items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfSpeciess items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfSpecies::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the ListOfSpeciess in - a model is (in SBML Level 2 Version 4) the sixth - ListOf___. (However, it differs for different Levels and Versions of - SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfSpecies::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Parameter " - @ingroup Core - Implementation of SBML\'s %Parameter construct. - - A Parameter is used in SBML to define a symbol associated with a value; - this symbol can then be used in mathematical formulas in a model. By - default, parameters have constant value for the duration of a - simulation, and for this reason are called @em parameters instead of @em - variables in SBML, although it is crucial to understand that SBML - parameters represent both concepts. Whether a given SBML - parameter is intended to be constant or variable is indicated by the - value of its \'constant\' attribute. - - SBML\'s Parameter has a required attribute, \'id\', that gives the - parameter a unique identifier by which other parts of an SBML model - definition can refer to it. A parameter can also have an optional - \'name\' attribute of type @c string. Identifiers and names must be used - according to the guidelines described in the SBML specifications. - - The optional attribute \'value\' determines the value (of type @c double) - assigned to the parameter. A missing value for \'value\' implies that - the value either is unknown, or to be obtained from an external source, - or determined by an initial assignment. The unit of measurement - associated with the value of the parameter can be specified using the - optional attribute \'units\'. Here we only mention briefly some notable - points about the possible unit choices, but readers are urged to consult - the SBML specification documents for more information: -
    - -
  • In SBML Level 3, there are no constraints on the units that - can be assigned to parameters in a model; there are also no units to - inherit from the enclosing Model object (unlike the case for, e.g., - Species and Compartment). - -
  • In SBML Level 2, the value assigned to the parameter\'s \'units\' - attribute must be chosen from one of the following possibilities: one of - the base unit identifiers defined in SBML; one of the built-in unit - identifiers @c \'substance\', @c \'time\', @c \'volume\', @c \'area\' or @c - \'length\'; or the identifier of a new unit defined in the list of unit - definitions in the enclosing Model structure. There are no constraints - on the units that can be chosen from these sets. There are no default - units for parameters. -
- - The Parameter structure has another boolean attribute named \'constant\' - that is used to indicate whether the parameter\'s value can vary during a - simulation. (In SBML Level 3, the attribute is mandatory and must - be given a value; in SBML Levels below Level 3, the attribute is - optional.) A value of @c True indicates the parameter\'s value cannot be - changed by any construct except InitialAssignment. Conversely, if the - value of \'constant\' is @c False, other constructs in SBML, such as rules - and events, can change the value of the parameter. - - SBML Level 3 uses a separate object class, LocalParameter, for - parameters that are local to a Reaction\'s KineticLaw. In Levels prior - to SBML Level 3, the Parameter class is used both for definitions - of global parameters, as well as reaction-local parameters stored in a - list within KineticLaw objects. Parameter objects that are local to a - reaction (that is, those defined within the KineticLaw structure of a - Reaction) cannot be changed by rules and therefore are implicitly - always constant; consequently, in SBML Level 2, parameter - definitions within Reaction structures should @em not have their - \'constant\' attribute set to @c False. - - What if a global parameter has its \'constant\' attribute set to @c False, - but the model does not contain any rules, events or other constructs - that ever change its value over time? Although the model may be - suspect, this situation is not strictly an error. A value of @c False - for \'constant\' only indicates that a parameter @em can change value, not - that it @em must. - - As with all other major SBML components, Parameter is derived from - SBase, and the methods defined on SBase are available on Parameter. - - @note The use of the term @em parameter in SBML sometimes leads to - confusion among readers who have a particular notion of what something - called \'parameter\' should be. It has been the source of heated debate, - but despite this, no one has yet found an adequate replacement term that - does not have different connotations to different people and hence leads - to confusion among @em some subset of users. Perhaps it would have been - better to have two constructs, one called @em constants and the other - called @em variables. The current approach in SBML is simply more - parsimonious, using a single Parameter construct with the boolean flag - \'constant\' indicating which flavor it is. In any case, readers are - implored to look past their particular definition of a @em parameter and - simply view SBML\'s Parameter as a single mechanism for defining both - constants and (additional) variables in a model. (We write @em - additional because the species in a model are usually considered to be - the central variables.) After all, software tools are not required to - expose to users the actual names of particular SBML constructs, and - thus tools can present to their users whatever terms their designers - feel best matches their target audience. - - @see ListOfParameters - - -"; - - -%feature("docstring") ListOfParameters " - @ingroup Core - Implementation of SBML\'s %ListOfParameters construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Parameter::Parameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Parameter(SBMLNamespaces sbmlns)
- - Creates a new Parameter using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the \'id\' - (identifier) attribute of a Parameter is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor if no identifier is provided as an argument. Setting the - identifier can be accomplished using the method - @if java setId(String id)@else setId()@endif. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Parameter object to an SBMLDocument - (e.g., using Model.addParameter()), the SBML XML namespace of the - document @em overrides the value used when creating the Parameter - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a Parameter is an - important aid to producing valid SBML. Knowledge of the intented SBML - Level and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - -
- Method variant with the following signature: -
Parameter(long level, long version)
- - Creates a new Parameter using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Parameter - - @param version a long integer, the SBML Version to assign to this - Parameter - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Parameter object to an SBMLDocument - (e.g., using Model.addParameter()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the Parameter object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a Parameter is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Parameter(Parameter orig)
- - Copy constructor; creates a copy of a Parameter. - - @param orig the Parameter instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Parameter::accept " - Accepts the given SBMLVisitor for this instance of Parameter. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), indicating - whether the Visitor would like to visit the next Parameter object in - the list of parameters within which @em the present object is - embedded. -"; - - -%feature("docstring") Parameter::clone " - Creates and returns a deep copy of this Parameter. - - @return a (deep) copy of this Parameter. -"; - - -%feature("docstring") Parameter::initDefaults " - Initializes the fields of this Parameter object to \'typical\' defaults - values. - - The SBML Parameter component has slightly different aspects and - default attribute values in different SBML Levels and Versions. Many - SBML object classes defined by libSBML have an initDefaults() method - to set the values to certain common defaults, based mostly on what - they are in SBML Level 2. In the case of Parameter, this method - only sets the value of the \'constant\' attribute to @c True. - - @see getConstant() - @see isSetConstant() - @see setConstant() -"; - - -%feature("docstring") Parameter::getId " - Returns the value of the \'id\' attribute of this Parameter. - - @return the id of this Parameter. -"; - - -%feature("docstring") Parameter::getName " - Returns the value of the \'name\' attribute of this Parameter. - - @return the name of this Parameter. -"; - - -%feature("docstring") Parameter::getValue " - Gets the numerical value of this Parameter. - - @return the value of the \'value\' attribute of this Parameter, as a - number of type @c double. - - @note It is crucial that callers not blindly call - Parameter.getValue() without first using Parameter.isSetValue() to - determine whether a value has ever been set. Otherwise, the value - return by Parameter.getValue() may not actually represent a value - assigned to the parameter. The reason is simply that the data type - @c double in a program always has @em some value. A separate test is - needed to determine whether the value is a true model value, or - uninitialized data in a computer\'s memory location. - - @see isSetValue() - @see setValue() - @see getUnits() -"; - - -%feature("docstring") Parameter::getUnits " - Gets the units defined for this Parameter. - - The value of an SBML parameter\'s \'units\' attribute establishes the - unit of measurement associated with the parameter\'s value. - - @return the value of the \'units\' attribute of this Parameter, as a - string. An empty string indicates that no units have been assigned. - - @note @htmlinclude unassigned-units-are-not-a-default.html - - @see isSetUnits() - @see setUnits() - @see getValue() -"; - - -%feature("docstring") Parameter::getConstant " - Gets the value of the \'constant\' attribute of this Parameter instance. - - @return @c True if this Parameter is declared as being constant, - @c False otherwise. - - @note Readers who view the documentation for LocalParameter may be - confused about the presence of this method. LibSBML derives - LocalParameter from Parameter; however, this does not precisely match - the object hierarchy defined by SBML Level 3, where - LocalParameter is derived directly from SBase and not Parameter. We - believe this arrangement makes it easier for libSBML users to program - applications that work with both SBML Level 2 and SBML - Level 3, but programmers should also keep in mind this difference - exists. A side-effect of libSBML\'s scheme is that certain methods on - LocalParameter that are inherited from Parameter do not actually have - relevance to LocalParameter objects. An example of this is the - methods pertaining to Parameter\'s attribute \'constant\' (i.e., - isSetConstant(), setConstant(), and getConstant()). - - @see isSetConstant() - @see setConstant() -"; - - -%feature("docstring") Parameter::isSetId " - Predicate returning @c True if this - Parameter\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this Parameter is - set, @c False otherwise. -"; - - -%feature("docstring") Parameter::isSetName " - Predicate returning @c True if this - Parameter\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this Parameter is - set, @c False otherwise. -"; - - -%feature("docstring") Parameter::isSetValue " - Predicate returning @c True if the - \'value\' attribute of this Parameter is set. - - In SBML definitions after SBML Level 1 Version 1, - parameter values are optional and have no defaults. If a model read - from a file does not contain a setting for the \'value\' attribute of a - parameter, its value is considered unset; it does not default to any - particular value. Similarly, when a Parameter object is created in - libSBML, it has no value until given a value. The - Parameter.isSetValue() method allows calling applications to - determine whether a given parameter\'s value has ever been set. - - In SBML Level 1 Version 1, parameters are required to have - values and therefore, the value of a Parameter should always be - set. In Level 1 Version 2 and beyond, the value is - optional and as such, the \'value\' attribute may or may not be set. - - @return @c True if the value of this Parameter is set, - @c False otherwise. - - @see getValue() - @see setValue() -"; - - -%feature("docstring") Parameter::isSetUnits " - Predicate returning @c True if the - \'units\' attribute of this Parameter is set. - - @return @c True if the \'units\' attribute of this Parameter is - set, @c False otherwise. - - @note @htmlinclude unassigned-units-are-not-a-default.html -"; - - -%feature("docstring") Parameter::isSetConstant " - Predicate returning @c True if the - \'constant\' attribute of this Parameter is set. - - @return @c True if the \'constant\' attribute of this Parameter is - set, @c False otherwise. - - @note Readers who view the documentation for LocalParameter may be - confused about the presence of this method. LibSBML derives - LocalParameter from Parameter; however, this does not precisely match - the object hierarchy defined by SBML Level 3, where - LocalParameter is derived directly from SBase and not Parameter. We - believe this arrangement makes it easier for libSBML users to program - applications that work with both SBML Level 2 and SBML - Level 3, but programmers should also keep in mind this difference - exists. A side-effect of libSBML\'s scheme is that certain methods on - LocalParameter that are inherited from Parameter do not actually have - relevance to LocalParameter objects. An example of this is the - methods pertaining to Parameter\'s attribute \'constant\' (i.e., - isSetConstant(), setConstant(), and getConstant()). - - @see getConstant() - @see setConstant() -"; - - -%feature("docstring") Parameter::setId " - Sets the value of the \'id\' attribute of this Parameter. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this Parameter - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Parameter::setName " - Sets the value of the \'name\' attribute of this Parameter. - - The string in @p name is copied. - - @param name the new name for the Parameter - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Parameter::setValue " - Sets the \'value\' attribute of this Parameter to the given @c double - value and marks the attribute as set. - - @param value a @c double, the value to assign - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") Parameter::setUnits " - Sets the \'units\' attribute of this Parameter to a copy of the given - units identifier @p units. - - @param units a string, the identifier of the units to assign to this - Parameter instance - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Parameter::setConstant " - Sets the \'constant\' attribute of this Parameter to the given boolean - @p flag. - - @param flag a boolean, the value for the \'constant\' attribute of this - Parameter instance - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note Readers who view the documentation for LocalParameter may be - confused about the presence of this method. LibSBML derives - LocalParameter from Parameter; however, this does not precisely match - the object hierarchy defined by SBML Level 3, where - LocalParameter is derived directly from SBase and not Parameter. We - believe this arrangement makes it easier for libSBML users to program - applications that work with both SBML Level 2 and SBML - Level 3, but programmers should also keep in mind this difference - exists. A side-effect of libSBML\'s scheme is that certain methods on - LocalParameter that are inherited from Parameter do not actually have - relevance to LocalParameter objects. An example of this is the - methods pertaining to Parameter\'s attribute \'constant\' (i.e., - isSetConstant(), setConstant(), and getConstant()). - - @see getConstant() - @see isSetConstant() -"; - - -%feature("docstring") Parameter::unsetName " - Unsets the value of the \'name\' attribute of this Parameter. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Parameter::unsetValue " - Unsets the \'value\' attribute of this Parameter instance. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - In SBML Level 1 Version 1, parameters are required to have - values and therefore, the value of a Parameter should always be - set. In SBML Level 1 Version 2 and beyond, the value - is optional and as such, the \'value\' attribute may or may not be set. -"; - - -%feature("docstring") Parameter::unsetUnits " - Unsets the \'units\' attribute of this Parameter instance. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Parameter::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this Parameter\'s value. - - Parameters in SBML have an attribute (\'units\') for declaring the units - of measurement intended for the parameter\'s value. No defaults are - defined by SBML in the absence of a definition for \'units\'. This - method returns a UnitDefinition object based on the units declared for - this Parameter using its \'units\' attribute, or it returns @c None if - no units have been declared. - - Note that unit declarations for Parameter objects are specified in - terms of the @em identifier of a unit (e.g., using setUnits()), but - @em this method returns a UnitDefinition object, not a unit - identifier. It does this by constructing an appropriate - UnitDefinition.For SBML Level 2 models, it will do this even when - the value of the \'units\' attribute is one of the special SBML - Level 2 unit identifiers @c \'substance\', @c \'volume\', @c \'area\', - @c \'length\' or @c \'time\'. Callers may find this useful in conjunction - with the helper methods provided by the UnitDefinition class for - comparing different UnitDefinition objects. - - @return a UnitDefinition that expresses the units of this - Parameter, or @c None if one cannot be constructed. - - @note The libSBML system for unit analysis depends on the model as a - whole. In cases where the Parameter object has not yet been added to - a model, or the model itself is incomplete, unit analysis is not - possible, and consequently this method will return @c None. - - @see isSetUnits() -"; - - -%feature("docstring") Parameter::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or - @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Parameter::getElementName " - Returns the XML element name of this object, which for Parameter, is - always @c \'parameter\'. - - @return the name of this element, i.e., @c \'parameter\'. -"; - - -%feature("docstring") Parameter::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Parameter::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this Parameter object - have been set. - - @note The required attributes for a Parameter object are: - @li \'id\' (or \'name\' in SBML Level 1) - @li \'value\' (required in Level 1, optional otherwise) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Parameter::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Parameter::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Parameter::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Parameter::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Parameter::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Parameter::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Parameter::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Parameter::isExplicitlySetConstant " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfParameters::ListOfParameters " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfParameters(SBMLNamespaces sbmlns)
- - Creates a new ListOfParameters object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfParameters object to be created. - - -
- Method variant with the following signature: -
ListOfParameters(long level, long version)
- - Creates a new ListOfParameters object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfParameters::clone " - Creates and returns a deep copy of this ListOfParameters instance. - - @return a (deep) copy of this ListOfParameters. -"; - - -%feature("docstring") ListOfParameters::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfParameters::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Parameter objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink - (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfParameters::getElementName " - Returns the XML element name of this object. - - For ListOfParameters, the XML element name is @c \'listOfParameters\'. - - @return the name of this element, i.e., @c \'listOfParameters\'. -"; - - -%feature("docstring") ListOfParameters::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Returns the Parameter object located at position @p n within this - ListOfParameters instance. - - @param n the index number of the Parameter to get. - - @return the nth Parameter in this ListOfParameters. If the index @p n - is out of bounds for the length of the list, then @c None is returned. - - @see size() - @see get() - - -
- Method variant with the following signature: -
get(string sid)
- - Returns the first Parameter object matching the given identifier. - - @param sid a string representing the identifier of the Parameter to - get. - - @return the Parameter object found. The caller owns the returned - object and is responsible for deleting it. If none of the items have - an identifier matching @p sid, then @c None is returned. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfParameters::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfParameters, and returns a pointer - to it. - - @param n the index of the item to remove - - @return the item removed. The caller owns the returned object and is - responsible for deleting it. If the index number @p n is out of - bounds for the length of the list, then @c None is returned. - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes the first Parameter object in this ListOfParameters - matching the given identifier, and returns a pointer to it. - - @param sid the identifier of the item to remove. - - @return the item removed. The caller owns the returned object and is - responsible for deleting it. If none of the items have an identifier - matching @p sid, then @c None is returned. -"; - - -%feature("docstring") ListOfParameters::getElementPosition " - @internal - Gets the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the ListOfParameters - in a model is (in SBML Level 2 Version 4) the seventh - ListOf___. (However, it differs for different Levels and Versions of - SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfParameters::createObject " - @internal - Create a ListOfParameters object corresponding to the next token in - the XML input stream. - - @return the SBML object corresponding to next XMLToken in the - XMLInputStream, or @c None if the token was not recognized. -"; - - -%feature("docstring") LocalParameter " - @ingroup Core - Implementation of SBML Level 3\'s %LocalParameter construct. - - LocalParameter has been introduced in SBML Level 3 to serve as the - object class for parameter definitions that are intended to be local to - a Reaction. Objects of class LocalParameter never appear at the Model - level; they are always contained within ListOfLocalParameters lists - which are in turn contained within KineticLaw objects. - - Like its global Parameter counterpart, the LocalParameter object class - is used to define a symbol associated with a value; this symbol can then - be used in a model\'s mathematical formulas (and specifically, for - LocalParameter, reaction rate formulas). Unlike Parameter, the - LocalParameter class does not have a \'constant\' attribute: local - parameters within reactions are @em always constant. - - LocalParameter has one required attribute, \'id\', to give the - parameter a unique identifier by which other parts of an SBML model - definition can refer to it. A parameter can also have an optional - \'name\' attribute of type @c string. Identifiers and names must be used - according to the guidelines described in the SBML specifications. - - The optional attribute \'value\' determines the value (of type @c double) - assigned to the parameter. A missing value for \'value\' implies that - the value either is unknown, or to be obtained from an external source, - or determined by an initial assignment. The unit of measurement - associated with the value of the parameter can be specified using the - optional attribute \'units\'. Here we only mention briefly some notable - points about the possible unit choices, but readers are urged to consult - the SBML specification documents for more information: -
    - -
  • In SBML Level 3, there are no constraints on the units that - can be assigned to parameters in a model; there are also no units to - inherit from the enclosing Model object. - -
  • In SBML Level 2, the value assigned to the parameter\'s \'units\' - attribute must be chosen from one of the following possibilities: one of - the base unit identifiers defined in SBML; one of the built-in unit - identifiers @c \'substance\', @c \'time\', @c \'volume\', @c \'area\' or @c - \'length\'; or the identifier of a new unit defined in the list of unit - definitions in the enclosing Model structure. There are no constraints - on the units that can be chosen from these sets. There are no default - units for local parameters. -
- - As with all other major SBML components, LocalParameter is derived from - SBase, and the methods defined on SBase are available on LocalParameter. - - @warning LibSBML derives LocalParameter from Parameter; however, this - does not precisely match the object hierarchy defined by SBML - Level 3, where LocalParameter is derived directly from SBase and not - Parameter. We believe this arrangement makes it easier for libSBML - users to program applications that work with both SBML Level 2 and - SBML Level 3, but programmers should also keep in mind this - difference exists. A side-effect of libSBML\'s scheme is that certain - methods on LocalParameter that are inherited from Parameter do not - actually have relevance to LocalParameter objects. An example of this - is the methods pertaining to Parameter\'s attribute \'constant\' - (i.e., isSetConstant(), setConstant(), and getConstant()). - - @see ListOfLocalParameters - @see KineticLaw - - -"; - - -%feature("docstring") ListOfLocalParameters " - @ingroup Core - Implementation of SBML Level 3\'s %ListOfLocalParameters construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - ListOfLocalParameters is a subsidiary object class used only within - KineticLaw in SBML Level 3. It is not defined in SBML Levels - 1–2. In Level 3, a KineticLaw object can have a single - object of class ListOfLocalParameters containing a set of local - parameters used in that kinetic law definition. - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") LocalParameter::LocalParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
LocalParameter(SBMLNamespaces sbmlns)
- - Creates a new LocalParameter object with the given SBMLNamespaces - object @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the \'id\' - (identifier) attribute of a LocalParameter is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor if no identifier is provided as an argument. Setting the - identifier can be accomplished using the method - @if java setId(String id)@else setId()@endif. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a LocalParameter object to an SBMLDocument - (e.g., using KineticLaw.addLocalParameter()), the SBML XML namespace of - the document @em overrides the value used when creating the - LocalParameter object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a - LocalParameter is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
LocalParameter(long level, long version)
- - Creates a new LocalParameter object with the given SBML @p level and - @p version values. - - @param level a long integer, the SBML Level to assign to this - LocalParameter. - - @param version a long integer, the SBML Version to assign to this - LocalParameter. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a LocalParameter object to an SBMLDocument - (e.g., using KineticLaw.addLocalParameter()), the SBML Level, SBML - Version and XML namespace of the document @em override the - values used when creating the LocalParameter object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a LocalParameter is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
LocalParameter(LocalParameter orig)
- - Copy constructor; creates a copy of a given LocalParameter object. - - @param orig the LocalParameter instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - -
- Method variant with the following signature: -
LocalParameter(Parameter orig)
- - Copy constructor; creates a LocalParameter object by copying - the attributes of a given Parameter object. - - @param orig the Parameter instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") LocalParameter::accept " - Accepts the given SBMLVisitor for this instance of LocalParameter. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next LocalParameter in the list - of parameters within which this LocalParameter is embedded (i.e., either - the list of parameters in the parent Model or the list of parameters - in the enclosing KineticLaw). -"; - - -%feature("docstring") LocalParameter::clone " - Creates and returns a deep copy of this LocalParameter. - - @return a (deep) copy of this LocalParameter. -"; - - -%feature("docstring") LocalParameter::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this LocalParameter\'s value. - - LocalParameters in SBML have an attribute (\'units\') for declaring the - units of measurement intended for the parameter\'s value. No - defaults are defined by SBML in the absence of a definition for - \'units\'. This method returns a UnitDefinition object based on the - units declared for this LocalParameter using its \'units\' attribute, or - it returns @c None if no units have been declared. - - Note that unit declarations for LocalParameter objects are specified - in terms of the @em identifier of a unit (e.g., using setUnits()), but - @em this method returns a UnitDefinition object, not a unit - identifier. It does this by constructing an appropriate - UnitDefinition. For SBML Level 2 models, it will do this even - when the value of the \'units\' attribute is one of the predefined SBML - units @c \'substance\', @c \'volume\', @c \'area\', @c \'length\' or @c - \'time\'. Callers may find this useful in conjunction with the helper - methods provided by the UnitDefinition class for comparing different - UnitDefinition objects. - - @return a UnitDefinition that expresses the units of this - LocalParameter, or @c None if one cannot be constructed. - - @note The libSBML system for unit analysis depends on the model as a - whole. In cases where the LocalParameter object has not yet been - added to a model, or the model itself is incomplete, unit analysis is - not possible, and consequently this method will return @c None. - - @see isSetUnits() -"; - - -%feature("docstring") LocalParameter::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") LocalParameter::getElementName " - Returns the XML element name of this object, which for LocalParameter, - is always @c \'localParameter\'. - - @return the name of this element, i.e., @c \'localParameter\'. -"; - - -%feature("docstring") LocalParameter::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this LocalParameter object - have been set. - - @note The required attributes for a LocalParameter object are: - @li \'id\' - @li \'value\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") LocalParameter::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") LocalParameter::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") LocalParameter::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") LocalParameter::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfLocalParameters::ListOfLocalParameters " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfLocalParameters(SBMLNamespaces sbmlns)
- - Creates a new ListOfLocalParameters object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfLocalParameters object to be created. - - -
- Method variant with the following signature: -
ListOfLocalParameters(long level, long version)
- - Creates a new ListOfLocalParameters object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfLocalParameters::clone " - Creates and returns a deep copy of this ListOfLocalParameters object. - - @return a (deep) copy of this ListOfLocalParameters. -"; - - -%feature("docstring") ListOfLocalParameters::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfLocalParameters::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., LocalParameter objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink - (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfLocalParameters::getElementName " - Returns the XML element name of this object. - - For ListOfLocalParameters, the XML element name is @c \'listOfLocalParameters\'. - - @return the name of this element, i.e., @c \'listOfLocalParameters\'. -"; - - -%feature("docstring") ListOfLocalParameters::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Returns the LocalParameter object located at position @p n within this - ListOfLocalParameters instance. - - @param n the index number of the LocalParameter to get. - - @return the item at position @p n. The caller owns the returned - object and is responsible for deleting it. If the index number @p n - is out of bounds for the length of the list, then @c None is returned. - - @see size() - @see get() - - -
- Method variant with the following signature: -
get(string sid)
- - Returns the first LocalParameter object matching the given identifier. - - @param sid a string representing the identifier of the LocalParameter - to get. - - @return the LocalParameter object found. The caller owns the returned - object and is responsible for deleting it. If none of the items have - an identifier matching @p sid, then @c None is returned. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfLocalParameters::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that LocalParameters, while they use the SId namespace, are not in the model-wide SId namespace, so no LocalParameter object will be returned from this function (and is the reason we override the base ListOf::getElementBySId function here). - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") ListOfLocalParameters::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfLocalParameters, and returns a - pointer to it. - - @param n the index of the item to remove. - - @return the item removed. The caller owns the returned object and is - responsible for deleting it. If the index number @p n is out of - bounds for the length of the list, then @c None is returned. - - @see size() - @see remove() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes the first LocalParameter object in this ListOfLocalParameters - matching the given identifier, and returns a pointer to it. - - @param sid the identifier of the item to remove. - - @return the item removed. The caller owns the returned object and is - responsible for deleting it. If none of the items have an identifier - matching @p sid, then @c None is returned. -"; - - -%feature("docstring") ListOfLocalParameters::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the ListOfLocalParameters - in a model is (in SBML Level 2 Version 4) the seventh - ListOf___. (However, it differs for different Levels and Versions of - SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfLocalParameters::createObject " - @internal - Create a ListOfLocalParameters object corresponding to the next token in - the XML input stream. - - @return the SBML object corresponding to next XMLToken in the - XMLInputStream, or @c None if the token was not recognized. -"; - - -%feature("docstring") InitialAssignment " - @ingroup Core - Implementation of %SBML\'s %InitialAssignment construct. - - SBML Level 2 Versions 2–4 and SBML Level 3 provide two ways of assigning initial - values to entities in a model. The simplest and most basic is to set - the values of the appropriate attributes in the relevant components; for - example, the initial value of a model parameter (whether it is a - constant or a variable) can be assigned by setting its \'value\' attribute - directly in the model definition. However, this approach is not - suitable when the value must be calculated, because the initial value - attributes on different components such as species, compartments, and - parameters are single values and not mathematical expressions. In those - situations, the InitialAssignment construct can be used; it permits the - calculation of the value of a constant or the initial value of a - variable from the values of @em other quantities in a model. - - As explained below, the provision of InitialAssignment does not mean - that models necessarily must use this construct when defining initial - values of quantities in a model. If a value can be set directly using - the relevant attribute of a component in a model, then that - approach may be more efficient and more portable to other software - tools. InitialAssignment should be used when the other mechanism is - insufficient for the needs of a particular model. - - The InitialAssignment construct has some similarities to AssignmentRule. - The main differences are: (a) an InitialAssignment can set the value of - a constant whereas an AssignmentRule cannot, and (b) unlike - AssignmentRule, an InitialAssignment definition only applies up to and - including the beginning of simulation time, i.e., t <= 0, - while an AssignmentRule applies at all times. - - InitialAssignment has a required attribute, \'symbol\', whose value must - follow the guidelines for identifiers described in the %SBML - specification (e.g., Section 3.3 in the Level 2 Version 4 - specification). The value of this attribute in an InitialAssignment - object can be the identifier of a Compartment, Species or global - Parameter elsewhere in the model. The InitialAssignment defines the - initial value of the constant or variable referred to by the \'symbol\' - attribute. (The attribute\'s name is \'symbol\' rather than \'variable\' - because it may assign values to constants as well as variables in a - model.) Note that an initial assignment cannot be made to reaction - identifiers, that is, the \'symbol\' attribute value of an - InitialAssignment cannot be an identifier that is the \'id\' attribute - value of a Reaction object in the model. This is identical to a - restriction placed on rules. - - InitialAssignment also has a required \'math\' subelement that contains a - MathML expression used to calculate the value of the constant or the - initial value of the variable. The units of the value computed by the - formula in the \'math\' subelement should (in SBML Level 2 - Version 4 and in SBML Level 3) or must (in previous Versions) be identical to be the - units associated with the identifier given in the \'symbol\' attribute. - (That is, the units are the units of the species, compartment, or - parameter, as appropriate for the kind of object identified by the value - of \'symbol\'.) - - InitialAssignment was introduced in SBML Level 2 Version 2. It is not - available in SBML Level 2 Version 1 nor in any version of Level 1. - - @section initassign-semantics Semantics of Initial Assignments - - The value calculated by an InitialAssignment object overrides the value - assigned to the given symbol by the object defining that symbol. For - example, if a compartment\'s \'size\' attribute is set in its definition, - and the model also contains an InitialAssignment having that - compartment\'s identifier as its \'symbol\' attribute value, then the - interpretation is that the \'size\' assigned in the Compartment object - should be ignored and the value assigned based on the computation - defined in the InitialAssignment. Initial assignments can take place - for Compartment, Species and global Parameter objects regardless of the - value of their \'constant\' attribute. - - The actions of all InitialAssignment objects are in general terms - the same, but differ in the precise details depending on the type - of variable being set: -
    -
  • In the case of a species, an InitialAssignment sets the - referenced species\' initial quantity (concentration or amount of - substance) to the value determined by the formula in the \'math\' - subelement. The overall units of the formula should (in SBML - Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) be the same - as the units specified for the species. - -
  • In the case of a compartment, an InitialAssignment sets - the referenced compartment\'s initial size to the size determined by the - formula in \'math\'. The overall units of the formula should (in SBML - Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) be the same - as the units specified for the size of the compartment. - -
  • In the case of a parameter, an InitialAssignment sets the - referenced parameter\'s initial value to that determined by the formula - in \'math\'. The overall units of the formula should (in SBML - Level 2 Version 4 and SBML Level 3) or must (in previous Versions) be the same - as the units defined for the parameter.
- - In the context of a simulation, initial assignments establish values - that are in effect prior to and including the start of simulation time, - i.e., t <= 0. Section 3.4.8 in the SBML Level 2 - Version 4 and SBML Level 3 Version 1 Core specifications provides information about the interpretation of - assignments, rules, and entity values for simulation time up to and - including the start time t = 0; this is important for - establishing the initial conditions of a simulation if the model - involves expressions containing the delay \'csymbol\'. - - There cannot be two initial assignments for the same symbol in a model; - that is, a model must not contain two or more InitialAssignment objects - that both have the same identifier as their \'symbol\' attribute value. A - model must also not define initial assignments and assignment - rules for the same entity. That is, there cannot be both an - InitialAssignment and an AssignmentRule for the same symbol in a model, - because both kinds of constructs apply prior to and at the start of - simulated time—allowing both to exist for a given symbol would - result in indeterminism). - - The ordering of InitialAssignment objects is not significant. The - combined set of InitialAssignment, AssignmentRule and KineticLaw - objects form a set of assignment statements that must be considered as a - whole. The combined set of assignment statements should not contain - algebraic loops: a chain of dependency between these statements should - terminate. (More formally, consider the directed graph of assignment - statements where nodes are a model\'s assignment statements and directed - arcs exist for each occurrence of a symbol in an assignment statement - \'math\' attribute. The directed arcs in this graph start from the - statement assigning the symbol and end at the statement that contains - the symbol in their math elements. Such a graph must be acyclic.) - - Finally, it is worth being explicit about the expected behavior in the - following situation. Suppose (1) a given symbol has a value x - assigned to it in its definition, and (2) there is an initial assignment - having the identifier as its \'symbol\' value and reassigning the value to - y, and (3) the identifier is also used in the - mathematical formula of a second initial assignment. What value should - the second initial assignment use? It is y, the value assigned - to the symbol by the first initial assignment, not whatever value was - given in the symbol\'s definition. This follows directly from the - behavior described above: if an InitialAssignment object exists for a - given symbol, then the symbol\'s value is overridden by that initial - assignment. - - -"; - - -%feature("docstring") ListOfInitialAssignments " - @ingroup Core - Implementation of SBML\'s %ListOfInitialAssignments construct. - - The various ListOf___ classes in %SBML are merely containers used for - organizing the main components of an %SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an %SBML model is - illustrated by the following (for %SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") InitialAssignment::InitialAssignment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
InitialAssignment(SBMLNamespaces sbmlns)
- - Creates a new InitialAssignment using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a InitialAssignment object to an - SBMLDocument (e.g., using Model.addInitialAssignment()), the SBML XML - namespace of the document @em overrides the value used when creating - the InitialAssignment object via this constructor. This is necessary - to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a InitialAssignment is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
InitialAssignment(long level, long version)
- - Creates a new InitialAssignment using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this InitialAssignment - - @param version a long integer, the SBML Version to assign to this - InitialAssignment - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a InitialAssignment object to an - SBMLDocument (e.g., using Model.addInitialAssignment()), the SBML - Level, SBML Version and XML namespace of the document @em - override the values used when creating the InitialAssignment object - via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a InitialAssignment is an - important aid to producing valid SBML. Knowledge of the intented SBML - Level and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - -
- Method variant with the following signature: -
InitialAssignment(InitialAssignment orig)
- - Copy constructor; creates a copy of this InitialAssignment. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") InitialAssignment::accept " - Accepts the given SBMLVisitor for this instance of InitialAssignment. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next InitialAssignment in - the list of compartment types. -"; - - -%feature("docstring") InitialAssignment::clone " - Creates and returns a deep copy of this InitialAssignment. - - @return a (deep) copy of this InitialAssignment. -"; - - -%feature("docstring") InitialAssignment::getSymbol " - Get the value of the \'symbol\' attribute of this InitialAssignment. - - @return the identifier string stored as the \'symbol\' attribute value - in this InitialAssignment. -"; - - -%feature("docstring") InitialAssignment::getMath " - Get the mathematical formula of this InitialAssignment. - - @return an ASTNode, the value of the \'math\' subelement of this - InitialAssignment -"; - - -%feature("docstring") InitialAssignment::isSetSymbol " - Predicate returning @c True if this - InitialAssignment\'s \'symbol\' attribute is set. - - @return @c True if the \'symbol\' attribute of this InitialAssignment - is set, @c False otherwise. -"; - - -%feature("docstring") InitialAssignment::isSetMath " - Predicate returning @c True if this - InitialAssignment\'s \'math\' subelement contains a value. - - @return @c True if the \'math\' for this InitialAssignment is set, - @c False otherwise. -"; - - -%feature("docstring") InitialAssignment::setSymbol " - Sets the \'symbol\' attribute value of this InitialAssignment. - - @param sid the identifier of a Species, Compartment or Parameter - object defined elsewhere in this Model. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") InitialAssignment::setMath " - Sets the \'math\' subelement of this InitialAssignment. - - The AST passed in @p math is copied. - - @param math an AST containing the mathematical expression to - be used as the formula for this InitialAssignment. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") InitialAssignment::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units - of measurement assumed for the \'math\' expression of this - InitialAssignment. - - The units are calculated based on the mathematical expression in the - InitialAssignment and the model quantities referenced by - <ci> elements used within that expression. The - @if java InitialAssignment.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - method returns the calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - @warning Note that it is possible the \'math\' expression in the - InitialAssignment contains pure numbers or parameters with undeclared - units. In those cases, it is not possible to calculate the units of - the overall expression without making assumptions. LibSBML does not - make assumptions about the units, and - @if java InitialAssignment.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - only returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has - unambiguously-defined units and Y does not, it will return - the units of X. It is important that callers also - invoke the method - @if java InitialAssignment.containsUndeclaredUnits()@else containsUndeclaredUnits()@endif@~ - to determine whether this situation holds. Callers - may wish to take suitable actions in those scenarios. - - @return a UnitDefinition that expresses the units of the math - expression of this InitialAssignment, or @c None if one cannot be constructed. - - @see containsUndeclaredUnits() -"; - - -%feature("docstring") InitialAssignment::containsUndeclaredUnits " - Predicate returning @c True if - the math expression of this InitialAssignment contains - parameters/numbers with undeclared units. - - @return @c True if the math expression of this InitialAssignment - includes parameters/numbers - with undeclared units, @c False otherwise. - - @note A return value of @c True indicates that the UnitDefinition - returned by - @if java InitialAssignment.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - may not accurately represent the units of the expression. - - @see getDerivedUnitDefinition() -"; - - -%feature("docstring") InitialAssignment::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") InitialAssignment::getElementName " - Returns the XML element name of this object, which for - InitialAssignment, is always @c \'initialAssignment\'. - - @return the name of this element, i.e., @c \'initialAssignment\'. -"; - - -%feature("docstring") InitialAssignment::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") InitialAssignment::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this InitialAssignment object - have been set. - - @note The required attributes for an InitialAssignment object are: - @li \'symbol\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") InitialAssignment::hasRequiredElements " - Predicate returning @c True if - all the required elements for this InitialAssignment object - have been set. - - @note The required elements for a InitialAssignment object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") InitialAssignment::getId " - Predicate returning @c True if - all the required elements for this InitialAssignment object - have been set. - - @note The required elements for a InitialAssignment object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") InitialAssignment::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") InitialAssignment::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") InitialAssignment::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") InitialAssignment::divideAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing/function). -"; - - -%feature("docstring") InitialAssignment::multiplyAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). -"; - - -%feature("docstring") InitialAssignment::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") InitialAssignment::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") InitialAssignment::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") InitialAssignment::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") InitialAssignment::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") InitialAssignment::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfInitialAssignments::ListOfInitialAssignments " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfInitialAssignments(SBMLNamespaces sbmlns)
- - Creates a new ListOfInitialAssignments object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfInitialAssignments object to be created. - - -
- Method variant with the following signature: -
ListOfInitialAssignments(long level, long version)
- - Creates a new ListOfInitialAssignments object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfInitialAssignments::clone " - Creates and returns a deep copy of this ListOfInitialAssignments instance. - - @return a (deep) copy of this ListOfInitialAssignments. -"; - - -%feature("docstring") ListOfInitialAssignments::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfInitialAssignments::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., InitialAssignment objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfInitialAssignments::getElementName " - Returns the XML element name of this object. - - For ListOfInitialAssignments, the XML element name is @c - \'listOfInitialAssignments\'. - - @return the name of this element, i.e., @c \'listOfInitialAssignments\'. -"; - - -%feature("docstring") ListOfInitialAssignments::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a InitialAssignment from the ListOfInitialAssignments. - - @param n the index number of the InitialAssignment to get. - - @return the nth InitialAssignment in this ListOfInitialAssignments. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a InitialAssignment from the ListOfInitialAssignments - based on its identifier. - - @param sid a string representing the identifier - of the InitialAssignment to get. - - @return InitialAssignment in this ListOfInitialAssignments - with the given @p sid or @c None if no such - InitialAssignment exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfInitialAssignments::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfInitialAssignments items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfInitialAssignments items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfInitialAssignments::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that InitialAssignments do not actually have IDs, though the libsbml interface pretends that they do: no initial assignment is returned by this function. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") ListOfInitialAssignments::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of %SBML is generally fixed - for most components in %SBML. So, for example, the - ListOfInitialAssignments in a model is (in %SBML Level 2 Version 4) - the eighth ListOf___. (However, it differs for different Levels and - Versions of SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfInitialAssignments::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Rule " - @ingroup Core - Implementation of %SBML\'s %Rule construct. - - In SBML, @em rules provide additional ways to define the values of - variables in a model, their relationships, and the dynamical behaviors - of those variables. They enable encoding relationships that cannot be - expressed using Reaction nor InitialAssignment objects alone. - - The libSBML implementation of rules mirrors the SBML Level 3 - Version 1 Core definition (which is in turn is very similar to the - Level 2 Version 4 definition), with Rule being the parent - class of three subclasses as explained below. The Rule class itself - cannot be instantiated by user programs and has no constructor; only the - subclasses AssignmentRule, AlgebraicRule and RateRule can be - instantiated directly. - - @section general General summary of SBML rules - - @htmlinclude rules-general-summary.html - - @section additional-restrictions Additional restrictions on SBML rules - - @htmlinclude rules-additional-restrictions.html - - @section RuleType_t Rule types for SBML Level 1 - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for - distinguishing rules; specifically, it uses an attribute whose value is - drawn from an enumeration of 3 values. LibSBML supports this using methods - that work @if clike a libSBML enumeration type, RuleType_t, whose values - are @else with the enumeration values @endif@~ listed below. - - @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates - the rule is a \'rate\' rule. - @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: - Indicates the rule is a \'scalar\' rule. - @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: - Indicates the rule type is unknown or not yet set. - - -"; - - -%feature("docstring") ListOfRules " - @ingroup Core - Implementation of SBML\'s %ListOfRules construct. - - The various ListOf___ classes in %SBML are merely containers used for - organizing the main components of an %SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an %SBML model is - illustrated by the following (for SBML Level 3 and later versions - of SBML Level 2 as well): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Rule::accept " - Accepts the given SBMLVisitor for this instance of Rule. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next Rule object in the - list of rules within which @em the present object is embedded. -"; - - -%feature("docstring") Rule::clone " - Creates and returns a deep copy of this Rule. - - @return a (deep) copy of this Rule. -"; - - -%feature("docstring") Rule::getFormula " - Returns the mathematical expression of this Rule in text-string form. - - The text string is produced by - @if java libsbml.formulaToString()@else SBML_formulaToString()@endif; please consult - the documentation for that function to find out more about the format - of the text-string formula. - - @return the formula text string for this Rule. - - @note The attribute \'formula\' is specific to SBML Level 1; in - higher Levels of SBML, it has been replaced with a subelement named - \'math\'. However, libSBML provides a unified interface to the - underlying math expression and this method can be used for models - of all Levels of SBML. - - @see getMath() -"; - - -%feature("docstring") Rule::getMath " - Get the mathematical formula of this Rule as an ASTNode tree. - - @return an ASTNode, the value of the \'math\' subelement of this Rule. - - @note The subelement \'math\' is present in SBML Levels 2 - and 3. In SBML Level 1, the equivalent construct is the - attribute named \'formula\'. LibSBML provides a unified interface to - the underlying math expression and this method can be used for models - of all Levels of SBML. - - @see getFormula() -"; - - -%feature("docstring") Rule::getVariable " - Get the value of the \'variable\' attribute of this Rule object. - - In SBML Level 1, the different rule types each have a different - name for the attribute holding the reference to the object - constituting the left-hand side of the rule. (E.g., for - SBML Level 1\'s SpeciesConcentrationRule the attribute is \'species\', for - CompartmentVolumeRule it is \'compartment\', etc.) In SBML - Levels 2 and 3, the only two types of Rule objects with a - left-hand side object reference are AssignmentRule and RateRule, and - both of them use the same name for attribute: \'variable\'. In order to - make it easier for application developers to work with all Levels of - SBML, libSBML uses a uniform name for all of such attributes, and it - is \'variable\', regardless of whether Level 1 rules or - Level 2–3 rules are being used. - - @return the identifier string stored as the \'variable\' attribute value - in this Rule, or @c None if this object is an AlgebraicRule object. -"; - - -%feature("docstring") Rule::getUnits " - Returns the units for the - mathematical formula of this Rule. - - @return the identifier of the units for the expression of this Rule. - - @note The attribute \'units\' exists on SBML Level 1 ParameterRule - objects only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::isSetFormula " - Predicate returning @c True if this - Rule\'s mathematical expression is set. - - This method is equivalent to isSetMath(). This version is present for - easier compatibility with SBML Level 1, in which mathematical - formulas were written in text-string form. - - @return @c True if the mathematical formula for this Rule is - set, @c False otherwise. - - @note The attribute \'formula\' is specific to SBML Level 1; in - higher Levels of SBML, it has been replaced with a subelement named - \'math\'. However, libSBML provides a unified interface to the - underlying math expression and this method can be used for models - of all Levels of SBML. - - @see isSetMath() -"; - - -%feature("docstring") Rule::isSetMath " - Predicate returning @c True if this - Rule\'s mathematical expression is set. - - This method is equivalent to isSetFormula(). - - @return @c True if the formula (or equivalently the math) for this - Rule is set, @c False otherwise. - - @note The subelement \'math\' is present in SBML Levels 2 - and 3. In SBML Level 1, the equivalent construct is the - attribute named \'formula\'. LibSBML provides a unified interface to - the underlying math expression and this method can be used for models - of all Levels of SBML. - - @see isSetFormula() -"; - - -%feature("docstring") Rule::isSetVariable " - Predicate returning @c True if this - Rule\'s \'variable\' attribute is set. - - In SBML Level 1, the different rule types each have a different - name for the attribute holding the reference to the object - constituting the left-hand side of the rule. (E.g., for - SBML Level 1\'s SpeciesConcentrationRule the attribute is \'species\', for - CompartmentVolumeRule it is \'compartment\', etc.) In SBML - Levels 2 and 3, the only two types of Rule objects with a - left-hand side object reference are AssignmentRule and RateRule, and - both of them use the same name for attribute: \'variable\'. In order to - make it easier for application developers to work with all Levels of - SBML, libSBML uses a uniform name for all such attributes, and it is - \'variable\', regardless of whether Level 1 rules or - Level 2–3 rules are being used. - - @return @c True if the \'variable\' attribute value of this Rule is - set, @c False otherwise. -"; - - -%feature("docstring") Rule::isSetUnits " - Predicate returning @c True - if this Rule\'s \'units\' attribute is set. - - @return @c True if the units for this Rule is set, @c False - otherwise - - @note The attribute \'units\' exists on SBML Level 1 ParameterRule - objects only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::setFormula " - Sets the \'math\' subelement of this Rule to an expression in - text-string form. - - This is equivalent to setMath(ASTNode math). The provision of - using text-string formulas is retained for easier SBML Level 1 - compatibility. The formula is converted to an ASTNode internally. - - @param formula a mathematical formula in text-string form. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note The attribute \'formula\' is specific to SBML Level 1; in - higher Levels of SBML, it has been replaced with a subelement named - \'math\'. However, libSBML provides a unified interface to the - underlying math expression and this method can be used for models - of all Levels of SBML. - - @see setMath() -"; - - -%feature("docstring") Rule::setMath " - Sets the \'math\' subelement of this Rule to a copy of the given - ASTNode. - - @param math the ASTNode structure of the mathematical formula. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note The subelement \'math\' is present in SBML Levels 2 - and 3. In SBML Level 1, the equivalent construct is the - attribute named \'formula\'. LibSBML provides a unified interface to - the underlying math expression and this method can be used for models - of all Levels of SBML. - - @see setFormula() -"; - - -%feature("docstring") Rule::setVariable " - Sets the \'variable\' attribute value of this Rule object. - - In SBML Level 1, the different rule types each have a different - name for the attribute holding the reference to the object - constituting the left-hand side of the rule. (E.g., for - SBML Level 1\'s SpeciesConcentrationRule the attribute is \'species\', for - CompartmentVolumeRule it is \'compartment\', etc.) In SBML - Levels 2 and 3, the only two types of Rule objects with a - left-hand side object reference are AssignmentRule and RateRule, and - both of them use the same name for attribute: \'variable\'. In order to - make it easier for application developers to work with all Levels of - SBML, libSBML uses a uniform name for all such attributes, and it is - \'variable\', regardless of whether Level 1 rules or - Level 2–3 rules are being used. - - @param sid the identifier of a Compartment, Species or Parameter - elsewhere in the enclosing Model object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Rule::setUnits " - Sets the units for this Rule. - - @param sname the identifier of the units - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attribute \'units\' exists on SBML Level 1 ParameterRule - objects only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::unsetUnits " - Unsets the \'units\' for this Rule. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attribute \'units\' exists on SBML Level 1 ParameterRule - objects only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units of - measurement assumed for the \'math\' expression of this Rule. - - The units are calculated based on the mathematical expression in the - Rule and the model quantities referenced by <ci> - elements used within that expression. The getDerivedUnitDefinition() - method returns the calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - @warning Note that it is possible the \'math\' expression in the Rule - contains pure numbers or parameters with undeclared units. In those - cases, it is not possible to calculate the units of the overall - expression without making assumptions. LibSBML does not make - assumptions about the units, and getDerivedUnitDefinition() only - returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has - unambiguously-defined units and Y does not, it will return - the units of X. It is important that callers also - invoke the method - @if java Rule.containsUndeclaredUnits()@else containsUndeclaredUnits()@endif@~ - to determine whether this situation holds. Callers may - wish to take suitable actions in those scenarios. - - @return a UnitDefinition that expresses the units of the math - expression of this Rule, or @c None if one cannot be constructed. - - @see containsUndeclaredUnits() -"; - - -%feature("docstring") Rule::containsUndeclaredUnits " - Predicate returning @c True if - the math expression of this Rule contains - parameters/numbers with undeclared units. - - @return @c True if the math expression of this Rule - includes parameters/numbers - with undeclared units, @c False otherwise. - - @note A return value of @c True indicates that the UnitDefinition - returned by getDerivedUnitDefinition() may not accurately represent - the units of the expression. - - @see getDerivedUnitDefinition() -"; - - -%feature("docstring") Rule::getType " - Get the type of rule this is. - - @return the rule type (a value drawn from the enumeration RuleType_t) of this Rule. The value - will be either @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink - or @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink. - - @note The attribute \'type\' on Rule objects is present only in SBML - Level 1. In SBML Level 2 and later, the type has been - replaced by subclassing the Rule object. -"; - - -%feature("docstring") Rule::isAlgebraic " - Predicate returning @c True if this - Rule is an AlgebraicRule. - - @return @c True if this Rule is an AlgebraicRule, @c False otherwise. -"; - - -%feature("docstring") Rule::isAssignment " - Predicate returning @c True if this - Rule is an AssignmentRule. - - @return @c True if this Rule is an AssignmentRule, @c False otherwise. -"; - - -%feature("docstring") Rule::isCompartmentVolume " - Predicate returning @c True if this Rule is an CompartmentVolumeRule - or equivalent. - - This libSBML method works for SBML Level 1 models (where there is - such a thing as an explicit CompartmentVolumeRule), as well as other Levels of - SBML. For Levels above Level 1, this method checks the symbol - being affected by the rule, and returns @c True if the symbol is the - identifier of a Compartment object defined in the model. - - @return @c True if this Rule is a CompartmentVolumeRule, @c False - otherwise. -"; - - -%feature("docstring") Rule::isParameter " - Predicate returning @c True if this Rule is an ParameterRule or - equivalent. - - This libSBML method works for SBML Level 1 models (where there is - such a thing as an explicit ParameterRule), as well as other Levels of - SBML. For Levels above Level 1, this method checks the symbol - being affected by the rule, and returns @c True if the symbol is the - identifier of a Parameter object defined in the model. - - @return @c True if this Rule is a ParameterRule, @c False - otherwise. -"; - - -%feature("docstring") Rule::isRate " - Predicate returning @c True if this Rule - is a RateRule (SBML Levels 2–3) or has a \'type\' attribute - value of @c \'rate\' (SBML Level 1). - - @return @c True if this Rule is a RateRule (Level 2) or has - type \'rate\' (Level 1), @c False otherwise. -"; - - -%feature("docstring") Rule::isScalar " - Predicate returning @c True if this Rule - is an AssignmentRule (SBML Levels 2–3) or has a \'type\' - attribute value of @c \'scalar\' (SBML Level 1). - - @return @c True if this Rule is an AssignmentRule (Level 2) or has - type \'scalar\' (Level 1), @c False otherwise. -"; - - -%feature("docstring") Rule::isSpeciesConcentration " - Predicate returning @c True if this Rule is a - SpeciesConcentrationRule or equivalent. - - This libSBML method works for SBML Level 1 models (where there is - such a thing as an explicit SpeciesConcentrationRule), as well as - other Levels of SBML. For Levels above Level 1, this method - checks the symbol being affected by the rule, and returns @c True if - the symbol is the identifier of a Species object defined in the model. - - @return @c True if this Rule is a SpeciesConcentrationRule, @c False - otherwise. -"; - - -%feature("docstring") Rule::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Rule::getL1TypeCode " - Returns the SBML Level 1 type code for this Rule object. - - This method only applies to SBML Level 1 model objects. If this - is not an SBML Level 1 rule object, this method will return @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink. - - @return the SBML Level 1 type code for this Rule (namely, @link - libsbml.SBML_COMPARTMENT_VOLUME_RULE - SBML_COMPARTMENT_VOLUME_RULE@endlink, @link - libsbml.SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, @link - libsbml.SBML_SPECIES_CONCENTRATION_RULE - SBML_SPECIES_CONCENTRATION_RULE@endlink, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink). -"; - - -%feature("docstring") Rule::getElementName " - Returns the XML element name of this object - - The returned value can be any of a number of different strings, - depending on the SBML Level in use and the kind of Rule object this - is. The rules as of libSBML version @htmlinclude libsbml-version.html - are the following: -
    -
  • (Level 2 and 3) RateRule: returns @c \'rateRule\' -
  • (Level 2 and 3) AssignmentRule: returns @c \'assignmentRule\' -
  • (Level 2 and 3) AlgebraicRule: returns @c \'algebraicRule\' -
  • (Level 1 Version 1) SpecieConcentrationRule: returns @c \'specieConcentrationRule\' -
  • (Level 1 Version 2) SpeciesConcentrationRule: returns @c \'speciesConcentrationRule\' -
  • (Level 1) CompartmentVolumeRule: returns @c \'compartmentVolumeRule\' -
  • (Level 1) ParameterRule: returns @c \'parameterRule\' -
  • Unknown rule type: returns @c \'unknownRule\' -
- - Beware that the last (@c \'unknownRule\') is not a valid SBML element - name. - - @return the name of this element -"; - - -%feature("docstring") Rule::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Rule::setL1TypeCode " - Sets the SBML Level 1 type code for this Rule. - - @param type the SBML Level 1 type code for this Rule. The - allowable values are @link libsbml.SBML_COMPARTMENT_VOLUME_RULE - SBML_COMPARTMENT_VOLUME_RULE@endlink, @link - libsbml.SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, and - @link libsbml.SBML_SPECIES_CONCENTRATION_RULE - SBML_SPECIES_CONCENTRATION_RULE@endlink. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - if given @p type value is not one of the above. -"; - - -%feature("docstring") Rule::hasRequiredElements " - Predicate returning @c True if all the - required elements for this Rule object have been set. - - The only required element for a Rule object is the \'math\' subelement. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Rule::hasRequiredAttributes " - Predicate returning @c True if all the - required attributes for this Rule object have been set. - - The required attributes for a Rule object depend on the type of Rule - it is. For AssignmentRule and RateRule objects (and SBML - Level 1\'s SpeciesConcentrationRule, CompartmentVolumeRule, and - ParameterRule objects), the required attribute is \'variable\'; for - AlgebraicRule objects, there is no required attribute. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Rule::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Rule::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Rule::getInternalId " - @internal - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Rule::setInternalId " - @internal - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Rule::getId " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Rule::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Rule::divideAssignmentsToSIdByFunction " - @internal - If this rule assigns a value or a change to the \'id\' element, replace the \'math\' object with the function (existing/function). -"; - - -%feature("docstring") Rule::multiplyAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). -"; - - -%feature("docstring") Rule::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") Rule::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Rule::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Rule::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Rule::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Rule::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Rule::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfRules::ListOfRules " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfRules(SBMLNamespaces sbmlns)
- - Creates a new ListOfRules object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfRules object to be created. - - -
- Method variant with the following signature: -
ListOfRules(long level, long version)
- - Creates a new ListOfRules object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfRules::clone " - Creates and returns a deep copy of this ListOfRules instance. - - @return a (deep) copy of this ListOfRules. -"; - - -%feature("docstring") ListOfRules::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfRules::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Rule objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfRules::getElementName " - Returns the XML element name of this object. - - For ListOfRules, the XML element name is @c \'listOfRules\'. - - @return the name of this element, i.e., @c \'listOfRules\'. -"; - - -%feature("docstring") ListOfRules::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a Rule from the ListOfRules. - - @param n the index number of the Rule to get. - - @return the nth Rule in this ListOfRules. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a Rule from the ListOfRules - based on its identifier. - - @param sid a string representing the identifier - of the Rule to get. - - @return Rule in this ListOfRules - with the given @p sid or @c None if no such - Rule exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfRules::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfRules items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfRules items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfRules::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that AssignmentRules and RateRules do not actually have IDs, but the libsbml interface pretends that they do: no assignment rule or rate rule is returned by this function. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") ListOfRules::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of %SBML is generally fixed - for most components in %SBML. - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfRules::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") ListOfRules::isValidTypeForList " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") AlgebraicRule " - @ingroup Core - Implementation of %SBML\'s %AlgebraicRule construct. - - The rule type AlgebraicRule is derived from the parent class Rule. It - is used to express equations that are neither assignments of model - variables nor rates of change. AlgebraicRule does not add any - attributes to the basic Rule; its role is simply to distinguish this - case from the other cases. - - In the context of a simulation, algebraic rules are in effect at all - times, t >= 0. For purposes of evaluating - expressions that involve the delay \'csymbol\' (see the SBML - specification), algebraic rules are considered to apply also at - t <= 0. Please consult the relevant SBML - specification for additional information about the semantics of - assignments, rules, and entity values for simulation time t - <= 0. - - An SBML model must not be overdetermined. The ability to define - arbitrary algebraic expressions in an SBML model introduces the - possibility that a model is mathematically overdetermined by the overall - system of equations constructed from its rules, reactions and events. - Therefore, if an algebraic rule is introduced in a model, for at least - one of the entities referenced in the rule\'s \'math\' element the value of - that entity must not be completely determined by other constructs in the - model. This means that at least this entity must not have the attribute - \'constant\'=@c True and there must also not be a rate rule or assignment - rule for it. Furthermore, if the entity is a Species object, its value - must not be determined by reactions, which means that it must either - have the attribute \'boundaryCondition\'=@c True or else not be involved - in any reaction at all. These restrictions are explained in more detail - in the SBML specification documents. - - In SBML Levels 2 and 3, Reaction object identifiers can be - referenced in the \'math\' expression of an algebraic rule, but reaction - rates can never be determined by algebraic rules. This is true - even when a reaction does not contain a KineticLaw element. (In such - cases of missing KineticLaw elements, the model is valid but incomplete; - the rates of reactions lacking kinetic laws are simply undefined, and - not determined by the algebraic rule.) - - @section general General summary of SBML rules - - @htmlinclude rules-general-summary.html - - @section additional-restrictions Additional restrictions on SBML rules - - @htmlinclude rules-additional-restrictions.html - - @section RuleType_t Rule types for SBML Level 1 - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for - distinguishing rules; specifically, it uses an attribute whose value is - drawn from an enumeration of 3 values. LibSBML supports this using methods - that work @if clike a libSBML enumeration type, RuleType_t, whose values - are @else with the enumeration values @endif@~ listed below. - - @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates - the rule is a \'rate\' rule. - @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: - Indicates the rule is a \'scalar\' rule. - @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: - Indicates the rule type is unknown or not yet set. - - -"; - - -%feature("docstring") AlgebraicRule::AlgebraicRule " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
AlgebraicRule(SBMLNamespaces sbmlns)
- - Creates a new AlgebraicRule using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a AlgebraicRule object to an SBMLDocument - (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML XML namespace of the - document @em overrides the value used when creating the AlgebraicRule - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a AlgebraicRule is an - important aid to producing valid SBML. Knowledge of the intented SBML - Level and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - -
- Method variant with the following signature: -
AlgebraicRule(long level, long version)
- - Creates a new AlgebraicRule using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this AlgebraicRule - - @param version a long integer, the SBML Version to assign to this - AlgebraicRule - - @throws @if python ValueError @else SBMLConstructorException @endif - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of an AlgebraicRule object to an SBMLDocument - (e.g., using  @if java Model.addRule()@else Model.addRule()@endif), the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the AlgebraicRule object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a AlgebraicRule is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. -"; - - -%feature("docstring") AlgebraicRule::clone " - Creates and returns a deep copy of this Rule. - - @return a (deep) copy of this Rule. -"; - - -%feature("docstring") AlgebraicRule::accept " - Accepts the given SBMLVisitor for this instance of AlgebraicRule. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next AlgebraicRule object - in the list of rules within which @em the present object is embedded. -"; - - -%feature("docstring") AlgebraicRule::setInternalIdOnly " - @internal - sets the mInternalIdOnly flag -"; - - -%feature("docstring") AlgebraicRule::getInternalIdOnly " - @internal - sets the mInternalIdOnly flag -"; - - -%feature("docstring") AlgebraicRule::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this AlgebraicRule object - have been set. - - @note In SBML Levels 2–3, there is no required attribute - for an AlgebraicRule object. For Level 1, the only required - attribute is \'formula\'. - - @return @c True if the required attributes have been set, @c False - otherwise. -"; - - -%feature("docstring") AssignmentRule " - @ingroup Core - Implementation of %SBML\'s %AssignmentRule construct. - - The rule type AssignmentRule is derived from the parent class Rule. It - is used to express equations that set the values of variables. The - left-hand side (the attribute named \'variable\') of an assignment rule - can refer to the identifier of a Species, SpeciesReference (in SBML - Level 3), Compartment, or Parameter object in the model (but not a - Reaction). The entity identified must have its \'constant\' attribute set - to @c False. The effects of an AssignmentRule are in general terms the - same, but differ in the precise details depending on the type of - variable being set:
    -
  • In the case of a species, an AssignmentRule sets the - referenced species\' quantity (whether a \'concentration\' or \'amount\') to - the value determined by the formula in the MathML subelement \'math\'. - The unit associated with the value produced by the \'math\' formula @em - should (in SBML Level 2 Version 4 and in SBML Level 3) or @em must (in - SBML releases prior to Level 2 version 4) be equal to the unit - associated with the species\' quantity. Restrictions: There - must not be both an AssignmentRule \'variable\' attribute and a - SpeciesReference \'species\' attribute having the same value, unless the - referenced Species object has its \'boundaryCondition\' attribute set to - @c True. In other words, an assignment rule cannot be defined for a - species that is created or destroyed in a reaction unless that species - is defined as a boundary condition in the model. - -
  • (For SBML Level 3 only) In the case of a species - reference, an AssignmentRule sets the stoichiometry of the - referenced reactant or product to the value determined by the formula in - \'math\'. The unit associated with the value produced by the \'math\' - formula should be consistent with the unit \'dimensionless\', because - reactant and product stoichiometries in reactions are dimensionless - quantities. - -
  • In the case of a compartment, an AssignmentRule sets the - referenced compartment\'s size to the value determined by the formula in - the \'math\' subelement of the AssignmentRule object. The overall units - of the formula in \'math\' @em should (in SBML Level 2 Version 4 - and in SBML Level 3) or @em must (in SBML releases prior to Level 2 - version 4) be the same as the units of the size of the compartment. - -
  • In the case of a parameter, an AssignmentRule sets the - referenced parameter\'s value to that determined by the formula in the - \'math\' subelement of the AssignmentRule object. The overall units of - the formula in the \'math\' subelement @em should (in SBML Level 2 - Version 4 and in SBML Level 3) or @em must (in SBML releases prior to - Level 2 version 4) be the same as the units defined for the - parameter.
- - In the context of a simulation, assignment rules are in effect at all - times, t >= 0. For purposes of evaluating - expressions that involve the delay \'csymbol\' (see the SBML - Level 2 specification), assignment rules are considered to apply - also at t <= 0. Please consult the relevant - SBML specification for additional information about the semantics of - assignments, rules, and entity values for simulation time t - <= 0. - - A model must not contain more than one AssignmentRule or RateRule - object having the same value of \'variable\'; in other words, in the set - of all assignment rules and rate rules in an SBML model, each variable - appearing in the left-hand sides can only appear once. This simply - follows from the fact that an indeterminate system would result if a - model contained more than one assignment rule for the same variable or - both an assignment rule and a rate rule for the same variable. - - Similarly, a model must also not contain both an AssignmentRule - and an InitialAssignment for the same variable, because both kinds of - constructs apply prior to and at the start of simulation time, i.e., - t <= 0. If a model contained both an initial - assignment and an assignment rule for the same variable, an - indeterminate system would result. - - The value calculated by an AssignmentRule object overrides the value - assigned to the given symbol by the object defining that symbol. For - example, if a Compartment object\'s \'size\' attribute value is set in its - definition, and the model also contains an AssignmentRule object having - that compartment\'s \'id\' as its \'variable\' value, then the \'size\' - assigned in the Compartment object definition is ignored and the value - assigned based on the computation defined in the AssignmentRule. This - does not mean that a definition for a given symbol can be - omitted if there is an AssignmentRule object for it. For example, there - must be a Parameter definition for a given parameter if there is an - AssignmentRule for that parameter. It is only a question of which value - definition takes precedence. - - @section general General summary of SBML rules - - @htmlinclude rules-general-summary.html - - @section additional-restrictions Additional restrictions on SBML rules - - @htmlinclude rules-additional-restrictions.html - - @section RuleType_t Rule types for SBML Level 1 - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for - distinguishing rules; specifically, it uses an attribute whose value is - drawn from an enumeration of 3 values. LibSBML supports this using methods - that work @if clike a libSBML enumeration type, RuleType_t, whose values - are @else with the enumeration values @endif@~ listed below. - - @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates - the rule is a \'rate\' rule. - @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: - Indicates the rule is a \'scalar\' rule. - @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: - Indicates the rule type is unknown or not yet set. - - -"; - - -%feature("docstring") AssignmentRule::AssignmentRule " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
AssignmentRule(SBMLNamespaces sbmlns)
- - Creates a new AssignmentRule using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a AssignmentRule object to an SBMLDocument - (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML XML namespace of - the document @em overrides the value used when creating the - AssignmentRule object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a - AssignmentRule is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
AssignmentRule(long level, long version)
- - Creates a new AssignmentRule using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this AssignmentRule - - @param version a long integer, the SBML Version to assign to this - AssignmentRule - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of an AssignmentRule object to an SBMLDocument - (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the AssignmentRule object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a AssignmentRule is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. -"; - - -%feature("docstring") AssignmentRule::clone " - Creates and returns a deep copy of this Rule. - - @return a (deep) copy of this Rule. -"; - - -%feature("docstring") AssignmentRule::accept " - Accepts the given SBMLVisitor for this instance of AssignmentRule. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next AssignmentRule object - in the list of rules within which @em the present object is embedded. -"; - - -%feature("docstring") AssignmentRule::hasRequiredAttributes " - Predicate returning @c True if all the required attributes for this - AssignmentRule object have been set. - - @note In SBML Levels 2–3, the only required attribute for - an AssignmentRule object is \'variable\'. For Level 1, where the - equivalent attribute is known by different names (\'compartment\', - \'species\', or \'name\', depending on the type of object), there is an - additional required attribute called \'formula\'. - - @return @c True if the required attributes have been set, @c False - otherwise. -"; - - -%feature("docstring") AssignmentRule::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") RateRule " - @ingroup Core - Implementation of %SBML\'s %RateRule construct. - - The rule type RateRule is derived from the parent class Rule. It is - used to express equations that determine the rates of change of - variables. The left-hand side (the \'variable\' attribute) can refer to - the identifier of a species, compartment, or parameter (but not a - reaction). The entity identified must have its \'constant\' attribute set - to @c False. The effects of a RateRule are in general terms the same, - but differ in the precise details depending on which variable is being - set: - -
  • In the case of a species, a RateRule sets the rate of - change of the species\' quantity (concentration or amount of - substance) to the value determined by the formula in the \'math\' - subelement of the RateRule object. The overall units of the formula in - \'math\' @em should (in SBML Level 2 Version 4 and in SBML Level 3) or @em - must (in SBML releases prior to Level 2 version 4) be equal to - the unit of species quantity divided by the model-wide unit of - time. Restrictions: There must not be both a RateRule - \'variable\' attribute and a SpeciesReference \'species\' attribute having - the same value, unless that species has its \'boundaryCondition\' - attribute is set to @c True. This means a rate rule cannot be defined - for a species that is created or destroyed in a reaction, unless that - species is defined as a boundary condition in the model. - -
  • (For SBML Level 3 only) In the case of a species - reference, a RateRule sets the rate of change of the stoichiometry - of the referenced reactant or product to the value determined by the - formula in \'math\'. The unit associated with the value produced by the - \'math\' formula should be consistent with the unit \'dimensionless\' - divided by the model-wide unit of time. - -
  • In the case of a compartment, a RateRule sets the rate of - change of the compartment\'s size to the value determined by the formula - in the \'math\' subelement of the RateRule object. The overall units of - the formula @em should (in SBML Level 2 Version 4 and in SBML - Level 3) or @em must (in SBML releases prior to Level 2 - version 4) be the units of the compartment\'s size divided - by the model-wide unit of time. - -
  • In the case of a parameter, a RateRule sets the rate of - change of the parameter\'s value to that determined by the formula in the - \'math\' subelement of the RateRule object. The overall units of the - formula @em should (in SBML Level 2 Version 4 and in SBML - Level 3) or @em must (in SBML releases prior to Level 2 - version 4) be the Parameter object\'s \'unit\' attribute value divided - by the model-wide unit of time.
- - In the context of a simulation, rate rules are in effect for simulation - time t < 0. Please consult the relevant SBML - specification for additional information about the semantics of - assignments, rules, and entity values for simulation time t - <= 0. - - As mentioned in the description of AssignmentRule, a model must not - contain more than one RateRule or AssignmentRule object having the same - value of \'variable\'; in other words, in the set of all assignment rules - and rate rules in an SBML model, each variable appearing in the - left-hand sides can only appear once. This simply follows from the fact - that an indeterminate system would result if a model contained more than - one assignment rule for the same variable or both an assignment rule and - a rate rule for the same variable. - - @section general General summary of SBML rules - - @htmlinclude rules-general-summary.html - - @section additional-restrictions Additional restrictions on SBML rules - - @htmlinclude rules-additional-restrictions.html - - @section RuleType_t Rule types for SBML Level 1 - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for - distinguishing rules; specifically, it uses an attribute whose value is - drawn from an enumeration of 3 values. LibSBML supports this using methods - that work @if clike a libSBML enumeration type, RuleType_t, whose values - are @else with the enumeration values @endif@~ listed below. - - @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates - the rule is a \'rate\' rule. - @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: - Indicates the rule is a \'scalar\' rule. - @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: - Indicates the rule type is unknown or not yet set. - - -"; - - -%feature("docstring") RateRule::RateRule " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
RateRule(SBMLNamespaces sbmlns)
- - Creates a new RateRule using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a RateRule object to an SBMLDocument (e.g., - using @if java Model.addRule()@else Model.addRule()@endif, the SBML XML namespace of the document - @em overrides the value used when creating the RateRule object via - this constructor. This is necessary to ensure that an SBML document - is a consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a RateRule is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
RateRule(long level, long version)
- - Creates a new RateRule using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this RateRule - - @param version a long integer, the SBML Version to assign to this - RateRule - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a RateRule object to an SBMLDocument - (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the RateRule object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a RateRule is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. -"; - - -%feature("docstring") RateRule::clone " - Creates and returns a deep copy of this Rule. - - @return a (deep) copy of this Rule. -"; - - -%feature("docstring") RateRule::accept " - Accepts the given SBMLVisitor. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next RateRule object - in the list of rules within which @em the present object is embedded. -"; - - -%feature("docstring") RateRule::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this RateRule object - have been set. - - @note In SBML Levels 2–3, the only required attribute for a - RateRule object is \'variable\'. For Level 1, where the equivalent - attribute is known by different names (\'compartment\', \'species\', or - \'name\', depending on the type of object), there is an additional - required attribute called \'formula\'. - - @return @c True if the required attributes have been set, @c False - otherwise. -"; - - -%feature("docstring") RateRule::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Constraint " - @ingroup Core - Implementation of SBML\'s %Constraint construct. - - The Constraint object class was introduced in SBML Level 2 - Version 2 as a mechanism for stating the assumptions under which a - model is designed to operate. The constraints are statements - about permissible values of different quantities in a model. - Constraints are not used to compute dynamical values for simulation or - analysis, but rather, they serve an advisory role for - simulation/analysis tools. - - SBML\'s Constraint object class has one required attribute, \'id\', to - give the parameter a unique identifier by which other parts of an SBML - model definition can refer to it. A Constraint object can also have an - optional \'name\' attribute of type @c string. Identifiers and names must - be used according to the guidelines described in the SBML specification - (e.g., Section 3.3 in the Level 2 Version 4 specification). - - Constraint has one required subelement, \'math\', containing a MathML - formula defining the condition of the constraint. This formula must - return a boolean value of @c True when the model is a valid - state. The formula can be an arbitrary expression referencing the - variables and other entities in an SBML model. The evaluation of \'math\' - and behavior of constraints are described in more detail below. - - A Constraint structure also has an optional subelement called \'message\'. - This can contain a message in XHTML format that may be displayed to the - user when the condition of the formula in the \'math\' subelement - evaluates to a value of @c False. Software tools are not required to - display the message, but it is recommended that they do so as a matter - of best practice. The XHTML content within a \'message\' subelement must - follow the same restrictions as for the \'notes\' element on SBase - described in in the SBML Level 2 specification; please consult the - SBML - specification document corresponding to the SBML Level and Version - of your model for more information about the requirements for \'notes\' - content. - - Constraint was introduced in SBML Level 2 Version 2. It is - not available in earlier versions of Level 2 nor in any version of - Level 1. - - @section constraint-semantics Semantics of Constraints - - In the context of a simulation, a Constraint has effect at all times - t >= 0. Each Constraint\'s \'math\' subelement is first - evaluated after any InitialAssignment definitions in a model at t = - 0 and can conceivably trigger at that point. (In other words, a - simulation could fail a constraint immediately.) - - Constraint structures cannot and should not be used to compute - the dynamical behavior of a model as part of, for example, simulation. - Constraints may be used as input to non-dynamical analysis, for instance - by expressing flux constraints for flux balance analysis. - - The results of a simulation of a model containing a constraint are - invalid from any simulation time at and after a point when the function - given by the \'math\' subelement returns a value of @c False. Invalid - simulation results do not make a prediction of the behavior of the - biochemical reaction network represented by the model. The precise - behavior of simulation tools is left undefined with respect to - constraints. If invalid results are detected with respect to a given - constraint, the \'message\' subelement may optionally be displayed to the - user. The simulation tool may also halt the simulation or clearly - delimit in output data the simulation time point at which the simulation - results become invalid. - - SBML does not impose restrictions on duplicate Constraint definitions or - the order of evaluation of Constraint objects in a model. It is - possible for a model to define multiple constraints all with the same - mathematical expression. Since the failure of any constraint indicates - that the model simulation has entered an invalid state, a system is not - required to attempt to detect whether other constraints in the model - have failed once any one constraint has failed. - - -"; - - -%feature("docstring") ListOfConstraints " - @ingroup Core - Implementation of SBML\'s %ListOfConstraints construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Constraint::Constraint " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Constraint(SBMLNamespaces sbmlns)
- - Creates a new Constraint using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Constraint object to an SBMLDocument - (e.g., using Model.addConstraint()), the - SBML XML namespace of the document @em overrides the value used when - creating the Constraint object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a Constraint is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Constraint(long level, long version)
- - Creates a new Constraint using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Constraint - - @param version a long integer, the SBML Version to assign to this - Constraint - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Constraint object to an SBMLDocument - (e.g., using Model.addConstraint()), the - SBML Level, SBML Version and XML namespace of the document @em - override the values used when creating the Constraint object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Constraint is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
Constraint(Constraint orig)
- - Copy constructor; creates a copy of this Constraint. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Constraint::accept " - Accepts the given SBMLVisitor for this instance of Constraint. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next Constraint in the - list of constraints within which this Constraint is embedded (i.e., in - the ListOfConstraints located in the enclosing Model instance). -"; - - -%feature("docstring") Constraint::clone " - Creates and returns a deep copy of this Constraint. - - @return a (deep) copy of this Constraint. -"; - - -%feature("docstring") Constraint::getMessage " - Get the message, if any, associated with this Constraint - - @return the message for this Constraint, as an XMLNode. -"; - - -%feature("docstring") Constraint::getMessageString " - Get the message string, if any, associated with this Constraint - - @return the message for this Constraint, as a string. -"; - - -%feature("docstring") Constraint::getMath " - Get the mathematical expression of this Constraint - - @return the math for this Constraint, as an ASTNode. -"; - - -%feature("docstring") Constraint::isSetMessage " - Predicate returning @c True if a - message is defined for this Constraint. - - @return @c True if the message of this Constraint is set, - @c False otherwise. -"; - - -%feature("docstring") Constraint::isSetMath " - Predicate returning @c True if a - mathematical formula is defined for this Constraint. - - @return @c True if the \'math\' subelement for this Constraint is - set, @c False otherwise. -"; - - -%feature("docstring") Constraint::setMessage " - Sets the message of this Constraint. - - The XMLNode tree passed in @p xhtml is copied. - - @param xhtml an XML tree containing XHTML content. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") Constraint::setMath " - Sets the mathematical expression of this Constraint to a copy of the - AST given as @p math. - - @param math an ASTNode expression to be assigned as the \'math\' - subelement of this Constraint - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") Constraint::unsetMessage " - Unsets the \'message\' subelement of this Constraint. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Constraint::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Constraint::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Constraint::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Constraint::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Constraint::getElementName " - Returns the XML element name of this object, which for Constraint, is - always @c \'constraint\'. - - @return the name of this element, i.e., @c \'constraint\'. -"; - - -%feature("docstring") Constraint::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Constraint::hasRequiredElements " - Predicate returning @c True if - all the required elements for this Constraint object - have been set. - - @note The required elements for a Constraint object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Constraint::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") Constraint::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Constraint::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Constraint::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Constraint::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Constraint::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfConstraints::ListOfConstraints " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfConstraints(SBMLNamespaces sbmlns)
- - Creates a new ListOfConstraints object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfConstraints object to be created. - - -
- Method variant with the following signature: -
ListOfConstraints(long level, long version)
- - Creates a new ListOfConstraints object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfConstraints::clone " - Creates and returns a deep copy of this ListOfConstraints instance. - - @return a (deep) copy of this ListOfConstraints. -"; - - -%feature("docstring") ListOfConstraints::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfConstraints::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Constraint objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfConstraints::getElementName " - Returns the XML element name of this object. - - For ListOfConstraints, the XML element name is @c \'listOfConstraints\'. - - @return the name of this element, i.e., @c \'listOfConstraints\'. -"; - - -%feature("docstring") ListOfConstraints::get " - Get a Constraint from the ListOfConstraints. - - @param n the index number of the Constraint to get. - - @return the nth Constraint in this ListOfConstraints. - - @see size() -"; - - -%feature("docstring") ListOfConstraints::remove " - Removes the nth item from this ListOfConstraints items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() -"; - - -%feature("docstring") ListOfConstraints::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the ListOfConstraints - in a model is (in SBML Level 2 Version 4) the tenth ListOf___. - (However, it differs for different Levels and Versions of SBML.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfConstraints::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Reaction " - @ingroup Core - Implementation of SBML\'s %Reaction construct. - - A @em reaction represents any transformation, transport or binding - process, typically a chemical reaction, that can change the quantity of - one or more species. In SBML, a reaction is defined primarily in terms - of the participating reactants and products (and their corresponding - stoichiometries), along with optional modifier species, an optional rate - at which the reaction takes place, and optional parameters. - - As with other major object in SBML, Reaction has a mandatory attribute, - \'id\', used to give the compartment type an identifier. The identifier - must be a text string conforming to the identifer syntax permitted in - SBML. In SBML Level 2 and Level 3, the reaction \'id\' - identifier can be used in mathematical formulas elsewhere in an SBML - model to represent the rate of that reaction; this usage is explained - below. Reaction also has an optional \'name\' attribute, of type @c - string. The \'id\' and \'name\' must be used according to the guidelines - described in the SBML specification. - - The species participating as reactants, products, and/or modifiers in a - reaction are declared using lists of SpeciesReference and/or - ModifierSpeciesReference instances stored in subelements - \'listOfReactants\', \'listOfProducts\' and \'listOfModifiers\'. Certain - restrictions are placed on the appearance of species in reaction - definitions: -
    -
  • The ability of a species to appear as a reactant or product of any - reaction in a model is governed by certain flags in that species\' - definition; see the definition of Species for more information. - -
  • Any species appearing in the mathematical formula of the subelement - \'kineticLaw\' (described below) of a Reaction must be declared in at - least one of that Reaction\'s lists of reactants, products, and/or - modifiers. Put another way, it is an error for a reaction\'s kinetic law - formula to refer to species that have not been declared for that - reaction. - -
  • A reaction definition can contain an empty list of reactants - or an empty list of products, but it must have at least one - reactant or product; in other words, a reaction without any reactant or - product species is not permitted. (This restriction does not apply to - modifier species, which remain optional in all cases.) -
- - A reaction can contain up to one KineticLaw object in a subelement named - \'kineticLaw\'. It defines the speed at which the process defined by the - reaction takes place. The description of KineticLaw provides more - details about its use. Note that although the inclusion of a KineticLaw - object in an instance of a Reaction component is optional, there is no - useful default that can be substituted in place of a missing rate - expression in a reaction. Moreover, a reaction\'s rate cannot be defined - in any other way in SBML—InitialAssignment, AssignmentRule, - RateRule, AlgebraicRule, Event, and other constructs in SBML cannot be - used to set the reaction rate separately. Nevertheless, for some - modeling applications, reactions without any defined rate can be - perfectly acceptable. - - Reaction also has a boolean attribute named \'reversible\' for indicating - whether the reaction is reversible. This attribute is optional in SBML - Level 2, with a default of @c True; it is mandatory in SBML - Level 3 (with no default value). To say that a reaction is @em - reversible is to say it can proceed in either the forward or the reverse - direction. Although the reversibility of a reaction can sometimes be - deduced by inspecting its rate expression, this is not always the case, - especially for complicated expressions. Moreover, the need in SBML to - allow rate expressions (i.e., KineticLaw) to be optional leads to the - need for a separate flag indicating reversibility. Note that labeling a - reaction as irreversible is an assertion that the reaction always - proceeds in the given forward direction. (Why else would it be flagged - as irreversible?) This implies the rate expression in the KineticLaw - always has a non-negative value during simulations. Software tools - could provide a means of optionally testing that this condition holds. - The presence of reversibility information in two places (i.e., the rate - expression and the \'reversible\' attribute on Reaction) leaves open the - possibility that a model could contain contradictory information, but - the creation of such a model would be an error on the part of the - software generating it. - - The Reaction object class has another boolean attribute called \'fast\'. - This attribute is optional in SBML Level 2, with a default of @c - false; it is mandatory in SBML Level 3 (with no default value). It - is used to indicate that a reaction occurs on a vastly faster time scale - than others in a system. Readers are directed to the SBML Level 2 - Version 4 specification, which provides more detail about the - conditions under which a reaction can be considered to be fast in this - sense. The attribute\'s default value is @c False. SBML Level 1 - and Level 2 Version 1 incorrectly claimed that software tools - could ignore this attribute if they did not implement support for the - corresponding concept; however, further research in SBML has revealed - that this is not true, and \'fast\' cannot be ignored if it is - set to @c True. SBML Level 2 Versions 2–4 therefore - stipulate that if a model has any reactions with \'fast\' set to @c True, - a software tool must be able to respect the attribute or else indicate - to the user that it does not have the capacity to do so. Analysis - software cannot ignore the value of the \'fast\' attribute because doing - so may lead to different results as compared to a software system that - does make use of \'fast\'. - - In SBML Level 3 Version 1, the Reaction object has an - additional optional attribute named \'compartment\', whose value must be - the identifier of a compartment defined in the enclosing Model object. - The \'compartment\' attribute can be used to indicate the compartment in - which the reaction is assumed to take place. If the attribute is - present, its value must be the identifier of a Compartment object - defined in the enclosing Model object. Similar to the \'reversible\' - attribute, the value of the \'compartment\' attribute has no direct impact - on the construction of mathematical equations for the SBML model. When - a kinetic law is given for a reaction, the compartment location may - already be implicit in the kinetic law (although this cannot always be - guaranteed). Nevertheless, software tools may find the \'compartment\' - attribute value useful for such purposes as analyzing the structure of - the model, guiding the modeler in constructing correct rate formulas, - and visualization purposes. - - Readers are urged to read the SBML specification for more details about - the proper use of Reaction. -"; - - -%feature("docstring") ListOfReactions " - @ingroup Core - Implementation of SBML\'s %ListOfReactions construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Reaction::Reaction " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Reaction(SBMLNamespaces sbmlns)
- - Creates a new Reaction using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Reaction object to an SBMLDocument (e.g., - using Model.addReaction()), the SBML XML namespace of the document - @em overrides the value used when creating the Reaction object via - this constructor. This is necessary to ensure that an SBML document - is a consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a Reaction is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
Reaction(long level, long version)
- - Creates a new Reaction using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Reaction - - @param version a long integer, the SBML Version to assign to this - Reaction - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Reaction object to an SBMLDocument (e.g., - using Model.addReaction()), the SBML Level, SBML Version and - XML namespace of the document @em override the values used when - creating the Reaction object via this constructor. This is necessary - to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a Reaction is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
Reaction(Reaction orig)
- - Copy constructor; creates a copy of this Reaction. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Reaction::accept " - Accepts the given SBMLVisitor for this instance of Reaction. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") Reaction::clone " - Creates and returns a deep copy of this Reaction. - - @return a (deep) copy of this Reaction. -"; - - -%feature("docstring") Reaction::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find. - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") Reaction::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") Reaction::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") Reaction::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Reaction::initDefaults " - Initializes the fields of this Reaction object to \'typical\' default - values. - - The SBML Reaction component has slightly different aspects and - default attribute values in different SBML Levels and Versions. - This method sets the values to certain common defaults, based - mostly on what they are in SBML Level 2. Specifically: -
    -
  • Sets the \'reversible\' attribute to @c True -
  • Sets the \'fast\' attribute to @c False -
  • Marks the \'fast\' attribute as @em not having been set -
- - @warning The \'fast\' attribute must be used with care. SBML - definitions before SBML Level 2 Version 2 incorrectly - indicated that software tools could ignore this attribute if they did - not implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and \'fast\' - cannot be ignored if it is set to @c True. Beginning with - SBML Level 2 Versions 2, the SBML specifications therefore - stipulate that if a model has any reactions with \'fast\' set to @c - true, a software tool must be able to respect the attribute or else - indicate to the user that it does not have the capacity to do so. - Readers are directed to the SBML specifications, which provides more - detail about the conditions under which a reaction can be considered - to be fast in this sense. -"; - - -%feature("docstring") Reaction::getId " - Returns the value of the \'id\' attribute of this Reaction. - - @return the id of this Reaction. -"; - - -%feature("docstring") Reaction::getName " - Returns the value of the \'name\' attribute of this Reaction. - - @return the name of this Reaction. -"; - - -%feature("docstring") Reaction::getKineticLaw " - Returns the KineticLaw object contained in this Reaction. - - @return the KineticLaw instance. -"; - - -%feature("docstring") Reaction::getReversible " - Returns the value of the \'reversible\' attribute on the Reaction as a - boolean value. - - @return the reversibility status of this Reaction. -"; - - -%feature("docstring") Reaction::getFast " - Returns the value of the \'fast\' attribute of this Reaction. - - @return the \'fast\' status of this Reaction. - - @warning SBML definitions before SBML Level 2 Version 2 incorrectly - indicated that software tools could ignore this attribute if they did - not implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and \'fast\' - cannot be ignored if it is set to @c True. SBML Level 2 - Versions 2, 3 and 4 therefore stipulate that if a model has any reactions - with \'fast\' set to @c True, a software tool must be able to respect - the attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML Level 2 Version - 4 specification, which provides more detail about the conditions under - which a reaction can be considered to be fast in this sense. -"; - - -%feature("docstring") Reaction::getCompartment " - (SBML Level 3 only) Returns the value of the \'compartment\' - attribute on the Reaction. - - @return the compartment of this Reaction. - - @note The \'compartment\' attribute is available in SBML Level 3 - Version 1 Core, but is not present on Reaction in lower Levels of - SBML. -"; - - -%feature("docstring") Reaction::isSetId " - Predicate returning @c True if this - Reaction\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this Reaction is - set, @c False otherwise. -"; - - -%feature("docstring") Reaction::isSetName " - Predicate returning @c True if this - Reaction\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this Reaction is - set, @c False otherwise. -"; - - -%feature("docstring") Reaction::isSetKineticLaw " - Predicate returning @c True if this - Reaction contains a kinetic law object. - - @return @c True if a KineticLaw is present in this Reaction,, @c False - otherwise. -"; - - -%feature("docstring") Reaction::isSetFast " - Predicate returning @c True if the value of - the \'fast\' attribute on this Reaction. - - @return @c True if the \'fast\' attribute is true, @c False otherwise. - - @warning SBML definitions before SBML Level 2 Version 2 incorrectly - indicated that software tools could ignore this attribute if they did - not implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and \'fast\' - cannot be ignored if it is set to @c True. SBML Level 2 - Versions 2, 3 and 4 therefore stipulate that if a model has any reactions - with \'fast\' set to @c True, a software tool must be able to respect - the attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML Level 2 Version - 4 specification, which provides more detail about the conditions under - which a reaction can be considered to be fast in this sense. Note - also that in SBML Level 1, \'fast\' is defined as optional with a - default of @c False, which means it is effectively always set. -"; - - -%feature("docstring") Reaction::isSetCompartment " - Predicate returning @c True if this - Reaction\'s \'compartment\' attribute is set. - - @return @c True if the \'compartment\' attribute of this Reaction is - set, @c False otherwise. - - @note The \'compartment\' attribute is available in SBML - Level 3 Version 1 Core, but is not present on Reaction in - lower Levels of SBML. -"; - - -%feature("docstring") Reaction::isSetReversible " - Predicate returning @c True if this - Reaction\'s \'reversible\' attribute is set. - - @return @c True if the \'reversible\' attribute of this Reaction is - set, @c False otherwise. -"; - - -%feature("docstring") Reaction::setId " - Sets the value of the \'id\' attribute of this Reaction. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this Reaction - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Reaction::setName " - Sets the value of the \'name\' attribute of this Reaction. - - The string in @p name is copied. - - @param name the new name for the Reaction - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Reaction::setKineticLaw " - Sets the \'kineticLaw\' subelement of this Reaction to a copy of the - given KineticLaw object. - - @param kl the KineticLaw object to use. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink -"; - - -%feature("docstring") Reaction::setReversible " - Sets the value of the \'reversible\' attribute of this Reaction. - - @param value the value of the \'reversible\' attribute. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") Reaction::setFast " - Sets the value of the \'fast\' attribute of this Reaction. - - @param value the value of the \'fast\' attribute. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @warning SBML definitions before SBML Level 2 Version 2 incorrectly - indicated that software tools could ignore this attribute if they did - not implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and \'fast\' - cannot be ignored if it is set to @c True. SBML Level 2 - Versions 2, 3 and 4 therefore stipulate that if a model has any reactions - with \'fast\' set to @c True, a software tool must be able to respect - the attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML Level 2 Version - 4 specification, which provides more detail about the conditions under - which a reaction can be considered to be fast in this sense. -"; - - -%feature("docstring") Reaction::setCompartment " - Sets the value of the \'compartment\' attribute of this Reaction. - - The string @p sid is copied. - - @param sid the string to use as the compartment of this Reaction - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The \'compartment\' attribute is available in SBML - Level 3 Version 1 Core, but is not present on Reaction in - lower Levels of SBML. -"; - - -%feature("docstring") Reaction::unsetName " - Unsets the value of the \'name\' attribute of this Reaction. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Reaction::unsetKineticLaw " - Unsets the \'kineticLaw\' subelement of this Reaction. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Reaction::unsetFast " - Unsets the value of the \'fast\' attribute of this Reaction. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @warning In SBML Level 1, \'fast\' is optional with a default of @c - false, which means it is effectively always set (and reset to @c False - if this method is called). Further, SBML definitions before SBML - Level 2 Version 2 incorrectly indicated that software tools could - ignore this attribute if they did not implement support for the - corresponding concept; however, further research in SBML has revealed - that this is not true, and \'fast\' cannot be ignored if it is - set to @c True. SBML Level 2 Versions 2, 3 and 4 therefore stipulate - that if a model has any reactions with \'fast\' set to @c True, a - software tool must be able to respect the attribute or else indicate - to the user that it does not have the capacity to do so. Readers are - directed to the SBML Level 2 Version 4 specification, which provides - more detail about the conditions under which a reaction can be - considered to be fast in this sense. -"; - - -%feature("docstring") Reaction::unsetCompartment " - Unsets the value of the \'compartment\' attribute of this Reaction. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The \'compartment\' attribute is available in SBML - Level 3 Version 1 Core, but is not present on Reaction in - lower Levels of SBML. -"; - - -%feature("docstring") Reaction::addReactant " - Adds a given SpeciesReference object as a reactant in this Reaction. - - The SpeciesReference instance in @p sr is copied. - - @param sr a SpeciesReference object referring to a Species in the - enclosing Model - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Reaction. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Reaction. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see Reaction.createReactant() - for a method that does not lead to these issues. - - @see createReactant() -"; - - -%feature("docstring") Reaction::addProduct " - Adds a given SpeciesReference object as a product in this Reaction. - - The SpeciesReference instance in @p sr is copied. - - @param sr a SpeciesReference object referring to a Species in the - enclosing Model - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Reaction. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Reaction. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see Reaction.createProduct() - for a method that does not lead to these issues. - - @see createProduct() -"; - - -%feature("docstring") Reaction::addModifier " - Adds a given ModifierSpeciesReference object as a product in this - Reaction. - - The ModifierSpeciesReference instance in @p msr is copied. - - @param msr a ModifierSpeciesReference object referring to a Species in - the enclosing Model - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Reaction. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Reaction. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see Reaction.createModifier() - for a method that does not lead to these issues. - - @see createModifier() -"; - - -%feature("docstring") Reaction::createReactant " - Creates a new SpeciesReference, adds it to this Reaction\'s list of - reactants, and returns it. - - @return a new SpeciesReference object. -"; - - -%feature("docstring") Reaction::createProduct " - Creates a new SpeciesReference, adds it to this Reaction\'s list of - products, and returns it. - - @return a new SpeciesReference object. -"; - - -%feature("docstring") Reaction::createModifier " - Creates a new ModifierSpeciesReference, adds it to this Reaction\'s - list of modifiers and returns it. - - @return a new ModifierSpeciesReference object. -"; - - -%feature("docstring") Reaction::createKineticLaw " - Creates a new KineticLaw object, installs it as this Reaction\'s - \'kineticLaw\' subelement, and returns it. - - If this Reaction had a previous KineticLaw, it will be destroyed. - - @return the new KineticLaw object -"; - - -%feature("docstring") Reaction::getListOfReactants " - Returns the list of reactants in this Reaction object. - - @return the ListOfSpeciesReferences containing the references to the - species acting as reactants in this reaction -"; - - -%feature("docstring") Reaction::getListOfProducts " - Returns the list of products in this Reaction object. - - @return the ListOfSpeciesReferences containing the references to the - species acting as products in this reaction -"; - - -%feature("docstring") Reaction::getListOfModifiers " - Returns the list of modifiers in this Reaction object. - - @return the ListOfSpeciesReferences containing the references to the - species acting as modifiers in this reaction -"; - - -%feature("docstring") Reaction::getReactant " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getReactant(string species)
- - Returns the reactant species (as a SpeciesReference object) having - a specific identifier in this Reaction. - - @param species the identifier of the reactant Species (\'species\' - attribute of the reactant SpeciesReference object) - - @return a SpeciesReference object, or @c None if no species with the - given identifier @p species appears as a reactant in this Reaction. - - -
- Method variant with the following signature: -
getReactant(long n)
- - Returns the nth reactant species (as a SpeciesReference object) - in the list of reactants in this Reaction. - - Callers should first call getNumReactants() to find out how many - reactants there are, to avoid using an invalid index number. - - @param n the index of the reactant sought. - - @return the nth reactant (as a SpeciesReference object) of this - Reaction. -"; - - -%feature("docstring") Reaction::getProduct " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getProduct(string species)
- - Returns the product species (as a SpeciesReference object) having - a specific identifier in this Reaction. - - @param species the identifier of the product Species (\'species\' - attribute of the product SpeciesReference object) - - @return a SpeciesReference object, or @c None if no species with the - given identifier @p species appears as a product in this Reaction. - - -
- Method variant with the following signature: -
getProduct(long n)
- - Returns the nth product species (as a SpeciesReference object) - in the list of products in this Reaction. - - Callers should first call getNumProducts() to find out how many - products there are, to avoid using an invalid index number. - - @param n the index of the product sought. - - @return the nth product (as a SpeciesReference object) of this - Reaction. -"; - - -%feature("docstring") Reaction::getModifier " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getModifier(string species)
- - Returns the modifier species (as a ModifierSpeciesReference object) - having a specific identifier in this Reaction. - - @param species the identifier of the modifier Species (\'species\' - attribute of the ModifierSpeciesReference object) - - @return a ModifierSpeciesReference object, or @c None if no species with - the given identifier @p species appears as a modifier in this - Reaction. - - -
- Method variant with the following signature: -
getModifier(long n)
- - Returns the nth modifier species (as a ModifierSpeciesReference object) - in the list of modifiers of this Reaction. - - Callers should first call getNumModifiers() to find out how many - modifiers there are, to avoid using an invalid index number. - - @param n the index of the modifier species sought - - @return the nth modifier (as a ModifierSpeciesReference object) of - this Reaction. -"; - - -%feature("docstring") Reaction::getNumReactants " - Returns the number of reactant species in this Reaction. - - @return the number of reactants in this Reaction. -"; - - -%feature("docstring") Reaction::getNumProducts " - Returns the number of product species in this Reaction. - - @return the number of products in this Reaction. -"; - - -%feature("docstring") Reaction::getNumModifiers " - Returns the number of modifier species in this Reaction. - - @return the number of modifiers in this Reaction. -"; - - -%feature("docstring") Reaction::removeReactant " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeReactant(string species)
- - Removes the reactant species (SpeciesReference object) having the given - \'species\' attribute in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param species the \'species\' attribute of the reactant SpeciesReference - object - - @return the removed reactant SpeciesReference object, or @c None if no - reactant SpeciesReference object with the given \'species\' attribute - @p species exists in this Reaction. - - -
- Method variant with the following signature: -
removeReactant(long n)
- - Removes the nth reactant species (SpeciesReference object) in the list of - reactants in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - The caller should first call getNumReactants() to find out how many - reactants there are, to avoid using an invalid index number. - - @param n the index of the reactant SpeciesReference object to remove - - @return the removed reactant SpeciesReference object, or @c None if the - given index is out of range. -"; - - -%feature("docstring") Reaction::removeProduct " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeProduct(string species)
- - Removes the product species (SpeciesReference object) having the given - \'species\' attribute in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param species the \'species\' attribute of the product SpeciesReference - object - - @return the removed product SpeciesReference object, or @c None if no - product SpeciesReference object with the given \'species\' attribute - @p species exists in this Reaction. - - -
- Method variant with the following signature: -
removeProduct(long n)
- - Removes the nth product species (SpeciesReference object) in the list of - products in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - The caller should first call getNumProducts() to find out how many - products there are, to avoid using an invalid index number. - - @param n the index of the product SpeciesReference object to remove - - @return the removed product SpeciesReference object, or @c None if the - given index is out of range. -"; - - -%feature("docstring") Reaction::removeModifier " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeModifier(string species)
- - Removes the modifier species (ModifierSpeciesReference object) having - the given \'species\' attribute in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param species the \'species\' attribute of the ModifierSpeciesReference - object - - @return the removed ModifierSpeciesReference object, or @c None if no - ModifierSpeciesReference object with the given \'species\' attribute @p - species exists in this Reaction. - - -
- Method variant with the following signature: -
removeModifier(long n)
- - Removes the nth modifier species (ModifierSpeciesReference object) in - the list of modifiers in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - The caller should first call getNumModifiers() to find out how many - modifiers there are, to avoid using an invalid index number. - - @param n the index of the ModifierSpeciesReference object to remove - - @return the removed ModifierSpeciesReference object, or @c None if the - given index is out of range. -"; - - -%feature("docstring") Reaction::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. -"; - - -%feature("docstring") Reaction::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") Reaction::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") Reaction::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Reaction::getElementName " - Returns the XML element name of this object, which for Reaction, is - always @c \'reaction\'. - - @return the name of this element, i.e., @c \'reaction\'. -"; - - -%feature("docstring") Reaction::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Reaction::hasRequiredAttributes " - Predicate returning @c True if all the required attributes for this - Reaction object have been set. - - @note The required attributes for a Reaction object are: - @li \'id\' (or \'name\' in SBML Level 1) - @li \'fast\' (in Level 3 only, where it is defined as a required attribute) - @li \'reversible\' (in Level 3 only, where it is defined as a required attribute) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Reaction::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Reaction::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Reaction::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Reaction::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Reaction::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Reaction::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Reaction::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Reaction::isExplicitlySetReversible " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Reaction::isExplicitlySetFast " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfReactions::ListOfReactions " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfReactions(SBMLNamespaces sbmlns)
- - Creates a new ListOfReactions object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfReactions object to be created. - - -
- Method variant with the following signature: -
ListOfReactions(long level, long version)
- - Creates a new ListOfReactions object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfReactions::clone " - Creates and returns a deep copy of this ListOfReactions instance. - - @return a (deep) copy of this ListOfReactions. -"; - - -%feature("docstring") ListOfReactions::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfReactions::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Reaction objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfReactions::getElementName " - Returns the XML element name of this object - - For ListOfReactions, the XML element name is @c \'listOfReactions\'. - - @return the name of this element, i.e., @c \'listOfReactions\'. -"; - - -%feature("docstring") ListOfReactions::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a Reaction from the ListOfReactions. - - @param n the index number of the Reaction to get. - - @return the nth Reaction in this ListOfReactions. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a Reaction from the ListOfReactions - based on its identifier. - - @param sid a string representing the identifier - of the Reaction to get. - - @return Reaction in this ListOfReactions - with the given @p sid or @c None if no such - Reaction exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfReactions::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfReactions items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfReactions items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfReactions::getElementPosition " - @internal - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfReactions::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") KineticLaw " - @ingroup Core - Implementation of %SBML\'s %KineticLaw construct. - - An object of class KineticLaw is used to describe the rate at which the - process defined by a given Reaction takes place. KineticLaw has - subelements called \'math\' (for MathML content) and \'listOfParameters\' - (of class ListOfParameters), in addition to the attributes and - subelements it inherits from SBase. - - KineticLaw\'s \'math\' subelement for holding a MathML formula defines the - rate of the reaction. The formula may refer to other entities in a - model as well as local parameter definitions within the scope of the - Reaction (see below). It is important to keep in mind, however, that - the only Species identifiers that can be used in this formula are those - declared in the lists of reactants, products and modifiers in the - Reaction structure. (In other words, before a species can be referenced - in the KineticLaw, it must be declared in one of those lists.) - - KineticLaw provides a way to define @em local parameters whose - identifiers can be used in the \'math\' formula of that KineticLaw - instance. Prior to SBML Level 3, these parameter definitions are - stored inside a \'listOfParameters\' subelement containing Parameter - objects; in SBML Level 3, this is achieved using a specialized - object class called LocalParameter and the containing subelement is - called \'listOfLocalParameters\'. In both cases, the parameters so - defined are only visible within the KineticLaw; they cannot be accessed - outside. A local parameter within one reaction is not visible from - within another reaction, nor is it visible to any other construct - outside of the KineticLaw in which it is defined. In addition, another - important feature is that if such a Parameter (or in Level 3, - LocalParameter) object has the same identifier as another object in the - scope of the enclosing Model, the definition inside the KineticLaw takes - precedence. In other words, within the KineticLaw\'s \'math\' formula, - references to local parameter identifiers shadow any identical - global identifiers. - - The values of local parameters defined within KineticLaw objects cannot - change. In SBML Level 3, this quality is built into the - LocalParameter construct. In Level 2, where the same kind of - Parameter object class is used as for global parameters, the Parameter - objects\' \'constant\' attribute must always have a value of @c True - (either explicitly or left to its default value). - - - @section shadowing-warning A warning about identifier shadowing - - A common misconception is that different classes of objects (e.g., - species, compartments, parameters) in SBML have different identifier - scopes. They do not. The implication is that if a KineticLaw\'s local - parameter definition uses an identifier identical to @em any other - identifier defined in the model outside the KineticLaw, even if the - other identifier does @em not belong to a parameter type of object, the - local parameter\'s identifier takes precedence within that KineticLaw\'s - \'math\' formula. It is not an error in SBML for identifiers to shadow - each other this way, but can lead to confusing and subtle errors. - - - @section version-diffs SBML Level/Version differences - - In SBML Level 2 Version 1, the SBML specification - included two additional attributes on KineticLaw called \'substanceUnits\' - and \'timeUnits\'. They were removed beginning with SBML Level 2 - Version 2 because further research determined they introduced many - problems. The most significant problem was that their use could easily - lead to the creation of valid models whose reactions nevertheless could - not be integrated into a system of equations without outside knowledge - for converting the quantities used. Examination of real-life models - revealed that a common reason for using \'substanceUnits\' on KineticLaw - was to set the units of all reactions to the same set of substance - units, something that is better achieved by using UnitDefinition to - redefine @c \'substance\' for the whole Model. - - As mentioned above, in SBML Level 2 Versions 2–4, local - parameters are of class Parameter. In SBML Level 3, the class of - object is LocalParameter. -"; - - -%feature("docstring") KineticLaw::KineticLaw " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
KineticLaw(SBMLNamespaces sbmlns)
- - Creates a new KineticLaw using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a KineticLaw object to an SBMLDocument - (e.g., using Reaction.setKineticLaw()), the SBML XML namespace of the - document @em overrides the value used when creating the KineticLaw - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a KineticLaw is an - important aid to producing valid SBML. Knowledge of the intented SBML - Level and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - -
- Method variant with the following signature: -
KineticLaw(long level, long version)
- - Creates a new KineticLaw using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this KineticLaw - - @param version a long integer, the SBML Version to assign to this - KineticLaw - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a KineticLaw object to an SBMLDocument - (e.g., using Reaction.setKineticLaw()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used - when creating the KineticLaw object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of creation - of a KineticLaw is an important aid to producing valid SBML. Knowledge - of the intented SBML Level and Version determine whether it is valid - to assign a particular value to an attribute, or whether it is valid - to add an object to an existing SBMLDocument. - - -
- Method variant with the following signature: -
KineticLaw(KineticLaw orig)
- - Copy constructor; creates a copy of this KineticLaw. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") KineticLaw::accept " - Accepts the given SBMLVisitor for this instance of KineticLaw. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") KineticLaw::clone " - Creates and returns a deep copy of this KineticLaw object. - - @return a (deep) copy of this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find. - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") KineticLaw::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") KineticLaw::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") KineticLaw::getFormula " - Returns the mathematical formula for this KineticLaw object and return - it as as a text string. - - This is fundamentally equivalent to - @if java KineticLaw.getMath()@else getMath()@endif. - This variant is provided principally for compatibility compatibility - with SBML Level 1. - - @return a string representing the formula of this KineticLaw. - - @note @htmlinclude level-1-uses-text-string-math.html - - @see getMath() -"; - - -%feature("docstring") KineticLaw::getMath " - Returns the mathematical formula for this KineticLaw object and return - it as as an AST. - - This is fundamentally equivalent to - @if java KineticLaw.getFormula()@else getFormula()@endif. - The latter is provided principally for compatibility compatibility - with SBML Level 1, which represented mathematical formulas in - text-string form. - - @return the ASTNode representation of the mathematical formula. - - @see getFormula() -"; - - -%feature("docstring") KineticLaw::getTimeUnits " - (SBML Level 2 Version 1 only) Returns the value of the - \'timeUnits\' attribute of this KineticLaw object. - - @return the \'timeUnits\' attribute value. - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::getSubstanceUnits " - (SBML Level 2 Version 1 only) Returns the value of the - \'substanceUnits\' attribute of this KineticLaw object. - - @return the \'substanceUnits\' attribute value. - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::isSetFormula " - Predicate returning @c True if this - KineticLaw\'s \'formula\' attribute is set. - - This is functionally identical to the method - @if java KineticLaw.isSetMath()@else isSetMath()@endif. It is - provided in order to mirror the parallel between - @if java KineticLaw.getFormula()@else getFormula()@endif@~ and - @if java KineticLaw.getMath()@else getMath()@endif. - - @return @c True if the formula (meaning the @c math subelement) of - this KineticLaw is set, @c False otherwise. - - @note @htmlinclude level-1-uses-text-string-math.html - - @see isSetMath() -"; - - -%feature("docstring") KineticLaw::isSetMath " - Predicate returning @c True if this - Kinetic\'s \'math\' subelement is set. - - This is identical to the method - @if java KineticLaw.isSetFormula()@else isSetFormula()@endif. - It is provided in order to mirror the parallel between - @if java KineticLaw.getFormula()@else getFormula()@endif@~ and - @if java KineticLaw.getMath()@else getMath()@endif. - - @return @c True if the formula (meaning the @c math subelement) of - this KineticLaw is set, @c False otherwise. - - @see isSetFormula() -"; - - -%feature("docstring") KineticLaw::isSetTimeUnits " - (SBML Level 2 Version 1 only) Predicate returning @c True if - this SpeciesReference\'s \'timeUnits\' attribute is set. - - @return @c True if the \'timeUnits\' attribute of this KineticLaw object - is set, @c False otherwise. - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::isSetSubstanceUnits " - (SBML Level 2 Version 1 only) Predicate returning @c True if - this SpeciesReference\'s \'substanceUnits\' attribute is set. - - @return @c True if the \'substanceUnits\' attribute of this KineticLaw - object is set, @c False otherwise. - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::setFormula " - Sets the mathematical expression of this KineticLaw instance to the - given @p formula. - - The given @p formula string is copied. Internally, libSBML stores the - mathematical expression as an ASTNode. - - @param formula the mathematical expression to use, represented in - text-string form. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note @htmlinclude level-1-uses-text-string-math.html - - @see setMath() -"; - - -%feature("docstring") KineticLaw::setMath " - Sets the mathematical expression of this KineticLaw instance to a copy - of the given ASTNode. - - This is fundamentally identical to - @if java KineticLaw.setFormula()@else getFormula()@endif. - The latter is provided principally for compatibility compatibility with - SBML Level 1, which represented mathematical formulas in text-string - form. - - @param math an ASTNode representing a formula tree. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @see setFormula() -"; - - -%feature("docstring") KineticLaw::setTimeUnits " - (SBML Level 2 Version 1 only) Sets the \'timeUnits\' attribute - of this KineticLaw object to a copy of the identifier in @p sid. - - @param sid the identifier of the units to use. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::setSubstanceUnits " - (SBML Level 2 Version 1 only) Sets the \'substanceUnits\' - attribute of this KineticLaw object to a copy of the identifier given - in @p sid. - - @param sid the identifier of the units to use. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::unsetTimeUnits " - (SBML Level 2 Version 1 only) Unsets the \'timeUnits\' - attribugte of this KineticLaw object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::unsetSubstanceUnits " - (SBML Level 2 Version 1 only) Unsets the \'substanceUnits\' - attribute of this KineticLaw object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attributes \'timeUnits\' and \'substanceUnits\' are present only - in SBML Level 2 Version 1. In SBML Level 2 - Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were - removed. For compatibility with new versions of SBML, users are - cautioned to avoid these attributes. -"; - - -%feature("docstring") KineticLaw::addParameter " - Adds a copy of the given Parameter object to the list of local - parameters in this KineticLaw. - - @param p the Parameter to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this KineticLaw. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the KineticLaw. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see - @if java KineticLaw.createParameter()@else createParameter()@endif@~ - for a method that does not lead to these issues. - - @see createParameter() -"; - - -%feature("docstring") KineticLaw::addLocalParameter " - Adds a copy of the given LocalParameter object to the list of local - parameters in this KineticLaw. - - @param p the LocalParameter to add - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this KineticLaw. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the KineticLaw. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see - @if java KineticLaw.createParameter()@else createParameter()@endif@~ - for a method that does not lead to these issues. - - @see createLocalParameter() -"; - - -%feature("docstring") KineticLaw::createParameter " - Creates a new Parameter object, adds it to this KineticLaw\'s list of - local parameters, and returns the Parameter object created. - - @return a new Parameter object instance - - @see addParameter() -"; - - -%feature("docstring") KineticLaw::createLocalParameter " - Creates a new LocalParameter object, adds it to this KineticLaw\'s list - of local parameters, and returns the LocalParameter object created. - - @return a new LocalParameter object instance - - @see addLocalParameter() -"; - - -%feature("docstring") KineticLaw::getListOfParameters " - Returns the list of local parameters in this KineticLaw object. - - @return the list of Parameters for this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getListOfLocalParameters " - Returns the list of local parameters in this KineticLaw object. - - @return the list of LocalParameters for this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getParameter(long n)
- - Returns the nth Parameter object in the list of local parameters in - this KineticLaw instance. - - @param n the index of the Parameter object sought - - @return the nth Parameter of this KineticLaw. - - -
- Method variant with the following signature: -
getParameter(string sid)
- - Returns a local parameter based on its identifier. - - @param sid the identifier of the Parameter being sought. - - @return the Parameter object in this KineticLaw instace having the - given \'id\', or @c None if no such Parameter exists. -"; - - -%feature("docstring") KineticLaw::getLocalParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getLocalParameter(long n)
- - Returns the nth LocalParameter object in the list of local parameters in - this KineticLaw instance. - - @param n the index of the LocalParameter object sought - - @return the nth LocalParameter of this KineticLaw. - - -
- Method variant with the following signature: -
getLocalParameter(string sid)
- - Returns a local parameter based on its identifier. - - @param sid the identifier of the LocalParameter being sought. - - @return the LocalParameter object in this KineticLaw instace having the - given \'id\', or @c None if no such LocalParameter exists. -"; - - -%feature("docstring") KineticLaw::getNumParameters " - Returns the number of local parameters in this KineticLaw instance. - - @return the number of Parameters in this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getNumLocalParameters " - Returns the number of local parameters in this KineticLaw instance. - - @return the number of LocalParameters in this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units - of measurement assumed for the \'math\' expression of this - KineticLaw. - - The units are calculated based on the mathematical expression in the - KineticLaw and the model quantities referenced by - <ci> elements used within that expression. The - @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - method returns the calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - @warning Note that it is possible the \'math\' expression in the - KineticLaw contains pure numbers or parameters with undeclared - units. In those cases, it is not possible to calculate the units of - the overall expression without making assumptions. LibSBML does not - make assumptions about the units, and - @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - only returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has - unambiguously-defined units and Y does not, it will return - the units of X. It is important that callers also - invoke the method - @if java KineticLaw.containsUndeclaredUnits()@else containsUndeclaredUnits()@endif@~ - to determine whether this situation holds. Callers may - wish to take suitable actions in those scenarios. - - @return a UnitDefinition that expresses the units of the math - expression of this KineticLaw, or @c None if one cannot be constructed. - - @see containsUndeclaredUnits() -"; - - -%feature("docstring") KineticLaw::containsUndeclaredUnits " - Predicate returning @c True if - the math expression of this KineticLaw contains - parameters/numbers with undeclared units. - - @return @c True if the math expression of this KineticLaw - includes parameters/numbers - with undeclared units, @c False otherwise. - - @note A return value of @c True indicates that the UnitDefinition - returned by - @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ - may not accurately represent the units of the expression. - - @see getDerivedUnitDefinition() -"; - - -%feature("docstring") KineticLaw::removeParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeParameter(long n)
- - Removes the nth Parameter object in the list of local parameters - in this KineticLaw instance and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the Parameter object to remove - - @return the Parameter object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - -
- Method variant with the following signature: -
removeParameter(string sid)
- - Removes a Parameter object with the given identifier in the list of - local parameters in this KineticLaw instance and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param sid the identifier of the Parameter to remove - - @return the Parameter object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no Parameter - object with the identifier exists in this KineticLaw instance. -"; - - -%feature("docstring") KineticLaw::removeLocalParameter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeLocalParameter(long n)
- - Removes the nth LocalParameter object in the list of local parameters - in this KineticLaw instance and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the LocalParameter object to remove - - @return the LocalParameter object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. - - -
- Method variant with the following signature: -
removeLocalParameter(string sid)
- - Removes a LocalParameter object with the given identifier in the list of - local parameters in this KineticLaw instance and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param sid the identifier of the LocalParameter to remove - - @return the LocalParameter object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no LocalParameter - object with the identifier exists in this KineticLaw instance. -"; - - -%feature("docstring") KineticLaw::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. - - @param d the SBMLDocument to use. -"; - - -%feature("docstring") KineticLaw::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") KineticLaw::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") KineticLaw::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link - libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") KineticLaw::getElementName " - Returns the XML element name of this object, which for Species, is - always @c \'kineticLaw\'. - - @return the name of this element, i.e., @c \'kineticLaw\'. -"; - - -%feature("docstring") KineticLaw::getElementPosition " - @internal - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") KineticLaw::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") KineticLaw::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this KineticLaw object - have been set. - - @note The required attributes for a KineticLaw object are: - @li \'formula\' (SBML Level 1 only) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") KineticLaw::hasRequiredElements " - Predicate returning @c True if - all the required elements for this KineticLaw object - have been set. - - @note The required elements for a KineticLaw object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") KineticLaw::removeFromParentAndDelete " - Finds this KineticLaw\'s Reaction parent and calls unsetKineticLaw() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") KineticLaw::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") KineticLaw::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") KineticLaw::getInternalId " - @internal - Renames all the @c UnitSIdRef attributes on this element - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") KineticLaw::setInternalId " - @internal - Renames all the @c UnitSIdRef attributes on this element - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") KineticLaw::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") KineticLaw::divideAssignmentsToSIdByFunction " - @internal - If this reaction id matches the provided \'id\' string, replace the \'math\' object with the function (existing/function). -"; - - -%feature("docstring") KineticLaw::multiplyAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). -"; - - -%feature("docstring") KineticLaw::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") KineticLaw::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") KineticLaw::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") KineticLaw::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") KineticLaw::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") KineticLaw::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") KineticLaw::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") KineticLaw::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SimpleSpeciesReference " - @ingroup Core - Implementation of %SBML\'s %SimpleSpeciesReference construct. - - As mentioned in the description of Reaction, every species that enters - into a given reaction must appear in that reaction\'s lists of reactants, - products and/or modifiers. In an SBML model, all species that may - participate in any reaction are listed in the \'listOfSpecies\' element of - the top-level Model object. Lists of products, reactants and modifiers - in Reaction objects do not introduce new species, but rather, they refer - back to those listed in the model\'s top-level \'listOfSpecies\'. For - reactants and products, the connection is made using SpeciesReference - objects; for modifiers, it is made using ModifierSpeciesReference - objects. SimpleSpeciesReference is an abstract type that serves as the - parent class of both SpeciesReference and ModifierSpeciesReference. It - is used simply to hold the attributes and elements that are common to - the latter two structures. - - The SimpleSpeciesReference structure has a mandatory attribute, - \'species\', which must be a text string conforming to the identifer - syntax permitted in %SBML. This attribute is inherited by the - SpeciesReference and ModifierSpeciesReference subclasses derived from - SimpleSpeciesReference. The value of the \'species\' attribute must be - the identifier of a species defined in the enclosing Model. The species - is thereby declared as participating in the reaction being defined. The - precise role of that species as a reactant, product, or modifier in the - reaction is determined by the subclass of SimpleSpeciesReference (i.e., - either SpeciesReference or ModifierSpeciesReference) in which the - identifier appears. - - SimpleSpeciesReference also contains an optional attribute, \'id\', - allowing instances to be referenced from other structures. No SBML - structures currently do this; however, such structures are anticipated - in future SBML Levels. -"; - - -%feature("docstring") SimpleSpeciesReference::SimpleSpeciesReference " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
SimpleSpeciesReference(long level, long version)
- - Creates a new SimpleSpeciesReference using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this SimpleSpeciesReference - - @param version a long integer, the SBML Version to assign to this - SimpleSpeciesReference - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - -
- Method variant with the following signature: -
SimpleSpeciesReference(SimpleSpeciesReference orig)
- - Copy constructor; creates a copy of this SimpleSpeciesReference. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") SimpleSpeciesReference::accept " - Accepts the given SBMLVisitor. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") SimpleSpeciesReference::getId " - Returns the value of the \'id\' attribute of this SimpleSpeciesReference. - - @return the id of this SimpleSpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::getName " - Returns the value of the \'name\' attribute of this SimpleSpeciesReference. - - @return the name of this SimpleSpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::getSpecies " - Get the value of the \'species\' attribute. - - @return the value of the attribute \'species\' for this - SimpleSpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::isSetId " - Predicate returning @c True if this - SimpleSpeciesReference\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this SimpleSpeciesReference is - set, @c False otherwise. -"; - - -%feature("docstring") SimpleSpeciesReference::isSetName " - Predicate returning @c True if this - SimpleSpeciesReference\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this SimpleSpeciesReference is - set, @c False otherwise. -"; - - -%feature("docstring") SimpleSpeciesReference::isSetSpecies " - Predicate returning @c True if this - SimpleSpeciesReference\'s \'species\' attribute is set. - - @return @c True if the \'species\' attribute of this - SimpleSpeciesReference is set, @c False otherwise. -"; - - -%feature("docstring") SimpleSpeciesReference::setSpecies " - Sets the \'species\' attribute of this SimpleSpeciesReference. - - The identifier string passed in @p sid is copied. - - @param sid the identifier of a species defined in the enclosing - Model\'s ListOfSpecies. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SimpleSpeciesReference::setId " - Sets the value of the \'id\' attribute of this SimpleSpeciesReference. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this SimpleSpeciesReference - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") SimpleSpeciesReference::setName " - Sets the value of the \'name\' attribute of this SimpleSpeciesReference. - - The string in @p name is copied. - - @param name the new name for the SimpleSpeciesReference - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") SimpleSpeciesReference::unsetId " - Unsets the value of the \'id\' attribute of this SimpleSpeciesReference. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SimpleSpeciesReference::unsetName " - Unsets the value of the \'name\' attribute of this SimpleSpeciesReference. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SimpleSpeciesReference::isModifier " - Predicate returning @c True if this - is a ModifierSpeciesReference. - - @return @c True if this SimpleSpeciesReference\'s subclass is - ModiferSpeciesReference, @c False if it is a plain SpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") SimpleSpeciesReference::hasRequiredAttributes " - @internal - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") SimpleSpeciesReference::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") SimpleSpeciesReference::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SimpleSpeciesReference::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SimpleSpeciesReference::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SimpleSpeciesReference::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SimpleSpeciesReference::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SpeciesReference " - @ingroup Core - Implementation of %SBML\'s %SpeciesReference construct. - - The Reaction structure provides a way to express which species act as - reactants and which species act as products in a reaction. In a given - reaction, references to those species acting as reactants and/or - products are made using instances of SpeciesReference structures in a - Reaction object\'s lists of reactants and products. - - A species can occur more than once in the lists of reactants and - products of a given Reaction instance. The effective stoichiometry for - a species in a reaction is the sum of the stoichiometry values given on - the SpeciesReference object in the list of products minus the sum of - stoichiometry values given on the SpeciesReference objects in the list - of reactants. A positive value indicates the species is effectively a - product and a negative value indicates the species is effectively a - reactant. SBML places no restrictions on the effective stoichiometry of - a species in a reaction; for example, it can be zero. In the following - SBML fragment, the two reactions have the same effective stoichiometry - for all their species: - @verbatim - - - - - - - - - - - - - - - - - - - - @endverbatim - - The precise structure of SpeciesReference differs between SBML - Level 2 and Level 3. We discuss the two variants in separate - sections below. - - @section spr-l2 SpeciesReference in SBML Level 2 - - The mandatory \'species\' attribute of SpeciesReference must have as its - value the identifier of an existing species defined in the enclosing - Model. The species is thereby designated as a reactant or product in - the reaction. Which one it is (i.e., reactant or product) is indicated - by whether the SpeciesReference appears in the Reaction\'s \'reactant\' or - \'product\' lists. - - Product and reactant stoichiometries can be specified using - either \'stoichiometry\' or \'stoichiometryMath\' in a - SpeciesReference object. The \'stoichiometry\' attribute is of type - double and should contain values greater than zero (0). The - \'stoichiometryMath\' element is implemented as an element containing a - MathML expression. These two are mutually exclusive; only one of - \'stoichiometry\' or \'stoichiometryMath\' should be defined in a given - SpeciesReference instance. When neither the attribute nor the element - is present, the value of \'stoichiometry\' in the SpeciesReference - instance defaults to @c 1. - - For maximum interoperability, the \'stoichiometry\' attribute should be - used in preference to \'stoichiometryMath\' when a species\' stoichiometry - is a simple scalar number (integer or decimal). When the stoichiometry - is a rational number, or when it is a more complicated formula, - \'stoichiometryMath\' must be used. The MathML expression in - \'stoichiometryMath\' may also refer to identifiers of entities in a model - (except reaction identifiers). However, the only species identifiers - that can be used in \'stoichiometryMath\' are those referenced in the - Reaction list of reactants, products and modifiers. - - The following is a simple example of a species reference for species @c - X0, with stoichiometry @c 2, in a list of reactants within a reaction - having the identifier @c J1: - @verbatim - - ... - - - - - - ... - - ... - - ... - - @endverbatim - - The following is a more complex example of a species reference for - species X0, with a stoichiometry formula consisting of the parameter - @c x: - @verbatim - - ... - - - - - - - x - - - - - ... - - ... - - ... - - @endverbatim - - - @section spr-l3 SpeciesReference in SBML Level 3 - - In Level 2\'s definition of a reaction, the stoichiometry attribute of a - SpeciesReference is actually a combination of two factors, the standard - biochemical stoichiometry and a conversion factor that may be needed to - translate the units of the species quantity to the units of the reaction - rate. Unfortunately, Level 2 offers no direct way of decoupling - these two factors, or for explicitly indicating the units. The only way - to do it in Level 2 is to use the StoichiometryMath object - associated with SpeciesReferences, and to reference SBML Parameter - objects from within the StoichiometryMath formula. This works because - Parameter offers a way to attach units to a numerical value, but the - solution is indirect and awkward for something that should be a simple - matter. Moreover, the question of how to properly encode - stoichiometries in SBML reactions has caused much confusion among - implementors of SBML software. - - SBML Level 3 approaches this problem differently. It (1) extends - the the use of the SpeciesReference identifier to represent the value of - the \'stoichiometry\' attribute, (2) makes the \'stoichiometry\' attribute - optional, (3) removes StoichiometryMath, and (4) adds a new \'constant\' - boolean attribute on SpeciesReference. - - As in Level 2, the \'stoichiometry\' attribute is of type - @c double and should contain values greater than zero (@c 0). A - missing \'stoichiometry\' implies that the stoichiometry is either - unknown, or to be obtained from an external source, or determined by an - InitialAssignment object or other SBML construct elsewhere in the model. - - A species reference\'s stoichiometry is set by its \'stoichiometry\' - attribute exactly once. If the SpeciesReference object\'s \'constant\' - attribute has the value @c True, then the stoichiometry is fixed and - cannot be changed except by an InitialAssignment object. These two - methods of setting the stoichiometry (i.e., using \'stoichiometry\' - directly, or using InitialAssignment) differ in that the \'stoichiometry\' - attribute can only be set to a literal floating-point number, whereas - InitialAssignment allows the value to be set using an arbitrary - mathematical expression. (As an example, the approach could be used to - set the stoichiometry to a rational number of the form @em p/@em q, - where @em p and @em q are integers, something that is occasionally - useful in the context of biochemical reaction networks.) If the species - reference\'s \'constant\' attribute has the value @c False, the species - reference\'s value may be overridden by an InitialAssignment or changed - by AssignmentRule or AlgebraicRule, and in addition, for simulation time - t > 0, it may also be changed by a RateRule or Event - objects. (However, some of these constructs are mutually exclusive; see - the SBML Level 3 Version 1 Core specifiation for more - details.) It is not an error to define \'stoichiometry\' on a species - reference and also redefine the stoichiometry using an - InitialAssignment, but the \'stoichiometry\' attribute in that case is - ignored. - - The value of the \'id\' attribute of a SpeciesReference can be used as the - content of a <ci> element in MathML formulas - elsewhere in the model. When the identifier appears in a MathML - <ci> element, it represents the stoichiometry of the - corresponding species in the reaction where the SpeciesReference object - instance appears. More specifically, it represents the value of the - \'stoichiometry\' attribute on the SpeciesReference object. - - In SBML Level 3, the unit of measurement associated with the value of a - species\' stoichiometry is always considered to be @c dimensionless. - This has the following implications: -
    - -
  • When a species reference\'s identifier appears in mathematical - formulas elsewhere in the model, the unit associated with that value is - @c dimensionless. - -
  • The units of the \'math\' elements of AssignmentRule, - InitialAssignment and EventAssignment objects setting the stoichiometry - of the species reference should be @c dimensionless. - -
  • If a species reference\'s identifier is the subject of a RateRule, - the unit associated with the RateRule object\'s value should be - dimensionless/time, where time is the - model-wide unit of time set on the Model object. - -
- - -"; - - -%feature("docstring") ListOfSpeciesReferences " - @ingroup Core - Implementation of SBML\'s %ListOfSpeciesReferences construct. - - The ListOfSpeciesReferences class is used to store lists of reactants - and products in a Reaction object. - - As with the various other ListOf___ classes in %SBML, the - ListOfSpeciesReferences is merely a container used for organizing - instances of other objects, in this case SpeciesReference objects. - ListOfSpeciesReferences is derived from the abstract class SBase, and - inherit the various attributes and subelements of SBase, such as - \'metaid\' as and \'annotation\'. The ListOf___ classes do not add any - attributes of their own. -"; - - -%feature("docstring") SpeciesReference::SpeciesReference " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
SpeciesReference(SBMLNamespaces sbmlns)
- - Creates a new SpeciesReference using the given SBMLNamespaces object - @p sbmlns. - - @param sbmlns an SBMLNamespaces object. - - @note Upon the addition of a SpeciesReference object to a Model (e.g., - using Reaction.addReactant() or - Reaction.addProduct()), the SBML Level, - SBML Version and XML namespace of the document @em override the values - used when creating the SpeciesReference object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the time - of creation of a SpeciesReference is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
SpeciesReference(long level, long version)
- - Creates a new SpeciesReference using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this SpeciesReference - - @param version a long integer, the SBML Version to assign to this - SpeciesReference - - @note Upon the addition of a SpeciesReference object to a Model (e.g., - using Reaction.addReactant() or - Reaction.addProduct()), the SBML Level, - SBML Version and XML namespace of the document @em override the values - used when creating the SpeciesReference object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the time - of creation of a SpeciesReference is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
SpeciesReference(SpeciesReference orig)
- - Copy constructor; creates a copy of this SpeciesReference. - - @param orig the SpeciesReference instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") SpeciesReference::accept " - Accepts the given SBMLVisitor. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") SpeciesReference::clone " - Creates and returns a deep copy of this SpeciesReference instance. - - @return a (deep) copy of this SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::initDefaults " - Initializes the fields of this SpeciesReference object to \'typical\' - default values. - - The SBML SpeciesReference component has slightly different aspects and - default attribute values in different SBML Levels and Versions. - This method sets the values to certain common defaults, based - mostly on what they are in SBML Level 2. Specifically: -
    -
  • Sets attribute \'stoichiometry\' to @c 1.0 -
  • (Applies to Level 1 models only) Sets attribute \'denominator\' to @c 1 -
- - @see getDenominator() - @see setDenominator() - @see getStoichiometry() - @see setStoichiometry() - @see getStoichiometryMath() - @see setStoichiometryMath() -"; - - -%feature("docstring") SpeciesReference::getStoichiometry " - Get the value of the \'stoichiometry\' attribute. - - In SBML Level 2, product and reactant stoichiometries can be specified - using either \'stoichiometry\' or \'stoichiometryMath\' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The \'stoichiometry\' - attribute is of type @c double and should contain values greater than - zero (@c 0). The \'stoichiometryMath\' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of \'stoichiometry\' in - the SpeciesReference instance defaults to @c 1. For maximum - interoperability between different software tools, the \'stoichiometry\' - attribute should be used in preference to \'stoichiometryMath\' when a - species\' stoichiometry is a simple scalar number (integer or - decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the \'stoichiometry\' attribute. - - @return the value of the (scalar) \'stoichiometry\' attribute of this - SpeciesReference. - - @see getStoichiometryMath() -"; - - -%feature("docstring") SpeciesReference::getStoichiometryMath " - Get the content of the \'stoichiometryMath\' subelement as an ASTNode - tree. - - The \'stoichiometryMath\' element exists only in SBML Level 2. There, - product and reactant stoichiometries can be specified using - either \'stoichiometry\' or \'stoichiometryMath\' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The \'stoichiometry\' - attribute is of type @c double and should contain values greater than - zero (@c 0). The \'stoichiometryMath\' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of \'stoichiometry\' in - the SpeciesReference instance defaults to @c 1. For maximum - interoperability between different software tools, the \'stoichiometry\' - attribute should be used in preference to \'stoichiometryMath\' when a - species\' stoichiometry is a simple scalar number (integer or decimal). - - @return the content of the \'stoichiometryMath\' subelement of this - SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::getDenominator " - Get the value of the \'denominator\' attribute, for the case of a - rational-numbered stoichiometry or a model in SBML Level 1. - - The \'denominator\' attribute is only actually written out in the case - of an SBML Level 1 model. In SBML Level 2, rational-number - stoichiometries are written as MathML elements in the - \'stoichiometryMath\' subelement. However, as a convenience to users, - libSBML allows the creation and manipulation of rational-number - stoichiometries by supplying the numerator and denominator directly - rather than having to manually create an ASTNode structure. LibSBML - will write out the appropriate constructs (either a combination of - \'stoichiometry\' and \'denominator\' in the case of SBML Level 1, or a - \'stoichiometryMath\' subelement in the case of SBML Level 2). - - @return the value of the \'denominator\' attribute of this - SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::getConstant " - Get the value of the \'constant\' attribute. - - @return the value of the \'constant\' attribute of this - SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::isSetStoichiometryMath " - Predicate returning @c True if this - SpeciesReference\'s \'stoichiometryMath\' subelement is set - - @return @c True if the \'stoichiometryMath\' subelement of this - SpeciesReference is set, @c False otherwise. -"; - - -%feature("docstring") SpeciesReference::isSetConstant " - Predicate returning @c True if this - SpeciesReference\'s \'constant\' attribute is set - - @return @c True if the \'constant\' attribute of this - SpeciesReference is set, @c False otherwise. -"; - - -%feature("docstring") SpeciesReference::isSetStoichiometry " - Predicate returning @c True if this - SpeciesReference\'s \'stoichiometry\' attribute is set. - - @return @c True if the \'stoichiometry\' attribute of this - SpeciesReference is set, @c False otherwise. -"; - - -%feature("docstring") SpeciesReference::setStoichiometry " - Sets the value of the \'stoichiometry\' attribute of this - SpeciesReference. - - In SBML Level 2, product and reactant stoichiometries can be specified - using either \'stoichiometry\' or \'stoichiometryMath\' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The \'stoichiometry\' - attribute is of type @c double and should contain values greater than - zero (@c 0). The \'stoichiometryMath\' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of \'stoichiometry\' in - the SpeciesReference instance defaults to @c 1. For maximum - interoperability between different software tools, the \'stoichiometry\' - attribute should be used in preference to \'stoichiometryMath\' when a - species\' stoichiometry is a simple scalar number (integer or - decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the \'stoichiometry\' attribute. - - @param value the new value of the \'stoichiometry\' attribute - - @note In SBML Level 2, the \'stoichiometryMath\' subelement of this - SpeciesReference object will be unset because the \'stoichiometry\' - attribute and the stoichiometryMath\' subelement are mutually - exclusive. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") SpeciesReference::setStoichiometryMath " - Sets the \'stoichiometryMath\' subelement of this SpeciesReference. - - The Abstract Syntax Tree in @p math is copied. - - In SBML Level 2, product and reactant stoichiometries can be specified - using either \'stoichiometry\' or \'stoichiometryMath\' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The \'stoichiometry\' - attribute is of type @c double and should contain values greater than - zero (@c 0). The \'stoichiometryMath\' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of \'stoichiometry\' in - the SpeciesReference instance defaults to @c 1. For maximum - interoperability between different software tools, the \'stoichiometry\' - attribute should be used in preference to \'stoichiometryMath\' when a - species\' stoichiometry is a simple scalar number (integer or - decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the \'stoichiometry\' attribute. - - @param math the StoichiometryMath expression that is to be copied as the - content of the \'stoichiometryMath\' subelement. - - @note In SBML Level 2, the \'stoichiometry\' attribute of this - SpeciesReference object will be unset (isSetStoichiometry() will - return @c False although getStoichiometry() will return @c 1.0) if the - given math is not null because the \'stoichiometry\' attribute and the - stoichiometryMath\' subelement are mutually exclusive. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink -"; - - -%feature("docstring") SpeciesReference::setDenominator " - Set the value of the \'denominator\' attribute, for the case of a - rational-numbered stoichiometry or a model in SBML Level 1. - - The \'denominator\' attribute is only actually written out in the case - of an SBML Level 1 model. In SBML Level 2, rational-number - stoichiometries are written as MathML elements in the - \'stoichiometryMath\' subelement. However, as a convenience to users, - libSBML allows the creation and manipulation of rational-number - stoichiometries by supplying the numerator and denominator directly - rather than having to manually create an ASTNode structure. LibSBML - will write out the appropriate constructs (either a combination of - \'stoichiometry\' and \'denominator\' in the case of SBML Level 1, or - a \'stoichiometryMath\' subelement in the case of SBML Level 2). - - @param value the scalar value - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") SpeciesReference::setConstant " - Sets the \'constant\' attribute of this SpeciesReference to the given boolean - @p flag. - - @param flag a boolean, the value for the \'constant\' attribute of this - SpeciesReference instance - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") SpeciesReference::unsetStoichiometryMath " - Unsets the \'stoichiometryMath\' subelement of this SpeciesReference. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - In SBML Level 2, product and reactant stoichiometries can be specified - using either \'stoichiometry\' or \'stoichiometryMath\' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The \'stoichiometry\' - attribute is of type @c double and should contain values greater than - zero (@c 0). The \'stoichiometryMath\' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of \'stoichiometry\' in - the SpeciesReference instance defaults to @c 1. For maximum - interoperability between different software tools, the \'stoichiometry\' - attribute should be used in preference to \'stoichiometryMath\' when a - species\' stoichiometry is a simple scalar number (integer or - decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the \'stoichiometry\' attribute. - - @note In SBML Level 2, the \'stoichiometry\' attribute of this - SpeciesReference object will be reset to a default value (@c 1.0) if - the \'stoichiometry\' attribute has not been set. -"; - - -%feature("docstring") SpeciesReference::unsetStoichiometry " - Unsets the \'stoichiometry\' attribute of this SpeciesReference. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note In SBML Level 1, the \'stoichiometry\' attribute of this - SpeciesReference object will be just reset to a default value (@c 1.0) - and isSetStoichiometry() will still return @c True. In SBML - Level 2, the \'stoichiometry\' attribute of this object will be - unset (which will result in isSetStoichiometry() returning @c False, - although getStoichiometry() will return @c 1.0) if the - \'stoichiometryMath\' subelement is set, otherwise the attribute - will be just reset to the default value (@c 1.0) (and - isSetStoichiometry() will still return @c True). In SBML - Level 3, the \'stoichiometry\' attribute of this object will be set - to @c NaN and isSetStoichiometry() will return @c False. -"; - - -%feature("docstring") SpeciesReference::createStoichiometryMath " - Creates a new, empty StoichiometryMath object, adds it to this - SpeciesReference, and returns it. - - @return the newly created StoichiometryMath object instance - - @see Reaction.addReactant() - @see Reaction.addProduct() -"; - - -%feature("docstring") SpeciesReference::setAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
setAnnotation(XMLNode annotation)
- - Sets the value of the \'annotation\' subelement of this SBML object to a - copy of @p annotation. - - Any existing content of the \'annotation\' subelement is discarded. - Unless you have taken steps to first copy and reconstitute any - existing annotations into the @p annotation that is about to be - assigned, it is likely that performing such wholesale replacement is - unfriendly towards other software applications whose annotations are - discarded. An alternative may be to use appendAnnotation(). - - @param annotation an XML structure that is to be used as the content - of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see appendAnnotation() - @see appendAnnotation() - - -
- Method variant with the following signature: -
setAnnotation(string annotation)
- - Sets the value of the \'annotation\' subelement of this SBML object to a - copy of @p annotation. - - Any existing content of the \'annotation\' subelement is discarded. - Unless you have taken steps to first copy and reconstitute any - existing annotations into the @p annotation that is about to be - assigned, it is likely that performing such wholesale replacement is - unfriendly towards other software applications whose annotations are - discarded. An alternative may be to use appendAnnotation(). - - @param annotation an XML string that is to be used as the content - of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see appendAnnotation() - @see appendAnnotation() -"; - - -%feature("docstring") SpeciesReference::appendAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
appendAnnotation(XMLNode annotation)
- - Appends annotation content to any existing content in the \'annotation\' - subelement of this object. - - The content in @p annotation is copied. Unlike - SpeciesReference.setAnnotation(), - this method allows other annotations to be preserved when an application - adds its own data. - - @param annotation an XML structure that is to be copied and appended - to the content of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see setAnnotation() - @see setAnnotation() - - -
- Method variant with the following signature: -
appendAnnotation(string annotation)
- - Appends annotation content to any existing content in the \'annotation\' - subelement of this object. - - The content in @p annotation is copied. Unlike - SpeciesReference.setAnnotation(), this - method allows other annotations to be preserved when an application - adds its own data. - - @param annotation an XML string that is to be copied and appended - to the content of the \'annotation\' subelement of this object - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see setAnnotation() - @see setAnnotation() -"; - - -%feature("docstring") SpeciesReference::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") SpeciesReference::getElementName " - Returns the XML element name of this object, which for - SpeciesReference, is always @c \'speciesReference\'. - - @return the name of this element, i.e., @c \'speciesReference\'. -"; - - -%feature("docstring") SpeciesReference::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") SpeciesReference::sortMath " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") SpeciesReference::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this SpeciesReference object - have been set. - - @note The required attributes for a SpeciesReference object are: - @li \'species\' - @li \'constant\' (only available SBML Level 3) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") SpeciesReference::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") SpeciesReference::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") SpeciesReference::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") SpeciesReference::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SpeciesReference::readL1Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SpeciesReference::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SpeciesReference::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") SpeciesReference::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SpeciesReference::syncAnnotation " - @internal - - Synchronizes the annotation of this SBML object. - - Annotation element (XMLNode mAnnotation) is synchronized with the - current CVTerm objects (List mCVTerm) and id string (string mId) - Currently, this method is called in getAnnotation(), isSetAnnotation(), - and writeElements() methods. -"; - - -%feature("docstring") SpeciesReference::isExplicitlySetStoichiometry " - @internal - - Synchronizes the annotation of this SBML object. - - Annotation element (XMLNode mAnnotation) is synchronized with the - current CVTerm objects (List mCVTerm) and id string (string mId) - Currently, this method is called in getAnnotation(), isSetAnnotation(), - and writeElements() methods. -"; - - -%feature("docstring") SpeciesReference::isExplicitlySetDenominator " - @internal - - Synchronizes the annotation of this SBML object. - - Annotation element (XMLNode mAnnotation) is synchronized with the - current CVTerm objects (List mCVTerm) and id string (string mId) - Currently, this method is called in getAnnotation(), isSetAnnotation(), - and writeElements() methods. -"; - - -%feature("docstring") ListOfSpeciesReferences::ListOfSpeciesReferences " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfSpeciesReferences(SBMLNamespaces sbmlns)
- - Creates a new ListOfSpeciesReferences object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfSpeciesReferences object to be created. - - -
- Method variant with the following signature: -
ListOfSpeciesReferences(long level, long version)
- - Creates a new, empty ListOfSpeciesReferences object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfSpeciesReferences::clone " - Creates and returns a deep copy of this ListOfSpeciesReferences - instance. - - @return a (deep) copy of this ListOfSpeciesReferences. -"; - - -%feature("docstring") ListOfSpeciesReferences::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfSpeciesReferences::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., SpeciesReference objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfSpeciesReferences::getElementName " - Returns the XML element name of this object. - - For ListOfSpeciesReferences, the XML element name is @c - \'listOfSpeciesReferences\'. - - @return the name of this element, i.e., @c \'listOfSpeciesReferences\'. -"; - - -%feature("docstring") ListOfSpeciesReferences::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a SpeciesReference from the ListOfSpeciesReferences. - - @param n the index number of the SpeciesReference to get. - - @return the nth SpeciesReference in this ListOfSpeciesReferences. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a SpeciesReference from the ListOfSpeciesReferences - based on its identifier. - - @param sid a string representing the identifier - of the SpeciesReference to get. - - @return SpeciesReference in this ListOfSpeciesReferences - with the given @p sid or @c None if no such - SpeciesReference exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfSpeciesReferences::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfSpeciesReferences items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfSpeciesReferences items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfSpeciesReferences::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfSpeciesReferences::setType " - @internal - Sets type of this ListOfSpeciesReferences. -"; - - -%feature("docstring") ListOfSpeciesReferences::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") ModifierSpeciesReference " - @ingroup Core - Implementation of %SBML\'s %ModifierSpeciesReference construct. - - Sometimes a species appears in the kinetic rate formula of a reaction - but is itself neither created nor destroyed in that reaction (for - example, because it acts as a catalyst or inhibitor). In SBML, all such - species are simply called @em modifiers without regard to the detailed - role of those species in the model. The Reaction structure provides a - way to express which species act as modifiers in a given reaction. This - is the purpose of the list of modifiers available in Reaction. The list - contains instances of ModifierSpeciesReference structures. - - The ModifierSpeciesReference structure inherits the mandatory attribute - \'species\' and optional attributes \'id\' and \'name\' from the parent class - SimpleSpeciesReference. See the description of SimpleSpeciesReference - for more information about these. - - The value of the \'species\' attribute must be the identifier of a species - defined in the enclosing Model; this species is designated as a modifier - for the current reaction. A reaction may have any number of modifiers. - It is permissible for a modifier species to appear simultaneously in the - list of reactants and products of the same reaction where it is - designated as a modifier, as well as to appear in the list of reactants, - products and modifiers of other reactions in the model. -"; - - -%feature("docstring") ModifierSpeciesReference::ModifierSpeciesReference " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ModifierSpeciesReference(SBMLNamespaces sbmlns)
- - Creates a new ModifierSpeciesReference using the given SBMLNamespaces object - @p sbmlns. - - @param sbmlns an SBMLNamespaces object. - - @note Upon the addition of a ModifierSpeciesReference object to an - SBMLDocument (e.g., using Reaction.addModifier()), the - SBML XML namespace of the document @em overrides the value used when - creating the ModifierSpeciesReference object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the time - of creation of a ModifierSpeciesReference is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
ModifierSpeciesReference(long level, long version)
- - Creates a new ModifierSpeciesReference using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this ModifierSpeciesReference - - @param version a long integer, the SBML Version to assign to this - ModifierSpeciesReference - - @note Upon the addition of a ModifierSpeciesReference object to an - SBMLDocument (e.g., using Reaction.addModifier()), the - SBML Level, SBML Version and XML namespace of the document @em - override the values used when creating the ModifierSpeciesReference - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a - ModifierSpeciesReference is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. -"; - - -%feature("docstring") ModifierSpeciesReference::accept " - Accepts the given SBMLVisitor. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") ModifierSpeciesReference::clone " - Creates and returns a deep copy of this ModifierSpeciesReference - instance. - - @return a (deep) copy of this ModifierSpeciesReference. -"; - - -%feature("docstring") ModifierSpeciesReference::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ModifierSpeciesReference::getElementName " - Returns the XML element name of this object, which for Species, is - always @c \'modifierSpeciesReference\'. - - @return the name of this element, i.e., @c \'modifierSpeciesReference\'. -"; - - -%feature("docstring") ModifierSpeciesReference::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this ModifierSpeciesReference object - have been set. - - @note The required attributes for a ModifierSpeciesReference object are: - species -"; - - -%feature("docstring") Event " - @ingroup Core - Implementation of SBML\'s %Event construct. - - An SBML Event object defines when the event can occur, the variables - that are affected by it, how the variables are affected, and the event\'s - relationship to other events. The effect of the event can optionally be - delayed after the occurrence of the condition which invokes it. - - The operation of Event is divided into two phases (even when the event - is not delayed): one when the event is @em triggered, and the other when - the event is @em executed. Trigger objects define the conditions for - triggering an event, Delay objects define when the event is actually - executed, EventAssignment objects define the effects of executing the - event, and (in SBML Level 3) Priority objects influence the order - of EventAssignment performance in cases of simultaneous events. Please - consult the descriptions of Trigger, Delay, EventAssignment and Priority - for more information. - - @section version-diffs SBML Level/Version differences - - @subsection sbml-l3 SBML Level 3 - - SBML Level 3 introduces several changes to the structure and components - of Events compared to SBML Level 2. These changes fall into two - main categories: changes to what is optional or required, and additions - of new attributes and elements. -
    -
  • The attribute \'useValuesFromTriggerTime\' on Event is mandatory (it - was optional in Level 2); -
  • Event\'s \'listOfEventAssignments\' element (of class - ListOfEventAssignments) is optional (it was mandatory in Level 2); -
  • Event\'s \'priority\' element (of class Priority) is new in - Level 3; and -
  • The Trigger object gains new mandatory attributes (described as part - of the definition of Trigger). -
- - The changes to the attributes of Event are described below; the changes - to Trigger and Priority are described in their respective sections. - - @subsection sbml-l2 SBML Level 2 - - In SBML Level 2 versions before Version 4, the semantics of - Event time delays were defined such that the expressions in the event\'s - assignments were always evaluated at the time the event was - triggered. This definition made it difficult to define an event - whose assignment formulas were meant to be evaluated at the time the - event was executed (i.e., after the time period defined by the - value of the Delay element). In SBML Level 2 Version 4 and in - Level 3, the attribute \'useValuesFromTriggerTime\' on Event allows a - model to indicate the time at which the event\'s assignments are intended - the values of the assignment formulas are computed at the moment the - event is triggered, not after the delay. If \'useValuesFromTriggerTime\'=@c - false, it means that the formulas in the event\'s assignments are to be - computed @em after the delay, at the time the event is executed. - - The definition of Event in SBML Level 2 Versions 1 and 2 includes - an additional attribute called \'timeUnits\', which allowed the time units - of the Delay to be set explicitly. Later Versions of SBML Level 2 - as well as SBML Level 3 do not define this attribute. LibSBML - supports this attribute for compatibility with previous versions of SBML - Level 2; however, if a model in SBML Level 3 or Level 2 - Versions 3–4 format sets the attribute, the - consistency-checking method SBMLDocument.checkConsistency() will report - an error. - - The attribute \'useValuesFromTriggerTime\' was introduced in SBML - Level 2 Version 4. Models defined in prior Versions of SBML - Level 2 cannot use this attribute, and - SBMLDocument.checkConsistency() will report an error if they do. - - @section semantics Semantics of events in SBML Level 3 Version 1 - - The detailed semantics of events are described in the specification - documents for each SBML Level/Version. Here we include the description - from the SBML Level 1 Version 1. - Any transition of a Trigger object\'s \'math\' formula from the value @c - false to @c True will cause the enclosing Event object to - trigger. Such a transition is not possible at the very start - of a simulation (i.e., at time t = 0) unless the Trigger - object\'s \'initialValue\' attribute has a value of @c False; this defines - the value of the trigger formula to be @c False immediately prior to the - start of simulation, thereby giving it the potential to change in value - from @c False to @c True when the formula is evaluated at t = - 0. If \'initialValue\'=@c True, then the trigger expression cannot - transition from @c False to @c True at t = 0 but may do so at - some time t > 0. - - Consider an Event object definition E with delay d in - which the Trigger object\'s \'math\' formula makes a transition in value - from @c False to @c True at times t1 and - t2. The EventAssignment within the Event object - will have effect at t1 + d and - t2 + d irrespective of the relative times of - t1 and t2. For example, events - can \'overlap\' so that t1 < t2 < - t1 + d still causes an event assignments to occur at - t1 + d and t2 + d. - - It is entirely possible for two events to be executed simultaneously, - and it is possible for events to trigger other events (i.e., an event - assignment can cause an event to trigger). This leads to several - points: -
    - -
  • A software package should retest all event triggers after executing - an event assignment in order to account for the possibility that the - assignment causes another event trigger to transition from @c False to - @c True. This check should be made after each individual Event object\'s - execution, even when several events are to be executed simultaneously. - -
  • Any Event object whose Trigger \'persistent\' attribute has the value - @c False must have its trigger expression reevaluated continuously - between when the event is triggered and when it is executed. If - its trigger expression ever evaluates to @c False, it must be removed - from the queue of events pending execution and treated as any other - event whose trigger expression evaluates to @c False. - -
  • Although the precise time at which events are executed is not - resolved beyond the given execution point in simulated time, it is - assumed that the order in which the events occur is resolved. - This order can be significant in determining the overall outcome of a - given simulation. When an event X triggers another - event Y and event Y has zero delay, then event - Y is added to the existing set of simultaneous events that are - pending execution. Events X and Y form a - cascade of events at the same point in simulation time. An event such - as Y may have a special priority if it contains a Priority - subobject. - -
  • All events in a model are open to being in a cascade. The position - of an event in the event queue does not affect whether it can be in the - cascade: event Y can be triggered whether it is before or after - X in the queue of events pending execution. A cascade of - events can be potentially infinite (never terminate); when this occurs a - simulator should indicate this has occurred—it is incorrect for a - simulator to break a cascade arbitrarily and continue the simulation - without at least indicating that the infinite cascade occurred. - -
  • Simultaneous events having no defined priorities are executed in an - undefined order. This does not mean that the behavior of the simulation - is completely undefined; merely that the order of execution of - these particular events is undefined. A given simulator may use any - algorithm to choose an order as long as every event is executed exactly - once. - -
  • Events with defined priorities are executed in the order implied by - their Priority \'math\' formula values, with events having higher - priorities being executed ahead of events with lower priorities, and - events with identical priorities being executed in a random order with - respect to one another (as determined at run-time by some random - algorithm equivalent to coin-flipping). Newly-triggered events that are - to be executed immediately (i.e., if they define no delays) should be - inserted into the queue of events pending execution according to their - priorities: events with higher priority values value must be inserted - ahead of events with lower priority values and after any pending events - with even higher priorities, and inserted randomly among pending events - with the same priority values. Events without Priority objects must be - inserted into the queue in some fashion, but the algorithm used to place - it in the queue is undefined. Similarly, there is no restriction on the - order of a newly-inserted event with a defined Priority with respect to - any other pending Event without a defined Priority. - -
  • A model variable that is the target of one or more event - assignments can change more than once when simultaneous events are - processed at some time point t. The model\'s behavior (output) - for such a variable is the value of the variable at the end of - processing all the simultaneous events at time t. - -
- - @see Trigger - @see Priority - @see Delay - @see EventAssignment - - - -"; - - -%feature("docstring") ListOfEvents " - @ingroup Core - Implementation of SBML\'s %ListOfEvents construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the components - all directly at the top level of the model definition. The choice made - in SBML is to group them within XML elements named after - ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes are - derived from SBase means that software tools can add information @em about - the lists themselves into each list container\'s \'annotation\'. - - @see ListOfFunctionDefinitions - @see ListOfUnitDefinitions - @see ListOfCompartmentTypes - @see ListOfSpeciesTypes - @see ListOfCompartments - @see ListOfSpecies - @see ListOfParameters - @see ListOfInitialAssignments - @see ListOfRules - @see ListOfConstraints - @see ListOfReactions - @see ListOfEvents -"; - - -%feature("docstring") Event::Event " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Event(SBMLNamespaces sbmlns)
- - Creates a new Event using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of an Event object to an SBMLDocument (e.g., - using Model.addEvent()), the SBML XML namespace of the document @em - overrides the value used when creating the Event object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Event is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
Event(long level, long version)
- - Creates a new Event using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Event - - @param version a long integer, the SBML Version to assign to this - Event - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of an Event object to an SBMLDocument (e.g., - using Model.addEvent()), the SBML Level, SBML Version and XML - namespace of the document @em override the values used when creating - the Event object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of an Event is an - important aid to producing valid SBML. Knowledge of the intented SBML - Level and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - -
- Method variant with the following signature: -
Event(Event orig)
- - Copy constructor; creates a copy of this Event. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Event::accept " - Accepts the given SBMLVisitor for this instance of Event. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next Event in the list - of events within which this Event is embedded. -"; - - -%feature("docstring") Event::clone " - Creates and returns a deep copy of this Event. - - @return a (deep) copy of this Event. -"; - - -%feature("docstring") Event::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") Event::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") Event::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth. - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") Event::getId " - Returns the value of the \'id\' attribute of this Event. - - @return the id of this Event. -"; - - -%feature("docstring") Event::getName " - Returns the value of the \'name\' attribute of this Event. - - @return the name of this Event. -"; - - -%feature("docstring") Event::getTrigger " - Get the event trigger portion of this Event. - - @return the Trigger object of this Event. -"; - - -%feature("docstring") Event::getDelay " - Get the assignment delay portion of this Event, if there is one. - - @return the delay of this Event if one is defined, or @c None if none - is defined. -"; - - -%feature("docstring") Event::getPriority " - (SBML Level 3 only) Get the event priority portion of this - Event. - - @return the Priority object of this Event. - - @note The element \'priority\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::getTimeUnits " - Get the value of the \'timeUnits\' attribute of this Event, if it has one. - - @return the value of the attribute \'timeUnits\' as a string. - - @warning Definitions of Event in SBML Level 2 Versions 1 - and 2 included the additional attribute called \'timeUnits\', but - it was removed in SBML Level 2 Version 3. LibSBML supports - this attribute for compatibility with previous versions of SBML - Level 2, but its use is discouraged since models in Level 2 - Versions 3 and 4 cannot contain it. If a Version 3 - or 4 model sets the attribute, the consistency-checking method - SBMLDocument.checkConsistency() will report an error. -"; - - -%feature("docstring") Event::getUseValuesFromTriggerTime " - Get the value of the \'useValuesFromTriggerTime\' attribute of this Event. - - The optional Delay on Event means there are two times to consider when - computing the results of an event: the time at which the event is - triggered, and the time at which assignments are - executed. It is also possible to distinguish between the - time at which the EventAssignment\'s expression is calculated, and the - time at which the assignment is made: the expression could be - evaluated at the same time the assignments are performed, i.e., when - the event is executed, but it could also be defined to be - evaluated at the time the event is triggered. - - In SBML Level 2 versions prior to Version 4, the semantics - of Event time delays were defined such that the expressions in the - event\'s assignments were always evaluated at the time the event was - triggered. This definition made it difficult to define an - event whose assignment formulas were meant to be evaluated at the time - the event was executed (i.e., after the time period defined - by the value of the Delay element). In SBML Level 2 - Version 4, the attribute \'useValuesFromTriggerTime\' on Event - allows a model to indicate the time at which the event\'s assignments - are intended to be evaluated. In SBML Level 2, the attribute has - a default value of @c True, which corresponds to the interpretation of - event assignments prior to Version 4: the values of the - assignment formulas are computed at the moment the event is triggered, - not after the delay. If \'useValuesFromTriggerTime\'=@c False, it means - that the formulas in the event\'s assignments are to be computed after - the delay, at the time the event is executed. In SBML Level 3, - the attribute is mandatory, not optional, and all events must specify - a value for it. - - @return the value of the attribute \'useValuesFromTriggerTime\' as a boolean. - - @warning The attribute \'useValuesFromTriggerTime\' was introduced in - SBML Level 2 Version 4. It is not valid in models defined - using SBML Level 2 versions prior to Version 4. If a - Level 2 Version 1–3 model sets the attribute, the - consistency-checking method SBMLDocument.checkConsistency() will - report an error. -"; - - -%feature("docstring") Event::isSetId " - Predicate returning @c True if this - Event\'s \'id\' attribute is set. - - @return @c True if the \'id\' attribute of this Event is - set, @c False otherwise. -"; - - -%feature("docstring") Event::isSetName " - Predicate returning @c True if this - Event\'s \'name\' attribute is set. - - @return @c True if the \'name\' attribute of this Event is - set, @c False otherwise. -"; - - -%feature("docstring") Event::isSetTrigger " - Predicate for testing whether the trigger for this Event is set. - - @return @c True if the trigger of this Event is set, @c False - otherwise. -"; - - -%feature("docstring") Event::isSetDelay " - Predicate for testing whether the delay for this Event is set. - - @return @c True if the delay of this Event is set, @c False - otherwise. -"; - - -%feature("docstring") Event::isSetPriority " - (SBML Level 3 only) Predicate for testing whether the priority - for this Event is set. - - @return @c True if the priority of this Event is set, @c False - otherwise. - - @note The element \'priority\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::isSetTimeUnits " - Predicate for testing whether the \'timeUnits\' attribute of this Event - is set. - - @return @c True if the \'timeUnits\' attribute of this Event is - set, @c False otherwise. - - @warning Definitions of Event in SBML Level 2 Versions 1 - and 2 included the additional attribute called \'timeUnits\', but - it was removed in SBML Level 2 Version 3. LibSBML supports - this attribute for compatibility with previous versions of SBML - Level 2, but its use is discouraged since models in Level 2 - Versions 3 and 4 cannot contain it. If a Version 3 - or 4 model sets the attribute, the consistency-checking method - SBMLDocument.checkConsistency() will report an error. -"; - - -%feature("docstring") Event::isSetUseValuesFromTriggerTime " - Predicate for testing whether the \'useValuesFromTriggerTime\' attribute of this Event - is set. - - @return @c True if the \'useValuesFromTriggerTime\' attribute of this Event is - set, @c False otherwise. - - @note In SBML Level 2, this attribute is optional and has a default value of - @c True, whereas in Level 3 Version 1, this optional is mandatory and - has no default value. -"; - - -%feature("docstring") Event::setId " - Sets the value of the \'id\' attribute of this Event. - - The string @p sid is copied. Note that SBML has strict requirements - for the syntax of identifiers. @htmlinclude id-syntax.html - - @param sid the string to use as the identifier of this Event - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Event::setName " - Sets the value of the \'name\' attribute of this Event. - - The string in @p name is copied. - - @param name the new name for the Event - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Event::setTrigger " - Sets the trigger definition of this Event to a copy of the given - Trigger object instance. - - @param trigger the Trigger object instance to use. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink -"; - - -%feature("docstring") Event::setDelay " - Sets the delay definition of this Event to a copy of the given Delay - object instance. - - @param delay the Delay object instance to use - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink -"; - - -%feature("docstring") Event::setPriority " - (SBML Level 3 only) Sets the priority definition of this Event - to a copy of the given Priority object instance. - - @param priority the Priority object instance to use - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The element \'priority\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::setTimeUnits " - Sets the \'timeUnits\' attribute of this Event to a copy of @p sid. - - @param sid the identifier of the time units to use. - - @warning Definitions of Event in SBML Level 2 Versions 1 - and 2 included the additional attribute called \'timeUnits\', but - it was removed in SBML Level 2 Version 3. LibSBML supports - this attribute for compatibility with previous versions of SBML - Level 2, but its use is discouraged since models in Level 2 - Versions 3 and 4 cannot contain it. If a Version 3 - or 4 model sets the attribute, the consistency-checking method - SBMLDocument.checkConsistency() will report an error. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") Event::setUseValuesFromTriggerTime " - Sets the \'useValuesFromTriggerTime\' attribute of this Event to a @p value. - - The optional Delay on Event means there are two times to consider when - computing the results of an event: the time at which the event is - triggered, and the time at which assignments are - executed. It is also possible to distinguish between the - time at which the EventAssignment\'s expression is calculated, and the - time at which the assignment is made: the expression could be - evaluated at the same time the assignments are performed, i.e., when - the event is executed, but it could also be defined to be - evaluated at the time the event is triggered. - - In SBML Level 2 versions prior to Version 4, the semantics - of Event time delays were defined such that the expressions in the - event\'s assignments were always evaluated at the time the event was - triggered. This definition made it difficult to define an - event whose assignment formulas were meant to be evaluated at the time - the event was executed (i.e., after the time period defined - by the value of the Delay element). In SBML Level 2 - Version 4, the attribute \'useValuesFromTriggerTime\' on Event - allows a model to indicate the time at which the event\'s assignments - are intended to be evaluated. In SBML Level 2, the attribute has - a default value of @c True, which corresponds to the interpretation of - event assignments prior to Version 4: the values of the - assignment formulas are computed at the moment the event is triggered, - not after the delay. If \'useValuesFromTriggerTime\'=@c False, it means - that the formulas in the event\'s assignments are to be computed after - the delay, at the time the event is executed. In SBML Level 3, - the attribute is mandatory, not optional, and all events must specify - a value for it. - - @param value the value of useValuesFromTriggerTime to use. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @warning The attribute \'useValuesFromTriggerTime\' was introduced in - SBML Level 2 Version 4. It is not valid in models defined - using SBML Level 2 versions prior to Version 4. If a - Version 1– 3 model sets the attribute, the - consistency-checking method SBMLDocument.checkConsistency() will - report an error. -"; - - -%feature("docstring") Event::unsetId " - Unsets the value of the \'id\' attribute of this Event. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Event::unsetName " - Unsets the value of the \'name\' attribute of this Event. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Event::unsetDelay " - Unsets the Delay of this Event. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Event::unsetPriority " - (SBML Level 3 only) Unsets the Priority of this Event. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The element \'priority\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::unsetTrigger " - Unsets the Trigger of this Event. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note The element \'priority\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::unsetTimeUnits " - Unsets the \'timeUnits\' attribute of this Event. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @warning Definitions of Event in SBML Level 2 Versions 1 and 2 - included the attribute called \'timeUnits\', but it was removed in SBML - Level 2 Version 3. LibSBML supports this attribute for - compatibility with previous versions of SBML Level 2, but its use - is discouraged since models in Level 2 Version 3 and - Version 4 cannot contain it. If a Version 3 or 4 model - sets this attribute, the consistency-checking method - SBMLDocument.checkConsistency() will report an error. -"; - - -%feature("docstring") Event::addEventAssignment " - Appends a copy of the given EventAssignment to this Event. - - @param ea the EventAssignment object to add. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink - @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink - @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note This method should be used with some caution. The fact that - this method @em copies the object passed to it means that the caller - will be left holding a physically different object instance than the - one contained in this Event. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Event. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Event.createEventAssignment() - for a method that does not lead to these issues. - - @see createEventAssignment() -"; - - -%feature("docstring") Event::createEventAssignment " - Creates a new, empty EventAssignment, adds it to this Event\'s list of - event assignments and returns the EventAssignment. - - @return the newly created EventAssignment object instance - - @see addEventAssignment() -"; - - -%feature("docstring") Event::createTrigger " - Creates a new, empty Trigger, adds it to this Event and - returns the Trigger. - - @return the newly created Trigger object instance -"; - - -%feature("docstring") Event::createDelay " - Creates a new, empty Delay, adds it to this Event and - returns the Delay. - - @return the newly created Delay object instance -"; - - -%feature("docstring") Event::createPriority " - (SBML Level 3 only) Creates a new, empty Priority, adds it to this - Event and returns the Priority. - - @return the newly created Priority object instance - - @note The element \'priority\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::getListOfEventAssignments " - Returns the list of event assignments for this Event. - - @return the list of EventAssignments for this Event. -"; - - -%feature("docstring") Event::getEventAssignment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
getEventAssignment(string variable)
- - Return the event assignment indicated by the given @p variable. - - @param variable a string, the identifier of the variable whose - EventAssignment is being sought. - - @return the EventAssignment for the given @p variable, or @c None if - no such EventAssignment exits. - - -
- Method variant with the following signature: -
getEventAssignment(long n)
- - Return a specific EventAssignment object of this Event. - - @param n an integer, the index of the EventAssignment object to return - - @return the nth EventAssignment of this Event. -"; - - -%feature("docstring") Event::getNumEventAssignments " - Returns the number of EventAssignment objects attached to this - Event. - - @return the number of EventAssignments in this Event. -"; - - -%feature("docstring") Event::removeEventAssignment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
removeEventAssignment(string variable)
- - Removes the EventAssignment object with the given \'variable\' attribute - from this Event object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - If none of the EventAssignment objects in this Event object have the - \'variable\' attribute @p variable, then @c None is returned. - - @param variable the \'variable\' attribute of the EventAssignment object - to remove - - @return the EventAssignment object removed. As mentioned above, the - caller owns the returned object. @c None is returned if no EventAssignment - object with the \'variable\' attribute exists in this Event object. - - -
- Method variant with the following signature: -
removeEventAssignment(long n)
- - Removes the nth EventAssignment object from this Event object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting it. - - @param n the index of the EventAssignment object to remove - - @return the EventAssignment object removed. As mentioned above, - the caller owns the returned item. @c None is returned if the given index - is out of range. -"; - - -%feature("docstring") Event::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. - - @param d the SBMLDocument to use -"; - - -%feature("docstring") Event::connectToChild " - @internal - Sets this SBML object to child SBML objects (if any). - (Creates a child-parent relationship by the parent) - - Subclasses must override this function if they define - one ore more child elements. - Basically, this function needs to be called in - constructor, copy constructor and assignment operator. - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") Event::enablePackageInternal " - @internal - Enables/Disables the given package with this element and child - elements (if any). - (This is an internal implementation for enablePackage function) - - @note Subclasses of the SBML Core package in which one or more child - elements are defined must override this function. -"; - - -%feature("docstring") Event::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Event::getElementName " - Returns the XML element name of this object, which for Event, is - always @c \'event\'. - - @return the name of this element, i.e., @c \'event\'. -"; - - -%feature("docstring") Event::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Event::setInternalIdOnly " - @internal - sets the mInternalIdOnly flag -"; - - -%feature("docstring") Event::hasRequiredAttributes " - Predicate returning @c True if all the required attributes for this - Event object have been set. - - @note The required attributes for a Event object are: - @li \'useValuesfromTriggerTime\' (required in SBML Level 3) -"; - - -%feature("docstring") Event::hasRequiredElements " - Predicate returning @c True if - all the required elements for this Event object - have been set. - - @note The required elements for a Event object are: - @li \'trigger\' - @li \'listOfEventAssignments\' (required in SBML Level 2, optional in Level 3) -"; - - -%feature("docstring") Event::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Event::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Event::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Event::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Event::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Event::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Event::isExplicitlySetUVFTT " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfEvents::ListOfEvents " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfEvents(SBMLNamespaces sbmlns)
- - Creates a new ListOfEvents object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfEvents object to be created. - - -
- Method variant with the following signature: -
ListOfEvents(long level, long version)
- - Creates a new ListOfEvents object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfEvents::clone " - Creates and returns a deep copy of this ListOfEvents. - - @return a (deep) copy of this ListOfEvents. -"; - - -%feature("docstring") ListOfEvents::getTypeCode " - Returns the libSBML type code for this SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfEvents::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., Event objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfEvents::getElementName " - Returns the XML element name of this object. - - For ListOfEvents, the XML element name is @c \'listOfEvents\'. - - @return the name of this element, i.e., @c \'listOfEvents\'. -"; - - -%feature("docstring") ListOfEvents::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a Event from the ListOfEvents. - - @param n the index number of the Event to get. - - @return the nth Event in this ListOfEvents. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a Event from the ListOfEvents - based on its identifier. - - @param sid a string representing the identifier - of the Event to get. - - @return Event in this ListOfEvents - with the given @p sid or @c None if no such - Event exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfEvents::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfEvents items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfEvents items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then - @c None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfEvents::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - The ordering of elements in the XML form of SBML is generally fixed - for most components in SBML. So, for example, the ListOfEvents in a - model is (in SBML Level 2 Version 4) the twelfth ListOf___. - (However, it differs for different Levels and Versions of SBML, so - calling code should not hardwire this number.) - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfEvents::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") EventAssignment " - @ingroup Core - Implementation of %SBML\'s %EventAssignment construct for %Event. - - Event contains an optional element called \'listOfEventAssignments\', of - class ListOfEventAssignments. In every instance of an event definition - in a model, the object\'s \'listOfEventAssignments\' element must have a - non-empty list of one or more \'eventAssignment\' elements of class - EventAssignment. The object class EventAssignment has one required - attribute, \'variable\', and a required element, \'math\'. Being derived - from SBase, it also has all the usual attributes and elements of its - parent class. - - An Event object defines when the event can occur, the variables that are - affected by the event, and how the variables are affected. The purpose - of the EventAssignment object class is to define how variables are - affected by an Event. In SBML Level 2, every Event object instance - must have a nonempty list of event assignments; in SBML Level 3, - the list of assignments is optional. - - The operation of an Event is divided into two phases (regardless of - whether a delay is involved): one phase when the event is @em triggered, - and the other when the event is @em executed. EventAssignment objects - are interpreted when an event is executed. The effects are described - below. - - @section event-variable The attribute \'variable\' - - The EventAssignment attribute \'variable\' must be the identifier of an - existing Compartment, Species, SpeciesReference, or Parameter - instance defined in the model. When the event is executed, the value of - the model component identified by \'variable\' is changed by the - EventAssignment to the value computed by the \'math\' element; that is, a - species\' quantity, species reference\'s stoichiometry, compartment\'s size - or parameter\'s value are reset to the value computed by \'math\'. - - Certain restrictions are placed on what can appear in \'variable\': -
    -
  • The object identified by the value of the EventAssignment attribute - \'variable\' must not have its \'constant\' attribute set to or default to - @c True. (Constants cannot be affected by events.) - -
  • The \'variable\' attribute must not contain the identifier of a - reaction; only species, species references, compartment and parameter - values may be set by an Event. - -
  • The value of every \'variable\' attribute must be unique among the set - of EventAssignment structures within a given Event structure. In other - words, a single event cannot have multiple EventAssignment objects - assigning the same variable. (All of them would be performed at the - same time when that particular Event triggers, resulting in - indeterminacy.) However, @em separate Event instances can refer to the - same variable. - -
  • A variable cannot be assigned a value in an EventAssignment object - instance and also be assigned a value by an AssignmentRule; i.e., the - value of an EventAssignment\'s \'variable\' attribute cannot be the same as - the value of a AssignmentRule\' \'variable\' attribute. (Assignment rules - hold at all times, therefore it would be inconsistent to also define an - event that reassigns the value of the same variable.) -
- - Note that the time of assignment of the object identified by the - value of the \'variable\' attribute is always the time at which the Event - is executed, not when it is triggered. The timing is - controlled by the optional Delay in an Event. The time of - assignment is not affected by the \'useValuesFromTriggerTime\' - attribute on Eventmdash;that attribute affects the time at which the - EventAssignment\'s \'math\' expression is @em evaluated. In other - words, SBML allows decoupling the time at which the - \'variable\' is assigned from the time at which its value - expression is calculated. - - @section event-math The \'math\' subelement in an EventAssignment - - The MathML expression contained in an EventAssignment defines the new - value of the variable being assigned by the Event. - - As mentioned above, the time at which the expression in \'math\' is - evaluated is determined by the attribute \'useValuesFromTriggerTime\' on - Event. If the attribute value is @c True, the expression must be - evaluated when the event is @em triggered; more precisely, the values of - identifiers occurring in MathML <ci> elements in the - EventAssignment\'s \'math\' expression are the values they have at the - point when the event @em triggered. If, instead, - \'useValuesFromTriggerTime\'\'s value is @c False, it means the values at - @em execution time should be used; that is, the values of identifiers - occurring in MathML <ci> elements in the - EventAssignment\'s \'math\' expression are the values they have at the - point when the event @em executed. - - @section version-diffs SBML Level/Version differences - - Between Version 4 and previous versions of SBML Level 2, the - requirements regarding the matching of units between an - EvengAssignment\'s formula and the units of the object identified by the - \'variable\' attribute changed. Previous versions required consistency, - but in SBML Level 2 Version 4 and in SBML Level 3, unit - consistency is only @em recommended. More precisely: -
    - -
  • In the case of a species, an EventAssignment sets the referenced - species\' quantity (concentration or amount of substance) to the value - determined by the formula in the EventAssignment\'s \'math\' subelement. - The units of the \'math\' formula should (in SBML Level 2 - Version 4 and in Level 3) or must (in previous Versions of - Level 2) be identical to the units of the species. - -
  • (SBML Level 3 only.) In the case of a species reference, an - EventAssignment sets the stoichiometry of the reactant or product - referenced by the SpeciesReference object to the value determined by the - formula in the \'math\' element. The unit associated with the value - produced by the \'math\' formula should be @c dimensionless, because - reactant and product stoichiometries in reactions are dimensionless - quantities. - -
  • In the case of a compartment, an EventAssignment sets the - referenced compartment\'s size to the size determined by the formula in - the \'math\' subelement of the EventAssignment. The overall units of the - formula should (in SBML Level 2 Version 4 and in Level 3) - or must (in previous Versions of Level 2) be identical to the units - specified for the size of the compartment identified by the - EventAssignment\'s \'variable\' attribute. - -
  • In the case of a parameter, an EventAssignment sets the referenced - parameter\'s value to that determined by the formula in \'math\'. The - overall units of the formula should (in SBML Level 2 Version 4 - and Level 3) or must (in previous Versions of Level 2) be - identical to the units defined for the parameter. -
- - Note that the formula placed in the \'math\' element has no assumed - units. The consistency of the units of the formula, and the units - of the entity which the assignment affects, must be explicitly - established just as in the case of the value of the Delay subelement. - An approach similar to the one discussed in the context of Delay may be - used for the formula of an EventAssignment. - - @see Event -"; - - -%feature("docstring") ListOfEventAssignments " - @ingroup Core - Implementation of SBML\'s %ListOfEventAssignments construct. - - The various ListOf___ classes in %SBML are merely containers used for - organizing the main components of an %SBML model. All are derived from - the abstract class SBase, and inherit the various attributes and - subelements of SBase, such as \'metaid\' as and \'annotation\'. The - ListOf___ classes do not add any attributes of their own. - - ListOfEventAssignments is entirely contained within Event. -"; - - -%feature("docstring") EventAssignment::EventAssignment " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
EventAssignment(SBMLNamespaces sbmlns)
- - Creates a new EventAssignment using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a EventAssignment object to an SBMLDocument - (e.g., using Event.addEventAssignment()), - the SBML XML namespace of the document @em overrides the value used - when creating the EventAssignment object via this constructor. This - is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the time - of creation of a EventAssignment is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
EventAssignment(long level, long version)
- - Creates a new EventAssignment using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this EventAssignment - - @param version a long integer, the SBML Version to assign to this - EventAssignment - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a EventAssignment object to an SBMLDocument - (e.g., using Event.addEventAssignment()), - the SBML Level, SBML Version and XML namespace of the document @em - override the values used when creating the EventAssignment object via - this constructor. This is necessary to ensure that an SBML document - is a consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a EventAssignment is an important - aid to producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - -
- Method variant with the following signature: -
EventAssignment(EventAssignment orig)
- - Copy constructor; creates a copy of this EventAssignment. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") EventAssignment::accept " - Accepts the given SBMLVisitor for this instance of EventAssignment. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(), which indicates - whether the Visitor would like to visit the next EventAssignment in - the list within which this EventAssignment is embedded (i.e., in the - ListOfEventAssignments located in the enclosing Event instance). -"; - - -%feature("docstring") EventAssignment::clone " - Creates and returns a deep copy of this EventAssignment. - - @return a (deep) copy of this EventAssignment. -"; - - -%feature("docstring") EventAssignment::getVariable " - Get the value of this EventAssignment\'s \'variable\' attribute. - - @return the identifier stored in the \'variable\' attribute of this - EventAssignment. -"; - - -%feature("docstring") EventAssignment::getMath " - Get the mathematical expression in this EventAssignment\'s \'math\' - subelement. - - @return the top ASTNode of an abstract syntax tree representing the - mathematical formula in this EventAssignment. -"; - - -%feature("docstring") EventAssignment::isSetVariable " - Predicate for testing whether the attribute \'variable\' of this - EventAssignment is set. - - @return @c True if the \'variable\' attribute of this EventAssignment - is set, @c False otherwise. -"; - - -%feature("docstring") EventAssignment::isSetMath " - Predicate for testing whether the \'math\' subelement of this - EventAssignment is set. - - @return @c True if this EventAssignment has a \'math\' subelement, - @c False otherwise. -"; - - -%feature("docstring") EventAssignment::setVariable " - Sets the attribute \'variable\' of this EventAssignment to a copy of - the given identifier string. - - @param sid the identifier of a Compartment, Species or (global) - Parameter defined in this model. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") EventAssignment::setMath " - Sets the \'math\' subelement of this EventAssignment to a copy of the - given ASTNode. - - @param math an ASTNode that will be copied and stored as the - mathematical formula for this EventAssignment. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") EventAssignment::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units - of measurement assumed for the \'math\' expression of this - EventAssignment. - - The units are calculated based on the mathematical expression in the - EventAssignment and the model quantities referenced by - <ci> elements used within that expression. The - EventAssignment.getDerivedUnitDefinition() method returns the - calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - @warning Note that it is possible the \'math\' expression in the - EventAssignment contains literal numbers or parameters with undeclared - units. In those cases, it is not possible to calculate the units of - the overall expression without making assumptions. LibSBML does not - make assumptions about the units, and - EventAssignment.getDerivedUnitDefinition() only returns the units as - far as it is able to determine them. For example, in an expression - X + Y, if X has unambiguously-defined units and - Y does not, it will return the units of X. When - using this method, it is critical that callers also invoke the - method EventAssignment.containsUndeclaredUnits() to - determine whether this situation holds. Callers should take - suitable action in those situations. - - @return a UnitDefinition that expresses the units of the math - expression of this EventAssignment, or @c None if one cannot be constructed. - - @see containsUndeclaredUnits() -"; - - -%feature("docstring") EventAssignment::containsUndeclaredUnits " - Predicate returning @c True if the math - expression of this EventAssignment contains literal numbers or - parameters with undeclared units. - - The EventAssignment.getDerivedUnitDefinition() method returns what - libSBML computes to be the units of the \'math\', to the extent that - libSBML can compute them. However, if the expression contains literal - numbers or parameters with undeclared units, libSBML may not be able - to compute the full units of the expression and will only return what - it can compute. Callers should always use - EventAssignment.containsUndeclaredUnits() when using - EventAssignment.getDerivedUnitDefinition() to decide whether the - returned units may be incomplete. - - @return @c True if the math expression of this EventAssignment - includes parameters/numbers - with undeclared units, @c False otherwise. - - @note A return value of @c True indicates that the UnitDefinition - returned by EventAssignment.getDerivedUnitDefinition() may not - accurately represent the units of the expression. - - @see getDerivedUnitDefinition() -"; - - -%feature("docstring") EventAssignment::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") EventAssignment::getElementName " - Returns the XML element name of this object, which for - EventAssignment, is always @c \'eventAssignment\'. - - @return the name of this element, i.e., @c \'eventAssignment\'. -"; - - -%feature("docstring") EventAssignment::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") EventAssignment::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this EventAssignment object - have been set. - - @note The required attributes for a EventAssignment object are: - @li \'variable\' - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") EventAssignment::hasRequiredElements " - Predicate returning @c True if - all the required elements for this EventAssignment object - have been set. - - @note The required elements for a EventAssignment object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") EventAssignment::getId " - @internal - Predicate returning @c True if - all the required elements for this EventAssignment object - have been set. - - @note The required elements for a EventAssignment object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") EventAssignment::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") EventAssignment::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") EventAssignment::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") EventAssignment::divideAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing/function). -"; - - -%feature("docstring") EventAssignment::multiplyAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). -"; - - -%feature("docstring") EventAssignment::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") EventAssignment::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") EventAssignment::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") EventAssignment::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") EventAssignment::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") EventAssignment::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") ListOfEventAssignments::ListOfEventAssignments " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
ListOfEventAssignments(SBMLNamespaces sbmlns)
- - Creates a new ListOfEventAssignments object. - - The object is constructed such that it is valid for the SBML Level and - Version combination determined by the SBMLNamespaces object in @p - sbmlns. - - @param sbmlns an SBMLNamespaces object that is used to determine the - characteristics of the ListOfEventAssignments object to be created. - - -
- Method variant with the following signature: -
ListOfEventAssignments(long level, long version)
- - Creates a new ListOfEventAssignments object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - @param level the SBML Level - - @param version the Version within the SBML Level -"; - - -%feature("docstring") ListOfEventAssignments::clone " - Creates and returns a deep copy of this ListOfEventAssignments. - - @return a (deep) copy of this ListOfEventAssignments. -"; - - -%feature("docstring") ListOfEventAssignments::getTypeCode " - Returns the libSBML type code for this %SBML object. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfEventAssignments::getItemTypeCode " - Returns the libSBML type code for the objects contained in this ListOf - (i.e., EventAssignment objects, if the list is non-empty). - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for the objects contained in this ListOf - instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") ListOfEventAssignments::getElementName " - Returns the XML element name of this object. - - For ListOfEventAssignments, the XML element name is @c - \'listOfEventAssignments\'. - - @return the name of this element, i.e., @c \'listOfEventAssignments\'. -"; - - -%feature("docstring") ListOfEventAssignments::get " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
get(long n)
- - Get a EventAssignment from the ListOfEventAssignments. - - @param n the index number of the EventAssignment to get. - - @return the nth EventAssignment in this ListOfEventAssignments. - - @see size() - - -
- Method variant with the following signature: -
get(string sid)
- - Get a EventAssignment from the ListOfEventAssignments - based on its identifier. - - @param sid a string representing the identifier - of the EventAssignment to get. - - @return EventAssignment in this ListOfEventAssignments - with the given @p sid or @c None if no such - EventAssignment exists. - - @see get() - @see size() -"; - - -%feature("docstring") ListOfEventAssignments::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
remove(long n)
- - Removes the nth item from this ListOfEventAssignments items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - @param n the index of the item to remove - - @see size() - - -
- Method variant with the following signature: -
remove(string sid)
- - Removes item in this ListOfEventAssignments items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier @p sid, then @c - None is returned. - - @param sid the identifier of the item to remove - - @return the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfEventAssignments::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that EventAssignments do not actually have IDs, but the libsbml interface pretends that they do: no event assignment is returned by this function. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") ListOfEventAssignments::getElementPosition " - @internal - Get the ordinal position of this element in the containing object - (which in this case is the Model object). - - @return the ordinal position of the element with respect to its - siblings, or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") ListOfEventAssignments::createObject " - @internal - @return the SBML object corresponding to next XMLToken in the - XMLInputStream or @c None if the token was not recognized. -"; - - -%feature("docstring") Trigger " - @ingroup Core - Implementation of %SBML\'s %Trigger construct for %Event. - - An Event object defines when the event can occur, the variables that are - affected by the event, and how the variables are affected. The Trigger - construct in SBML is used to define a mathematical expression that - determines when an Event is @em triggered. - - A Trigger object in SBML Level 2 and Level 3 contains one - subelement named \'math\' containing a MathML expression. The expression - must evaluate to a value of type @c boolean. The exact moment at which - the expression evaluates to @c True is the time point when the Event is - @em triggered. In SBML Level 3, Trigger has additional attributes - that must be assigned values; they are discussed in a separate section - below. - - An event only @em triggers when its Trigger expression makes the - transition in value from @c False to @c True. The event will also - trigger at any subsequent time points when the trigger makes this - transition; in other words, an event can be triggered multiple times - during a simulation if its trigger condition makes the transition from - @c False to @c True more than once. In SBML Level 3, the behavior - at the very start of simulation (i.e., at t = 0, where - t stands for time) is determined in part by the boolean flag - \'initialValue\'. This and other additional features introduced in SBML - Level 3 are discussed further below. - - @section version-diffs Version differences - - SBML Level 3 Version 1 introduces two required attributes - on the Trigger object: \'persistent\' and \'initialValue\'. The rest of - this introduction describes these two attributes. - - @subsection trigger-persistent The \'persistent\' attribute on Trigger - - In the interval between when an Event object triggers (i.e., - its Trigger object expression transitions in value from @c False to - @c True) and when its assignments are to be executed, conditions - in the model may change such that the trigger expression transitions - back from @c True to @c False. Should the event\'s assignments still be - made if this happens? Answering this question is the purpose of the - \'persistent\' attribute on Trigger. - - If the boolean attribute \'persistent\' has a value of @c True, then once - the event is triggered, all of its assignments are always performed when - the time of execution is reached. The name @em persistent is meant to - evoke the idea that the trigger expression does not have to be - re-checked after it triggers if \'persistent\'=@c True. Conversely, if - the attribute value is @c False, then the trigger expression is not - assumed to persist: if the expression transitions in value back to @c - false at any time between when the event triggered and when it is to be - executed, the event is no longer considered to have triggered and its - assignments are not executed. (If the trigger expression transitions - once more to @c True after that point, then the event is triggered, but - this then constitutes a whole new event trigger-and-execute sequence.) - - The \'persistent\' attribute can be especially useful when Event objects - contain Delay objects, but it is relevant even in a model without delays - if the model contains two or more events. As explained in the - introduction to this section, the operation of all events in SBML - (delayed or not) is conceptually divided into two phases, - triggering and execution; however, unless events have - priorities associated with them, SBML does not mandate a particular - ordering of event execution in the case of simultaneous events. Models - with multiple events can lead to situations where the execution of one - event affects another event\'s trigger expression value. If that other - event has \'persistent\'=@c False, and its trigger expression evaluates to - @c False before it is to be executed, the event must not be executed - after all. - - @subsection trigger-initialvalue The \'initialValue\' attribute on Trigger - - As mentioned above, an event triggers when the mathematical - expression in its Trigger object transitions in value from @c False to - @c True. An unanswered question concerns what happens at the start of a - simulation: can event triggers make this transition at t = 0, - where t stands for time? - - In order to determine whether an event may trigger at t = 0, it - is necessary to know what value the Trigger object\'s \'math\' expression - had immediately prior to t = 0. This starting value of the - trigger expression is determined by the value of the boolean attribute - \'initialValue\'. A value of @c True means the trigger expression is - taken to have the value @c True immediately prior to t = 0. In - that case, the trigger cannot transition in value from @c False to @c - true at the moment simulation begins (because it has the value @c True - both before and after t = 0), and can only make the transition - from @c False to @c True sometime after t = 0. (To do - that, it would also first have to transition to @c False before it could - make the transition from @c False back to @c True.) Conversely, if - \'initialValue\'=@c False, then the trigger expression is assumed to start - with the value @c False, and therefore may trigger at t = 0 if - the expression evaluates to @c True at that moment. - - - @see Event - @see Delay - @see EventAssignment -"; - - -%feature("docstring") Trigger::Trigger " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Trigger(SBMLNamespaces sbmlns)
- - Creates a new Trigger using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - -
- Method variant with the following signature: -
Trigger(long level, long version)
- - Creates a new Trigger using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Trigger - - @param version a long integer, the SBML Version to assign to this - Trigger - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - -
- Method variant with the following signature: -
Trigger(Trigger orig)
- - Copy constructor; creates a copy of this Trigger. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Trigger::accept " - Accepts the given SBMLVisitor for this instance of Trigger. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") Trigger::clone " - Creates and returns a deep copy of this Trigger. - - @return a (deep) copy of this Trigger. -"; - - -%feature("docstring") Trigger::getMath " - Get the mathematical formula for the trigger and return it - as an AST. - - @return the math of this Trigger. -"; - - -%feature("docstring") Trigger::getInitialValue " - (SBML Level 3 only) Get the value of the \'initialValue\' attribute - of this Trigger. - - @return the boolean value stored as the \'initialValue\' attribute value - in this Trigger. - - @note The attribute \'initialValue\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::getPersistent " - (SBML Level 3 only) Get the value of the \'persistent\' attribute - of this Trigger. - - @return the boolean value stored as the \'persistent\' attribute value - in this Trigger. - - @note The attribute \'persistent\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::isSetMath " - Predicate to test whether the math for this trigger is set. - - @return @c True if the formula (meaning the \'math\' subelement) of - this Trigger is set, @c False otherwise. -"; - - -%feature("docstring") Trigger::isSetInitialValue " - (SBML Level 3 only) Predicate to test whether the \'initialValue\' - attribute for this trigger is set. - - @return @c True if the initialValue attribute of - this Trigger is set, @c False otherwise. - - @note The attribute \'initialValue\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::isSetPersistent " - (SBML Level 3 only) Predicate to test whether the \'persistent\' - attribute for this trigger is set. - - @return @c True if the persistent attribute of - this Trigger is set, @c False otherwise. - - @note The attribute \'persistent\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::setMath " - Sets the trigger expression of this Trigger instance to a copy of the given - ASTNode. - - @param math an ASTNode representing a formula tree. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") Trigger::setInitialValue " - (SBML Level 3 only) Sets the \'initialValue\' attribute of this Trigger instance. - - @param initialValue a boolean representing the initialValue to be set. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attribute \'initialValue\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::setPersistent " - (SBML Level 3 only) Sets the \'persistent\' attribute of this Trigger instance. - - @param persistent a boolean representing the persistent value to be set. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - - @note The attribute \'persistent\' is available in SBML Level 3 - Version 1 Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this SBML object. - - @param d the SBMLDocument to use. -"; - - -%feature("docstring") Trigger::setParentSBMLObject " - @internal - Sets the parent SBML object of this SBML object. - - @param sb the SBML object to use -"; - - -%feature("docstring") Trigger::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Trigger::getElementName " - Returns the XML element name of this object, which for Trigger, is - always @c \'trigger\'. - - @return the name of this element, i.e., @c \'trigger\'. -"; - - -%feature("docstring") Trigger::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Trigger::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Trigger::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Trigger::getElementPosition " - @internal - Returns the position of this element. - - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") Trigger::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Trigger::hasRequiredElements " - Predicate returning @c True if - all the required elements for this Trigger object - have been set. - - @note The required elements for a Trigger object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Trigger::hasRequiredAttributes " - Predicate returning @c True if - all the required attributes for this Trigger object - have been set. - - @note The required attributes for a Trigger object are: - @li \'persistent\' (required in SBML Level 3) - @li \'initialValue\' (required in SBML Level 3) - - @return a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Trigger::removeFromParentAndDelete " - Finds this Trigger\'s Event parent and calls unsetTrigger() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Trigger::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") Trigger::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Trigger::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Trigger::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Trigger::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Trigger::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Delay " - @ingroup Core - Implementation of %SBML\'s %Delay construct for %Event. - - An Event object defines when the event can occur, the variables that - are affected by the event, and how the variables are affected. The - effect of the event can optionally be delayed after the occurrence of - the condition which invokes it. An event delay is defined using an - object of class Delay. - - The object class Delay is derived from SBase and adds a single - subelement called \'math\'. This subelement is used to hold MathML - content. The mathematical formula represented by \'math\' must evaluate - to a numerical value. It is used as the length of time between when the - event is @em triggered and when the event\'s assignments are - actually @em executed. If no delay is present on a given Event, a time - delay of zero is assumed. - - The expression in \'math\' must be evaluated at the time the event is @em - triggered. The expression must always evaluate to a nonnegative number - (otherwise, a nonsensical situation could arise where an event is - defined to execute before it is triggered!). - - @section delay-units The units of the mathematical expression in a Delay - - In SBML Level 2 versions before Version 4, the units of the - numerical value computed by the Delay\'s \'math\' expression are @em - required to be in units of time, or the model is considered to have a - unit consistency error. In Level 2 Version 4 as well as SBML - Level 3 Version 1 Core, this requirement is relaxed; these - specifications only stipulate that the units of the numerical value - computed by a Delay instance\'s \'math\' expression @em should match the - model\'s units of time (meaning the definition of the @c time units in - the model). LibSBML respects these requirements, and depending on - whether an earlier Version of SBML Level 2 is in use, libSBML may - or may not flag unit inconsistencies as errors or merely warnings. - - Note that units are not predefined or assumed for the contents - of \'math\' in a Delay object; rather, they must be defined explicitly for - each instance of a Delay object in a model. This is an important point - to bear in mind when literal numbers are used in delay expressions. For - example, the following Event instance would result in a warning logged - by SBMLDocument.checkConsistency() about the fact that libSBML cannot - verify the consistency of the units of the expression. The reason is - that the formula inside the \'math\' element does not have any declared - units, whereas what is expected in this context is units of time: - @verbatim - - ... - - - ... - - - 1 - - - ... - - - ... - - @endverbatim - - The <cn> 1 </cn> within the mathematical formula - of the @c delay above has no units declared. To make the - expression have the needed units of time, literal numbers should be - avoided in favor of defining Parameter objects for each quantity, and - declaring units for the Parameter values. The following fragment of - SBML illustrates this approach: - @verbatim - - ... - - - - ... - - - ... - - - transcriptionDelay - - - ... - - - ... - - @endverbatim - - In SBML Level 3, an alternative approach is available in the form - of the @c units attribute, which SBML Level 3 allows to appear on - MathML @c cn elements. The value of this attribute can be used to - indicate the unit of measurement to be associated with the number in the - content of a @c cn element. The attribute is named @c units but, - because it appears inside MathML element (which is in the XML namespace - for MathML and not the namespace for SBML), it must always be prefixed - with an XML namespace prefix for the SBML Level 3 Version 1 - namespace. The following is an example of this approach: - @verbatim - - ... - - - ... - - - 10 - - - ... - - - ... - - @endverbatim -"; - - -%feature("docstring") Delay::Delay " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Delay(SBMLNamespaces sbmlns)
- - Creates a new Delay using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Delay object to an Event (e.g., using - Event.setDelay()), the SBML XML namespace of - the document @em overrides the value used when creating the Delay - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a Delay is an important - aid to producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add a particular Delay object - to an existing Event. - - -
- Method variant with the following signature: -
Delay(long level, long version)
- - Creates a new Delay using the given SBML @p level and @p version - values. - - @param level a long integer, the SBML Level to assign to this Delay - - @param version a long integer, the SBML Version to assign to this - Delay - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Delay object to an Event (e.g., using - Event.setDelay()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used when - creating the Delay object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a Delay is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add a - particular Delay object to an existing Event. - - -
- Method variant with the following signature: -
Delay(Delay orig)
- - Copy constructor; creates a copy of this Delay. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Delay::accept " - Accepts the given SBMLVisitor for this instance of Delay. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") Delay::clone " - Creates and returns a deep copy of this Delay. - - @return a (deep) copy of this Delay. -"; - - -%feature("docstring") Delay::getMath " - Get the mathematical formula for the delay and return it - as an AST. - - @return the math of this Delay. -"; - - -%feature("docstring") Delay::isSetMath " - Predicate to test whether the formula for this delay is set. - - @return @c True if the formula (meaning the @c math subelement) of - this Delay is set, @c False otherwise. -"; - - -%feature("docstring") Delay::setMath " - Sets the delay expression of this Delay instance to a copy of the given - ASTNode. - - @param math an ASTNode representing a formula tree. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") Delay::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units - of measurement assumed for the \'math\' expression of this Delay. - - Delay elements in SBML express a time delay for an Event. Beginning - with SBML Level 2 Version 2, the units of that time are - calculated based on the mathematical expression and the model - quantities referenced by <ci> elements used within - that expression. The Delay.getDerivedUnitDefinition() method returns - what libSBML computes the units to be, to the extent that libSBML can - compute them. - - (Prior to SBML Level 2 Version 2, there existed an attribute - on Event called \'timeUnits\'. This attribute could be used to set the - intended units of the delay expression. For such models, this will - return a UnitDefinition object that corresponds to the declared - \'timeUnits\' units.) - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - @warning Note that it is possible the \'math\' expression in the Delay - contains literal numbers or parameters with undeclared units. In - those cases, it is not possible to calculate the units of the overall - expression without making assumptions. LibSBML does not make - assumptions about the units, and Delay.getDerivedUnitDefinition() - only returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has - unambiguously-defined units and Y does not, it will return - the units of X. When using this method, it is - critical that callers also invoke the method - Delay.containsUndeclaredUnits() to determine whether this - situation holds. Callers should take suitable action in - those situations. - - @return a UnitDefinition that expresses the units of the math - expression of this Delay, or @c None if one cannot be constructed. - - @see containsUndeclaredUnits() -"; - - -%feature("docstring") Delay::containsUndeclaredUnits " - Predicate returning @c True if - the \'math\' expression in this Delay instance contains - parameters with undeclared units or literal numbers. - - Delay elements in SBML express a time delay for an Event. Beginning - with SBML Level 2 Version 2, the units of that time are - calculated based on the mathematical expression and the model - quantities referenced by <ci> elements used within - that expression. The Delay.getDerivedUnitDefinition() method returns - what libSBML computes the units to be, to the extent that libSBML can - compute them. However, if the expression contains literal numbers or - parameters with undeclared units, libSBML may not be able to compute - the full units of the expression and will only return what it can - compute. Callers should always use Delay.containsUndeclaredUnits() - when using Delay.getDerivedUnitDefinition() to decide whether the - returned units may be incomplete. - - @return @c True if the math expression of this Delay includes - numbers/parameters with undeclared units, @c False otherwise. - - @note A return value of @c True indicates that the UnitDefinition - returned by Delay.getDerivedUnitDefinition() may not accurately - represent the units of the expression. - - @see getDerivedUnitDefinition() -"; - - -%feature("docstring") Delay::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Delay::getElementName " - Returns the XML element name of this object, which for Delay, is - always @c \'delay\'. - - @return the name of this element, i.e., @c \'delay\'. - - @see getTypeCode() -"; - - -%feature("docstring") Delay::getElementPosition " - @internal - Returns the position of this element. - - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") Delay::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Delay::hasRequiredElements " - Predicate returning @c True if - all the required elements for this Delay object - have been set. - - @note The required elements for a Delay object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Delay::removeFromParentAndDelete " - Finds this Delay\'s Event parent and calls unsetDelay() on it, indirectly - deleting itself. - - Overridden from the SBase function since the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Delay::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Delay::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Delay::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Delay::getInternalId " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Delay::setInternalId " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Delay::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") Delay::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Delay::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Delay::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Delay::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Delay::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") Priority " - @ingroup Core - Implementation of %SBML Level 3\'s %Priority construct - for Event. - - The Priority object class (which was introduced in SBML Level 3 - Version 1), like Delay, is derived from SBase and contains a MathML - formula stored in the element \'math\'. This formula is used to compute a - dimensionless numerical value that influences the order in which a - simulator is to perform the assignments of two or more events that - happen to be executed simultaneously. The formula may evaluate to any - @c double value (and thus may be a positive or negative number, or - zero), with positive numbers taken to signifying a higher priority than - zero or negative numbers. If no Priority object is present on a given - Event object, no priority is defined for that event. - - @section priority-interp The interpretation of priorities on events in a model - - For the purposes of SBML, simultaneous event execution is - defined as the situation in which multiple events have identical - times of execution. The time of execution is calculated as the - sum of the time at which a given event\'s Trigger is triggered - plus its Delay duration, if any. Here, identical times means - mathematically equal instants in time. (In practice, - simulation software adhering to this specification may have to - rely on numerical equality instead of strict mathematical - equality; robust models will ensure that this difference will not - cause significant discrepancies from expected behavior.) - - If no Priority subobjects are defined for two or more Event objects, - then those events are still executed simultaneously but their order of - execution is undefined by the SBML Level 3 Version 1 - specification. A software implementation may choose to execute - such simultaneous events in any order, as long as each event is executed - only once and the requirements of checking the \'persistent\' attribute - (and acting accordingly) are satisfied. - - If Priority subobjects are defined for two or more - simultaneously-triggered events, the order in which those particular - events must be executed is dictated by their Priority objects, - as follows. If the values calculated using the two Priority - objects\' \'math\' expressions differ, then the event having - the higher priority value must be executed before the event with - the lower value. If, instead, the two priority values are - mathematically equal, then the two events must be triggered in a - random order. It is important to note that a random - order is not the same as an undefined order: given multiple - runs of the same model with identical conditions, an undefined - ordering would permit a system to execute the events in (for - example) the same order every time (according to whatever scheme - may have been implemented by the system), whereas the explicit - requirement for random ordering means that the order of execution - in different simulation runs depends on random chance. In other - words, given two events A and B, a randomly-determined - order must lead to an equal chance of executing A first or - B first, every time those two events are executed - simultaneously. - - A model may contain a mixture of events, some of which have - Priority subobjects and some do not. Should a combination of - simultaneous events arise in which some events have priorities - defined and others do not, the set of events with defined - priorities must trigger in the order determined by their Priority - objects, and the set of events without Priority objects must be - executed in an undefined order with respect to each other - and with respect to the events with Priority subobjects. (Note - that undefined order does not necessarily mean random - order, although a random ordering would be a valid implementation - of this requirement.) - - The following example may help further clarify these points. - Suppose a model contains four events that should be executed - simultaneously, with two of the events having Priority objects - with the same value and the other two events having Priority - objects with the same, but different, value. The two events with - the higher priorities must be executed first, in a random order - with respect to each other, and the remaining two events must be - executed after them, again in a random order, for a total of four - possible and equally-likely event executions: A-B-C-D, A-B-D-C, - B-A-C-D, and B-A-D-C. If, instead, the model contains four events - all having the same Priority values, there are 4! or 24 - possible orderings, each of which must be equally likely to be - chosen. Finally, if none of the four events has a Priority - subobject defined, or even if exactly one of the four events has a - defined Priority, there are again 24 possible orderings, but the - likelihood of choosing any particular ordering is undefined; the - simulator can choose between events as it wishes. (The SBML - specification only defines the effects of priorities on Event - objects with respect to other Event objects with - priorities. Putting a priority on a single Event object - in a model does not cause it to fall within that scope.) - - @section priority-eval Evaluation of Priority expressions - - An event\'s Priority object \'math\' expression must be - evaluated at the time the Event is to be executed. During - a simulation, all simultaneous events have their Priority values - calculated, and the event with the highest priority is selected for - next execution. Note that it is possible for the execution of one - Event object to cause the Priority value of another - simultaneously-executing Event object to change (as well as to - trigger other events, as already noted). Thus, after executing - one event, and checking whether any other events in the model have - been triggered, all remaining simultaneous events that - either (i) have Trigger objects with attributes - \'persistent\'=@c False or (ii) have Trigger - expressions that did not transition from @c True to - @c False, must have their Priority expression reevaluated. - The highest-priority remaining event must then be selected for - execution next. - - @section priority-units Units of Priority object\'s mathematical expressions - - The unit associated with the value of a Priority object\'s - \'math\' expression should be @c dimensionless. This is - because the priority expression only serves to provide a relative - ordering between different events, and only has meaning with - respect to other Priority object expressions. The value of - Priority objects is not comparable to any other kind of object in - an SBML model. - - @note The Priority construct exists only in SBML Level 3; it cannot - be used in SBML Level 2 or Level 1 models. - - @see Event - @see Delay - @see EventAssignment -"; - - -%feature("docstring") Priority::Priority " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
Priority(SBMLNamespaces sbmlns)
- - Creates a new Priority object using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Priority object to an Event (e.g., using - Event.setPriority()), the SBML XML namespace of - the document @em overrides the value used when creating the Priority - object via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a Priority is an important - aid to producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add a particular Priority object - to an existing Event.

- - @note The Priority construct exists only in SBML Level 3; it - cannot be used in SBML Level 2 or Level 1 models. - - -
- Method variant with the following signature: -
Priority(long level, long version)
- - Creates a new Priority object using the given SBML @p level and @p - version values. - - @param level a long integer, the SBML Level to assign to this Priority - - @param version a long integer, the SBML Version to assign to this - Priority - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a Priority object to an Event (e.g., using - Event.setPriority()), the SBML Level, SBML Version - and XML namespace of the document @em override the values used when - creating the Priority object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a Priority is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add a - particular Priority object to an existing Event.

- - @note The Priority construct exists only in SBML Level 3; it - cannot be used in SBML Level 2 or Level 1 models. - - -
- Method variant with the following signature: -
Priority(Priority orig)
- - Copy constructor; creates a copy of this Priority. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Priority::accept " - Accepts the given SBMLVisitor for this instance of Priority. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling v.visit(). -"; - - -%feature("docstring") Priority::clone " - Creates and returns a deep copy of this Priority. - - @return a (deep) copy of this Priority. -"; - - -%feature("docstring") Priority::getMath " - Get the mathematical formula for the priority and return it - as an AST. - - @return the math of this Priority. -"; - - -%feature("docstring") Priority::isSetMath " - Predicate to test whether the formula for this delay is set. - - @return @c True if the formula (meaning the @c math subelement) of - this Priority is set, @c False otherwise. -"; - - -%feature("docstring") Priority::setMath " - Sets the math expression of this Priority instance to a copy of the given - ASTNode. - - @param math an ASTNode representing a formula tree. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") Priority::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as SBML type codes. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as SBML type codes. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as SBML type - codes. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") Priority::getElementName " - Returns the XML element name of this object, which for Priority, is - always @c \'priority\'. - - @return the name of this element, i.e., @c \'priority\'. - - @see getTypeCode() -"; - - -%feature("docstring") Priority::getElementPosition " - @internal - Returns the position of this element. - - @return the ordinal position of the element with respect to its - siblings or -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") Priority::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") Priority::hasRequiredElements " - Predicate returning @c True if - all the required elements for this Priority object - have been set. - - @note The required elements for a Priority object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") Priority::removeFromParentAndDelete " - Finds this Priority\'s Event parent and calls unsetPriority() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") Priority::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Priority::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") Priority::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Priority::getInternalId " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Priority::setInternalId " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") Priority::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") Priority::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") Priority::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Priority::readL3Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") Priority::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SBO " - @ingroup Core - Methods for interacting with Systems Biology Ontology terms. - - @htmlinclude not-sbml-warning.html - - The values of \'id\' attributes on SBML components allow the components to - be cross-referenced within a model. The values of \'name\' attributes on - SBML components provide the opportunity to assign them meaningful labels - suitable for display to humans. The specific identifiers and labels - used in a model necessarily must be unrestricted by SBML, so that - software and users are free to pick whatever they need. However, this - freedom makes it more difficult for software tools to determine, without - additional human intervention, the semantics of models more precisely - than the semantics provided by the SBML object classes defined in other - sections of this document. For example, there is nothing inherent in a - parameter with identifier k that would indicate to a - software tool it is a first-order rate constant (if that\'s what - k happened to be in some given model). However, one may - need to convert a model between different representations (e.g., - Henri-Michaelis-Menten versus elementary steps), or to use it with - different modeling approaches (discrete or continuous). One may also - need to relate the model components with other description formats such - as SBGN (http://www.sbgn.org/) using deeper - semantics. Although an advanced software tool might be able to - deduce the semantics of some model components through detailed analysis - of the kinetic rate expressions and other parts of the model, this - quickly becomes infeasible for any but the simplest of models. - - An approach to solving this problem is to associate model components - with terms from carefully curated controlled vocabularies (CVs). This - is the purpose of the optional \'sboTerm\' attribute provided on the SBML - class SBase. The \'sboTerm\' attribute always refers to terms belonging - to the Systems Biology Ontology (SBO). - - @section use Use of SBO - - Labeling model components with terms from shared controlled vocabularies - allows a software tool to identify each component using identifiers that - are not tool-specific. An example of where this is useful is the desire - by many software developers to provide users with meaningful names for - reaction rate equations. Software tools with editing interfaces - frequently provide these names in menus or lists of choices for users. - However, without a standardized set of names or identifiers shared - between developers, a given software package cannot reliably interpret - the names or identifiers of reactions used in models written by other - tools. - - The first solution that might come to mind is to stipulate that certain - common reactions always have the same name (e.g., \'Michaelis-Menten\'), but - this is simply impossible to do: not only do humans often disagree on - the names themselves, but it would not allow for correction of errors or - updates to the list of predefined names except by issuing new releases - of the SBML specification—to say nothing of many other limitations - with this approach. Moreover, the parameters and variables that appear - in rate expressions also need to be identified in a way that software - tools can interpret mechanically, implying that the names of these - entities would also need to be regulated. - - The Systems Biology Ontology (SBO) provides terms for identifying most - elements of SBML. The relationship implied by an \'sboTerm\' on an SBML - model component is is-a between the characteristic of the - component meant to be described by %SBO on this element and the %SBO - term identified by the value of the \'sboTerm\'. By adding %SBO term - references on the components of a model, a software tool can provide - additional details using independent, shared vocabularies that can - enable other software tools to recognize precisely what the - component is meant to be. Those tools can then act on that information. - For example, if the %SBO identifier @c \'SBO:0000049\' is assigned - to the concept of \'first-order irreversible mass-action kinetics, - continuous framework\', and a given KineticLaw object in a model has an - \'sboTerm\' attribute with this value, then regardless of the identifier - and name given to the reaction itself, a software tool could use this to - inform users that the reaction is a first-order irreversible mass-action - reaction. This kind of reverse engineering of the meaning of reactions - in a model would be difficult to do otherwise, especially for more - complex reaction types. - - The presence of %SBO labels on Compartment, Species, and Reaction - objects in SBML can help map those entities to equivalent concepts in - other standards, such as (but not limited to) BioPAX (http://www.biopax.org/), PSI-MI (http://www.psidev.info), - or the Systems Biology Graphical Notation (SBGN, http://www.sbgn.org/). Such mappings - can be used in conversion procedures, or to build interfaces, with %SBO - becoming a kind of \'glue\' between standards of representation. - - The presence of the label on a kinetic expression can also allow - software tools to make more intelligent decisions about reaction rate - expressions. For example, an application could recognize certain types - of reaction formulas as being ones it knows how to solve with optimized - procedures. The application could then use internal, optimized code - implementing the rate formula indexed by identifiers such as - @c \'SBO:0000049\' appearing in SBML models. - - Finally, %SBO labels may be very valuable when it comes to model - integration, by helping identify interfaces, convert mathematical - expressions and parameters etc. - - Although the use of %SBO can be beneficial, it is critical to keep in - mind that the presence of an \'sboTerm\' value on an object must not - change the fundamental mathematical meaning of the model. An SBML - model must be defined such that it stands on its own and does not depend - on additional information added by %SBO terms for a correct mathematical - interpretation. %SBO term definitions will not imply any alternative - mathematical semantics for any SBML object labeled with that term. Two - important reasons motivate this principle. First, it would be too - limiting to require all software tools to be able to understand the %SBO - vocabularies in addition to understanding SBML. Supporting %SBO is not - only additional work for the software developer; for some kinds of - applications, it may not make sense. If %SBO terms on a model are - optional, it follows that the SBML model must remain - unambiguous and fully interpretable without them, because an application - reading the model may ignore the terms. Second, we believe allowing the - use of \'sboTerm\' to alter the mathematical meaning of a model would - allow too much leeway to shoehorn inconsistent concepts into SBML - objects, ultimately reducing the interoperability of the models. - - @section relationship Relationships between SBO and SBML - - The goal of %SBO labeling for SBML is to clarify to the fullest extent - possible the nature of each element in a model. The approach taken in - %SBO begins with a hierarchically-structured set of controlled - vocabularies with six main divisions: (1) entity, (2) participant role, - (3) quantitative parameter, (4) modeling framework, (5) mathematical - expression, and (6) interaction. The web site for %SBO (http://biomodels.net) should be - consulted for the current version of the ontology. - - The Systems Biology Ontology (SBO) is not part of SBML; it is being - developed separately, to allow the modeling community to evolve the - ontology independently of SBML. However, the terms in the ontology are - being designed keeping SBML components in mind, and are classified into - subsets that can be directly related with SBML components such as - reaction rate expressions, parameters, and others. The use of \'sboTerm\' - attributes is optional, and the presence of \'sboTerm\' on an element does - not change the way the model is interpreted. Annotating SBML - elements with %SBO terms adds additional semantic information that may - be used to convert the model into another model, or another - format. Although %SBO support provides an important source of - information to understand the meaning of a model, software does not need - to support \'sboTerm\' to be considered SBML-compliant. -"; - - -%feature("docstring") SBO::readTerm " - @internal - Reads (and checks) sboTerm from the given XMLAttributes set. - - @return the sboTerm as an integer or -1 if the sboTerm was not in the - correct format or not found. -"; - - -%feature("docstring") SBO::writeTerm " - @internal - Writes sboTerm as an XMLAttribute with the given prefix to the given XMLOutputStream. -"; - - -%feature("docstring") SBO::isQuantitativeParameter " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'quantiative parameter\', @c False - otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isQuantitativeParameter(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isParticipantRole " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'participant role\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isParticipantRole(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isModellingFramework " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'modeling framework\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isModellingFramework(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isMathematicalExpression " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'mathematical expression\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isMathematicalExpression(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isKineticConstant " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'kinetic constant\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isKineticConstant(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isReactant " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'reactant\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isReactant(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isProduct " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'product\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isProduct(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isModifier " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'modifier\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isModifier(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isRateLaw " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'rate law\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isRateLaw(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isEvent " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'event\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isEvent(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isPhysicalParticipant " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'physical participant, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isPhysicalParticipant(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isParticipant " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'participant\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isParticipant(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isInteraction " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'interaction\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isInteraction(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isEntity " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'entity\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isEntity(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isFunctionalEntity " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'functional entity\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isFunctionalEntity(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isMaterialEntity " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'material entity\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isMaterialEntity(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isConservationLaw " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'conservation law\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isConservationLaw(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isSteadyStateExpression " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'steady state expression\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isSteadyStateExpression(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isFunctionalCompartment " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'functional compartment\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isFunctionalCompartment(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isContinuousFramework " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'continuous framework\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isContinuousFramework(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isDiscreteFramework " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'discrete framework\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isDiscreteFramework(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isLogicalFramework " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'logical framework\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isLogicalFramework(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isMetadataRepresentation " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'metadata representation\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isMetadataRepresentation(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isOccurringEntityRepresentation " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'occurring entity representation\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isOccurringEntityRepresentation(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isPhysicalEntityRepresentation " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'physical entity representation\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isPhysicalEntityRepresentation(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isSystemsDescriptionParameter " - Returns @c True if the given term identifier comes from the stated branch of %SBO. - - @return @c True if @p term is-a %SBO \'systems description parameter\', @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isSystemsDescriptionParameter(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isObselete " - Predicate for checking whether the given term is obsolete. - - @return @c True if @p term is-a %SBO \'obsolete\' term, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_isObselete(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::intToString " - Returns the integer as a correctly formatted %SBO identifier string. - - @return the given integer sboTerm as a zero-padded seven digit string. - - @note If the sboTerm is not in the correct range - (0000000–9999999), an empty string is returned. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_intToString(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::stringToInt " - Returns the string as a correctly formatted %SBO integer portion. - - @return the given string sboTerm as an integer. If the sboTerm is not - in the correct format (a zero-padded, seven digit string), -1 is - returned. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_stringToInt(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::checkTerm " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - -
- Method variant with the following signature: -
checkTerm(string sboTerm)
- - Checks the format of the given %SBO identifier string. - - @return @c True if sboTerm is in the correct format (a zero-padded, seven - digit string), @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_checkTerm(). They are functionally identical. @endif@~ - - -
- Method variant with the following signature: -
checkTerm(int sboTerm)
- - Checks the format of the given %SBO identifier, given in the form of - the integer portion alone. - - @return @c True if sboTerm is in the range (0000000–9999999), @c False - otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBO), and the other will - be a standalone top-level function with the name - SBO_checkTerm(). They are functionally identical. @endif@~ -"; - - -%feature("docstring") SBO::isChildOf " - @internal - Returns @c True if the given term identifier comes from the stated branch of %SBO. - * @return true if the term is-a parent, false otherwise -"; - - -%feature("docstring") SBO::populateSBOTree " - @internal - Returns @c True if the given term identifier comes from the stated branch of %SBO. - populates the parent-child map -"; - - -%feature("docstring") SyntaxChecker " - @ingroup Core - Methods for checking syntax of SBML identifiers and other strings. - - @htmlinclude not-sbml-warning.html - - This utility class provides static methods for checking the syntax of - identifiers and other text used in an SBML model. The methods allow - callers to verify that strings such as SBML identifiers and XHTML notes - text conform to the SBML specifications. -"; - - -%feature("docstring") SyntaxChecker::isValidSBMLSId " - Returns true @c True or @c False depending on whether the argument - string conforms to the syntax of SBML identifiers. - - In SBML, identifiers that are the values of \'id\' attributes on objects - must conform to a data type called SId in the SBML - specifications. LibSBML does not provide an explicit SId - data type; it uses ordinary character strings, which is easier for - applications to support. LibSBML does, however, test for identifier - validity at various times, such as when reading in models from files - and data streams. - - This method provides programs with the ability to test explicitly that - the identifier strings they create conform to the SBML identifier - syntax. - - @param sid string to be checked for conformance to SBML identifier - syntax. - - @return @c True if the string conforms to type SBML data type - SId, @c False otherwise. - - @note @htmlinclude id-syntax.html - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SyntaxChecker), and the - other will be a standalone top-level function with the name - SyntaxChecker_isValidSBMLSId(). They are functionally - identical. @endif@~ - - @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~ - @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~ -"; - - -%feature("docstring") SyntaxChecker::isValidXMLID " - Returns @c True or @c False depending on whether the argument string - conforms to the XML data type ID. - - In SBML, identifiers that are the values of \'metaid\' attributes on - objects must conform to the XML ID data type. LibSBML - does not provide an explicit XML ID data type; it uses - ordinary character strings, which is easier for applications to - support. LibSBML does, however, test for identifier validity at - various times, such as when reading in models from files and data - streams. - - This method provides programs with the ability to test explicitly that - the identifier strings they create conform to the SBML identifier - syntax. - - @param id string to be checked for conformance to the syntax of - XML ID. - - @return @c True if the string is a syntactically-valid value for the - XML type ID, @c False otherwise. - - @note @htmlinclude xmlid-syntax.html - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SyntaxChecker), and the - other will be a standalone top-level function with the name - SyntaxChecker_isValidXMLID(). They are functionally - identical. @endif@~ - - @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~ - @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~ -"; - - -%feature("docstring") SyntaxChecker::isValidXMLanyURI " - Returns @c True or @c False depending on whether the @param uri argument string - conforms to the XML data type anyURI. - - Type anyURI is defined by XML Schema 1.0. It is a character string - data type whose values are interpretable as URIs (Universal Resource - Identifiers) as described by the W3C document RFC 3986. LibSBML - does not provide an explicit XML anyURI data type; it uses - ordinary character strings, which is easier for applications to - support. LibSBML does, however, test for anyURI validity at - various times, such as when reading in models from files and data - streams. - - This method provides programs with the ability to test explicitly that - the strings they create conform to the XML anyURI syntax. - - @param uri string to be checked for conformance to the syntax of - anyURI. - - @return @c True if the string is a syntactically-valid value for the - XML type anyURI, - @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SyntaxChecker), and the - other will be a standalone top-level function with the name - SyntaxChecker_isValidXMLanyURI(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") SyntaxChecker::isValidUnitSId " - Returns @c True or @c False depending on whether the argument string - conforms to the syntax of SBML unit identifiers. - - In SBML, the identifiers of units (of both the predefined units and - user-defined units) must conform to a data type called - UnitSId in the SBML specifications. LibSBML does not - provide an explicit UnitSId data type; it uses ordinary - character strings, which is easier for applications to support. - LibSBML does, however, test for identifier validity at various times, - such as when reading in models from files and data streams. - - This method provides programs with the ability to test explicitly that - the identifier strings they create conform to the SBML identifier - syntax. - - @param units string to be checked for conformance to SBML unit - identifier syntax. - - @return @c True if the string conforms to type SBML data type - UnitSId, @c False otherwise. - - @note @htmlinclude unitid-syntax.html - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SyntaxChecker), and the - other will be a standalone top-level function with the name - SyntaxChecker_isValidUnitSId(). They are functionally - identical. @endif@~ - - @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~ - @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~ -"; - - -%feature("docstring") SyntaxChecker::hasExpectedXHTMLSyntax " - Returns @c True or @c False depending on whether the given XMLNode - object contains valid XHTML content. - - In SBML, the content of the \'notes\' subelement available on SBase, as - well as the \'message\' subelement available on Constraint, must conform - to XHTML 1.0 (which is - simply an XML-ized version of HTML). However, the content cannot be - @em entirely free-form; it must satisfy certain requirements defined in - the SBML - specifications for specific SBML Levels. This method implements a - verification process that lets callers check whether the content of a - given XMLNode object conforms to the SBML requirements for \'notes\' and - \'message\' structure. - - An aspect of XHTML validity is that the content is declared to be in - the XML namespace for XHTML 1.0. There is more than one way in - which this can be done in XML. In particular, a model might not - contain the declaration within the \'notes\' or \'message\' subelement - itself, but might instead place the declaration on an enclosing - element and use an XML namespace prefix within the \'notes\' element to - refer to it. In other words, the following is valid: - @verbatim - - - - - A Simple Mitotic Oscillator - A minimal cascade model for the mitotic oscillator. - - - ... rest of model ... - - @endverbatim - Contrast the above with the following, self-contained version, which - places the XML namespace declaration within the <notes> - element itself: - @verbatim - - - - - - - </head> - <body> - <center><h2>A Simple Mitotic Oscillator</h2></center> - <p>A minimal cascade model for the mitotic oscillator.</p> - </body> - </html> - </notes> - ... rest of model ... - </sbml> - @endverbatim - - Both of the above are valid XML. The purpose of the @p sbmlns - argument to this method is to allow callers to check the validity of - \'notes\' and \'message\' subelements whose XML namespace declarations - have been put elsewhere in the manner illustrated above. Callers can - can pass in the SBMLNamespaces object of a higher-level model - component if the XMLNode object does not itself have the XML namespace - declaration for XHTML 1.0. - - @param xhtml the XMLNode to be checked for conformance. - @param sbmlns the SBMLNamespaces associated with the object. - - @return @c True if the XMLNode content conforms, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SyntaxChecker), and the - other will be a standalone top-level function with the name - SyntaxChecker_hasExpectedXHTMLSyntax(). They are functionally - identical. @endif@~ - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SyntaxChecker::isValidInternalSId " - @internal - Returns true @c True or @c False depending on whether the argument - string conforms to the syntax of SBML identifiers or is empty. -"; - - -%feature("docstring") SyntaxChecker::isValidInternalUnitSId " - @internal - Returns true @c True or @c False depending on whether the argument - string conforms to the syntax of SBML identifiers or is empty. -"; - - -%feature("docstring") SyntaxChecker::isAllowedElement " - @internal - Returns true @c True or @c False depending on whether the argument - string conforms to the syntax of SBML identifiers or is empty. -"; - - -%feature("docstring") SyntaxChecker::hasDeclaredNS " - @internal - Returns true @c True or @c False depending on whether the argument - string conforms to the syntax of SBML identifiers or is empty. -"; - - -%feature("docstring") SyntaxChecker::isCorrectHTMLNode " - @internal - Returns true @c True or @c False depending on whether the argument - string conforms to the syntax of SBML identifiers or is empty. -"; - - -%feature("docstring") SyntaxChecker::isUnicodeLetter " - @internal - Checks if a character is part of the Unicode Letter set. - @return true if the character is a part of the set, false otherwise. -"; - - -%feature("docstring") SyntaxChecker::isUnicodeDigit " - @internal - Checks if a character is part of the Unicode Digit set. - @return true if the character is a part of the set, false otherwise. -"; - - -%feature("docstring") SyntaxChecker::isCombiningChar " - @internal - Checks if a character is part of the Unicode CombiningChar set. - @return true if the character is a part of the set, false otherwise. -"; - - -%feature("docstring") SyntaxChecker::isExtender " - @internal - Checks if a character is part of the Unicode Extender set. - @return true if the character is a part of the set, false otherwise. -"; - - -%feature("docstring") StoichiometryMath " - @ingroup Core - Implementation of SBML Level 2\'s %StoichiometryMath construct. - - @section l2-stoichiometries Stoichiometries in SBML Level 2 - - In SBML Level 2, product and reactant stoichiometries can be specified - using @em either the \'stoichiometry\' attribute or a \'stoichiometryMath\' - element in a SpeciesReference object. The \'stoichiometry\' attribute is - of type @c double and should contain values greater than zero (0). The - \'stoichiometryMath\' element is implemented as an element containing a - MathML expression. These two are mutually exclusive; only one of - \'stoichiometry\' or \'stoichiometryMath\' should be defined in a given - SpeciesReference instance. When neither the attribute nor the element - is present, the value of \'stoichiometry\' in the enclosing - SpeciesReference instance defaults to @c 1. - - For maximum interoperability, SpeciesReference\'s \'stoichiometry\' - attribute should be used in preference to \'stoichiometryMath\' when a - species\' stoichiometry is a simple scalar number (integer or decimal). - When the stoichiometry is a rational number, or when it is a more - complicated formula, \'stoichiometryMath\' must be used. The MathML - expression in \'stoichiometryMath\' may also refer to identifiers of - entities in a model (except reaction identifiers). However, the only - species identifiers that can be used in \'stoichiometryMath\' are those - referenced in the enclosing Reaction\'s list of reactants, products and - modifiers. - - The \'stoichiometry\' attribute and the \'stoichiometryMath\' element, when - either is used, is each interpreted as a factor applied to the reaction - rate to produce the rate of change of the species identified by the - \'species\' attribute in the enclosing SpeciesReference. This is the - normal interpretation of a stoichiometry, but in SBML, one additional - consideration has to be taken into account. The reaction rate, which is - the result of the KineticLaw\'s \'math\' element, is always in the model\'s - @em substance per @em time units. However, the rate of change of the - species will involve the species\' @em substance units (i.e., the units - identified by the Species object\'s \'substanceUnits\' attribute), and - these units may be different from the model\'s default @em substance - units. If the units @em are different, the stoichiometry must - incorporate a conversion factor for converting the model\'s @em substance - units to the species\' @em substance units. The conversion factor is - assumed to be included in the scalar value of the \'stoichiometry\' - attribute if \'stoichiometry\' is used. If instead \'stoichiometryMath\' is - used, then the product of the model\'s \'substance\' units times the - \'stoichiometryMath\' units must match the @em substance units of the - species. Note that in either case, if the species\' units and the - model\'s default @em substance units are the same, the stoichiometry ends - up being a dimensionless number and equivalent to the standard chemical - stoichiometry found in textbooks. Examples and more explanations of - this are given in the SBML specification. - - The following is a simple example of a species reference for species @c - \'X0\', with stoichiometry @c 2, in a list of reactants within a reaction - having the identifier @c \'J1\': - @verbatim - <model> - ... - <listOfReactions> - <reaction id=\'J1\'> - <listOfReactants> - <speciesReference species=\'X0\' stoichiometry=\'2\'> - </listOfReactants> - ... - </reaction> - ... - </listOfReactions> - ... - </model> - @endverbatim - - The following is a more complex example of a species reference for - species @c \'X0\', with a stoichiometry formula consisting of - a rational number: - @verbatim - <model> - ... - <listOfReactions> - <reaction id=\'J1\'> - <listOfReactants> - <speciesReference species=\'X0\'> - <stoichiometryMath> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> - <cn type=\'rational\'> 3 <sep/> 2 </cn> - </math> - </stoichiometryMath> - </speciesReference> - </listOfReactants> - ... - </reaction> - ... - </listOfReactions> - ... - </model> - @endverbatim - - Additional discussions of stoichiometries and implications for species - and reactions are included in the documentation of SpeciesReference - class. - - @section l3-stoichiometries Stoichiometries in SBML Level 3 - - The StoichiometryMath construct is not defined in SBML Level 3 - Version 1 Core. Instead, Level 3 defines the identifier of - SpeciesReference objects as a stand-in for the stoichiometry of the - reactant or product being referenced, and allows that identifier to be - used elsewhere in SBML models, including (for example) InitialAssignment - objects. This makes it possible to achieve the same effect as - StoichiometryMath, but with other SBML objects. For instance, to - produce a stoichiometry value that is a rational number, a model can use - InitialAssignment to assign the identifier of a SpeciesReference object - to a MathML expression evaluating to a rational number. This is - analogous to the same way that, in Level 2, the model would use - StoichiometryMath with a MathML expression evaluating to a rational - number. - - In SBML Level 2, the stoichiometry of a reactant or product is a - combination of both a <em>biochemical stoichiometry</em> (meaning, the - standard stoichiometry of a species in a reaction) and any necessary - unit conversion factors. The introduction of an explicit attribute on - the Species object for a conversion factor allows Level 3 to avoid - having to overload the meaning of stoichiometry. In Level 3, the - stoichiometry given by a SpeciesReference object in a reaction is a - \'proper\' biochemical stoichiometry, meaning a dimensionless number free - of unit conversions. - - @see SpeciesReference - @see Reaction -"; - - -%feature("docstring") StoichiometryMath::StoichiometryMath " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>StoichiometryMath(SBMLNamespaces sbmlns)</pre> - - Creates a new StoichiometryMath object using the given SBMLNamespaces object - @p sbmlns. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - A common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - @param sbmlns an SBMLNamespaces object. - - The StoichiometryMath construct exists only in SBML Level 2. It - is an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a StoichiometryMath object to an - SBMLDocument (e.g., using - SpeciesReference.createStoichiometryMath()), the SBML XML namespace - of the document @em overrides the value used when creating the - StoichiometryMath object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. Nevertheless, - the ability to supply the values at the time of creation of a - StoichiometryMath is an important aid to producing valid SBML. - Knowledge of the intented SBML Level and Version determine whether it - is valid to assign a particular value to an attribute, or whether it - is valid to add an object to an existing SBMLDocument. - - - <hr> - Method variant with the following signature: - <pre class='signature'>StoichiometryMath(long level, long version)</pre> - - Creates a new StoichiometryMath object using the given SBML @p level - values. - - @param level a long integer, the SBML Level to assign to this StoichiometryMath - - @param version a long integer, the SBML Version to assign to this - StoichiometryMath - - The StoichiometryMath construct exists only in SBML Level 2. It - is an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the given @p level and @p version combination, or this kind - of SBML object, are either invalid or mismatched with respect to the - parent SBMLDocument object. - - @note Upon the addition of a StoichiometryMath object to an - SBMLDocument (e.g., using - SpeciesReference.createStoichiometryMath()), the SBML Level, SBML - Version and XML namespace of the document @em override the values used - when creating the StoichiometryMath object via this constructor. This - is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the time - of creation of a StoichiometryMath is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - - <hr> - Method variant with the following signature: - <pre class='signature'>StoichiometryMath(StoichiometryMath orig)</pre> - - Copy constructor; creates a copy of this StoichiometryMath. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") StoichiometryMath::accept " - Accepts the given SBMLVisitor for this instance of StoichiometryMath. - - @param v the SBMLVisitor instance to be used. - - @return the result of calling <code>v.visit()</code>. -"; - - -%feature("docstring") StoichiometryMath::clone " - Creates and returns a deep copy of this StoichiometryMath object. - - @return a (deep) copy of this StoichiometryMath. -"; - - -%feature("docstring") StoichiometryMath::getMath " - Retrieves the mathematical formula within this StoichiometryMath and - return it as an AST. - - @return the math of this StoichiometryMath. - - The StoichiometryMath construct exists only in SBML Level 2. It - is an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. -"; - - -%feature("docstring") StoichiometryMath::isSetMath " - Predicate to test whether the math for this StoichiometryMath object - is set. - - @return @c True if the formula (meaning the @c math subelement) of - this StoichiometryMath is set, @c False otherwise. - - The StoichiometryMath construct exists only in SBML Level 2. It - is an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. -"; - - -%feature("docstring") StoichiometryMath::setMath " - Sets the \'math\' expression of this StoichiometryMath instance to a - copy of the given ASTNode. - - @param math an ASTNode representing a formula tree. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - The StoichiometryMath construct exists only in SBML Level 2. It - is an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. -"; - - -%feature("docstring") StoichiometryMath::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition object that expresses the - units returned by the math expression in this StoichiometryMath - object. - - The units are calculated based on the mathematical expression in the - StoichiometryMath and the model quantities referenced by - <code><ci></code> elements used within that expression. The - StoichiometryMath.getDerivedUnitDefinition() method returns the - calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, - unit analysis is not possible and this method will return @c None. - - @warning Note that it is possible the \'math\' expression in the - StoichiometryMath instance contains literal numbers or parameters with - undeclared units. In those cases, it is not possible to calculate the - units of the overall expression without making assumptions. LibSBML - does not make assumptions about the units, and - StoichiometryMath.getDerivedUnitDefinition() only returns the units - as far as it is able to determine them. For example, in an expression - <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and - <em>Y</em> does not, it will return the units of <em>X</em>. When - using this method, <strong>it is critical that callers also invoke the - method</strong> StoichiometryMath.containsUndeclaredUnits() - <strong>to determine whether this situation holds</strong>. Callers - should take suitable action in those situations. - - @return a UnitDefinition that expresses the units of the math, - or @c None if one cannot be constructed. - - @see containsUndeclaredUnits() -"; - - -%feature("docstring") StoichiometryMath::containsUndeclaredUnits " - Predicate returning @c True if the math - expression of this StoichiometryMath object contains literal numbers - or parameters with undeclared units. - - The StoichiometryMath.getDerivedUnitDefinition() method returns what - libSBML computes the units of the Stoichiometry to be, to the extent - that libSBML can compute them. However, if the expression contains - literal numbers or parameters with undeclared units, libSBML may not - be able to compute the full units of the expression and will only - return what it can compute. Callers should always use - StoichiometryMath.containsUndeclaredUnits() when using - StoichiometryMath.getDerivedUnitDefinition() to decide whether the - returned units may be incomplete. - - @return @c True if the math expression of this StoichiometryMath - includes numbers/parameters with undeclared units, @c False otherwise. - - @note A return value of @c True indicates that the UnitDefinition - returned by StoichiometryMath.getDerivedUnitDefinition() may not - accurately represent the units of the expression. - - @see getDerivedUnitDefinition() -"; - - -%feature("docstring") StoichiometryMath::getTypeCode " - Returns the libSBML type code of this object instance. - - @if clike LibSBML attaches an identifying code to every kind of SBML - object. These are known as <em>SBML type codes</em>. The set of - possible type codes is defined in the enumeration #SBMLTypeCode_t. - The names of the type codes all begin with the characters @c - SBML_. @endif@if java LibSBML attaches an identifying code to every - kind of SBML object. These are known as <em>SBML type codes</em>. In - other languages, the set of type codes is stored in an enumeration; in - the Java language interface for libSBML, the type codes are defined as - static integer constants in the interface class {@link - libsbmlConstants}. The names of the type codes all begin with the - characters @c SBML_. @endif@if python LibSBML attaches an identifying - code to every kind of SBML object. These are known as <em>SBML type - codes</em>. In the Python language interface for libSBML, the type - codes are defined as static integer constants in the interface class - @link libsbml@endlink. The names of the type codes all begin with the - characters @c SBML_. @endif@if csharp LibSBML attaches an identifying - code to every kind of SBML object. These are known as <em>SBML type - codes</em>. In the C# language interface for libSBML, the type codes - are defined as static integer constants in the interface class @link - libsbmlcs.libsbml@endlink. The names of the type codes all begin with - the characters @c SBML_. @endif@~ - - @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). - - @see getElementName() -"; - - -%feature("docstring") StoichiometryMath::getElementName " - Returns the XML element name of this object, which for StoichiometryMath, is - always @c \'stoichiometryMath\'. - - @return the name of this element, i.e., @c \'stoichiometryMath\'. -"; - - -%feature("docstring") StoichiometryMath::getElementPosition " - @internal - Returns the position of this element. - - @return the ordinal position of the element with respect to its - siblings or @c -1 (default) to indicate the position is not significant. -"; - - -%feature("docstring") StoichiometryMath::writeElements " - @internal - Subclasses should override this method to write out their contained - SBML objects as XML elements. Be sure to call your parents - implementation of this method as well. -"; - - -%feature("docstring") StoichiometryMath::hasRequiredElements " - Predicate returning @c True if - all the required elements for this StoichiometryMath object - have been set. - - @note The required elements for a StoichiometryMath object are: - @li \'math\' - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") StoichiometryMath::removeFromParentAndDelete " - Finds this StoichiometryMath\'s SpeciesReference parent and calls unsetStoichiometryMath() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") StoichiometryMath::renameSIdRefs " - Renames all the @c SIdRef attributes on this element, including any - found in MathML. - - @htmlinclude what-is-sidref.html - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of @p - oldid. If any matches are found, the matching identifiers are replaced - with @p newid. The method does @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") StoichiometryMath::renameUnitSIdRefs " - Renames all the @c UnitSIdRef attributes on this element. - - @htmlinclude what-is-unitsidref.html - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing the - unit identifiers to the value of @p oldid. If any matches are found, - the matching identifiers are replaced with @p newid. The method does - @em not descend into child elements. - - @param oldid the old identifier - @param newid the new identifier -"; - - -%feature("docstring") StoichiometryMath::replaceSIDWithFunction " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") StoichiometryMath::getInternalId " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") StoichiometryMath::setInternalId " - @internal - Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. -"; - - -%feature("docstring") StoichiometryMath::readOtherXML " - @internal - Subclasses should override this method to read (and store) XHTML, - MathML, etc. directly from the XMLInputStream. - - @return true if the subclass read from the stream, false otherwise. -"; - - -%feature("docstring") StoichiometryMath::addExpectedAttributes " - @internal - Subclasses should override this method to get the list of - expected attributes. - This function is invoked from corresponding readAttributes() - function. -"; - - -%feature("docstring") StoichiometryMath::readAttributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") StoichiometryMath::readL2Attributes " - @internal - Subclasses should override this method to read values from the given - XMLAttributes set into their specific fields. Be sure to call your - parents implementation of this method as well. -"; - - -%feature("docstring") StoichiometryMath::writeAttributes " - @internal - Subclasses should override this method to write their XML attributes - to the XMLOutputStream. Be sure to call your parents implementation - of this method as well. -"; - - -%feature("docstring") SBMLNamespaces " - @ingroup Core - Class to store SBML level, version and namespace information. - - @htmlinclude not-sbml-warning.html - - There are differences in the definitions of components between different - SBML Levels, as well as Versions within Levels. For example, the - \'sboTerm\' attribute was not introduced until Level 2 - Version 2, and then only on certain component classes; the SBML - Level 2 Version 3 specification moved the \'sboTerm\' attribute - to the SBase class, thereby allowing nearly all components to have SBO - annotations. As a result of differences such as those, libSBML needs to - track the SBML Level and Version of every object created. - - The purpose of the SBMLNamespaces object class is to make it easier to - communicate SBML Level and Version data between libSBML constructors and - other methods. The SBMLNamespaces object class tracks 3-tuples - (triples) consisting of SBML Level, Version, and the corresponding SBML - XML namespace. - - The plural name (SBMLNamespaces) is not a mistake, because in SBML - Level 3, objects may have extensions added by Level 3 packages - used by a given model and therefore may have multiple namespaces - associated with them; however, until the introduction of SBML - Level 3, the SBMLNamespaces object only records one SBML - Level/Version/namespace combination at a time. Most constructors for - SBML objects in libSBML take a SBMLNamespaces object as an argument, - thereby allowing the constructor to produce the proper combination of - attributes and other internal data structures for the given SBML Level - and Version. -"; - - -%feature("docstring") SBMLNamespaces::SBMLNamespaces " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLNamespaces(SBMLNamespaces orig)</pre> - - Copy constructor; creates a copy of a SBMLNamespaces. - - @param orig the SBMLNamespaces instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLNamespaces(long level = SBML_DEFAULT_LEVEL, long version = SBML_DEFAULT_VERSION)</pre> - - Creates a new SBMLNamespaces object corresponding to the given SBML - @p level and @p version. - - SBMLNamespaces objects are used in libSBML to communicate SBML Level - and Version data between constructors and other methods. The - SBMLNamespaces object class tracks 3-tuples (triples) consisting of - SBML Level, Version, and the corresponding SBML XML namespace. Most - constructors for SBML objects in libSBML take a SBMLNamespaces object - as an argument, thereby allowing the constructor to produce the proper - combination of attributes and other internal data structures for the - given SBML Level and Version. - - The plural name (SBMLNamespaces) is not a mistake, because in SBML - Level 3, objects may have extensions added by Level 3 - packages used by a given model and therefore may have multiple - namespaces associated with them; however, until the introduction of - SBML Level 3, the SBMLNamespaces object only records one SBML - Level/Version/namespace combination at a time. Most constructors for - SBML objects in libSBML take a SBMLNamespaces object as an argument, - thereby allowing the constructor to produce the proper combination of - attributes and other internal data structures for the given SBML Level - and Version. - - @param level the SBML level - @param version the SBML version - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLNamespaces(long level, long version, string &pkgName, long pkgVersion, string pkgPrefix = \'\')</pre> - - (For Extension) - - Creates a new SBMLNamespaces object corresponding to the combination of - (1) the given SBML @p level and @p version, and (2) the given @p package - with the @p package @p version. - - @note SBMLExtensionException will be thrown if the extension module - that supports the combination of the given sbml level, sbml version, - package name, and package version has not been registered. - - @param level the SBML level - @param version the SBML version - @param pkgName the string of package name (e.g. \'layout\', \'multi\') - @param pkgVersion the package version - @param pkgPrefix the prefix of the package namespace (e.g. \'layout\', \'multi\') to be added. - The package\'s name will be used if the given string is empty (default). -"; - - -%feature("docstring") SBMLNamespaces::clone " - Creates and returns a deep copy of this SBMLNamespaces. - - @return a (deep) copy of this SBMLNamespaces. -"; - - -%feature("docstring") SBMLNamespaces::getSBMLNamespaceURI " - Returns a string representing the SBML XML namespace for the - given @p level and @p version of SBML. - - @param level the SBML level - @param version the SBML version - - @return a string representing the SBML namespace that reflects the - SBML Level and Version specified. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLNamespaces), and the - other will be a standalone top-level function with the name - SBMLNamespaces_getSBMLNamespaceURI(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") SBMLNamespaces::getSupportedNamespaces " - Returns a list of all supported SBMLNamespaces in this version of - libsbml. - - @return a list with supported SBML namespaces. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLNamespaces), and the - other will be a standalone top-level function with the name - SBMLNamespaces_getSupportedNamespaces(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") SBMLNamespaces::getURI " - Returns a string representing the SBML XML namespace of this - object. - - @return a string representing the SBML namespace that reflects the - SBML Level and Version of this object. -"; - - -%feature("docstring") SBMLNamespaces::getLevel " - Get the SBML Level of this SBMLNamespaces object. - - @return the SBML Level of this SBMLNamespaces object. -"; - - -%feature("docstring") SBMLNamespaces::getVersion " - Get the SBML Version of this SBMLNamespaces object. - - @return the SBML Version of this SBMLNamespaces object. -"; - - -%feature("docstring") SBMLNamespaces::getNamespaces " - Get the XML namespaces list for this SBMLNamespaces object. - - The plural is not a mistake, because in SBML Level 3, objects may - have extensions added by Level 3 packages used by a given model, - and therefore there may be multiple XML namespaces involved too. - However, until the introduction of SBML Level 3, the - SBMLNamespaces object only records one SBML Level/Version/namespace - combination at a time, and so this method will also only return - a list of one item. - - @return the XML namespaces of this SBMLNamespaces object. -"; - - -%feature("docstring") SBMLNamespaces::addNamespaces " - Add the given XML namespaces list to the set of namespaces within this - SBMLNamespaces object. - - The following code gives an example of how one could add the XHTML - namespace to the list of namespaces recorded by the top-level - <code><sbml></code> element of a model. It gives the new - namespace a prefix of <code>html</code>. @if clike - @verbatim - SBMLDocumentsd; - try - { - sd = new SBMLDocument(3, 1); - } - catch (SBMLConstructorException e) - { - // Here, have code to handle a truly exceptional situation. Candidate - // causes include invalid combinations of SBML Level and Version - // (impossible if hardwired as given here), running out of memory, and - // unknown system exceptions. - } - - SBMLNamespaces sn = sd->getNamespaces(); - if (sn != None) - { - sn->add(\'http://www.w3.org/1999/xhtml\', \'html\'); - } - else - { - // Handle another truly exceptional situation. - } - @endverbatim - @endif@if java - @verbatim - SBMLDocument sd; - try - { - sd = new SBMLDocument(3, 1); - } - catch (SBMLConstructorException e) - { - // Here, have code to handle a truly exceptional situation. Candidate - // causes include invalid combinations of SBML Level and Version - // (impossible if hardwired as given here), running out of memory, and - // unknown system exceptions. - } - - SBMLNamespaces sn = sd.getNamespaces(); - if (sn != null) - { - sn.add(\'http://www.w3.org/1999/xhtml\', \'html\'); - } - else - { - // Handle another truly exceptional situation. - } - @endverbatim - @endif@if python - @verbatim - sbmlDoc = None - try: - sbmlDoc = SBMLDocument(3, 1) - except ValueError: - # Do something to handle exceptional situation. Candidate - # causes include invalid combinations of SBML Level and Version - # (impossible if hardwired as given here), running out of memory, and - # unknown system exceptions. - - namespaces = sbmlDoc.getNamespaces() - if namespaces == None: - # Do something to handle case of no namespaces. - - status = namespaces.add(\'http://www.w3.org/1999/xhtml\', \'html\') - if status != LIBSBML_OPERATION_SUCCESS: - # Do something to handle failure. - @endverbatim - @endif@if csharp - @verbatim - SBMLDocument sd = null; - try - { - sd = new SBMLDocument(3, 1); - } - catch (SBMLConstructorException e) - { - // Here, have code to handle a truly exceptional situation. - // Candidate causes include invalid combinations of SBML - // Level and Version (impossible if hardwired as given here), - // running out of memory, and unknown system exceptions. - } - - XMLNamespaces sn = sd.getNamespaces(); - if (sn != null) - { - sn.add(\'http://www.w3.org/1999/xhtml\', \'html\'); - } - else - { - // Handle another truly exceptional situation. - } - @endverbatim - @endif@~ - - @param xmlns the XML namespaces to be added. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") SBMLNamespaces::addNamespace " - Add an XML namespace (a pair of URI and prefix) to the set of namespaces - within this SBMLNamespaces object. - - @param uri the XML namespace to be added. - @param prefix the prefix of the namespace to be added. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") SBMLNamespaces::removeNamespace " - Removes an XML namespace from the set of namespaces within this - SBMLNamespaces object. - - @param uri the XML namespace to be added. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") SBMLNamespaces::addPackageNamespace " - Add an XML namespace (a pair of URI and prefix) of a package extension - to the set of namespaces within this SBMLNamespaces object. - The SBML Level and SBML Version of this object is used. - - @note An XML namespace of a non-registered package extension can\'t be - added by this function (@link - libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - will be returned). - - @param pkgName the string of package name (e.g. \'layout\', \'multi\') - @param pkgVersion the package version - @param prefix the prefix of the package namespace to be added. - The package\'s name will be used if the given string is empty (default). - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @see addNamespace() -"; - - -%feature("docstring") SBMLNamespaces::addPackageNamespaces " - Add the XML namespaces of package extensions in the given - XMLNamespace object to the set of namespaces within this - SBMLNamespaces object (Non-package XML namespaces are not added - by this function). - - @note XML namespaces of a non-registered package extensions are not - added (just ignored) by this function. @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - will be returned if the given xmlns is null. - - @param xmlns the XML namespaces to be added. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SBMLNamespaces::removePackageNamespace " - Removes an XML namespace of a package extension from the set of namespaces - within this SBMLNamespaces object. - - @param level the SBML level - @param version the SBML version - @param pkgName the string of package name (e.g. \'layout\', \'multi\') - @param pkgVersion the package version - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") SBMLNamespaces::addPkgNamespace " - @internal - Add an XML namespace (a pair of URI and prefix) of a package extension - to the set of namespaces within this SBMLNamespaces object. - The SBML Level and SBML Version of this object is used. - - @note An XML namespace of a non-registered package extension can\'t be - added by this function (@link - libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - will be returned). - - @param pkgName the string of package name (e.g. \'layout\', \'multi\') - @param pkgVersion the package version - @param prefix the prefix of the package namespace to be added. - The package\'s name will be used if the given string is empty (default). - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @see addNamespace() -"; - - -%feature("docstring") SBMLNamespaces::addPkgNamespaces " - @internal - Add the XML namespaces of package extensions in the given - XMLNamespace object to the set of namespaces within this - SBMLNamespaces object (Non-package XML namespaces are not added - by this function). - - @note XML namespaces of a non-registered package extensions are not - added (just ignored) by this function. @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - will be returned if the given xmlns is null. - - @param xmlns the XML namespaces to be added. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SBMLNamespaces::removePkgNamespace " - @internal - Removes an XML namespace of a package extension from the set of namespaces - within this SBMLNamespaces object. - - @param level the SBML level - @param version the SBML version - @param pkgName the string of package name (e.g. \'layout\', \'multi\') - @param pkgVersion the package version - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") SBMLNamespaces::isSBMLNamespace " - Predicate returning @c True if the given - URL is one of SBML XML namespaces. - - @param uri the URI of namespace - - @return @c True if the \'uri\' is one of SBML namespaces, @c False otherwise. - - @if notclike @note Because this is a @em static method, the - non-C++ language interfaces for libSBML will contain two variants. One - will be a static method on the class (i.e., SBMLNamespaces), and the - other will be a standalone top-level function with the name - SBMLNamespaces_isSBMLNamespace(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") SBMLNamespaces::isValidCombination " - Predicate returning @c True if the given - set of namespaces represent a valid set - - @return @c True if the set of namespaces is valid, @c False otherwise. -"; - - -%feature("docstring") SBMLNamespaces::setLevel " - @internal - Predicate returning @c True if the given - set of namespaces represent a valid set - - @return @c True if the set of namespaces is valid, @c False otherwise. -"; - - -%feature("docstring") SBMLNamespaces::setVersion " - @internal - Predicate returning @c True if the given - set of namespaces represent a valid set - - @return @c True if the set of namespaces is valid, @c False otherwise. -"; - - -%feature("docstring") SBMLNamespaces::setNamespaces " - @internal - Predicate returning @c True if the given - set of namespaces represent a valid set - - @return @c True if the set of namespaces is valid, @c False otherwise. -"; - - -%feature("docstring") SBMLNamespaces::getPackageName " - Returns the name of the main package for this namespace. - - @return the name of the main package for this namespace. - \'core\' will be returned if this namespace is defined in the SBML - core. -"; - - -%feature("docstring") SBMLNamespaces::initSBMLNamespace " - @internal - Returns the name of the main package for this namespace. - - @return the name of the main package for this namespace. - \'core\' will be returned if this namespace is defined in the SBML - core. -"; - - -%feature("docstring") SBMLConstructorException " - @ingroup Core - Class of exceptions thrown by constructors of some libSBML objects. - - In some situations, constructors for SBML objects may need to indicate to - callers that the creation of the object failed. The failure may be for - different reasons, such as an attempt to use invalid parameters or a - system condition such as a memory error. To communicate this to callers, - those classes will throw an SBMLConstructorException. - - In languages that don\'t have an exception mechanism (e.g., C), the - constructors generally try to return an error code instead of throwing - an exception. -"; - - -%feature("docstring") SBMLConstructorException::getSBMLErrMsg " - Returns the message associated with this SBML exception. - - @return the message string. -"; - - -%feature("docstring") ConversionOption " - @ingroup Core - Class of object that encapsulates a conversion option. - - @htmlinclude libsbml-facility-only-warning.html - - LibSBML provides a number of converters that can perform transformations - on SBML documents. These converters allow their behaviors to be - controlled by setting property values. Converter properties are - communicated using objects of class ConversionProperties, and within - such objects, individual options are encapsulated using ConversionOption - objects. - - A ConversionOption object consists of four parts: - @li A @em key, acting as the name of the option; - @li A @em value of this option; - @li A @em type for the value; this is chosen from the enumeration type - <a class=\'el\' href=\'#ConversionOptionType_t\'>ConversionOptionType_t</a>; and - @li A @em description consisting of a text string that describes the - option in some way. - - There are no constraints on the values of keys or descriptions; - authors of SBML converters are free to choose them as they see fit. - - @section ConversionOptionType_t Conversion option data types - - An option in ConversionOption must have a data type declared, to - indicate whether it is a string value, an integer, and so forth. The - possible types of values are taken from the enumeration <a - class=\'el\' href=\'#ConversionOptionType_t\'>ConversionOptionType_t</a>. - The following are the possible values: - - <p> - <center> - <table width=\'90%\' cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'normal-font\'> - <tr style=\'background: lightgray\' class=\'normal-font\'> - <td><strong>Enumerator</strong></td> - <td><strong>Meaning</strong></td> - </tr> - <tr> - <td><code>@link libsbml.CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink</code></td> - <td>Indicates the value type is a Boolean.</td> - </tr> - <tr> - <td><code>@link libsbml.CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink</code></td> - <td>Indicates the value type is a double-sized float.</td> - </tr> - <tr> - <td><code>@link libsbml.CNV_TYPE_INT CNV_TYPE_INT@endlink</code></td> - <td>Indicates the value type is an integer.</td> - </tr> - <tr> - <td><code>@link libsbml.CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink</code></td> - <td>Indicates the value type is a float.</td> - </tr> - <tr> - <td><code>@link libsbml.CNV_TYPE_STRING CNV_TYPE_STRING@endlink</code></td> - <td>Indicates the value type is a string.</td> - </tr> - </table> - </center> - - @see ConversionProperties -"; - - -%feature("docstring") ConversionOption::ConversionOption " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(string key, double value, string description=\'\')</pre> - - Creates a new ConversionOption specialized for double-type options. - - @param key the key for this option - @param value the value for this option - @param description an optional description - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(string key, int value, string description=\'\')</pre> - - Creates a new ConversionOption specialized for integer-type options. - - @param key the key for this option - @param value the value for this option - @param description an optional description - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(string key, float value, string description=\'\')</pre> - - Creates a new ConversionOption specialized for float-type options. - - @param key the key for this option - @param value the value for this option - @param description an optional description - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(string key, string value, string description=\'\')</pre> - - Creates a new ConversionOption specialized for string-type options. - - @param key the key for this option - @param value the value for this option - @param description an optional description - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(string key, bool value, string description=\'\')</pre> - - Creates a new ConversionOption specialized for Boolean-type options. - - @param key the key for this option - @param value the value for this option - @param description an optional description - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(string key, string value=\'\', ConversionOptionType_t type=CNV_TYPE_STRING, string description=\'\')</pre> - - Creates a new ConversionOption. - - This is the general constructor, taking arguments for all aspects of - an option. Other constructors exist with different arguments. - - @param key the key for this option - @param value an optional value for this option - @param type the type of this option - @param description the description for this option - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionOption(ConversionOption orig)</pre> - - Copy constructor; creates a copy of an ConversionOption object. - - @param orig the ConversionOption object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") ConversionOption::clone " - Creates and returns a deep copy of this ConversionOption object. - - @return a (deep) copy of this ConversionOption object. -"; - - -%feature("docstring") ConversionOption::getKey " - Returns the key for this option. - - @return the key, as a string. -"; - - -%feature("docstring") ConversionOption::setKey " - Sets the key for this option. - - @param key a string representing the key to set. -"; - - -%feature("docstring") ConversionOption::getValue " - Returns the value of this option. - - @return the value of this option, as a string. -"; - - -%feature("docstring") ConversionOption::setValue " - Sets the value for this option. - - @param value the value to set, as a string. -"; - - -%feature("docstring") ConversionOption::getDescription " - Returns the description string for this option. - - @return the description of this option. -"; - - -%feature("docstring") ConversionOption::setDescription " - Sets the description text for this option. - - @param description the description to set for this option. -"; - - -%feature("docstring") ConversionOption::getType " - Returns the type of this option - - @return the type of this option. -"; - - -%feature("docstring") ConversionOption::setType " - Sets the type of this option. - - @param type the type value to use. -"; - - -%feature("docstring") ConversionOption::getBoolValue " - Returns the value of this option as a Boolean. - - @return the value of this option. -"; - - -%feature("docstring") ConversionOption::setBoolValue " - Set the value of this option to a given Boolean value. - - Invoking this method will also set the type of the option to - @link libsbml.CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink. - - @param value the Boolean value to set -"; - - -%feature("docstring") ConversionOption::getDoubleValue " - Returns the value of this option as a @c double. - - @return the value of this option. -"; - - -%feature("docstring") ConversionOption::setDoubleValue " - Set the value of this option to a given @c double value. - - Invoking this method will also set the type of the option to - @link libsbml.CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink. - - @param value the value to set -"; - - -%feature("docstring") ConversionOption::getFloatValue " - Returns the value of this option as a @c float. - - @return the value of this option as a float -"; - - -%feature("docstring") ConversionOption::setFloatValue " - Set the value of this option to a given @c float value. - - Invoking this method will also set the type of the option to - @link libsbml.CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink. - - @param value the value to set -"; - - -%feature("docstring") ConversionOption::getIntValue " - Returns the value of this option as an @c integer. - - @return the value of this option, as an int -"; - - -%feature("docstring") ConversionOption::setIntValue " - Set the value of this option to a given @c int value. - - Invoking this method will also set the type of the option to - @link libsbml.CNV_TYPE_INT CNV_TYPE_INT@endlink. - - @param value the value to set -"; - - -%feature("docstring") ConversionProperties " - @ingroup Core - Class of object that encapsulates the properties of an SBML converter. - - @htmlinclude libsbml-facility-only-warning.html - - The properties of SBML converters are communicated using objects of - class ConversionProperties, and within such objects, individual options - are encapsulated using ConversionOption objects. The ConversionProperties - class provides numerous methods for setting and getting options. - - ConversionProperties objects are also used to determine the target SBML - namespace when an SBML converter\'s behavior depends on the intended - Level+Version combination of SBML. In addition, it is conceivable that - conversions may be affected by SBML Level 3 packages being used - by an SBML document. These, too, are communicated by the values of - the SBML namespaces set on a ConversionProperties object. - - @see ConversionOption - @see SBMLNamespaces -"; - - -%feature("docstring") ConversionProperties::ConversionProperties " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionProperties(ConversionProperties orig)</pre> - - Copy constructor. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>ConversionProperties(SBMLNamespaces targetNS=None)</pre> - - Constructor that initializes the conversion properties - with a specific SBML target namespace. - - @param targetNS the target namespace to convert to -"; - - -%feature("docstring") ConversionProperties::clone " - Creates and returns a deep copy of this ConversionProperties object. - - @return a (deep) copy of this ConversionProperties object. -"; - - -%feature("docstring") ConversionProperties::getTargetNamespaces " - Returns the current target SBML namespace. - - @return the SBMLNamepaces object expressing the target namespace. -"; - - -%feature("docstring") ConversionProperties::hasTargetNamespaces " - Returns @c True if the target SBML namespace has been set. - - @return @c True if the target namespace has been set, @c False - otherwise. -"; - - -%feature("docstring") ConversionProperties::setTargetNamespaces " - Sets the target namespace. - - @param targetNS the target namespace to use. -"; - - -%feature("docstring") ConversionProperties::getDescription " - Returns the description string for a given option in this properties - object. - - @param key the key for the option. - - @return the description text of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::getType " - Returns the type of a given option in this properties object. - - @param key the key for the option. - - @return the type of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::getOption " - Returns the ConversionOption object for a given key. - - @param key the key for the option. - - @return the option with the given key. -"; - - -%feature("docstring") ConversionProperties::addOption " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(ConversionOption option)</pre> - - Adds a copy of the given option to this properties object. - - @param option the option to add - - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(string key, double value, string description=\'\')</pre> - - Adds a new ConversionOption object with the given parameters. - - @param key the key for the new option - @param value the double value of that option - @param description (optional) the description for the option - - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(string key, int value, string description=\'\')</pre> - - Adds a new ConversionOption object with the given parameters. - - @param key the key for the new option - @param value the integer value of that option - @param description (optional) the description for the option - - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(string key, float value, string description=\'\')</pre> - - Adds a new ConversionOption object with the given parameters. - - @param key the key for the new option - @param value the float value of that option - @param description (optional) the description for the option - - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(string key, string value, string description=\'\')</pre> - - Adds a new ConversionOption object with the given parameters. - - @param key the key for the new option - @param value the string value of that option - @param description (optional) the description for the option - - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(string key, bool value, string description=\'\')</pre> - - Adds a new ConversionOption object with the given parameters. - - @param key the key for the new option - @param value the boolean value of that option - @param description (optional) the description for the option - - - <hr> - Method variant with the following signature: - <pre class='signature'>addOption(string key, string value=\'\', ConversionOptionType_t type=CNV_TYPE_STRING, string description=\'\')</pre> - - Adds a new ConversionOption object with the given parameters. - - @param key the key for the new option - @param value (optional) the value of that option - @param type (optional) the type of the option - @param description (optional) the description for the option -"; - - -%feature("docstring") ConversionProperties::removeOption " - Removes the option with the given key from this properties object. - - @param key the key for the new option to remove - @return the removed option -"; - - -%feature("docstring") ConversionProperties::hasOption " - Returns @c True if this properties object contains an option with - the given key. - - @param key the key of the option to find. - - @return @c True if an option with the given @p key exists in - this properties object, @c False otherwise. -"; - - -%feature("docstring") ConversionProperties::getValue " - Returns the value of the given option as a string. - - @param key the key for the option. - - @return the string value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setValue " - Sets the value of the given option to a string. - - @param key the key for the option - @param value the new value -"; - - -%feature("docstring") ConversionProperties::getBoolValue " - Returns the value of the given option as a Boolean. - - @param key the key for the option. - - @return the boolean value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setBoolValue " - Sets the value of the given option to a Boolean. - - @param key the key for the option. - - @param value the new Boolean value. -"; - - -%feature("docstring") ConversionProperties::getDoubleValue " - Returns the value of the given option as a @c double. - - @param key the key for the option. - - @return the double value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setDoubleValue " - Sets the value of the given option to a @c double. - - @param key the key for the option. - - @param value the new double value. -"; - - -%feature("docstring") ConversionProperties::getFloatValue " - Returns the value of the given option as a @c float. - - @param key the key for the option. - - @return the float value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setFloatValue " - Sets the value of the given option to a @c float. - - @param key the key for the option. - - @param value the new float value. -"; - - -%feature("docstring") ConversionProperties::getIntValue " - Returns the value of the given option as an integer. - - @param key the key for the option. - - @return the int value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setIntValue " - Sets the value of the given option to an integer. - - @param key the key for the option. - - @param value the new integer value. -"; - - -%feature("docstring") SBMLConverter " - @ingroup Core - Base class for SBML converters. - - @htmlinclude libsbml-facility-only-warning.html - - The SBMLConverter class is the base class for the various SBML @em - converters: classes of objects that transform or convert SBML documents. - These transformations can involve essentially anything that can be - written algorithmically; examples include converting the units of - measurement in a model, or converting from one Level+Version combination - of SBML to another. - - LibSBML provides a number of built-in converters, and applications can - create their own by subclassing SBMLConverter and following the examples - of the existing converters. The following are the built-in converters - in libSBML @htmlinclude libsbml-version.html: - @li SBMLFunctionDefinitionConverter - @li SBMLInitialAssignmentConverter - @li SBMLLevelVersionConverter - @li SBMLRuleConverter - @li SBMLStripPackageConverter - @li SBMLUnitsConverter - - Many converters provide the ability to configure their behavior to some - extent. This is realized through the use of @em properties that offer - different @em options. Two related classes implement these features: - ConversionProperties and ConversionOptions. The default property values - for each converter can be interrogated using the method - SBMLConverter.getDefaultProperties() on the converter class. -"; - - -%feature("docstring") SBMLConverter::SBMLConverter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLConverter()</pre> - - Creates a new SBMLConverter object. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLConverter(SBMLConverter c)</pre> - - Copy constructor; creates a copy of an SBMLConverter object. - - @param c the SBMLConverter object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") SBMLConverter::clone " - Creates and returns a deep copy of this SBMLConverter object. - - @return a (deep) copy of this SBMLConverter object. -"; - - -%feature("docstring") SBMLConverter::getDocument " - Returns the SBML document that is the subject of the conversions. - - @return the current SBMLDocument object. -"; - - -%feature("docstring") SBMLConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. The run-time properties of the converter object can - be adjusted by using the method - SBMLConverter.setProperties(). - - @return the default properties for the converter. - - @see setProperties() - @see matchesProperties() -"; - - -%feature("docstring") SBMLConverter::getTargetNamespaces " - Returns the target SBML namespaces of the currently set properties. - - SBML namespaces are used by libSBML to express the Level+Version of - the SBML document (and, possibly, any SBML Level 3 packages in - use). Some converters\' behavior is affected by the SBML namespace - configured in the converter. For example, the actions of - SBMLLevelVersionConverter, the converter for converting SBML documents - from one Level+Version combination to another, are fundamentally - dependent on the SBML namespaces being targeted. - - @return the SBMLNamespaces object that describes the SBML namespaces - in effect. -"; - - -%feature("docstring") SBMLConverter::matchesProperties " - Predicate returning @c True if this converter\'s properties matches a - given set of configuration properties. - - @param props the configuration properties to match. - - @return @c True if this converter\'s properties match, @c False - otherwise. -"; - - -%feature("docstring") SBMLConverter::setDocument " - Sets the current SBML document to the given SBMLDocument object. - - @param doc the document to use for this conversion. - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The set of possible values that may - be returned ultimately depends on the specific subclass of - SBMLConverter being used, but the default method can return the - following values: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") SBMLConverter::setProperties " - Sets the configuration properties to be used by this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method sets - the current properties for this converter. - - @param props the ConversionProperties object defining the properties - to set. - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The set of possible values that may - be returned ultimately depends on the specific subclass of - SBMLConverter being used, but the default method can return the - following values: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see getProperties() - @see matchesProperties() -"; - - -%feature("docstring") SBMLConverter::getProperties " - Returns the current properties in effect for this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the current properties for this converter; in other words, the - settings in effect at this moment. To change the property values, you - can use SBMLConverter.setProperties(). - - @return the currently set configuration properties. - - @see setProperties() - @see matchesProperties() -"; - - -%feature("docstring") SBMLConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and - with the configuration options set by - SBMLConverter.setProperties(). - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The set of possible values that may - be returned depends on the converter subclass; please consult - the documentation for the relevant class to find out what the - possibilities are. -"; - - -%feature("docstring") SBMLConverterRegistry " - @ingroup Core - Registry of all SBML converters. - - @htmlinclude libsbml-facility-only-warning.html - - LibSBML provides facilities for transforming and converting SBML - documents in various ways. These transformations can involve - essentially anything that can be written algorithmically; examples - include converting the units of measurement in a model, or converting - from one Level+Version combination of SBML to another. Converters are - implemented as objects derived from the class SBMLConverter. - - The converter registry, implemented as a singleton object of class - SBMLConverterRegistry, maintains a list of known converters and provides - methods for discovering them. Callers can use the method - SBMLConverterRegistry.getNumConverters() to find out how many - converters are registered, then use - SBMLConverterRegistry.getConverterByIndex() to - iterate over each one; alternatively, callers can use - SBMLConverterRegistry.getConverterFor() - to search for a converter having specific properties. -"; - - -%feature("docstring") SBMLConverterRegistry::getInstance " - Returns the singleton instance for the converter registry. - - Prior to using the registry, callers have to obtain a copy of the - registry. This static method provides the means for doing that. - - @return the singleton for the converter registry. -"; - - -%feature("docstring") SBMLConverterRegistry::addConverter " - Adds the given converter to the registry of SBML converters. - - @param converter the converter to add to the registry. - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") SBMLConverterRegistry::getConverterByIndex " - Returns the converter with the given index number. - - Converters are given arbitrary index numbers by the registry. Callers - can use the method SBMLConverterRegistry.getNumConverters() to find - out how many converters are registered, then use this method to - iterate over the list and obtain each one in turn. - - @param index the zero-based index of the converter to fetch. - - @return the converter with the given index number, or @c None if the - number is less than @c 0 or there is no converter at the given index - position. -"; - - -%feature("docstring") SBMLConverterRegistry::getConverterFor " - Returns the converter that best matches the given configuration - properties. - - Many converters provide the ability to configure their behavior. This - is realized through the use of @em properties that offer different @em - options. The present method allows callers to search for converters - that have specific property values. Callers can do this by creating a - ConversionProperties object, adding the desired option(s) to the - object, then passing the object to this method. - - @param props a ConversionProperties object defining the properties - to match against. - - @return the converter matching the properties, or @c None if no - suitable converter is found. - - @see getConverterByIndex() -"; - - -%feature("docstring") SBMLConverterRegistry::getNumConverters " - Returns the number of converters known by the registry. - - @return the number of registered converters. - - @see getConverterByIndex() -"; - - -%feature("docstring") SBMLConverterRegistry::SBMLConverterRegistry " - @internal - protected constructor, use the getInstance() method to access the registry. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter " - @ingroup Core - SBML converter for replacing function definitions. - - @htmlinclude libsbml-facility-only-warning.html - - This is an SBML converter for manipulating user-defined functions in an - SBML file. When invoked on the current model, it performs the following - operation: - <ol> - <li>Read the list of user-defined functions in the model (i.e., the - list of FunctionDefinition objects); - <li>Look for invocations of the function in mathematical expressions - throughout the model; and - <li>For each invocation found, replaces the invocation with a - in-line copy of the function\'s body, similar to how macro expansions - might be performed in scripting and programming languages. - </ol> - - For example, suppose the model contains a function definition - representing the function <i>f(x, y) = x * y</i>. Further - suppose this functions invoked somewhere else in the model, in - a mathematical formula, as <i>f(s, p)</i>. The outcome of running - SBMLFunctionDefinitionConverter on the model will be to replace - the call to <i>f</i> with the expression <i>s * p</i>. - - @see SBMLInitialAssignmentConverter - @see SBMLLevelVersionConverter - @see SBMLRuleConverter - @see SBMLStripPackageConverter - @see SBMLUnitsConverter -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::SBMLFunctionDefinitionConverter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLFunctionDefinitionConverter()</pre> - - Creates a new SBMLFunctionDefinitionConverter object. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLFunctionDefinitionConverter(SBMLFunctionDefinitionConverter obj)</pre> - - Copy constructor; creates a copy of an SBMLFunctionDefinitionConverter - object. - - @param obj the SBMLFunctionDefinitionConverter object to copy. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::clone " - Creates and returns a deep copy of this SBMLFunctionDefinitionConverter - object. - - @return a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::matchesProperties " - Returns @c True if this converter object\'s properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLFunctionDefinitionConverter object to find out if the object\'s - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() - to search across all registered converters for one matching particular - properties. - - @param props the properties to match. - - @return @c True if this converter\'s properties match, @c False - otherwise. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::convert " - Replaces invocations of each user-defined function with an in-line - copy, similar to macro expansion. - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT @endlink -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - @return the ConversionProperties object describing the default properties - for this converter. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::expandFD_errors " - @internal - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - @return the ConversionProperties object describing the default properties - for this converter. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter " - @ingroup Core - SBML converter for replacing initial assignments. - - @htmlinclude libsbml-facility-only-warning.html - - This is an SBML converter for replacing InitialAssignment objects - (when possible) by setting the initial value attributes on the model - objects being assigned. In other words, for every object that is - the target of an initial assignment in the model, it evaluates the - mathematical expression of the assignment to get a numerical value, - and then sets the corresponding attribute of the object to the - value. The effects for different kinds of SBML components are - as follows: - - <center> - <table border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> - <tr style=\'background: lightgray; font-size: 14px;\'> - <th align=\'left\' width=\'200\'>Component</th> - <th align=\'left\'>Effect</th> - </tr> - <tr> - <td>Compartment</td> - <td>Sets the value of the <code>size</code> attribute.</td> - </tr> - <tr> - <td>Species</td> - <td>Sets the value of either the <code>initialAmount</code> - or the <code>initialConcentration</code> attributes, depending - on the value of the Species object\'s - <code>hasOnlySubstanceUnits</code> attribute.</td> - </tr> - <tr> - <td>Parameter</td> - <td>Sets the value of the <code>value</code> attribute.</td> - </tr> - <tr> - <td>SpeciesReference</td> - <td>Sets the value of the <code>stoichiometry</code> attribute - in the Reaction object where the SpeciesReference object appears.</td> - </tr> - </table> - </center> - - @see SBMLFunctionDefinitionConverter - @see SBMLLevelVersionConverter - @see SBMLRuleConverter - @see SBMLStripPackageConverter - @see SBMLUnitsConverter -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::SBMLInitialAssignmentConverter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLInitialAssignmentConverter(SBMLInitialAssignmentConverter obj)</pre> - - Copy constructor; creates a copy of an SBMLInitialAssignmentConverter - object. - - @param obj the SBMLInitialAssignmentConverter object to copy. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLInitialAssignmentConverter()</pre> - - Creates a new SBMLInitialAssignmentConverter object. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::clone " - Creates and returns a deep copy of this SBMLInitialAssignmentConverter - object. - - @return a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::matchesProperties " - Returns @c True if this converter object\'s properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLInitialAssignmentConverter object to find out if the object\'s - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() - to search across all registered converters for one matching particular - properties. - - @param props the properties to match. - - @return @c True if this converter\'s properties match, @c False - otherwise. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and - with the configuration options set by - SBMLConverter.setProperties(). - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - @return the ConversionProperties object describing the default properties - for this converter. -"; - - -%feature("docstring") SBMLLevelVersionConverter " - @ingroup Core - SBML converter for transforming documents from one Level+Version to another. - - @htmlinclude libsbml-facility-only-warning.html - - This SBML converter takes an SBML document of one SBML Level+Version - combination and attempts to convert it to another Level+Version combination. - The target Level+Version is set using an SBMLNamespace object in the - ConversionProperties object that controls this converter. - - This class is the basis for - SBMLDocument.setLevelAndVersion(). - - @see SBMLFunctionDefinitionConverter - @see SBMLInitialAssignmentConverter - @see SBMLRuleConverter - @see SBMLStripPackageConverter - @see SBMLUnitsConverter -"; - - -%feature("docstring") SBMLLevelVersionConverter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLLevelVersionConverter()</pre> - - Creates a new SBMLLevelVersionConverter object. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLLevelVersionConverter(SBMLLevelVersionConverter obj)</pre> - - Copy constructor; creates a copy of an SBMLLevelVersionConverter - object. - - @param obj the SBMLLevelVersionConverter object to copy. -"; - - -%feature("docstring") clone " - Creates and returns a deep copy of this SBMLLevelVersionConverter - object. - - @return a (deep) copy of this converter. -"; - - -%feature("docstring") matchesProperties " - Returns @c True if this converter object\'s properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLLevelVersionConverter object to find out if the object\'s - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() - to search across all registered converters for one matching particular - properties. - - @param props the properties to match. - - @return @c True if this converter\'s properties match, @c False - otherwise. -"; - - -%feature("docstring") convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and - with the configuration options set by - SBMLConverter.setProperties(). - SBMLConverter.setProperties(). - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - @return the ConversionProperties object describing the default properties - for this converter. -"; - - -%feature("docstring") getTargetLevel " - Returns the target SBML Level for the conversion. - - @return an integer indicating the SBML Level. -"; - - -%feature("docstring") getTargetVersion " - Returns the target SBML Version for the conversion. - - @return an integer indicating the Version within the SBML Level. -"; - - -%feature("docstring") getValidityFlag " - Returns the flag indicating whether the conversion has been set to \'strict\'. - - @return @c True if strict validity has been requested, @c False - otherwise. -"; - - -%feature("docstring") SBMLRuleConverter " - @ingroup Core - SBML converter for reordering rules and assignments in a model. - - @htmlinclude libsbml-facility-only-warning.html - - This converter reorders assignments in a model. Specifically, it sorts - the list of assignment rules (i.e., the AssignmentRule objects contained - in the ListOfAssignmentRules within the Model object) and the initial - assignments (i.e., the InitialAssignment objects contained in the - ListOfInitialAssignments) such that, within each set, assignments that - depend on prior values are placed after the values are set. For - example, if there is an assignment rule stating <i>a = b + 1</i>, and - another rule stating <i>b = 3</i>, the list of rules is sorted and the - rules are arranged so that the rule for <i>b = 3</i> appears @em before - the rule for <i>a = b + 1</i>. Similarly, if dependencies of this - sort exist in the list of initial assignments in the model, the initial - assignments are sorted as well. - - Beginning with SBML Level 2, assignment rules have no ordering - required—the order in which the rules appear in an SBML file has - no significance. Software tools, however, may need to reorder - assignments for purposes of evaluating them. For example, for - simulators that use time integration methods, it would be a good idea to - reorder assignment rules such as the following, - - <i>b = a + 10 seconds</i><br> - <i>a = time</i> - - so that the evaluation of the rules is independent of integrator - step sizes. (This is due to the fact that, in this case, the order in - which the rules are evaluated changes the result.) This converter - can be used to reorder the SBML objects regardless of whether the - input file contained them in the desired order. Here is a code - fragment to illustrate how to do that: - @verbatim - ConversionProperties props; - props.addOption(\'sortRules\', true, \'sort rules\'); - - SBMLConverter converter; - converter.setProperties(&props); - converter.setDocument(&doc); - converter.convert(); - @endverbatim - - @note The two sets of assignments (list of assignment rules on the one - hand, and list of initial assignments on the other hand) are handled @em - independently. In an SBML model, these entities are treated differently - and no amount of sorting can deal with inter-dependencies between - assignments of the two kinds. - - @see SBMLFunctionDefinitionConverter - @see SBMLInitialAssignmentConverter - @see SBMLLevelVersionConverter - @see SBMLStripPackageConverter - @see SBMLUnitsConverter -"; - - -%feature("docstring") SBMLRuleConverter::SBMLRuleConverter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLRuleConverter(SBMLRuleConverter obj)</pre> - - Copy constructor; creates a copy of an SBMLLevelVersionConverter - object. - - @param obj the SBMLLevelVersionConverter object to copy. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLRuleConverter()</pre> - - Creates a new SBMLLevelVersionConverter object. -"; - - -%feature("docstring") SBMLRuleConverter::clone " - Creates and returns a deep copy of this SBMLLevelVersionConverter - object. - - @return a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLRuleConverter::matchesProperties " - Returns @c True if this converter object\'s properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLLevelVersionConverter object to find out if the object\'s - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() - to search across all registered converters for one matching particular - properties. - - @param props the properties to match. - - @return @c True if this converter\'s properties match, @c False - otherwise. -"; - - -%feature("docstring") SBMLRuleConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and - with the configuration options set by - SBMLConverter.setProperties(). - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT @endlink -"; - - -%feature("docstring") SBMLRuleConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - @return the ConversionProperties object describing the default properties - for this converter. -"; - - -%feature("docstring") SBMLStripPackageConverter " - @ingroup Core - SBML converter for removing packages. - - @htmlinclude libsbml-facility-only-warning.html - - This SBML converter takes an SBML document and removes (strips) a package - from it. No conversion is performed; the package constructs are simply - removed from the SBML document. The package to be stripped is determined - by the value of the option \'package\' on the conversion properties. - - @see SBMLFunctionDefinitionConverter - @see SBMLLevelVersionConverter - @see SBMLRuleConverter - @see SBMLLevelVersionConverter - @see SBMLUnitsConverter -"; - - -%feature("docstring") SBMLStripPackageConverter::SBMLStripPackageConverter " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLStripPackageConverter()</pre> - - Creates a new SBMLStripPackageConverter object. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLStripPackageConverter(SBMLStripPackageConverter obj)</pre> - - Copy constructor; creates a copy of an SBMLStripPackageConverter - object. - - @param obj the SBMLStripPackageConverter object to copy. -"; - - -%feature("docstring") SBMLStripPackageConverter::clone " - Creates and returns a deep copy of this SBMLStripPackageConverter - object. - - @return a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLStripPackageConverter::matchesProperties " - Returns @c True if this converter object\'s properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLStripPackageConverter object to find out if the object\'s - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() - to search across all registered converters for one matching particular - properties. - - @param props the properties to match. - - @return @c True if this converter\'s properties match, @c False - otherwise. -"; - - -%feature("docstring") SBMLStripPackageConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and - with the configuration options set by - SBMLConverter.setProperties(). - - @return integer value indicating the success/failure of the operation. - @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SBMLStripPackageConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the @em default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - @return the ConversionProperties object describing the default properties - for this converter. -"; - - -%feature("docstring") SBMLUnitsConverter " - @ingroup Core - SBML converter to convert a model\'s units to SI units. - - @htmlinclude libsbml-facility-only-warning.html - - This SBML converter converts the units in a model to base SI units, - namely metre, kilogram, second, Ampere, Kelvin, mole and candela. - - Unit conversion will only be performed on models that are fully unit - consistent; that is, all objects have associated units, and there are no - literal numbers with no units specified. In the case of an SBML - Level 3 model involving math expressions, this means that the @c - timeUnits attribute on the Model object must be set, and if there are - any reactions in the model, the @c extentUnits attribute on the Model - object must also be set. - - This converter has the additional Boolean property \'removeUnusedUnits\' - that can be used to tell the converter whether to remove any - UnitDefinition objects that are not referred to, after conversion is - complete. You can set this value by adding the property using - @verbatim - prop.addOption(\'removeUnusedUnits\', false); - @endverbatim - The converter\'s default behavior is to remove the unused - UnitDefinition objects in the model. - - @see SBMLFunctionDefinitionConverter - @see SBMLLevelVersionConverter - @see SBMLRuleConverter - @see SBMLStripPackageConverter - @see SBMLUnitsConverter -"; - - -%feature("docstring") SBMLValidator " - @ingroup Core - Base class for SBML validators - - @htmlinclude not-sbml-warning.html - - LibSBML implements facilities for verifying that a given SBML document - is valid according to the SBML specifications; it also exposes the - validation interface so that user programs and SBML Level 3 package - authors may use the facilities to implement new validators. There are - two main interfaces to libSBML\'s validation facilities, based on the - classes Validator and SBMLValidator. - - The Validator class is the basis of the system for validating an SBML - document against the validation rules defined in the SBML - specifications. The scheme used by Validator relies is compact and uses - the @em visitor programming pattern, but it relies on C/C++ features and - is not directly accessible from language bindings. SBMLValidator offers - a framework for straightforward class-based extensibility, so that user - code can subclass SBMLValidator to implement new validation systems, - different validators can be introduced or turned off at run-time, and - interfaces can be provided in the libSBML language bindings. - SBMLValidator can call Validator functionality internally (as is the - case in the current implementation of SBMLInternalValidator) or use - entirely different implementation approaches, as necessary. - - Users of libSBML may already be familiar with the facilities encompassed - by the validation system, in the form of the consistency-checking methods - defined on SBMLDocument. The methods SBMLDocument.setConsistencyChecks(), - SBMLDocument.checkConsistency(), SBMLDocument.checkInternalConsistency() - and other method of that sort are in fact implemented via SBMLValidator, - specifically as methods on the class SBMLInternalValidator. - - Authors may use SBMLValidator as the base class for their own validator - extensions to libSBML. The class SBMLInternalValidator may serve as a - code example for how to implement such things. -"; - - -%feature("docstring") SBMLValidator::SBMLValidator " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLValidator()</pre> - - Creates a new SBMLValidator. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLValidator(const SBMLValidator& orig)</pre> - - Copy constructor; creates a copy of an SBMLValidator object. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") SBMLValidator::clone " - Creates and returns a deep copy of this SBMLValidator. - - @return a (deep) copy of this SBMLValidator. -"; - - -%feature("docstring") SBMLValidator::getDocument " - Returns the current SBML document in use by this validator. - - @return the current SBML document - - @see setDocument() -"; - - -%feature("docstring") SBMLValidator::setDocument " - Sets the current SBML document to the given SBMLDocument object. - - @param doc the document to use for this validation - - @return an integer value indicating the success/failure of the - validation. @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values returned by this - function are - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see getDocument() -"; - - -%feature("docstring") SBMLValidator::validate " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>validate(string filename)</pre> - - Validates the SBML document located at the given @p filename. - - This is a convenience method that saves callers the trouble of - using SBMLReader to read the document first. - - @param filename the path to the file to be read and validated. - - @return the number of validation failures that occurred. The objects - describing the actual failures can be retrieved using getFailures(). - - - <hr> - Method variant with the following signature: - <pre class='signature'>validate()</pre> - - Runs this validator on the current SBML document. - - @return an integer value indicating the success/failure of the - validation. @if clike The value is drawn from the enumeration - #OperationReturnValues_t. @endif@~ The possible values returned by this - function are determined by the specific subclasses of this class. - - - <hr> - Method variant with the following signature: - <pre class='signature'>validate(SBMLDocument d)</pre> - - Validates the given SBMLDocument object. - - This is identical to calling setDocument(@if java SBMLDocument d @endif) - followed by validate(). - - @param d the SBML document to validate - - @return the number of validation failures that occurred. The objects - describing the actual failures can be retrieved using getFailures(). -"; - - -%feature("docstring") SBMLValidator::clearFailures " - Clears this validator\'s list of failures. - - If you are validating multiple SBML documents with the same validator, - call this method after you have processed the list of failures from - the last validation run and before validating the next document. - - @if clike @see getFailures() @endif@~ -"; - - -%feature("docstring") SBMLValidator::getFailures " - Returns a list of SBMLError objects (if any) that were logged by the - last run of this validator. - - @return a list of errors, warnings and other diagnostics logged during - validation. - - @see clearFailures() -"; - - -%feature("docstring") SBMLValidator::logFailure " - Adds the given failure to this list of Validators failures. - - @param err an SBMLError object representing an error or warning - - @if clike @see getFailures() @endif@~ -"; - - -%feature("docstring") SBMLValidator::getErrorLog " - Returns the list of errors or warnings logged during parsing, - consistency checking, or attempted translation of this model. - - Note that this refers to the SBMLDocument object\'s error log (i.e., - the list returned by SBMLDocument.getErrorLog()). @em That list of - errors and warnings is @em separate from the validation failures - tracked by this validator (i.e., the list returned by getFailures()). - - @return the SBMLErrorLog used for the SBMLDocument - - @if clike @see getFailures() @endif@~ -"; - - -%feature("docstring") SBMLValidator::getModel " - Returns the Model object stored in the SBMLDocument. - - It is important to note that this method <em>does not create</em> a - Model instance. The model in the SBMLDocument must have been created - at some prior time, for example using SBMLDocument.createModel() - or SBMLDocument.setModel(). - This method returns @c None if a model does not yet exist. - - @return the Model contained in this validator\'s SBMLDocument object. - - @see SBMLDocument.setModel() - @see SBMLDocument.createModel() -"; - - -%feature("docstring") SBMLValidator::getNumFailures " - Returns the number of failures encountered in the last validation run. - - This method returns the number of failures logged by this validator. - This number only reflects @em this validator\'s actions; the number may - not be the same as the number of errors and warnings logged on the - SBMLDocument object\'s error log (i.e., the object returned by - SBMLDocument.getErrorLog()), because other parts of libSBML may log - errors and warnings beyond those found by this validator. - - @return the number of errors logged by this validator. -"; - - -%feature("docstring") SBMLValidator::getFailure " - Returns the failure object at index n in this validator\'s list of - failures logged during the last run. - - Callers should use getNumFailures() first, to find out the number - of entries in this validator\'s list of failures. - - @param n an integer indicating the index of the object to return from - the failures list; index values start at 0. - - @return the failure at the given index number. - - @see getNumFailures() -"; - - -%feature("docstring") SBMLExternalValidator::SBMLExternalValidator " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLExternalValidator()</pre> - - Constructor. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLExternalValidator(SBMLExternalValidator)</pre> - - Copy constructor. -"; - - -%feature("docstring") SBMLExternalValidator::clone " - Creates and returns a deep copy of this converter. - - @return a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLExternalValidator::validate " - the actual conversion - - @return status code represeting success/failure/conversion impossible -"; - - -%feature("docstring") SBMLExternalValidator::getProgram " - @return the program name of the validator to be run -"; - - -%feature("docstring") SBMLExternalValidator::setProgram " - Sets the name of the program to run - - @param program the program to be started -"; - - -%feature("docstring") SBMLExternalValidator::getOutputFileName " - @return the output file name (this is the file the external program will write) -"; - - -%feature("docstring") SBMLExternalValidator::setOutputFileName " - Sets the output file name - - @param outputFileName the name of the output XML file -"; - - -%feature("docstring") SBMLExternalValidator::getSBMLFileName " - @return the name of the SBML file (the document of this validator will be written to it) -"; - - -%feature("docstring") SBMLExternalValidator::setSBMLFileName " - Sets the filename for the temporary file to be created - - @param sbmlFileName the temporary name -"; - - -%feature("docstring") SBMLExternalValidator::clearArguments " - Clear all additional arguments -"; - - -%feature("docstring") SBMLExternalValidator::addArgument " - Adds the given argument to the list of additional arguments - - @param arg the argument -"; - - -%feature("docstring") SBMLExternalValidator::getNumArguments " - @return the number of arguments. -"; - - -%feature("docstring") SBMLExternalValidator::getArgument " - Returns the argument for the given index. - - @param n the zero based index of the argument. - - @return the argument at the given index. -"; - - -%feature("docstring") SBMLExternalValidator::getArguments " - @return all arguments -"; - - -%feature("docstring") SBMLExternalValidator::setArguments " - Sets the additional arguments - - @param args teh additional arguments -"; - - -%feature("docstring") readMathML " - @internal - Reads the MathML from the given XMLInputStream, constructs a corresponding - abstract syntax tree and returns a pointer to the root of the tree. -"; - - -%feature("docstring") writeMathML " - @internal - Writes the given ASTNode (and its children) to the XMLOutputStream as - MathML. -"; - - -%feature("docstring") readMathMLFromString " - Reads the MathML from the given XML string, constructs a corresponding - abstract syntax tree, and returns a pointer to the root of the tree. - - @param xml a string containing a full MathML expression - - @return the root of an AST corresponding to the given mathematical - expression, otherwise @c None is returned if the given string is @c None - or invalid. -"; - - -%feature("docstring") writeMathMLToString " - Writes the given ASTNode (and its children) to a string as MathML, and - returns the string. - - @param node the root of an AST to write out to the stream. - - @return a string containing the written-out MathML representation - of the given AST. - - @note The string is owned by the caller and should be freed (with - free()) when no longer needed. @c None is returned if the given - argument is @c None. -"; - - -%feature("docstring") ASTNode " - @ingroup Core - Abstract Syntax Tree (AST) representation of a - mathematical expression. - - @htmlinclude not-sbml-warning.html - - Abstract Syntax Trees (ASTs) are a simple kind of data structure used in - libSBML for storing mathematical expressions. The ASTNode is the - cornerstone of libSBML\'s AST representation. An AST \'node\' represents the - most basic, indivisible part of a mathematical formula and come in many - types. For instance, there are node types to represent numbers (with - subtypes to distinguish integer, real, and rational numbers), names - (e.g., constants or variables), simple mathematical operators, logical - or relational operators and functions. LibSBML ASTs provide a canonical, - in-memory representation for all mathematical formulas regardless of - their original format (which might be MathML or might be text strings). - - An AST @em node in libSBML is a recursive structure containing a pointer - to the node\'s value (which might be, for example, a number or a symbol) - and a list of children nodes. Each ASTNode node may have none, one, - two, or more children depending on its type. The following diagram - illustrates an example of how the mathematical expression <code>\'1 + - 2\'</code> is represented as an AST with one @em plus node having two @em - integer children nodes for the numbers <code>1</code> and - <code>2</code>. The figure also shows the corresponding MathML - representation: - - @htmlinclude astnode-illustration.html - - The following are other noteworthy points about the AST representation - in libSBML: - <ul> - <li> A numerical value represented in MathML as a real number with an - exponent is preserved as such in the AST node representation, even if - the number could be stored in a @c double data type. This is done - so that when an SBML model is read in and then written out again, the - amount of change introduced by libSBML to the SBML during the round-trip - activity is minimized. - - <li> Rational numbers are represented in an AST node using separate - numerator and denominator values. These can be retrieved using the - methods ASTNode.getNumerator() and ASTNode.getDenominator(). - - <li> The children of an ASTNode are other ASTNode objects. The list of - children is empty for nodes that are leaf elements, such as numbers. - For nodes that are actually roots of expression subtrees, the list of - children points to the parsed objects that make up the rest of the - expression. - </ul> - - - @if clike <h3><a class=\'anchor\' name=\'ASTNodeType_t\'> - ASTNodeType_t</a></h3> @else <h3><a class=\'anchor\' - name=\'ASTNodeType_t\'>The set of possible %ASTNode types</a></h3> @endif@~ - - Every ASTNode has an associated type code to indicate, - for example, whether it holds a number or stands for an arithmetic - operator. - @if clike The type is recorded as a value drawn from the enumeration - @link ASTNode.h::ASTNodeType_t ASTNodeType_t@endlink.@endif - @if java The type is recorded as a value drawn from a - set of static integer constants defined in the class {@link - libsbmlConstants}. Their names begin with the characters @c AST_.@endif - @if python The type is recorded as a value drawn from a - set of static integer constants defined in the class {@link - libsbml}. Their names begin with the characters @c AST_.@endif - @if csharp The type is recorded as a value drawn from a - set of static integer constants defined in the class {@link - libsbml}. Their names begin with the characters @c AST_.@endif - The list of possible types is quite long, because it covers all the - mathematical functions that are permitted in SBML. The values are shown - in the following table: - - @htmlinclude astnode-types.html - - The types have the following meanings: - <ul> - <li> If the node is basic mathematical operator (e.g., @c \'+\'), then the - node\'s type will be @c AST_PLUS, @c AST_MINUS, @c AST_TIMES, @c AST_DIVIDE, - or @c AST_POWER, as appropriate. - - <li> If the node is a predefined function or operator from %SBML Level 1 - (in the string-based formula syntax used in Level 1) or %SBML Levels 2 and 3 - (in the subset of MathML used in SBML Levels 2 and 3), then the node\'s type - will be either <code>AST_FUNCTION_</code><em><span - class=\'placeholder\'>X</span></em>, <code>AST_LOGICAL_</code><em><span - class=\'placeholder\'>X</span></em>, or - <code>AST_RELATIONAL_</code><em><span class=\'placeholder\'>X</span></em>, - as appropriate. (Examples: @c AST_FUNCTION_LOG, @c AST_RELATIONAL_LEQ.) - - <li> If the node refers to a user-defined function, the node\'s type will - be @c AST_FUNCTION (because it holds the name of the function). - - <li> If the node is a lambda expression, its type will be @c AST_LAMBDA. - - <li> If the node is a predefined constant (@c \'ExponentialE\', @c \'Pi\', - @c \'True\' or @c \'False\'), then the node\'s type will be @c AST_CONSTANT_E, - @c AST_CONSTANT_PI, @c AST_CONSTANT_TRUE, or @c AST_CONSTANT_FALSE. - - <li> (Levels 2 and 3 only) If the node is the special MathML csymbol @c time, - the value of the node will be @c AST_NAME_TIME. (Note, however, that the - MathML csymbol @c delay is translated into a node of type - @c AST_FUNCTION_DELAY. The difference is due to the fact that @c time is a - single variable, whereas @c delay is actually a function taking - arguments.) - - <li> (Level 3 only) If the node is the special MathML csymbol @c avogadro, - the value of the node will be @c AST_NAME_AVOGADRO. - - <li> If the node contains a numerical value, its type will be - @c AST_INTEGER, @c AST_REAL, @c AST_REAL_E, or @c AST_RATIONAL, - as appropriate. - </ul> - - - <h3><a class=\'anchor\' name=\'math-convert\'>Converting between ASTs and text strings</a></h3> - - The text-string form of mathematical formulas produced by @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString()</a></code>@endif@~ and - read by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - and - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ - are in a simple C-inspired infix notation. A - formula in this text-string form can be handed to a program that - understands SBML mathematical expressions, or used as part - of a translation system. The libSBML distribution comes with an example - program in the @c \'examples\' subdirectory called @c translateMath that - implements an interactive command-line demonstration of translating - infix formulas into MathML and vice-versa. - - The formula strings may contain operators, function calls, symbols, and - white space characters. The allowable white space characters are tab - and space. The following are illustrative examples of formulas - expressed in the syntax: - - @verbatim - 0.10 * k4^2 - @endverbatim - @verbatim - (vm * s1)/(km + s1) - @endverbatim - - The following table shows the precedence rules in this syntax. In the - Class column, @em operand implies the construct is an operand, @em - prefix implies the operation is applied to the following arguments, @em - unary implies there is one argument, and @em binary implies there are - two arguments. The values in the Precedence column show how the order - of different types of operation are determined. For example, the - expression <em>a * b + c</em> is evaluated as <em>(a * b) + c</em> - because the <code>*</code> operator has higher precedence. The - Associates column shows how the order of similar precedence operations - is determined; for example, <em>a - b + c</em> is evaluated as <em>(a - - b) + c</em> because the <code>+</code> and <code>-</code> operators are - left-associative. The precedence and associativity rules are taken from - the C programming language, except for the symbol <code>^</code>, which - is used in C for a different purpose. (Exponentiation can be invoked - using either <code>^</code> or the function @c power.) - - @htmlinclude math-precedence-table.html - - A program parsing a formula in an SBML model should assume that names - appearing in the formula are the identifiers of Species, Parameter, - Compartment, FunctionDefinition, Reaction (in SBML Levels 2 - and 3), or SpeciesReference (in SBML Level 3 only) objects - defined in a model. When a function call is involved, the syntax - consists of a function identifier, followed by optional white space, - followed by an opening parenthesis, followed by a sequence of zero or - more arguments separated by commas (with each comma optionally preceded - and/or followed by zero or more white space characters), followed by a - closing parenthesis. There is an almost one-to-one mapping between the - list of predefined functions available, and those defined in MathML. - All of the MathML functions are recognized; this set is larger than the - functions defined in SBML Level 1. In the subset of functions that - overlap between MathML and SBML Level 1, there exist a few - differences. The following table summarizes the differences between the - predefined functions in SBML Level 1 and the MathML equivalents in - SBML Levels 2 and  3: - - @htmlinclude math-functions.html - - @warning @htmlinclude L1-math-syntax-warning.html - - @if clike @see SBML_parseL3Formula()@endif@~ - @if csharp @see SBML_parseL3Formula()@endif@~ - @if python @see libsbml.parseL3Formula()@endif@~ - @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ - @if clike @see SBML_parseFormula()@endif@~ - @if csharp @see SBML_parseFormula()@endif@~ - @if python @see libsbml.parseFormula()@endif@~ - @if java @see <code><a href=\'libsbml.html#parseFormula(String formula)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ -"; - - -%feature("docstring") ASTNode::ASTNode " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>ASTNode(ASTNode orig)</pre> - - Copy constructor; creates a deep copy of the given ASTNode. - - @param orig the ASTNode to be copied. - - - <hr> - Method variant with the following signature: - <pre class='signature'>ASTNode(Token_t *token)</pre> - - Creates a new ASTNode from the given Token. The resulting ASTNode - will contain the same data as the Token. - - @param token the Token to add. - - - <hr> - Method variant with the following signature: - <pre class='signature'>ASTNode(ASTNodeType_t type = AST_UNKNOWN)</pre> - - Creates and returns a new ASTNode. - - Unless the argument @p type is given, the returned node will by - default have a type of @link libsbml.AST_UNKNOWN - AST_UNKNOWN@endlink. If the type isn\'t supplied when caling this - constructor, the caller should set the node type to something else as - soon as possible using - @if clike setType()@else ASTNode.setType()@endif. - - @param type an optional - @if clike @link #ASTNodeType_t ASTNodeType_t@endlink@else type@endif@~ - code indicating the type of node to create. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") ASTNode::freeName " - Frees the name of this ASTNode and sets it to @c None. - - This operation is only applicable to ASTNode objects corresponding to - operators, numbers, or @link libsbml.AST_UNKNOWN - AST_UNKNOWN@endlink. This method has no effect on other types of - nodes. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") ASTNode::canonicalize " - Converts this ASTNode to a canonical form and returns @c True if - successful, @c False otherwise. - - The rules determining the canonical form conversion are as follows: - <ul> - - <li> If the node type is @link libsbml.AST_NAME AST_NAME@endlink - and the node name matches @c \'ExponentialE\', @c \'Pi\', @c \'True\' or @c - \'False\' the node type is converted to the corresponding - <code>AST_CONSTANT_</code><em><span class=\'placeholder\'>X</span></em> type. - - <li> If the node type is an @link libsbml.AST_FUNCTION - AST_FUNCTION@endlink and the node name matches an SBML (MathML) function name, logical operator name, or - relational operator name, the node is converted to the corresponding - <code>AST_FUNCTION_</code><em><span class=\'placeholder\'>X</span></em> or - <code>AST_LOGICAL_</code><em><span class=\'placeholder\'>X</span></em> type. - - </ul> - - SBML Level 1 function names are searched first; thus, for - example, canonicalizing @c log will result in a node type of @link - libsbml.AST_FUNCTION_LN AST_FUNCTION_LN@endlink. (See the SBML - Level 1 Version 2 Specification, Appendix C.) - - Sometimes, canonicalization of a node results in a structural - conversion of the node as a result of adding a child. For example, a - node with the SBML Level 1 function name @c sqr and a single - child node (the argument) will be transformed to a node of type - @link libsbml.AST_FUNCTION_POWER AST_FUNCTION_POWER@endlink with - two children. The first child will remain unchanged, but the second - child will be an ASTNode of type @link libsbml.AST_INTEGER - AST_INTEGER@endlink and a value of 2. The function names that result - in structural changes are: @c log10, @c sqr, and @c sqrt. -"; - - -%feature("docstring") ASTNode::addChild " - Adds the given node as a child of this ASTNode. Child nodes are added - in-order, from left to right. - - @param child the ASTNode instance to add - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note Adding a child to an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. Callers need to be careful to use - this method in the context of other operations to create complete and - correct formulas. The method - @if clike isWellFormedASTNode()@else ASTNode.isWellFormedASTNode()@endif@~ - may also be useful for checking the results of node modifications. - - @see prependChild() - @see replaceChild() - @see insertChild() - @see removeChild() - @see isWellFormedASTNode() -"; - - -%feature("docstring") ASTNode::prependChild " - Adds the given node as a child of this ASTNode. This method adds - child nodes from right to left. - - @param child the ASTNode instance to add - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note Prepending a child to an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - @see addChild() - @see replaceChild() - @see insertChild() - @see removeChild() -"; - - -%feature("docstring") ASTNode::removeChild " - Removes the nth child of this ASTNode object. - - @param n long the index of the child to remove - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - @note Removing a child from an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - @see addChild() - @see prependChild() - @see replaceChild() - @see insertChild() -"; - - -%feature("docstring") ASTNode::replaceChild " - Replaces the nth child of this ASTNode with the given ASTNode. - - @param n long the index of the child to replace - @param newChild ASTNode to replace the nth child - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note Replacing a child from an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - @see addChild() - @see prependChild() - @see insertChild() - @see removeChild() -"; - - -%feature("docstring") ASTNode::insertChild " - Insert the given ASTNode at point n in the list of children - of this ASTNode. - - @param n long the index of the ASTNode being added - @param newChild ASTNode to insert as the nth child - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note Inserting a child into an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - @see addChild() - @see prependChild() - @see replaceChild() - @see removeChild() -"; - - -%feature("docstring") ASTNode::deepCopy " - Creates a recursive copy of this node and all its children. - - @return a copy of this ASTNode and all its children. The caller owns - the returned ASTNode and is reponsible for deleting it. -"; - - -%feature("docstring") ASTNode::getChild " - Get a child of this node according to its index number. - - @param n the index of the child to get - - @return the nth child of this ASTNode or @c None if this node has no nth - child (<code>n > </code> - @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~ - <code>- 1</code>). -"; - - -%feature("docstring") ASTNode::getLeftChild " - Get the left child of this node. - - @return the left child of this ASTNode. This is equivalent to calling - @if clike getChild()@else ASTNode.getChild()@endif@~ - with an argument of @c 0. -"; - - -%feature("docstring") ASTNode::getRightChild " - Get the right child of this node. - - @return the right child of this ASTNode, or @c None if this node has no - right child. If - @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~ - <code>> 1</code>, then this is equivalent to: - @code - getChild( getNumChildren() - 1 ); - @endcode -"; - - -%feature("docstring") ASTNode::getNumChildren " - Get the number of children that this node has. - - @return the number of children of this ASTNode, or 0 is this node has - no children. -"; - - -%feature("docstring") ASTNode::addSemanticsAnnotation " - Adds the given XMLNode as a <em>semantic annotation</em> of this ASTNode. - - @htmlinclude about-semantic-annotations.html - - @param sAnnotation the annotation to add. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @note Although SBML permits the semantic annotation construct in - MathML expressions, the truth is that this construct has so far (at - this time of this writing, which is early 2011) seen very little use - in SBML software. The full implications of using semantic annotations - are still poorly understood. If you wish to use this construct, we - urge you to discuss possible uses and applications on the SBML - discussion lists, particularly <a target=\'_blank\' - href=\'http://sbml.org/Forums\'>sbml-discuss@caltech.edu</a> and/or <a - target=\'_blank\' - href=\'http://sbml.org/Forums\'>sbml-interoperability@caltech.edu</a>. -"; - - -%feature("docstring") ASTNode::getNumSemanticsAnnotations " - Get the number of <em>semantic annotation</em> elements inside this node. - - @htmlinclude about-semantic-annotations.html - - @return the number of annotations of this ASTNode. - - @see ASTNode.addSemanticsAnnotation() -"; - - -%feature("docstring") ASTNode::getSemanticsAnnotation " - Get the nth semantic annotation of this node. - - @htmlinclude about-semantic-annotations.html - - @return the nth annotation of this ASTNode, or @c None if this node has - no nth annotation (<code>n ></code> - @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~ - <code>- 1</code>). - - @see ASTNode.addSemanticsAnnotation() -"; - - -%feature("docstring") ASTNode::getListOfNodes " - Performs a depth-first search of the tree rooted at this ASTNode - object, and returns a List of nodes where the given function - <code>predicate(node)</code> returns @c True (non-zero). - - For portability between different programming languages, the predicate - is passed in as a pointer to a function. @if clike The function - definition must have the type @link ASTNode::ASTNodePredicate - ASTNodePredicate @endlink, which is defined as - @code - int (*ASTNodePredicate) (const ASTNode_t *node); - @endcode - where a return value of non-zero represents @c True and zero - represents @c False. @endif - - @param predicate the predicate to use - - @return the list of nodes for which the predicate returned @c True - (non-zero). The List returned is owned by the caller and should be - deleted after the caller is done using it. The ASTNode objects in the - list; however, are not owned by the caller (as they still belong to - the tree itself), and therefore should not be deleted. -"; - - -%feature("docstring") ASTNode::fillListOfNodes " - Performs a depth-first search of the tree rooted at this ASTNode - object, and adds to the list @p lst the nodes where the given function - <code>predicate(node)</code> returns @c True (non-zero). - - This method is identical to getListOfNodes(ASTNodePredicate predicate) const, - except that instead of creating a new List object, it uses the one passed - in as argument @p lst. - - For portability between different programming languages, the predicate - is passed in as a pointer to a function. The function definition must - have the type @link ASTNode.h::ASTNodePredicate ASTNodePredicate - @endlink, which is defined as - @code - int (*ASTNodePredicate) (const ASTNode_t *node); - @endcode - where a return value of non-zero represents @c True and zero - represents @c False. - - @param predicate the predicate to use. - - @param lst the List to which ASTNode objects should be added. - - @see getListOfNodes() const -"; - - -%feature("docstring") ASTNode::getCharacter " - Get the value of this node as a single character. This function - should be called only when - @if clike getType()@else ASTNode.getType()@endif@~ returns - @link libsbml.AST_PLUS AST_PLUS@endlink, - @link libsbml.AST_MINUS AST_MINUS@endlink, - @link libsbml.AST_TIMES AST_TIMES@endlink, - @link libsbml.AST_DIVIDE AST_DIVIDE@endlink or - @link libsbml.AST_POWER AST_POWER@endlink. - - @return the value of this ASTNode as a single character -"; - - -%feature("docstring") ASTNode::getId " - Get the id of this ASTNode. - - @return the mathml id of this ASTNode. -"; - - -%feature("docstring") ASTNode::getClass " - Get the class of this ASTNode. - - @return the mathml class of this ASTNode. -"; - - -%feature("docstring") ASTNode::getStyle " - Get the style of this ASTNode. - - @return the mathml style of this ASTNode. -"; - - -%feature("docstring") ASTNode::getInteger " - Get the value of this node as an integer. This function should be - called only when - @if clike getType()@else ASTNode.getType()@endif@~ - <code>== @link libsbml.AST_INTEGER AST_INTEGER@endlink</code>. - - @return the value of this ASTNode as a (<code>long</code>) integer. -"; - - -%feature("docstring") ASTNode::getName " - Get the value of this node as a string. This function may be called - on nodes that (1) are not operators, i.e., nodes for which - @if clike isOperator()@else ASTNode.isOperator()@endif@~ - returns @c False, and (2) are not numbers, i.e., - @if clike isNumber()@else ASTNode.isNumber()@endif@~ returns @c False. - - @return the value of this ASTNode as a string. -"; - - -%feature("docstring") ASTNode::getOperatorName " - Get the value of this operator node as a string. This function may be called - on nodes that are operators, i.e., nodes for which - @if clike isOperator()@else ASTNode.isOperator()@endif@~ - returns @c True. - - @return the name of this operator ASTNode as a string (or None if not an operator). -"; - - -%feature("docstring") ASTNode::getNumerator " - Get the value of the numerator of this node. This function should be - called only when - @if clike getType()@else ASTNode.getType()@endif@~ - <code>== @link libsbml.AST_RATIONAL AST_RATIONAL@endlink</code>. - - @return the value of the numerator of this ASTNode. -"; - - -%feature("docstring") ASTNode::getDenominator " - Get the value of the denominator of this node. This function should - be called only when - @if clike getType()@else ASTNode.getType()@endif@~ - <code>== @link libsbml.AST_RATIONAL AST_RATIONAL@endlink</code>. - - @return the value of the denominator of this ASTNode. -"; - - -%feature("docstring") ASTNode::getReal " - Get the real-numbered value of this node. This function - should be called only when - @if clike isReal()@else ASTNode.isReal()@endif@~ - <code>== true</code>. - - This function performs the necessary arithmetic if the node type is - @link libsbml.AST_REAL_E AST_REAL_E@endlink (<em>mantissa * - 10<sup> exponent</sup></em>) or @link libsbml.AST_RATIONAL - AST_RATIONAL@endlink (<em>numerator / denominator</em>). - - @return the value of this ASTNode as a real (double). -"; - - -%feature("docstring") ASTNode::getMantissa " - Get the mantissa value of this node. This function should be called - only when @if clike getType()@else ASTNode.getType()@endif@~ - returns @link libsbml.AST_REAL_E AST_REAL_E@endlink - or @link libsbml.AST_REAL AST_REAL@endlink. - If @if clike getType()@else ASTNode.getType()@endif@~ - returns @link libsbml.AST_REAL AST_REAL@endlink, - this method is identical to - @if clike getReal()@else ASTNode.getReal()@endif. - - @return the value of the mantissa of this ASTNode. -"; - - -%feature("docstring") ASTNode::getExponent " - Get the exponent value of this ASTNode. This function should be - called only when - @if clike getType()@else ASTNode.getType()@endif@~ - returns @link libsbml.AST_REAL_E AST_REAL_E@endlink - or @link libsbml.AST_REAL AST_REAL@endlink. - - @return the value of the exponent of this ASTNode. -"; - - -%feature("docstring") ASTNode::getPrecedence " - Get the precedence of this node in the infix math syntax of SBML - Level 1. For more information about the infix syntax, see the - discussion about <a href=\'#math-convert\'>text string formulas</a> at - the top of the documentation for ASTNode. - - @return an integer indicating the precedence of this ASTNode -"; - - -%feature("docstring") ASTNode::getType " - Get the type of this ASTNode. The value returned is one of the - enumeration values such as @link libsbml.AST_LAMBDA - AST_LAMBDA@endlink, @link libsbml.AST_PLUS AST_PLUS@endlink, - etc. - - @return the type of this ASTNode. -"; - - -%feature("docstring") ASTNode::getUnits " - Get the units of this ASTNode. - - @htmlinclude about-sbml-units-attrib.html - - @return the units of this ASTNode. - - @note The <code>sbml:units</code> attribute is only available in SBML - Level 3. It may not be used in Levels 1–2 of SBML. - - @if clike @see SBML_parseL3Formula()@endif@~ - @if csharp @see SBML_parseL3Formula()@endif@~ - @if python @see libsbml.parseL3Formula()@endif@~ - @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ -"; - - -%feature("docstring") ASTNode::isAvogadro " - Predicate returning @c True (non-zero) if this node is the special - symbol @c avogadro. The predicate returns @c False (zero) otherwise. - - @return @c True if this ASTNode is the special symbol avogadro. - - @if clike @see SBML_parseL3Formula()@endif@~ - @if csharp @see SBML_parseL3Formula()@endif@~ - @if python @see libsbml.parseL3Formula()@endif@~ - @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ -"; - - -%feature("docstring") ASTNode::isBoolean " - Predicate returning @c True (non-zero) if this node has a boolean type - (a logical operator, a relational operator, or the constants @c True - or @c False). - - @return true if this ASTNode is a boolean, false otherwise. -"; - - -%feature("docstring") ASTNode::returnsBoolean " - Predicate returning @c True (non-zero) if this node returns a boolean type - or @c False (zero) otherwise. - - This function looks at the whole ASTNode rather than just the top - level of the ASTNode. Thus it will consider return values from - piecewise statements. In addition, if this ASTNode uses a function - call, the return value of the functionDefinition will be determined. - Note that this is only possible where the ASTNode can trace its parent - Model, that is, the ASTNode must represent the math element of some - SBML object that has already been added to an instance of an SBMLDocument. - - @see isBoolean() - - @return true if this ASTNode returns a boolean, false otherwise. -"; - - -%feature("docstring") ASTNode::isConstant " - Predicate returning @c True (non-zero) if this node represents a MathML - constant (e.g., @c True, @c Pi). - - @return @c True if this ASTNode is a MathML constant, @c False otherwise. - - @note this function will also return @c True for @link - libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink in SBML Level 3. -"; - - -%feature("docstring") ASTNode::isFunction " - Predicate returning @c True (non-zero) if this node represents a - MathML function (e.g., <code>abs()</code>), or an SBML Level 1 - function, or a user-defined function. - - @return @c True if this ASTNode is a function, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isInfinity " - Predicate returning @c True (non-zero) if this node represents - the special IEEE 754 value infinity, @c False (zero) otherwise. - - @return @c True if this ASTNode is the special IEEE 754 value infinity, - @c False otherwise. -"; - - -%feature("docstring") ASTNode::isInteger " - Predicate returning @c True (non-zero) if this node contains an - integer value, @c False (zero) otherwise. - - @return @c True if this ASTNode is of type @link - libsbml.AST_INTEGER AST_INTEGER@endlink, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isLambda " - Predicate returning @c True (non-zero) if this node is a MathML - <code><lambda></code>, @c False (zero) otherwise. - - @return @c True if this ASTNode is of type @link libsbml.AST_LAMBDA - AST_LAMBDA@endlink, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isLog10 " - Predicate returning @c True (non-zero) if this node represents a - @c log10 function, @c False (zero) otherwise. More precisely, this - predicate returns @c True if the node type is @link - libsbml.AST_FUNCTION_LOG AST_FUNCTION_LOG@endlink with two - children, the first of which is an @link libsbml.AST_INTEGER - AST_INTEGER@endlink equal to 10. - - @return @c True if the given ASTNode represents a log10() function, @c - false otherwise. - - @if clike @see SBML_parseL3Formula()@endif@~ - @if csharp @see SBML_parseL3Formula()@endif@~ - @if python @see libsbml.parseL3Formula()@endif@~ - @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ -"; - - -%feature("docstring") ASTNode::isLogical " - Predicate returning @c True (non-zero) if this node is a MathML - logical operator (i.e., @c and, @c or, @c not, @c xor). - - @return @c True if this ASTNode is a MathML logical operator -"; - - -%feature("docstring") ASTNode::isName " - Predicate returning @c True (non-zero) if this node is a user-defined - variable name in SBML L1, L2 (MathML), or the special symbols @c delay - or @c time. The predicate returns @c False (zero) otherwise. - - @return @c True if this ASTNode is a user-defined variable name in SBML - L1, L2 (MathML) or the special symbols delay or time. -"; - - -%feature("docstring") ASTNode::isNaN " - Predicate returning @c True (non-zero) if this node represents the - special IEEE 754 value \'not a number\' (NaN), @c False (zero) - otherwise. - - @return @c True if this ASTNode is the special IEEE 754 NaN. -"; - - -%feature("docstring") ASTNode::isNegInfinity " - Predicate returning @c True (non-zero) if this node represents the - special IEEE 754 value \'negative infinity\', @c False (zero) otherwise. - - @return @c True if this ASTNode is the special IEEE 754 value negative - infinity, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isNumber " - Predicate returning @c True (non-zero) if this node contains a number, - @c False (zero) otherwise. This is functionally equivalent to the - following code: - @code - isInteger() || isReal() - @endcode - - @return @c True if this ASTNode is a number, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isOperator " - Predicate returning @c True (non-zero) if this node is a mathematical - operator, meaning, <code>+</code>, <code>-</code>, <code>*</code>, - <code>/</code> or <code>^</code> (power). - - @return @c True if this ASTNode is an operator. -"; - - -%feature("docstring") ASTNode::isPiecewise " - Predicate returning @c True (non-zero) if this node is the MathML - <code><piecewise></code> construct, @c False (zero) otherwise. - - @return @c True if this ASTNode is a MathML @c piecewise function -"; - - -%feature("docstring") ASTNode::isRational " - Predicate returning @c True (non-zero) if this node represents a rational - number, @c False (zero) otherwise. - - @return @c True if this ASTNode is of type @link - libsbml.AST_RATIONAL AST_RATIONAL@endlink. -"; - - -%feature("docstring") ASTNode::isReal " - Predicate returning @c True (non-zero) if this node can represent a - real number, @c False (zero) otherwise. More precisely, this node - must be of one of the following types: @link libsbml.AST_REAL - AST_REAL@endlink, @link libsbml.AST_REAL_E AST_REAL_E@endlink or - @link libsbml.AST_RATIONAL AST_RATIONAL@endlink. - - @return @c True if the value of this ASTNode can represented as a real - number, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isRelational " - Predicate returning @c True (non-zero) if this node is a MathML - relational operator, meaning <code>==</code>, <code>>=</code>, - <code>></code>, <code><</code>, and <code>!=</code>. - - @return @c True if this ASTNode is a MathML relational operator, @c - false otherwise -"; - - -%feature("docstring") ASTNode::isSqrt " - Predicate returning @c True (non-zero) if this node represents a - square root function, @c False (zero) otherwise. More precisely, the - node type must be @link libsbml.AST_FUNCTION_ROOT - AST_FUNCTION_ROOT@endlink with two children, the first of which is an - @link libsbml.AST_INTEGER AST_INTEGER@endlink node having value - equal to 2. - - @return @c True if the given ASTNode represents a sqrt() function, - @c False otherwise. -"; - - -%feature("docstring") ASTNode::isUMinus " - Predicate returning @c True (non-zero) if this node is a unary minus - operator, @c False (zero) otherwise. A node is defined as a unary - minus node if it is of type @link libsbml.AST_MINUS - AST_MINUS@endlink and has exactly one child. - - For numbers, unary minus nodes can be \'collapsed\' by negating the - number. In fact, - @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - does this during its parsing process, and - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ - has a configuration option that allows this behavior to be turned - on or off. However, unary minus nodes for symbols - (@link libsbml.AST_NAME AST_NAME@endlink) cannot - be \'collapsed\', so this predicate function is necessary. - - @return @c True if this ASTNode is a unary minus, @c False otherwise. - - @if clike @see SBML_parseL3Formula()@endif@~ - @if csharp @see SBML_parseL3Formula()@endif@~ - @if python @see libsbml.parseL3Formula()@endif@~ - @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ -"; - - -%feature("docstring") ASTNode::isUPlus " - Predicate returning @c True (non-zero) if this node is a unary plus - operator, @c False (zero) otherwise. A node is defined as a unary - minus node if it is of type @link libsbml.AST_MINUS - AST_MINUS@endlink and has exactly one child. - - @return @c True if this ASTNode is a unary plus, @c False otherwise. -"; - - -%feature("docstring") ASTNode::hasTypeAndNumChildren " - Predicate returning @c True if this node is of type @param type - and has @param numchildren number of children. Designed - for use in cases where it is useful to discover if the node is - a unary not or unary minus, or a times node with no children, etc. - - @return @c True if this ASTNode is has the specified type and number - of children, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isUnknown " - Predicate returning @c True (non-zero) if this node has an unknown type. - - \'Unknown\' nodes have the type @link libsbml.AST_UNKNOWN - AST_UNKNOWN@endlink. Nodes with unknown types will not appear in an - ASTNode tree returned by libSBML based upon valid SBML input; the only - situation in which a node with type @link libsbml.AST_UNKNOWN - AST_UNKNOWN@endlink may appear is immediately after having create a - new, untyped node using the ASTNode constructor. Callers creating - nodes should endeavor to set the type to a valid node type as soon as - possible after creating new nodes. - - @return @c True if this ASTNode is of type @link - libsbml.AST_UNKNOWN AST_UNKNOWN@endlink, @c False otherwise. -"; - - -%feature("docstring") ASTNode::isSetId " - Predicate returning @c True (non-zero) if this node has the mathml attribute - <code>id</code>. - - @return true if this ASTNode has an attribute id, false otherwise. -"; - - -%feature("docstring") ASTNode::isSetClass " - Predicate returning @c True (non-zero) if this node has the mathml attribute - <code>class</code>. - - @return true if this ASTNode has an attribute class, false otherwise. -"; - - -%feature("docstring") ASTNode::isSetStyle " - Predicate returning @c True (non-zero) if this node has the mathml attribute - <code>style</code>. - - @return true if this ASTNode has an attribute style, false otherwise. -"; - - -%feature("docstring") ASTNode::isSetUnits " - Predicate returning @c True (non-zero) if this node has the attribute - <code>sbml:units</code>. - - @htmlinclude about-sbml-units-attrib.html - - @return @c True if this ASTNode has units associated with it, @c False otherwise. - - @note The <code>sbml:units</code> attribute is only available in SBML - Level 3. It may not be used in Levels 1–2 of SBML. -"; - - -%feature("docstring") ASTNode::hasUnits " - Predicate returning @c True (non-zero) if this node or any of its - children nodes have the attribute <code>sbml:units</code>. - - @htmlinclude about-sbml-units-attrib.html - - @return @c True if this ASTNode or its children has units associated - with it, @c False otherwise. - - @note The <code>sbml:units</code> attribute is only available in SBML - Level 3. It may not be used in Levels 1–2 of SBML. -"; - - -%feature("docstring") ASTNode::setCharacter " - Sets the value of this ASTNode to the given character. If character - is one of @c +, @c -, <code>*</code>, <code>/</code> or @c ^, the node - type will be set accordingly. For all other characters, the node type - will be set to @link libsbml.AST_UNKNOWN AST_UNKNOWN@endlink. - - @param value the character value to which the node\'s value should be - set. - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::setId " - Sets the mathml id of this ASTNode to id. - - @param id @c string representing the identifier. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::setClass " - Sets the mathml class of this ASTNode to className. - - @param className @c string representing the mathml class for this node. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::setStyle " - Sets the mathml style of this ASTNode to style. - - @param style @c string representing the identifier. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::setName " - Sets the value of this ASTNode to the given name. - - As a side-effect, this ASTNode object\'s type will be reset to - @link libsbml.AST_NAME AST_NAME@endlink if (and <em>only - if</em>) the ASTNode was previously an operator ( - @if clike isOperator()@else ASTNode.isOperator()@endif@~ - <code>== true</code>), number ( - @if clike isNumber()@else ASTNode.isNumber()@endif@~ - <code>== true</code>), or unknown. - This allows names to be set for @link libsbml.AST_FUNCTION - AST_FUNCTION@endlink nodes and the like. - - @param name the string containing the name to which this node\'s value - should be set - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::setValue " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>setValue(long numerator, long denominator)</pre> - - Sets the value of this ASTNode to the given rational in two parts: the - numerator and denominator. The node type is set to @link - libsbml.AST_RATIONAL AST_RATIONAL@endlink. - - @param numerator the numerator value of the rational - @param denominator the denominator value of the rational - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>setValue(double mantissa, long exponent)</pre> - - Sets the value of this ASTNode to the given real (@c double) in two - parts: the mantissa and the exponent. The node type is set to - @link libsbml.AST_REAL_E AST_REAL_E@endlink. - - @param mantissa the mantissa of this node\'s real-numbered value - @param exponent the exponent of this node\'s real-numbered value - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>setValue(int value)</pre> - - Sets the value of this ASTNode to the given integer and sets the node - type to @link libsbml.AST_INTEGER AST_INTEGER@endlink. - - @param value the integer to which this node\'s value should be set - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>setValue(double value)</pre> - - Sets the value of this ASTNode to the given real (@c double) and sets - the node type to @link libsbml.AST_REAL AST_REAL@endlink. - - This is functionally equivalent to: - @code - setValue(value, 0); - @endcode - - @param value the @c double format number to which this node\'s value - should be set - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: @li @link - libsbml.LIBSBML_OPERATION_SUCCESS - LIBSBML_OPERATION_SUCCESS @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>setValue(long value)</pre> - - Sets the value of this ASTNode to the given (@c long) integer and sets - the node type to @link libsbml.AST_INTEGER AST_INTEGER@endlink. - - @param value the integer to which this node\'s value should be set - - @return integer value indicating success/failure of the function. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::setType " - Sets the type of this ASTNode to the given type code. A side-effect - of doing this is that any numerical values previously stored in this - node are reset to zero. - - @param type the type to which this node should be set - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") ASTNode::setUnits " - Sets the units of this ASTNode to units. - - The units will be set @em only if this ASTNode object represents a - MathML <code><cn></code> element, i.e., represents a number. - Callers may use - @if clike isNumber()@else ASTNode.isNumber()@endif@~ - to inquire whether the node is of that type. - - @htmlinclude about-sbml-units-attrib.html - - @param units @c string representing the unit identifier. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink - - @note The <code>sbml:units</code> attribute is only available in SBML - Level 3. It may not be used in Levels 1–2 of SBML. -"; - - -%feature("docstring") ASTNode::swapChildren " - Swap the children of this ASTNode object with the children of the - given ASTNode object. - - @param that the other node whose children should be used to replace - <em>this</em> node\'s children - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ASTNode::renameSIdRefs " - Renames all the SIdRef attributes on this node and any child node -"; - - -%feature("docstring") ASTNode::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this node and any child node. - (The only place UnitSIDRefs appear in MathML <code><cn></code> elements.) -"; - - -%feature("docstring") ASTNode::replaceIDWithFunction " - @internal - Replace any nodes of type AST_NAME with the name \'id\' from the child \'math\' object with the provided ASTNode. -"; - - -%feature("docstring") ASTNode::multiplyTimeBy " - @internal - Replaces any \'AST_NAME_TIME\' nodes with a node that multiplies time by the given function. -"; - - -%feature("docstring") ASTNode::unsetUnits " - Unsets the units of this ASTNode. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ASTNode::unsetId " - Unsets the mathml id of this ASTNode. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ASTNode::unsetClass " - Unsets the mathml class of this ASTNode. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ASTNode::unsetStyle " - Unsets the mathml style of this ASTNode. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ASTNode::setSemanticsFlag " - @internal - Sets the flag indicating that this ASTNode has semantics attached. - - @htmlinclude about-semantic-annotations.html - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::unsetSemanticsFlag " - @internal - Unsets the flag indicating that this ASTNode has semantics attached. - - @htmlinclude about-semantic-annotations.html - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::getSemanticsFlag " - @internal - Gets the flag indicating that this ASTNode has semantics attached. - - @htmlinclude about-semantic-annotations.html - - @return @c True if this node has semantics attached, @c False otherwise. -"; - - -%feature("docstring") ASTNode::setDefinitionURL " - @internal - Sets the attribute \'definitionURL\'. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ASTNode::getDefinitionURL " - Gets the MathML @c definitionURL attribute value. - - @return the value of the @c definitionURL attribute, in the form of - a libSBML XMLAttributes object. -"; - - -%feature("docstring") ASTNode::replaceArgument " - Replaces occurences of a given name within this ASTNode with the - name/value/formula represented by @p arg. - - For example, if the formula in this ASTNode is <code>x + y</code>, - then the <code><bvar></code> is @c x and @c arg is an ASTNode - representing the real value @c 3. This method substitutes @c 3 for @c - x within this ASTNode object. - - @param bvar a string representing the variable name to be substituted - @param arg an ASTNode representing the name/value/formula to substitute -"; - - -%feature("docstring") ASTNode::setParentSBMLObject " - @internal - Sets the parent SBML object. - - @param sb the parent SBML object of this ASTNode. -"; - - -%feature("docstring") ASTNode::getParentSBMLObject " - Returns the parent SBML object. - - @return the parent SBML object of this ASTNode. -"; - - -%feature("docstring") ASTNode::reduceToBinary " - Reduces this ASTNode to a binary tree. - - Example: if this ASTNode is <code>and(x, y, z)</code>, then the - formula of the reduced node is <code>and(and(x, y), z)</code>. The - operation replaces the formula stored in the current ASTNode object. -"; - - -%feature("docstring") ASTNode::setUserData " - Sets the user data of this node. This can be used by the application - developer to attach custom information to the node. In case of a deep - copy this attribute will passed as it is. The attribute will be never - interpreted by this class. - - @param userData specifies the new user data. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ASTNode::*getUserData " - Returns the user data that has been previously set via setUserData(). - - @return the user data of this node, or @c None if no user data has been set. - - @if clike - @see ASTNode::setUserData - @endif@~ -"; - - -%feature("docstring") ASTNode::isWellFormedASTNode " - Predicate returning @c True or @c False depending on whether this - ASTNode is well-formed. - - @note An ASTNode may be well-formed, with each node and its children - having the appropriate number of children for the given type, but may - still be invalid in the context of its use within an SBML model. - - @return @c True if this ASTNode is well-formed, @c False otherwise. - - @see hasCorrectNumberArguments() -"; - - -%feature("docstring") ASTNode::hasCorrectNumberArguments " - Predicate returning @c True or @c False depending on whether this - ASTNode has the correct number of children for it\'s type. - - For example, an ASTNode with type @link libsbml.AST_PLUS - AST_PLUS@endlink expects 2 child nodes. - - @note This function performs a check on the toplevel node only. - Child nodes are not checked. - - @return @c True if this ASTNode is has appropriate number of children - for it\'s type, @c False otherwise. - - @see isWellFormedASTNode() -"; - - -%feature("docstring") ASTNode::isBvar " - @internal - Predicate returning @c True or @c False depending on whether this - ASTNode has the correct number of children for it\'s type. - - For example, an ASTNode with type @link libsbml.AST_PLUS - AST_PLUS@endlink expects 2 child nodes. - - @note This function performs a check on the toplevel node only. - Child nodes are not checked. - - @return @c True if this ASTNode is has appropriate number of children - for it\'s type, @c False otherwise. - - @see isWellFormedASTNode() -"; - - -%feature("docstring") ASTNode::setBvar " - @internal - Predicate returning @c True or @c False depending on whether this - ASTNode has the correct number of children for it\'s type. - - For example, an ASTNode with type @link libsbml.AST_PLUS - AST_PLUS@endlink expects 2 child nodes. - - @note This function performs a check on the toplevel node only. - Child nodes are not checked. - - @return @c True if this ASTNode is has appropriate number of children - for it\'s type, @c False otherwise. - - @see isWellFormedASTNode() -"; - - -%feature("docstring") ASTNode::canonicalizeConstant " - @internal - Internal helper function for canonicalize(). -"; - - -%feature("docstring") ASTNode::canonicalizeFunction " - @internal - Internal helper function for canonicalize(). -"; - - -%feature("docstring") ASTNode::canonicalizeFunctionL1 " - @internal - Internal helper function for canonicalize(). -"; - - -%feature("docstring") ASTNode::canonicalizeLogical " - @internal - Internal helper function for canonicalize(). -"; - - -%feature("docstring") ASTNode::canonicalizeRelational " - @internal - Internal helper function for canonicalize(). -"; - - -%feature("docstring") SBML_parseFormula " - Parses the given SBML formula and returns a representation of it as an - Abstract Syntax Tree (AST). - - The text-string form of mathematical formulas produced by - @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ - and read by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - and - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ - use a simple C-inspired infix notation. A - formula in this text-string form therefore can be handed to a program - that understands SBML mathematical expressions, or used as - part of a formula translation system. The syntax is described in detail - in the documentation for ASTNode. - - This returns the root node of the AST corresponding to the formula. If - the formula contains a syntax error, @c None is returned instead. - - Note that this facility is provided as a convenience by libSBML—the - MathML standard does not actually define a \'string-form\' equivalent to - MathML expression trees, so the choice of formula syntax is somewhat - arbitrary. The approach taken by libSBML is to use the syntax defined by - SBML Level 1 (which in fact used a text-string representation of - formulas and not MathML). This formula syntax is based mostly on C - programming syntax, and may contain operators, function calls, symbols, - and white space characters. The following table provides the precedence - rules for the different entities that may appear in formula strings. - - @htmlinclude math-precedence-table.html - - In the table above, @em operand implies the construct is an operand, @em - prefix implies the operation is applied to the following arguments, @em - unary implies there is one argument, and @em binary implies there are - two arguments. The values in the <b>Precedence</b> column show how the - order of different types of operation are determined. For example, the - expression <code>a * b + c</code> is evaluated as <code>(a * b) + - c</code> because the @c * operator has higher precedence. The - <b>Associates</b> column shows how the order of similar precedence - operations is determined; for example, <code>a - b + c</code> is - evaluated as <code>(a - b) + c</code> because the @c + and @c - - operators are left-associative. - - The function call syntax consists of a function name, followed by optional - white space, followed by an opening parenthesis token, followed by a - sequence of zero or more arguments separated by commas (with each comma - optionally preceded and/or followed by zero or more white space - characters, followed by a closing parenthesis token. The function name - must be chosen from one of the pre-defined functions in SBML or a - user-defined function in the model. The following table lists the names - of certain common mathematical functions; this table corresponds to - Table 6 in the <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2\'>SBML Level 1 Version 2 specification</a>: - - @htmlinclude string-functions-table.html - - @warning There are differences between the symbols used to represent the - common mathematical functions and the corresponding MathML token names. - This is a potential source of incompatibilities. Note in particular that - in this text-string syntax, <code>log(x)</code> represents the natural - logarithm, whereas in MathML, the natural logarithm is - <code><ln/></code>. Application writers are urged to be careful - when translating between text forms and MathML forms, especially if they - provide a direct text-string input facility to users of their software - systems.<br><br> - @htmlinclude L1-math-syntax-warning.html - - @param formula the text-string formula expression to be parsed - - @return the root node of the AST, or @c None if an error occurred in - parsing the formula - - @if clike @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @see libsbml.getLastParseL3Error() - @see libsbml.getDefaultL3ParserSettings() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> - @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> - @endif@~ -"; - - -%feature("docstring") SBML_formulaToString " - Converts an AST to a string representation of a formula using a syntax - basically derived from SBML Level 1. - - The text-string form of mathematical formulas produced by - @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ - and read by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - use a simple C-inspired infix notation taken from SBML Level 1. A - formula in this text-string form therefore can be handed to a program - that understands SBML Level 1 mathematical expressions, or used as - part of a formula translation system. The syntax is described in detail - in the documentation for ASTNode. - - Note that this facility is provided as a convenience by libSBML—the - MathML standard does not actually define a \'string-form\' equivalent to - MathML expression trees, so the choice of formula syntax is somewhat - arbitrary. The approach taken by libSBML is to use the syntax defined by - SBML Level 1 (which in fact used a text-string representation of - formulas and not MathML). This formula syntax is based mostly on C - programming syntax, and may contain operators, function calls, symbols, - and white space characters. The following table provides the precedence - rules for the different entities that may appear in formula strings. - - @htmlinclude math-precedence-table.html - - In the table above, @em operand implies the construct is an operand, @em - prefix implies the operation is applied to the following arguments, @em - unary implies there is one argument, and @em binary implies there are - two arguments. The values in the <b>Precedence</b> column show how the - order of different types of operation are determined. For example, the - expression <code>a * b + c</code> is evaluated as <code>(a * b) + - c</code> because the @c * operator has higher precedence. The - <b>Associates</b> column shows how the order of similar precedence - operations is determined; for example, <code>a - b + c</code> is - evaluated as <code>(a - b) + c</code> because the @c + and @c - - operators are left-associative. - - The function call syntax consists of a function name, followed by optional - white space, followed by an opening parenthesis token, followed by a - sequence of zero or more arguments separated by commas (with each comma - optionally preceded and/or followed by zero or more white space - characters, followed by a closing parenthesis token. The function name - must be chosen from one of the pre-defined functions in SBML or a - user-defined function in the model. The following table lists the names - of certain common mathematical functions; this table corresponds to - Table 6 in the <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2\'>SBML Level 1 Version 2 specification</a>: - - @htmlinclude string-functions-table.html - - @warning There are differences between the symbols used to represent the - common mathematical functions and the corresponding MathML token names. - This is a potential source of incompatibilities. Note in particular that - in this text-string syntax, <code>log(x)</code> represents the natural - logarithm, whereas in MathML, the natural logarithm is - <code><ln/></code>. Application writers are urged to be careful - when translating between text forms and MathML forms, especially if they - provide a direct text-string input facility to users of their software - systems.<br><br> - @htmlinclude L1-math-syntax-warning.html - - @param tree the AST to be converted. - - @return the formula from the given AST as an SBML Level 1 text-string - mathematical formula. The caller owns the returned string and is - responsible for freeing it when it is no longer needed. - - @if clike @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @see libsbml.getLastParseL3Error() - @see libsbml.getDefaultL3ParserSettings() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> - @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> - @endif@~ -"; - - -%feature("docstring") SBML_parseL3Formula " - Parses the given mathematical formula and returns a representation of it - as an Abstract Syntax Tree (AST). - - The text-string form of mathematical formulas read by this function - are expanded versions of the formats produced and read by @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ - and - @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~, - respectively. The latter two libSBML functions were originally - developed to support conversion between SBML Levels 1 and 2, - and were focused on the syntax of mathematical formulas used in SBML - Level 1. With time, and the use of MathML in SBML Levels 2 - and 3, it became clear that supporting Level 2 and 3\'s - expanded mathematical syntax would be useful for software developers. - To maintain backwards compatibility, the original - @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ - and - @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - have been left untouched, and instead, the new functionality is - provided in the form of - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. - - The following are the differences in the formula syntax supported by - this function, compared to what is supported by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~: - - @li Units may be asociated with bare numbers, using the following syntax: - <div style=\'margin: 10px auto 10px 25px; display: block\'> - <span class=\'code\' style=\'background-color: #d0d0ee\'>number</span> - <span class=\'code\' style=\'background-color: #edd\'>unit</span> - </div> - The <span class=\'code\' style=\'background-color: #d0d0ee\'>number</span> - may be in any form (an integer, real, or rational - number), and the - <span class=\'code\' style=\'background-color: #edd\'>unit</span> - must conform to the syntax of an SBML identifier (technically, the - type defined as @c SId in the SBML specifications). The whitespace between - <span class=\'code\' style=\'background-color: #d0d0ee\'>number</span> - and <span class=\'code\' style=\'background-color: #edd\'>unit</span> - is optional. - @li The Boolean function symbols @c &&, @c ||, @c !, and @c != may be used. - @li The @em modulo operation is allowed as the symbol @c @% and - will produce a piecewise function in the MathML. - @li All inverse trigonometric functions may be defined in the infix - either using @c arc as a prefix or simply @c a; in other words, both - @c arccsc and @c acsc are interpreted as the operator @em arccosecant - defined in MathML. (Many functions in the SBML Level 1 infix-notation - parser implemented by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - are defined this way as well, but not all.) - @li The following expression is parsed as a rational number instead of - as a numerical division: - <pre style=\'display: block; margin-left: 25px\'> - (<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>/<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>)</pre> - No spaces are allowed in this construct; in other words, - "<code>(3 / 4)</code>" will be parsed into the MathML - <code><divide></code> construct rather than a rational number. The - general number syntax allows you to assign units to a rational number, e.g., - "<code>(3/4) ml</code>". (If the string is a division, units - are not interpreted in this way.) - @li Various settings may be altered by using an L3ParserSettings object - in conjunction with the alternative function call - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~, including the following: - <ul> - <li> The function @c log with a single argument ("<code>log(x)</code>") - can be parsed as <code>log10(x)</code>, <code>ln(x)</code>, or treated - as an error, as desired. - <li> Unary minus signs can be collapsed or preserved; that is, - sequential pairs of unary minuses (e.g., "<code>- -3</code>") - can be removed from the input entirely and single unary minuses can be - incorporated into the number node, or all minuses can be preserved in - the AST node structure. - <li> Parsing of units embedded in the input string can be turned on and - off. - <li> The string @c avogadro can be parsed as a MathML @em csymbol or - as an identifier. - <li> A Model object may optionally be provided to the parser using - the variant function call @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.SBML_parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~. - or stored in a L3ParserSettings object passed to the variant function - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~. - When a Model object is provided, identifiers (values of type @c SId) - from that model are used in preference to pre-defined MathML - definitions. More precisely, the Model entities whose identifiers will - shadow identical symbols in the mathematical formula are: Species, - Compartment, Parameter, Reaction, and SpeciesReference. For instance, - if the parser is given a Model containing a Species with the identifier - "<code>pi</code>", and the formula to be parsed is - "<code>3*pi</code>", the MathML produced will contain the - construct <code><ci> pi </ci></code> instead of the - construct <code><pi/></code>. - <li> Similarly, when a Model object is provided, @c SId values of - user-defined functions present in the model will be used preferentially - over pre-defined MathML functions. For example, if the passed-in Model - contains a FunctionDefinition with the identifier - "<code>sin</code>", that function will be used instead of the - predefined MathML function <code><sin/></code>. - </ul> - These configuration settings cannot be changed using @em this function - (i.e., @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~), - but they can be change on a per-call basis by using the alternative function - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~ - - This function returns the root node of the AST corresponding to the - formula given as the argument. If the formula contains a syntax error, - this function will return @c None instead. When @c None is returned, an - error is set; information about the error can be retrieved using - @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. - - Note that this facility and the SBML Level 1-based @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ - are provided as a convenience by libSBML—the MathML standard does not - actually define a \'string-form\' equivalent to MathML expressions, so the - choice of formula syntax is arbitrary. The approach taken by libSBML is - to start with the syntax defined by SBML Level 1 (which in fact - used a text-string representation of formulas, and not MathML), and - expand it to include the above functionality. This formula syntax is - based mostly on C programming syntax, and may contain operators, - function calls, symbols, and white space characters. The following - table provides the precedence rules for the different entities that may - appear in formula strings. - - @htmlinclude math-precedence-table-l3.html - - In the table above, @em operand implies the construct is an operand, @em - prefix implies the operation is applied to the following arguments, @em - unary implies there is one argument, and @em binary implies there are - two arguments. The values in the <b>Precedence</b> column show how the - order of different types of operation are determined. For example, the - expression <code>a + b * c</code> is evaluated as <code>a + (b * c)</code> - because the @c * operator has higher precedence. The - <b>Associates</b> column shows how the order of similar precedence - operations is determined; for example, <code>a && b || c</code> is - evaluated as <code>(a && b) || c</code> because the @c && and @c || - operators are left-associative and have the same precedence. - - The function call syntax consists of a function name, followed by optional - white space, followed by an opening parenthesis token, followed by a - sequence of zero or more arguments separated by commas (with each comma - optionally preceded and/or followed by zero or more white space - characters), followed by a closing parenthesis token. The function name - must be chosen from one of the pre-defined functions in SBML or a - user-defined function in the model. The following table lists the names - of certain common mathematical functions; this table corresponds to - Table 6 in the <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2\'>SBML Level 1 Version 2 specification</a> with additions based on the - functions added in SBML Level 2 and Level 3: - - @htmlinclude string-functions-table-l3.html - - Note that this function\'s interpretation of the string - "<code>log</code>" as a function with a single argument can be - changed; use the function @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~ - instead of this function and pass it an appropriate L3ParserSettings - object. By default, unlike the SBML Level 1 parser implemented by - @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~, - the string "<code>log</code>" is interpreted as the base 10 - logarithm, and @em not as the natural logarithm. However, you can change - the interpretation to be base-10 log, natural log, or as an error; since - the name \'log\' by itself is ambiguous, you require that the parser uses - @c log10 or @c ln instead, which are more clear. Please refer to - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~. - - In addition, the following symbols will be translated to their MathML - equivalents, if no symbol with the same @c SId identifier string exists - in the Model object provided: - - @htmlinclude string-values-table-l3.html - - Note that whether the string "<code>avogadro</code>" is parsed - as an AST node of type @link libsbml.AST_NAME_AVOGADRO - AST_NAME_AVOGADRO@endlink or @link libsbml.AST_NAME - AST_NAME@endlink is configurable; use the alternate version of this - function, called - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~. - This functionality is provided because SBML Level 2 models may not - use @link libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink AST nodes. - - @param formula the text-string formula expression to be parsed - - @return the root node of an AST representing the mathematical formula, - or @c None if an error occurred while parsing the formula. When @c None - is returned, an error is recorded internally; information about the - error can be retrieved using - @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. - - @if clike @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @see libsbml.getLastParseL3Error() - @see libsbml.getDefaultL3ParserSettings() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> - @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> - @endif@~ -"; - - -%feature("docstring") SBML_parseL3FormulaWithModel " - Parses the given mathematical formula using specific a specific Model to - resolve symbols, and returns an Abstract Syntax Tree (AST) - representation of the result. - - This is identical to - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~, - except that this function uses the given model in the argument @p model - to check against identifiers that appear in the @p formula. - - For more details about the parser, please see the definition of - the function @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. - - @param formula the mathematical formula expression to be parsed - - @param model the Model object to use for checking identifiers - - @return the root node of an AST representing the mathematical formula, - or @c None if an error occurred while parsing the formula. When @c None - is returned, an error is recorded internally; information about the - error can be retrieved using - @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. - - @if clike @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.getLastParseL3Error() - @see libsbml.getDefaultL3ParserSettings() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> - @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> - @endif@~ -"; - - -%feature("docstring") SBML_parseL3FormulaWithSettings " - Parses the given mathematical formula using specific parser settings and - returns an Abstract Syntax Tree (AST) representation of the result. - - This is identical to - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~, - except that this function uses the parser settings given in the argument - @p settings. The settings override the default parsing behavior. - - The parameter @p settings allows callers to change the following parsing - behaviors: - - @li Use a specific Model object against which identifiers to compare - identifiers. This causes the parser to search the Model for identifiers - that the parser encounters in the formula. If a given symbol in the - formula matches the identifier of a Species, Compartment, Parameter, - Reaction, SpeciesReference or FunctionDefinition in the Model, then the - symbol is assumed to refer to that model entity instead of any possible - mathematical terms with the same symbol. For example, if the parser is - given a Model containing a Species with the identifier - "<code>pi</code>", and the formula to be parsed is - "<code>3*pi</code>", the MathML produced will contain the - construct <code><ci> pi </ci></code> instead of the - construct <code><pi/></code>. - @li Whether to parse "<code>log(x)</code>" with a single - argument as the base 10 - logarithm of x, the natural logarithm of x, or treat the case as an - error. - @li Whether to parse "<code>number id</code>" by interpreting - @c id as the identifier of a unit of measurement associated with the - number, or whether to treat the case as an error. - @li Whether to parse "<code>avogadro</code>" as an ASTNode of - type @link libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or - as type @link libsbml.AST_NAME AST_NAME@endlink. - @li Whether to always create explicit ASTNodes of type @link - libsbml.AST_MINUS AST_MINUS@endlink for all unary minuses, or - collapse and remove minuses where possible. - - For more details about the parser, please see the definition of - L3ParserSettings and - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. - - @param formula the mathematical formula expression to be parsed - - @param settings the settings to be used for this parser invocation - - @return the root node of an AST representing the mathematical formula, - or @c None if an error occurred while parsing the formula. When @c None - is returned, an error is recorded internally; information about the - error can be retrieved using - @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. - - @if clike @see SBML_formulaToString() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @see libsbml.getLastParseL3Error() - @see libsbml.getDefaultL3ParserSettings() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> - @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> - @endif@~ -"; - - -%feature("docstring") SBML_getDefaultL3ParserSettings " - Returns a copy of the default parser settings used by @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. - - The settings structure allows callers to change the following parsing - behaviors: - - @li Use a specific Model object against which identifiers to compare - identifiers. This causes the parser to search the Model for identifiers - that the parser encounters in the formula. If a given symbol in the - formula matches the identifier of a Species, Compartment, Parameter, - Reaction, SpeciesReference or FunctionDefinition in the Model, then the - symbol is assumed to refer to that model entity instead of any possible - mathematical terms with the same symbol. For example, if the parser is - given a Model containing a Species with the identifier - "<code>pi</code>", and the formula to be parsed is - "<code>3*pi</code>", the MathML produced will contain the - construct <code><ci> pi </ci></code> instead of the - construct <code><pi/></code>. - @li Whether to parse "<code>log(x)</code>" with a single - argument as the base 10 - logarithm of x, the natural logarithm of x, or treat the case as an - error. - @li Whether to parse "<code>number id</code>" by interpreting - @c id as the identifier of a unit of measurement associated with the - number, or whether to treat the case as an error. - @li Whether to parse "<code>avogadro</code>" as an ASTNode of - type @link libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or - as type @link libsbml.AST_NAME AST_NAME@endlink. - @li Whether to always create explicit ASTNodes of type @link - libsbml.AST_MINUS AST_MINUS@endlink for all unary minuses, or - collapse and remove minuses where possible. - - For more details about the parser, please see the definition of - L3ParserSettings and - @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. - - @if clike @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getLastParseL3Error() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @see libsbml.getLastParseL3Error() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> - @endif@~ -"; - - -%feature("docstring") SBML_getLastParseL3Error " - Returns the last error reported by the parser. - - If @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~, - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~, or - @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~ return @c None, an error is set internally which is accessible - via this function. - - @return a string describing the error that occurred. This will contain - the string the parser was trying to parse, which character it had parsed - when it encountered the error, and a description of the error. - - @if clike @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if csharp @see SBML_formulaToString() - @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @see SBML_getDefaultL3ParserSettings() - @endif@~ - @if python @see libsbml.formulaToString() - @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @see libsbml.getDefaultL3ParserSettings() - @endif@~ - @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> - @endif@~ -"; - - -%feature("docstring") L3ParserSettings " - @ingroup Core - A helper class for controlling the behavior of the text-string - formula parser. - - @htmlinclude not-sbml-warning.html - - The function - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~, - along with its variants - @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(java.lang.String formula)</a></code>@endif@~ - and - @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~, - are the interfaces to a parser for mathematical formulas expressed as - text strings. The parser converts the text-string formulas into - Abstract Syntax Trees (ASTs), represented in libSBML using ASTNode - objects. Compared to the parser implemented by the function - @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(java.lang.String formula)</a></code>@endif@~, - which was designed primarily for converting the mathematical formula - strings in SBML Level 1, the \'L3\' variant of the parser accepts an - extended formula syntax. It also has a number of configurable behaviors. - This class (L3ParserSettings) is an object used to communicate the - configuration settings with callers. - - The following aspects of the parser are configurable: - <ul> - <li> The function @c log with a single argument ("<code>log(x)</code>") - can be parsed as <code>log10(x)</code>, <code>ln(x)</code>, or treated - as an error, as desired. - <li> Unary minus signs can be collapsed or preserved; that is, - sequential pairs of unary minuses (e.g., "<code>- -3</code>") - can be removed from the input entirely and single unary minuses can be - incorporated into the number node, or all minuses can be preserved in - the AST node structure. - <li> Parsing of units embedded in the input string can be turned on and - off. - <li> The string @c avogadro can be parsed as a MathML @em csymbol or - as an identifier. - <li> A Model object may optionally be provided to the parser using - the variant function call @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.SBML_parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~. - or stored in a L3ParserSettings object passed to the variant function - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, org.sbml.libsbml.L3ParserSettings settings)</a></code>@endif@~. - When a Model object is provided, identifiers (values of type @c SId) - from that model are used in preference to pre-defined MathML - definitions. More precisely, the Model entities whose identifiers will - shadow identical symbols in the mathematical formula are: Species, - Compartment, Parameter, Reaction, and SpeciesReference. For instance, - if the parser is given a Model containing a Species with the identifier - "<code>pi</code>", and the formula to be parsed is - "<code>3*pi</code>", the MathML produced will contain the - construct <code><ci> pi </ci></code> instead of the - construct <code><pi/></code>. - <li> Similarly, when a Model object is provided, @c SId values of - user-defined functions present in the Model will be used preferentially - over pre-defined MathML functions. For example, if the passed-in Model - contains a FunctionDefinition with the identifier - "<code>sin</code>", that function will be used instead of the - predefined MathML function <code><sin/></code>. - </ul> - - To obtain the default configuration values, callers can use the function - @if clike SBML_getDefaultL3ParserSettings()@endif@if csharp SBML_getDefaultL3ParserSettings()@endif@if python libsbml.SBML_getDefaultL3ParserSettings()@endif@if java <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>libsbml.getDefaultL3ParserSettings()</a></code>@endif@~. - To change the configuration, callers can create an L3ParserSettings - object, set the desired characteristics using the methods - provided, and pass that object to - @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'><code>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</code></a>@endif@~. - - @if clike @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @endif@~ - @if csharp @see SBML_parseL3FormulaWithSettings() - @see SBML_parseL3Formula() - @see SBML_parseL3FormulaWithModel() - @endif@~ - @if python @see libsbml.parseL3FormulaWithSettings() - @see libsbml.parseL3Formula() - @see libsbml.parseL3FormulaWithModel() - @endif@~ - @if java @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> - @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> - @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> - @endif@~ -"; - - -%feature("docstring") L3ParserSettings::L3ParserSettings " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>L3ParserSettings(Model model, ParseLogType_t parselog, bool collapseminus, bool parseunits, bool avocsymbol)</pre> - - Creates a new L3ParserSettings object with specific values for all - possible settings. - - @param model a Model object to be used for disambiguating identifiers - - @param parselog a flag that controls how the parser will handle - the symbol @c log in formulas - - @param collapseminus a flag that controls how the parser will handle - minus signs - - @param parseunits a flag that controls how the parser will handle - apparent references to units of measurement associated with raw - numbers in a formula - - @param avocsymbol a flag that controls how the parser will handle - the appearance of the symbol @c avogadro in a formula - - @see getModel() - @see setModel() - @see unsetModel() - @see getParseLog() - @see setParseLog() - @see getParseUnits() - @see setParseUnits() - @see getParseCollapseMinus() - @see setParseCollapseMinus() - @see getParseAvogadroCsymbol() - @see setParseAvogadroCsymbol() - - - <hr> - Method variant with the following signature: - <pre class='signature'>L3ParserSettings()</pre> - - Creates a new L3ParserSettings object with default values. - - This is the default constructor for the L3ParserSettings object. It - sets the Model to @c None and other settings to @c - L3P_PARSE_LOG_AS_LOG10, @c L3P_EXPAND_UNARY_MINUS, @c L3P_PARSE_UNITS, - and @c L3P_AVOGADRO_IS_CSYMBOL. -"; - - -%feature("docstring") L3ParserSettings::setModel " - Sets the model reference in this L3ParserSettings object. - - When a Model object is provided, identifiers (values of type @c SId) - from that model are used in preference to pre-defined MathML - definitions. More precisely, the Model entities whose identifiers will - shadow identical symbols in the mathematical formula are: Species, - Compartment, Parameter, Reaction, and SpeciesReference. For instance, - if the parser is given a Model containing a Species with the identifier - "<code>pi</code>", and the formula to be parsed is - "<code>3*pi</code>", the MathML produced will contain the - construct <code><ci> pi </ci></code> instead of the - construct <code><pi/></code>. - Similarly, when a Model object is provided, @c SId values of - user-defined functions present in the Model will be used preferentially - over pre-defined MathML functions. For example, if the passed-in Model - contains a FunctionDefinition with the identifier - "<code>sin</code>", that function will be used instead of the - predefined MathML function <code><sin/></code>. - - @param model a Model object to be used for disambiguating identifiers - - @warning This does @em not copy the Model object. This means that - modifications made to the object after invoking this method may affect - parsing behavior. - - @see getModel() - @see unsetModel() -"; - - -%feature("docstring") L3ParserSettings::getModel " - Returns the Model object referenced by this L3ParserSettings object. - - @see setModel() - @see unsetModel() -"; - - -%feature("docstring") L3ParserSettings::unsetModel " - Sets the Model reference in this L3ParserSettings object to @c None. - - @see setModel() - @see getModel() -"; - - -%feature("docstring") L3ParserSettings::setParseLog " - Sets the behavior for handling @c log in mathematical formulas. - - The function @c log with a single argument - ("<code>log(x)</code>") can be parsed as - <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as - desired. - - @param type a constant, one of following three possibilities: - @li @link libsbml.L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink - @li @link libsbml.L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink - @li @link libsbml.L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink - - @see getParseLog() -"; - - -%feature("docstring") L3ParserSettings::getParseLog " - Returns the current setting indicating what to do with formulas - containing the function @c log with one argument. - - The function @c log with a single argument - ("<code>log(x)</code>") can be parsed as - <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as - desired. - - @return One of following three constants: - @li @link libsbml.L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink - @li @link libsbml.L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink - @li @link libsbml.L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink - - @see setParseLog() -"; - - -%feature("docstring") L3ParserSettings::setParseCollapseMinus " - Sets the behavior for handling unary minuses appearing in mathematical - formulas. - - This setting affects two behaviors. First, pairs of multiple unary - minuses in a row (e.g., "<code>- -3</code>") can be - collapsed and ignored in the input, or the multiple minuses can be - preserved in the AST node tree that is generated by the parser. - Second, minus signs in front of numbers can be collapsed into the - number node itself; for example, a "<code>- 4.1</code>" can - be turned into a single ASTNode of type @link libsbml.AST_REAL - AST_REAL@endlink with a value of <code>-4.1</code>, or it can be - turned into a node of type @link libsbml.AST_MINUS - AST_MINUS@endlink having a child node of type @link - libsbml.AST_REAL AST_REAL@endlink. This method lets you tell - the parser which behavior to use—either collapse minuses or - always preserve them. The two possibilities are represented using the - following constants: - - @li @link libsbml.L3P_COLLAPSE_UNARY_MINUS - L3P_COLLAPSE_UNARY_MINUS@endlink (value = @c True): collapse unary - minuses where possible. - @li @link libsbml.L3P_EXPAND_UNARY_MINUS - L3P_EXPAND_UNARY_MINUS@endlink (value = @c False): do not collapse - unary minuses, and instead translate each one into an AST node of type - @link libsbml.AST_MINUS AST_MINUS@endlink. - - @param collapseminus a boolean value (one of the constants - @link libsbml.L3P_COLLAPSE_UNARY_MINUS - L3P_COLLAPSE_UNARY_MINUS@endlink or - @link libsbml.L3P_EXPAND_UNARY_MINUS - L3P_EXPAND_UNARY_MINUS@endlink) indicating how unary minus signs in - the input should be handled. - - @see getParseCollapseMinus() -"; - - -%feature("docstring") L3ParserSettings::getParseCollapseMinus " - Returns a flag indicating the current behavior set for handling - multiple unary minuses in formulas. - - This setting affects two behaviors. First, pairs of multiple unary - minuses in a row (e.g., "<code>- -3</code>") can be - collapsed and ignored in the input, or the multiple minuses can be - preserved in the AST node tree that is generated by the parser. - Second, minus signs in front of numbers can be collapsed into the - number node itself; for example, a "<code>- 4.1</code>" can - be turned into a single ASTNode of type @link libsbml.AST_REAL - AST_REAL@endlink with a value of <code>-4.1</code>, or it can be - turned into a node of type @link libsbml.AST_MINUS - AST_MINUS@endlink having a child node of type @link - libsbml.AST_REAL AST_REAL@endlink. This method lets you tell - the parser which behavior to use—either collapse minuses or - always preserve them. The two possibilities are represented using the - following constants: - - @li @link libsbml.L3P_COLLAPSE_UNARY_MINUS - L3P_COLLAPSE_UNARY_MINUS@endlink (value = @c True): collapse unary - minuses where possible. - @li @link libsbml.L3P_EXPAND_UNARY_MINUS - L3P_EXPAND_UNARY_MINUS@endlink (value = @c False): do not collapse - unary minuses, and instead translate each one into an AST node of type - @link libsbml.AST_MINUS AST_MINUS@endlink. - - @return A boolean, one of @link - libsbml.L3P_COLLAPSE_UNARY_MINUS - L3P_COLLAPSE_UNARY_MINUS@endlink or @link - libsbml.L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink. - - @see setParseCollapseMinus() -"; - - -%feature("docstring") L3ParserSettings::setParseUnits " - Sets the parser\'s behavior in handling units associated with numbers - in a mathematical formula. - - In SBML Level 2, there is no means of associating a unit of - measurement with a pure number in a formula, while SBML Level 3 - does define a syntax for this. In Level 3, MathML - <code><cn></code> elements can have an attribute named @c units - placed in the SBML namespace, which can be used to indicate the units - to be associated with the number. The text-string infix formula - parser allows units to be placed after raw numbers; they are - interpreted as unit identifiers for units defined by the SBML - specification or in the containing Model object. Some examples - include: "<code>4 mL</code>", "<code>2.01 - Hz</code>", "<code>3.1e-6 M</code>", and - "<code>(5/8) inches</code>". To produce a valid SBML model, - there must either exist a UnitDefinition corresponding to the - identifier of the unit, or the unit must be defined in Table 2 of - the SBML specification. - - @param units A boolean indicating whether to parse units: - @li @link libsbml.L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink - (value = @c True): parse units in the text-string formula. - @li @link libsbml.L3P_NO_UNITS L3P_NO_UNITS@endlink (value = @c - false): treat units in the text-string formula as errors. - - @see getParseUnits() -"; - - -%feature("docstring") L3ParserSettings::getParseUnits " - Returns @c if the current settings allow units in text-string - mathematical formulas. - - In SBML Level 2, there is no means of associating a unit of - measurement with a pure number in a formula, while SBML Level 3 - does define a syntax for this. In Level 3, MathML - <code><cn></code> elements can have an attribute named @c units - placed in the SBML namespace, which can be used to indicate the units - to be associated with the number. The text-string infix formula - parser allows units to be placed after raw numbers; they are - interpreted as unit identifiers for units defined by the SBML - specification or in the containing Model object. Some examples - include: "<code>4 mL</code>", "<code>2.01 - Hz</code>", "<code>3.1e-6 M</code>", and - "<code>(5/8) inches</code>". To produce a valid SBML model, - there must either exist a UnitDefinition corresponding to the - identifier of the unit, or the unit must be defined in Table 2 of - the SBML specification. - - Since SBML Level 2 does not have the ability to associate units with - pure numbers, the value should be set to @c False when parsing text-string - formulas intended for use in SBML Level 2 documents. - - @return A boolean indicating whether to parse units: - @li @link libsbml.L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink - (value = @c True): parse units in the text-string formula. - @li @link libsbml.L3P_NO_UNITS L3P_NO_UNITS@endlink (value = @c - false): treat units in the text-string formula as errors. - - @see setParseUnits() -"; - - -%feature("docstring") L3ParserSettings::setParseAvogadroCsymbol " - Sets the parser\'s behavior in handling the string @c avogadro in - mathematical formulas. - - SBML Level 3 defines a symbol for representing the value of - Avogadro\'s constant, but it is not defined in SBML Level 2. As a - result, the text-string formula parser must behave differently - depending on which SBML Level is being targeted. The argument to this - method can be one of two values: - - @li @link libsbml.L3P_AVOGADRO_IS_CSYMBOL - L3P_AVOGADRO_IS_CSYMBOL@endlink (value = @c True): tells the parser to - translate the string @c avogadro (in any capitalization) into an AST - node of type @link libsbml.AST_NAME_AVOGADRO - AST_NAME_AVOGADRO@endlink. - @li @link libsbml.L3P_AVOGADRO_IS_NAME - L3P_AVOGADRO_IS_NAME@endlink (value = @c False): tells the parser to - translate the string @c avogadro into an AST of type @link - libsbml.AST_NAME AST_NAME@endlink. - - Since SBML Level 2 does not define a symbol for Avogadro\'s - constant, the value should be set to @c False when parsing text-string - formulas intended for use in SBML Level 2 documents. - - @param l2only a boolean value (one of the constants - @link libsbml.L3P_AVOGADRO_IS_CSYMBOL - L3P_AVOGADRO_IS_CSYMBOL@endlink or - @link libsbml.L3P_AVOGADRO_IS_NAME - L3P_AVOGADRO_IS_NAME@endlink) indicating how the string @c avogadro - should be treated when encountered in a formula. - - @see getParseAvogadroCsymbol() -"; - - -%feature("docstring") L3ParserSettings::getParseAvogadroCsymbol " - Returns @c True if the current settings are oriented towards handling - @c avogadro for SBML Level 3. - - SBML Level 3 defines a symbol for representing the value of - Avogadro\'s constant, but it is not defined in SBML Level 2. As a - result, the text-string formula parser must behave differently - depending on which SBML Level is being targeted. - - @return A boolean indicating which mode is currently set; the value is - one of the following possibilities: - @li @link libsbml.L3P_AVOGADRO_IS_CSYMBOL - L3P_AVOGADRO_IS_CSYMBOL@endlink (value = @c True): tells the parser to - translate the string @c avogadro (in any capitalization) into an AST - node of type @link libsbml.AST_NAME_AVOGADRO - AST_NAME_AVOGADRO@endlink. - @li @link libsbml.L3P_AVOGADRO_IS_NAME - L3P_AVOGADRO_IS_NAME@endlink (value = @c False): tells the parser to - translate the string @c avogadro into an AST of type @link - libsbml.AST_NAME AST_NAME@endlink. - - @see setParseAvogadroCsymbol() -"; - - -%feature("docstring") XMLAttributes " - @ingroup Core - Representation of attributes on an XML node. - - @htmlinclude not-sbml-warning.html - - <!-- leave this next break as-is to work around some doxygen bug --> -"; - - -%feature("docstring") XMLConstructorException " - @ingroup Core - Class of exceptions thrown by constructors of some libSBML objects. - - @htmlinclude not-sbml-warning.html - - In some situations, constructors for SBML objects may need to indicate - to callers that the creation of the object failed. The failure may be - for different reasons, such as an attempt to use invalid parameters or a - system condition such as a memory error. To communicate this to - callers, those classes will throw an XMLConstructorException. @if cpp - Callers can use the standard C++ <code>std::exception</code> method - <code>what()</code> to extract the diagnostic message stored with the - exception.@endif@~ - <p> - In languages that don\'t have an exception mechanism (e.g., C), the - constructors generally try to return an error code instead of throwing - an exception. - - @see SBMLConstructorException -"; - - -%feature("docstring") XMLAttributes::XMLAttributes " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLAttributes()</pre> - - Creates a new empty XMLAttributes set. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLAttributes(XMLAttributes orig)</pre> - - Copy constructor; creates a copy of this XMLAttributes set. - - @p orig the XMLAttributes object to copy. - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") XMLAttributes::clone " - Creates and returns a deep copy of this XMLAttributes set. - - @return a (deep) copy of this XMLAttributes set. -"; - - -%feature("docstring") XMLAttributes::add " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>add( XMLTriple triple, string value)</pre> - - Adds an attribute with the given XMLTriple/value pair to this XMLAttributes set. - - @note if local name with the same namespace URI already exists in this attribute set, - its value and prefix will be replaced. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a string, the value of the attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>add( string name , string value , string namespaceURI = \'\' , string prefix = \'\')</pre> - - Adds an attribute (a name/value pair) to this XMLAttributes object, - optionally with a prefix and URI defining a namespace. - - @param name a string, the local name of the attribute. - @param value a string, the value of the attribute. - @param namespaceURI a string, the namespace URI of the attribute. - @param prefix a string, the prefix of the namespace - - @return an integer code indicating the success or failure of the - function. The possible values returned by this - function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @note if local name with the same namespace URI already exists in this - attribute set, its value and prefix will be replaced. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLAttributes::addResource " - @internal - Adds an name/value pair to this XMLAttributes set. - - This method is similar to the add method but an attribute with same name wont - be overwritten. This facilitates the addition of multiple resource attributes - in CVTerm class. - - @param name a string, the name of the attribute. - @param value a string, the value of the attribute. - - @note This function is only internally used to store multiple rdf:resource - attributes in CVTerm class, and thus should not be used for other purposes. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") XMLAttributes::removeResource " - Removes an attribute with the given index from this XMLAttributes set. - - @param n an integer the index of the resource to be deleted - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") XMLAttributes::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>remove(XMLTriple triple)</pre> - - Removes an attribute with the given XMLTriple from this XMLAttributes set. - - @param triple an XMLTriple, the XML triple of the attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>remove(int n)</pre> - - Removes an attribute with the given index from this XMLAttributes set. - (This function is an alias of XMLAttributes.removeResource() ). - - @param n an integer the index of the resource to be deleted - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>remove(string name, string uri = \'\')</pre> - - Removes an attribute with the given local name and namespace URI from - this XMLAttributes set. - - @param name a string, the local name of the attribute. - @param uri a string, the namespace URI of the attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") XMLAttributes::clear " - Clears (deletes) all attributes in this XMLAttributes object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") XMLAttributes::getIndex " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getIndex(XMLTriple triple)</pre> - - Return the index of an attribute with the given XMLTriple. - - @param triple an XMLTriple, the XML triple of the attribute for which - the index is required. - - @return the index of an attribute with the given XMLTriple, or -1 if not present. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getIndex(string name, string uri)</pre> - - Return the index of an attribute with the given local name and namespace URI. - - @param name a string, the local name of the attribute. - @param uri a string, the namespace URI of the attribute. - - @return the index of an attribute with the given local name and namespace URI, - or -1 if not present. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getIndex(string name)</pre> - - Return the index of an attribute with the given name. - - @note A namespace bound to the name is not checked by this function. - Thus, if there are multiple attributes with the given local name and - different namespaces, the smallest index among those attributes will - be returned. XMLAttributes.getIndex() const or - XMLAttributes.getIndex() const should be used to get an index of an - attribute with the given local name and namespace. - - @param name a string, the local name of the attribute for which the - index is required. - - @return the index of an attribute with the given local name, or -1 if not present. -"; - - -%feature("docstring") XMLAttributes::getLength " - Return the number of attributes in the set. - - @return the number of attributes in this XMLAttributes set. -"; - - -%feature("docstring") XMLAttributes::getNumAttributes " - Return the number of attributes in the set. - - @return the number of attributes in this XMLAttributes set. - - This function is an alias for getLength introduced for consistency - with other XML classes. -"; - - -%feature("docstring") XMLAttributes::getName " - Return the local name of an attribute in this XMLAttributes set (by position). - - @param index an integer, the position of the attribute whose local name is - required. - - @return the local name of an attribute in this list (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for the attribute - existence. -"; - - -%feature("docstring") XMLAttributes::getPrefix " - Return the prefix of an attribute in this XMLAttributes set (by position). - - @param index an integer, the position of the attribute whose prefix is - required. - - @return the namespace prefix of an attribute in this list (by - position). - - @note If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for the attribute - existence. -"; - - -%feature("docstring") XMLAttributes::getPrefixedName " - Return the prefixed name of an attribute in this XMLAttributes set (by position). - - @param index an integer, the position of the attribute whose prefixed - name is required. - - @return the prefixed name of an attribute in this list (by - position). - - @note If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. -"; - - -%feature("docstring") XMLAttributes::getURI " - Return the namespace URI of an attribute in this XMLAttributes set (by position). - - @param index an integer, the position of the attribute whose namespace URI is - required. - - @return the namespace URI of an attribute in this list (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. -"; - - -%feature("docstring") XMLAttributes::getValue " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getValue(XMLTriple triple)</pre> - - Return a value of an attribute with the given XMLTriple. - - @param triple an XMLTriple, the XML triple of the attribute whose - value is required. - - @return The attribute value as a string. - - @note If an attribute with the given XMLTriple does not exist, an - empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getValue(int index)</pre> - - Return the value of an attribute in this XMLAttributes set (by position). - - @param index an integer, the position of the attribute whose value is - required. - - @return the value of an attribute in the list (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getValue(string name)</pre> - - Return an attribute\'s value by name. - - @param name a string, the local name of the attribute whose value is required. - - @return The attribute value as a string. - - @note If an attribute with the given local name does not exist, an - empty string will be returned. Use - XMLAttributes.hasAttribute() const - to test for attribute existence. A namespace bound to the local name - is not checked by this function. Thus, if there are multiple - attributes with the given local name and different namespaces, the - value of an attribute with the smallest index among those attributes - will be returned. XMLAttributes.getValue() const or - XMLAttributes.getValue() const should be used to get a value of an - attribute with the given local name and namespace. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getValue(string name, string uri)</pre> - - Return a value of an attribute with the given local name and namespace URI. - - @param name a string, the local name of the attribute whose value is required. - @param uri a string, the namespace URI of the attribute. - - @return The attribute value as a string. - - @note If an attribute with the given local name and namespace URI does - not exist, an empty string will be returned. Use - XMLAttributes.hasAttribute() const - to test for attribute existence. -"; - - -%feature("docstring") XMLAttributes::hasAttribute " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>hasAttribute(XMLTriple triple)</pre> - - Predicate returning @c True or @c False depending on whether - an attribute with the given XML triple exists in this XMLAttributes. - - @param triple an XMLTriple, the XML triple of the attribute - - @return @c True if an attribute with the given XML triple exists in this - XMLAttributes, @c False otherwise. - - - - <hr> - Method variant with the following signature: - <pre class='signature'>hasAttribute(int index)</pre> - - Predicate returning @c True or @c False depending on whether - an attribute with the given index exists in this XMLAttributes. - - @param index an integer, the position of the attribute. - - @return @c True if an attribute with the given index exists in this - XMLAttributes, @c False otherwise. - - - <hr> - Method variant with the following signature: - <pre class='signature'>hasAttribute(string name, string uri=\'\')</pre> - - Predicate returning @c True or @c False depending on whether - an attribute with the given local name and namespace URI exists in this - XMLAttributes. - - @param name a string, the local name of the attribute. - @param uri a string, the namespace URI of the attribute. - - @return @c True if an attribute with the given local name and namespace - URI exists in this XMLAttributes, @c False otherwise. -"; - - -%feature("docstring") XMLAttributes::isEmpty " - Predicate returning @c True or @c False depending on whether - this XMLAttributes set is empty. - - @return @c True if this XMLAttributes set is empty, @c False otherwise. -"; - - -%feature("docstring") XMLAttributes::readInto " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( XMLTriple triple , string& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute with the given XMLTriple into value. - If the XMLTriple was not found, value is not modified. - - If an XMLErrorLog is passed in and required is true, missing - attributes are logged. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a string, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( XMLTriple triple , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute XMLTriple into value. - If the XMLTriple was not found or value could be interpreted as a long, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, we - limit values to what can be stored in a long. For more information, - see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a long, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( XMLTriple triple , double& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute with the given XMLTriple into value. - If the triple was not found or value could be interpreted as a double, -value is not modified. - - According to the W3C XML Schema, valid doubles are the same as valid - doubles for C and the special values \'INF\', \'-INF\', and \'NaN\' - (case-sensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#double - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a double, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( string name , string& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute name into value. If the given local - name was not found, value is not modified. - - If an XMLErrorLog is passed in and required is true, missing - attributes are logged. - - @param name a string, the local name of the attribute. - @param value a string, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @note A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const - should be used to read a value for an attribute name with a prefix and - namespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( string name , bool& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute name into value. If the given local - name was not found or value could be interpreted as a boolean, value - is not modified. - - According to the W3C XML Schema, valid boolean values are: \'true\', - \'false\', \'1\', and \'0\' (case-insensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#boolean - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - - @param name a string, the local name of the attribute. - @param value a boolean, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @note A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should - be used to read a value for an attribute name with a prefix and - namespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( string name , int& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute name into value. If the given local - name was not found or value could be interpreted as an int, value is - not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, we - limit values to what can be stored in a int. For more information, - see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param name a string, the local name of the attribute. - @param value an integer, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @note A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should - be used to read a value for an attribute name with a prefix and - namespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( XMLTriple triple , bool& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute with the given XMLTriple into value. - If the XMLTriple was not found or value could be interpreted as a boolean, - value is not modified. - - According to the W3C XML Schema, valid boolean values are: \'true\', - \'false\', \'1\', and \'0\' (case-insensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#boolean - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a boolean, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( string name , double& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute name into value. If the given local - name was not found or value could be interpreted as a double, value is - not modified. - - According to the W3C XML Schema, valid doubles are the same as valid - doubles for C and the special values \'INF\', \'-INF\', and \'NaN\' - (case-sensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#double - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param name a string, the local name of the attribute. - @param value a double, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @note A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const - should be used to read a value for an attribute name with a prefix and - namespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( string name , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute name into value. If the given local - name was not found or value could be interpreted as an long, value is - not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, we - limit values to what can be stored in a long. For more information, - see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param name a string, the local name of the attribute. - @param value a long, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @note A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should - be used to read a value for an attribute name with a prefix and - namespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( string name , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute name into value. If the given local - name was not found or value could be interpreted as a long integer, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, we - limit values to what can be stored in a long. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param name a string, the local name of the attribute. - @param value a long integereger, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @note A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a value for an attribute name with a - prefix and namespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( XMLTriple triple , int& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute with the given XMLTriple into value. - If the XMLTriple was not found or value could be interpreted as an int, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, we - limit values to what can be stored in a int. For more information, - see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value an integer, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>readInto( XMLTriple triple , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> - - Reads the value for the attribute with the given XMLTriple into value. - If the XMLTriple was not found or value could be interpreted as a long integer, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, we - limit values to what can be stored in a long. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a long integereger, the value of the attribute. - @param log an XMLErrorLog, the error log. - @param required a boolean, indicating whether the attribute is required. - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. - - @returns @c True if the attribute was read into value, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLAttributes::write " - @internal - Writes this XMLAttributes set to stream. - - @param stream XMLOutputStream, stream to which this XMLAttributes - set is to be written. -"; - - -%feature("docstring") XMLAttributes::setErrorLog " - @internal - (Optional) Sets the log used when logging attributeTypeError() and - attributeRequired() errors. - - @param log the log to use - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") XMLAttributes::attributeTypeError " - @internal - Logs an attribute datatype error. - - @param name name of the attribute - @param type the datatype of the attribute value. - @param log the XMLErrorLog where the error should be logged - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. -"; - - -%feature("docstring") XMLAttributes::attributeRequiredError " - @internal - Logs an error indicating a required attribute was missing. - Used internally. - - @param name name of the attribute - @param log the XMLErrorLog where the error should be logged - @param line a long integer, the line number at which the error occured. - @param column a long integer, the column number at which the error occured. -"; - - -%feature("docstring") XMLConstructorException " - @ingroup Core - Class of exceptions thrown by constructors of some libSBML objects. - - @htmlinclude not-sbml-warning.html - - In some situations, constructors for SBML objects may need to indicate - to callers that the creation of the object failed. The failure may be - for different reasons, such as an attempt to use invalid parameters or a - system condition such as a memory error. To communicate this to - callers, those classes will throw an XMLConstructorException. @if cpp - Callers can use the standard C++ <code>std::exception</code> method - <code>what()</code> to extract the diagnostic message stored with the - exception.@endif@~ - <p> - In languages that don\'t have an exception mechanism (e.g., C), the - constructors generally try to return an error code instead of throwing - an exception. - - @see SBMLConstructorException -"; - - -%feature("docstring") XMLNamespaces " - @ingroup Core - Representation of XML Namespaces. - - @htmlinclude not-sbml-warning.html - - This class serves to organize functionality for tracking XML namespaces - in a document or data stream. The namespace declarations are stored as - a list of pairs of XML namespace URIs and prefix strings. These - correspond to the parts of a namespace declaration on an XML element. - For example, in the following XML fragment, - @verbatim - <annotation> - <mysim:nodecolors xmlns:mysim=\'urn:lsid:mysim.org\' - mysim:bgcolor=\'green\' mysim:fgcolor=\'white\'/> - </annotation> - @endverbatim - there is one namespace declaration. Its URI is - <code>urn:lsid:mysim.org</code> and its prefix is <code>mysim</code>. - This pair could be stored as one item in an XMLNamespaces list. - - XMLNamespaces provides various methods for manipulating the list of - prefix-URI pairs. Individual namespaces stored in a given XMLNamespace - object instance can be retrieved based on their index using - XMLNamespaces.getPrefix(), or by their characteristics such as - their URI or position in the list. -"; - - -%feature("docstring") XMLNamespaces::XMLNamespaces " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNamespaces()</pre> - - Creates a new empty list of XML namespace declarations. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNamespaces(XMLNamespaces orig)</pre> - - Copy constructor; creates a copy of this XMLNamespaces list. - - @param orig the XMLNamespaces object to copy - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") XMLNamespaces::clone " - Creates and returns a deep copy of this XMLNamespaces list. - - @return a (deep) copy of this XMLNamespaces list. -"; - - -%feature("docstring") XMLNamespaces::add " - Appends an XML namespace prefix and URI pair to this list of namespace - declarations. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. If there is an XML namespace with the given @p uri prefix - in this list, then its corresponding URI will be overwritten by the - new @p uri unless the uri represents the core sbml namespace. - Calling programs could use one of the other XMLNamespaces - methods, such as - XMLNamespaces.hasPrefix() and - XMLNamespaces.hasURI() to - inquire whether a given prefix and/or URI - is already present in this XMLNamespaces object. - If the @p uri represents the sbml namespaces then it will not be - overwritten, as this has potentially serious consequences. If it - is necessary to replace the sbml namespace the namespace should be removed - prior to adding the new namespace. - - @param uri a string, the uri for the namespace - @param prefix a string, the prefix for the namespace - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLNamespaces::remove " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>remove(int index)</pre> - - Removes an XML Namespace stored in the given position of this list. - - @param index an integer, position of the namespace to remove. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>remove(string prefix)</pre> - - Removes an XML Namespace with the given prefix. - - @param prefix a string, prefix of the required namespace. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - @see remove() -"; - - -%feature("docstring") XMLNamespaces::clear " - Clears (deletes) all XML namespace declarations in this XMLNamespaces - object. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink - - @see remove() -"; - - -%feature("docstring") XMLNamespaces::getIndex " - Look up the index of an XML namespace declaration by URI. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. If this XMLNamespaces object contains a pair with the given - URI @p uri, this method returns its index in the list. - - @param uri a string, the URI of the sought-after namespace. - - @return the index of the given declaration, or <code>-1</code> if not - present. -"; - - -%feature("docstring") XMLNamespaces::containsUri " - Tests whether the given uri is contained in this set of namespaces. -"; - - -%feature("docstring") XMLNamespaces::getIndexByPrefix " - Look up the index of an XML namespace declaration by prefix. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. If this XMLNamespaces object contains a pair with the given - prefix @p prefix, this method returns its index in the list. - - @param prefix a string, the prefix string of the sought-after - namespace - - @return the index of the given declaration, or <code>-1</code> if not - present. -"; - - -%feature("docstring") XMLNamespaces::getLength " - Returns the total number of URI-and-prefix pairs stored in this - particular XMLNamespaces instance. - - @return the number of namespaces in this list. -"; - - -%feature("docstring") XMLNamespaces::getNumNamespaces " - Returns the total number of URI-and-prefix pairs stored in this - particular XMLNamespaces instance. - - @return the number of namespaces in this list. - - This function is an alias for getLength introduced for consistency - with other XML classes. -"; - - -%feature("docstring") XMLNamespaces::getPrefix " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getPrefix(int index)</pre> - - Look up the prefix of an XML namespace declaration by its position. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. This method returns the prefix of the <code>n</code>th - element in that list (if it exists). Callers should use - XMLAttributes.getLength() first to find out how many namespaces are - stored in the list. - - @param index an integer, position of the sought-after prefix - - @return the prefix of an XML namespace declaration in this list (by - position), or an empty string if the @p index is out of range - - @see getLength() - - - <hr> - Method variant with the following signature: - <pre class='signature'>getPrefix(string uri)</pre> - - Look up the prefix of an XML namespace declaration by its URI. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. This method returns the prefix for a pair that has the - given @p uri. - - @param uri a string, the URI of the prefix being sought - - @return the prefix of an XML namespace declaration given its URI, or - an empty string if no such @p uri exists in this XMLNamespaces object -"; - - -%feature("docstring") XMLNamespaces::getURI " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getURI(int index)</pre> - - Look up the URI of an XML namespace declaration by its position. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. This method returns the URI of the <code>n</code>th element - in that list (if it exists). Callers should use - XMLAttributes.getLength() first to find out how many namespaces are - stored in the list. - - @param index an integer, position of the required URI. - - @return the URI of an XML namespace declaration in this list (by - position), or an empty string if the @p index is out of range. - - @see getLength() - - - <hr> - Method variant with the following signature: - <pre class='signature'>getURI(string prefix = \'\')</pre> - - Look up the URI of an XML namespace declaration by its prefix. - - An XMLNamespaces object stores a list of pairs of namespaces and their - prefixes. This method returns the namespace URI for a pair that has - the given @p prefix. - - @param prefix a string, the prefix of the required URI - - @return the URI of an XML namespace declaration having the given @p - prefix, or an empty string if no such prefix-and-URI pair exists - in this XMLNamespaces object - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - @see getURI() -"; - - -%feature("docstring") XMLNamespaces::isEmpty " - Predicate returning @c True or @c False depending on whether this - XMLNamespaces list is empty. - - @return @c True if this XMLNamespaces list is empty, @c False otherwise. -"; - - -%feature("docstring") XMLNamespaces::hasURI " - Predicate returning @c True or @c False depending on whether an XML - Namespace with the given URI is contained in this XMLNamespaces list. - - @param uri a string, the uri for the namespace - - @return @c True if an XML Namespace with the given URI is contained in - this XMLNamespaces list, @c False otherwise. -"; - - -%feature("docstring") XMLNamespaces::hasPrefix " - Predicate returning @c True or @c False depending on whether an XML - Namespace with the given prefix is contained in this XMLNamespaces - list. - - @param prefix a string, the prefix for the namespace - - @return @c True if an XML Namespace with the given URI is contained in - this XMLNamespaces list, @c False otherwise. -"; - - -%feature("docstring") XMLNamespaces::hasNS " - Predicate returning @c True or @c False depending on whether an XML - Namespace with the given URI and prefix pair is contained in this - XMLNamespaces list. - - @param uri a string, the URI for the namespace - @param prefix a string, the prefix for the namespace - - @return @c True if an XML Namespace with the given uri/prefix pair is - contained in this XMLNamespaces list, @c False otherwise. -"; - - -%feature("docstring") XMLNamespaces::removeDefault " - @internal - Removes the default XML namespace. -"; - - -%feature("docstring") XMLNamespaces::containIdenticalSetNS " - @internal - Removes the default XML namespace. -"; - - -%feature("docstring") XMLToken " - @ingroup Core - Representation of a token in an XML stream. - - @htmlinclude not-sbml-warning.html -"; - - -%feature("docstring") XMLToken::XMLToken " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLToken()</pre> - - Creates a new empty XMLToken. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLToken(XMLToken orig)</pre> - - Copy constructor; creates a copy of this XMLToken. - - @param orig the XMLToken object to copy. - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLToken( XMLTriple triple , XMLAttributes attributes , const long line = 0 , const long column = 0 )</pre> - - Creates a start element XMLToken with the given set of attributes. - - @param triple XMLTriple. - @param attributes XMLAttributes, the attributes to set. - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLToken( XMLTriple triple , const long line = 0 , const long column = 0 )</pre> - - Creates an end element XMLToken. - - @param triple XMLTriple. - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLToken( XMLTriple triple , XMLAttributes attributes , XMLNamespaces namespaces , const long line = 0 , const long column = 0 )</pre> - - Creates a start element XMLToken with the given set of attributes and - namespace declarations. - - @param triple XMLTriple. - @param attributes XMLAttributes, the attributes to set. - @param namespaces XMLNamespaces, the namespaces to set. - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLToken( string chars , const long line = 0 , const long column = 0 )</pre> - - Creates a text XMLToken. - - @param chars a string, the text to be added to the XMLToken - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::clone " - Creates and returns a deep copy of this XMLToken. - - @return a (deep) copy of this XMLToken set. -"; - - -%feature("docstring") XMLToken::getAttributes " - Returns the attributes of this element. - - @return the XMLAttributes of this XML element. -"; - - -%feature("docstring") XMLToken::setAttributes " - Sets an XMLAttributes to this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @param attributes XMLAttributes to be set to this XMLToken. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note This function replaces the existing XMLAttributes with the new one. -"; - - -%feature("docstring") XMLToken::addAttr " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>addAttr( XMLTriple triple, string value)</pre> - - Adds an attribute with the given XMLTriple/value pair to the attribute set - in this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @note if local name with the same namespace URI already exists in the - attribute set, its value and prefix will be replaced. - - @param triple an XMLTriple, the XML triple of the attribute. - @param value a string, the value of the attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>addAttr( string name , string value , string namespaceURI = \'\' , string prefix = \'\')</pre> - - Adds an attribute to the attribute set in this XMLToken optionally - with a prefix and URI defining a namespace. - Nothing will be done if this XMLToken is not a start element. - - @param name a string, the local name of the attribute. - @param value a string, the value of the attribute. - @param namespaceURI a string, the namespace URI of the attribute. - @param prefix a string, the prefix of the namespace - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - - @note if local name with the same namespace URI already exists in the - attribute set, its value and prefix will be replaced. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::removeAttr " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>removeAttr(XMLTriple triple)</pre> - - Removes an attribute with the given XMLTriple from the attribute set - in this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @param triple an XMLTriple, the XML triple of the attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>removeAttr(int n)</pre> - - Removes an attribute with the given index from the attribute set in - this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @param n an integer the index of the resource to be deleted - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>removeAttr(string name, string uri = \'\')</pre> - - Removes an attribute with the given local name and namespace URI from - the attribute set in this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @param name a string, the local name of the attribute. - @param uri a string, the namespace URI of the attribute. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") XMLToken::clearAttributes " - Clears (deletes) all attributes in this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink -"; - - -%feature("docstring") XMLToken::getAttrIndex " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getAttrIndex(XMLTriple triple)</pre> - - Return the index of an attribute with the given XMLTriple. - - @param triple an XMLTriple, the XML triple of the attribute for which - the index is required. - - @return the index of an attribute with the given XMLTriple, or <code>-1</code> if not present. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getAttrIndex(string name, string uri=\'\')</pre> - - Return the index of an attribute with the given local name and namespace URI. - - @param name a string, the local name of the attribute. - @param uri a string, the namespace URI of the attribute. - - @return the index of an attribute with the given local name and namespace URI, - or <code>-1</code> if not present. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::getAttributesLength " - Return the number of attributes in the attributes set. - - @return the number of attributes in the attributes set in this XMLToken. -"; - - -%feature("docstring") XMLToken::getAttrName " - Return the local name of an attribute in the attributes set in this - XMLToken (by position). - - @param index an integer, the position of the attribute whose local name - is required. - - @return the local name of an attribute in this list (by position). - - @note If index - is out of range, an empty string will be returned. Use - XMLToken.hasAttr() - to test for the attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrPrefix " - Return the prefix of an attribute in the attribute set in this - XMLToken (by position). - - @param index an integer, the position of the attribute whose prefix is - required. - - @return the namespace prefix of an attribute in the attribute set - (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test - for the attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrPrefixedName " - Return the prefixed name of an attribute in the attribute set in this - XMLToken (by position). - - @param index an integer, the position of the attribute whose prefixed - name is required. - - @return the prefixed name of an attribute in the attribute set - (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test - for attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrURI " - Return the namespace URI of an attribute in the attribute set in this - XMLToken (by position). - - @param index an integer, the position of the attribute whose namespace - URI is required. - - @return the namespace URI of an attribute in the attribute set (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test - for attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrValue " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getAttrValue(XMLTriple triple)</pre> - - Return a value of an attribute with the given XMLTriple. - - @param triple an XMLTriple, the XML triple of the attribute whose - value is required. - - @return The attribute value as a string. - - @note If an attribute with the - given XMLTriple does not exist, an empty string will be returned. - Use XMLToken.hasAttr() - to test for attribute existence. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getAttrValue(int index)</pre> - - Return the value of an attribute in the attribute set in this XMLToken - (by position). - - @param index an integer, the position of the attribute whose value is - required. - - @return the value of an attribute in the attribute set (by position). - - @note If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test - for attribute existence. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getAttrValue(string name, string uri=\'\')</pre> - - Return a value of an attribute with the given local name and namespace URI. - - @param name a string, the local name of the attribute whose value is required. - @param uri a string, the namespace URI of the attribute. - - @return The attribute value as a string. - - @note If an attribute with the - given local name and namespace URI does not exist, an empty string will be - returned. - Use XMLToken.hasAttr() - to test for attribute existence. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::hasAttr " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>hasAttr(XMLTriple triple)</pre> - - Predicate returning @c True or @c False depending on whether - an attribute with the given XML triple exists in the attribute set in - this XMLToken - - @param triple an XMLTriple, the XML triple of the attribute - - @return @c True if an attribute with the given XML triple exists - in the attribute set in this XMLToken, @c False otherwise. - - - - <hr> - Method variant with the following signature: - <pre class='signature'>hasAttr(int index)</pre> - - Predicate returning @c True or @c False depending on whether - an attribute with the given index exists in the attribute set in this - XMLToken. - - @param index an integer, the position of the attribute. - - @return @c True if an attribute with the given index exists in the attribute - set in this XMLToken, @c False otherwise. - - - <hr> - Method variant with the following signature: - <pre class='signature'>hasAttr(string name, string uri=\'\')</pre> - - Predicate returning @c True or @c False depending on whether - an attribute with the given local name and namespace URI exists - in the attribute set in this XMLToken. - - @param name a string, the local name of the attribute. - @param uri a string, the namespace URI of the attribute. - - @return @c True if an attribute with the given local name and namespace - URI exists in the attribute set in this XMLToken, @c False otherwise. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::isAttributesEmpty " - Predicate returning @c True or @c False depending on whether - the attribute set in this XMLToken set is empty. - - @return @c True if the attribute set in this XMLToken is empty, - @c False otherwise. -"; - - -%feature("docstring") XMLToken::getNamespaces " - Returns the XML namespace declarations for this XML element. - - @return the XML namespace declarations for this XML element. -"; - - -%feature("docstring") XMLToken::setNamespaces " - Sets an XMLnamespaces to this XML element. - Nothing will be done if this XMLToken is not a start element. - - @param namespaces XMLNamespaces to be set to this XMLToken. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - - @note This function replaces the existing XMLNamespaces with the new one. -"; - - -%feature("docstring") XMLToken::addNamespace " - Appends an XML namespace prefix and URI pair to this XMLToken. - If there is an XML namespace with the given prefix in this XMLToken, - then the existing XML namespace will be overwritten by the new one. - - Nothing will be done if this XMLToken is not a start element. - - @param uri a string, the uri for the namespace - @param prefix a string, the prefix for the namespace - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::removeNamespace " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>removeNamespace(int index)</pre> - - Removes an XML Namespace stored in the given position of the XMLNamespaces - of this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @param index an integer, position of the removed namespace. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink - - - <hr> - Method variant with the following signature: - <pre class='signature'>removeNamespace(string prefix)</pre> - - Removes an XML Namespace with the given prefix. - Nothing will be done if this XMLToken is not a start element. - - @param prefix a string, prefix of the required namespace. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink -"; - - -%feature("docstring") XMLToken::clearNamespaces " - Clears (deletes) all XML namespace declarations in the XMLNamespaces of - this XMLToken. - Nothing will be done if this XMLToken is not a start element. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink -"; - - -%feature("docstring") XMLToken::getNamespaceIndex " - Look up the index of an XML namespace declaration by URI. - - @param uri a string, uri of the required namespace. - - @return the index of the given declaration, or <code>-1</code> if not present. -"; - - -%feature("docstring") XMLToken::getNamespaceIndexByPrefix " - Look up the index of an XML namespace declaration by prefix. - - @param prefix a string, prefix of the required namespace. - - @return the index of the given declaration, or <code>-1</code> if not present. -"; - - -%feature("docstring") XMLToken::getNamespacesLength " - Returns the number of XML namespaces stored in the XMLNamespaces - of this XMLToken. - - @return the number of namespaces in this list. -"; - - -%feature("docstring") XMLToken::getNamespacePrefix " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getNamespacePrefix(int index)</pre> - - Look up the prefix of an XML namespace declaration by position. - - Callers should use getNamespacesLength() to find out how many - namespaces are stored in the XMLNamespaces. - - @param index an integer, position of the required prefix. - - @return the prefix of an XML namespace declaration in the XMLNamespaces - (by position). - - @note If index is out of range, an empty string will be - returned. - - @see getNamespacesLength() - - - <hr> - Method variant with the following signature: - <pre class='signature'>getNamespacePrefix(string uri)</pre> - - Look up the prefix of an XML namespace declaration by its URI. - - @param uri a string, the URI of the prefix being sought - - @return the prefix of an XML namespace declaration given its URI. - - @note If @p uri does not exist, an empty string will be returned. -"; - - -%feature("docstring") XMLToken::getNamespaceURI " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getNamespaceURI(int index)</pre> - - Look up the URI of an XML namespace declaration by its position. - - @param index an integer, position of the required URI. - - @return the URI of an XML namespace declaration in the XMLNamespaces - (by position). - - @note If @p index is out of range, an empty string will be - returned. - - @see getNamespacesLength() - - - <hr> - Method variant with the following signature: - <pre class='signature'>getNamespaceURI(string prefix = \'\')</pre> - - Look up the URI of an XML namespace declaration by its prefix. - - @param prefix a string, the prefix of the required URI - - @return the URI of an XML namespace declaration given its prefix. - - @note If @p prefix does not exist, an empty string will be returned. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLToken::isNamespacesEmpty " - Predicate returning @c True or @c False depending on whether - the XMLNamespaces of this XMLToken is empty. - - @return @c True if the XMLNamespaces of this XMLToken is empty, - @c False otherwise. -"; - - -%feature("docstring") XMLToken::hasNamespaceURI " - Predicate returning @c True or @c False depending on whether - an XML Namespace with the given URI is contained in the XMLNamespaces of - this XMLToken. - - @param uri a string, the uri for the namespace - - @return @c True if an XML Namespace with the given URI is contained in the - XMLNamespaces of this XMLToken, @c False otherwise. -"; - - -%feature("docstring") XMLToken::hasNamespacePrefix " - Predicate returning @c True or @c False depending on whether - an XML Namespace with the given prefix is contained in the XMLNamespaces of - this XMLToken. - - @param prefix a string, the prefix for the namespace - - @return @c True if an XML Namespace with the given URI is contained in the - XMLNamespaces of this XMLToken, @c False otherwise. -"; - - -%feature("docstring") XMLToken::hasNamespaceNS " - Predicate returning @c True or @c False depending on whether - an XML Namespace with the given uri/prefix pair is contained in the - XMLNamespaces ofthis XMLToken. - - @param uri a string, the uri for the namespace - @param prefix a string, the prefix for the namespace - - @return @c True if an XML Namespace with the given uri/prefix pair is - contained in the XMLNamespaces of this XMLToken, @c False otherwise. -"; - - -%feature("docstring") XMLToken::setTriple " - Sets the XMLTripe (name, uri and prefix) of this XML element. - Nothing will be done if this XML element is a text node. - - @param triple XMLTriple to be added to this XML element. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") XMLToken::getName " - Returns the (unqualified) name of this XML element. - - @return the (unqualified) name of this XML element. -"; - - -%feature("docstring") XMLToken::getPrefix " - Returns the namespace prefix of this XML element. - - @return the namespace prefix of this XML element. - - @note If no prefix - exists, an empty string will be return. -"; - - -%feature("docstring") XMLToken::getURI " - Returns the namespace URI of this XML element. - - @return the namespace URI of this XML element. -"; - - -%feature("docstring") XMLToken::getCharacters " - Returns the text of this element. - - @return the characters of this XML text. -"; - - -%feature("docstring") XMLToken::append " - Appends characters to this XML text content. - - @param chars string, characters to append - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink -"; - - -%feature("docstring") XMLToken::getColumn " - Returns the column at which this XMLToken occurred in the input - document or data stream. - - @return the column at which this XMLToken occurred. -"; - - -%feature("docstring") XMLToken::getLine " - Returns the line at which this XMLToken occurred in the input document - or data stream. - - @return the line at which this XMLToken occurred. -"; - - -%feature("docstring") XMLToken::isElement " - Predicate returning @c True or @c False depending on whether - this XMLToken is an XML element. - - @return @c True if this XMLToken is an XML element, @c False otherwise. -"; - - -%feature("docstring") XMLToken::isEnd " - Predicate returning @c True or @c False depending on whether - this XMLToken is an XML end element. - - @return @c True if this XMLToken is an XML end element, @c False otherwise. -"; - - -%feature("docstring") XMLToken::isEndFor " - Predicate returning @c True or @c False depending on whether - this XMLToken is an XML end element for the given start element. - - @param element XMLToken, element for which query is made. - - @return @c True if this XMLToken is an XML end element for the given - XMLToken start element, @c False otherwise. -"; - - -%feature("docstring") XMLToken::isEOF " - Predicate returning @c True or @c False depending on whether - this XMLToken is an end of file marker. - - @return @c True if this XMLToken is an end of file (input) marker, @c False - otherwise. -"; - - -%feature("docstring") XMLToken::isStart " - Predicate returning @c True or @c False depending on whether - this XMLToken is an XML start element. - - @return @c True if this XMLToken is an XML start element, @c False otherwise. -"; - - -%feature("docstring") XMLToken::isText " - Predicate returning @c True or @c False depending on whether - this XMLToken is an XML text element. - - @return @c True if this XMLToken is an XML text element, @c False otherwise. -"; - - -%feature("docstring") XMLToken::setEnd " - Declares this XML start element is also an end element. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink -"; - - -%feature("docstring") XMLToken::setEOF " - Declares this XMLToken is an end-of-file (input) marker. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink -"; - - -%feature("docstring") XMLToken::unsetEnd " - Declares this XML start/end element is no longer an end element. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink -"; - - -%feature("docstring") XMLToken::write " - @internal - Writes this XMLToken to stream. - - @param stream XMLOutputStream, stream to which this XMLToken - is to be written. -"; - - -%feature("docstring") XMLToken::toString " - Prints a string representation of the underlying token stream, for - debugging purposes. -"; - - -%feature("docstring") XMLNode " - @ingroup Core - Representation of a node in an XML document tree. - - Beginning with version 3.0.0, libSBML implements an XML abstraction - layer. This layer presents a uniform XML interface to calling programs - regardless of which underlying XML parser libSBML has actually been - configured to use. The basic data object in the XML abstraction is a - @em node, represented by XMLNode. - - An XMLNode can contain any number of children. Each child is another - XMLNode, thereby forming a tree. The methods XMLNode.getNumChildren() - and XMLNode.getChild() can be used to access the tree - structure starting from a given node. - - Each XMLNode is subclassed from XMLToken, and thus has the same methods - available as XMLToken. These methods include XMLToken.getNamespaces(), - XMLToken.getPrefix(), XMLToken.getName(), XMLToken.getURI(), and - XMLToken.getAttributes(). - - @section xmlnode-str2xmlnode Conversion between an XML string and an XMLNode - - LibSBML provides the following utility functions for converting an XML - string (e.g., <code><annotation>...</annotation></code>) - to/from an XMLNode object. - <ul> - <li> XMLNode.toXMLString() returns a string representation of the XMLNode object. - - <li> XMLNode.convertXMLNodeToString() - (static function) returns a string representation - of the given XMLNode object. - - <li> XMLNode.convertStringToXMLNode() - (static function) returns an XMLNode object converted - from the given XML string. - </ul> - - The returned XMLNode object by XMLNode.convertStringToXMLNode() - is a dummy root (container) XMLNode if the given XML string has two or - more top-level elements (e.g., - "<code><p>...</p><p>...</p></code>"). In the - dummy root node, each top-level element in the given XML string is - contained as a child XMLNode. XMLToken.isEOF() can be used to identify - if the returned XMLNode object is a dummy node or not. Here is an - example: @if clike - @verbatim - // Checks if the XMLNode object returned by XMLNode.convertStringToXMLNode() is a dummy root node: - - string str = \'...\'; - XMLNode xn = XMLNode.convertStringToXMLNode(); - if ( xn == None ) - { - // returned value is null (error) - ... - } - else if ( xn->isEOF() ) - { - // root node is a dummy node - for ( int i = 0; i < xn->getNumChildren(); i++ ) - { - // access to each child node of the dummy node. - XMLNode xnChild = xn->getChild(i); - ... - } - } - else - { - // root node is NOT a dummy node - ... - } - @endverbatim - @endif@if java - @verbatim - // Checks if the returned XMLNode object is a dummy root node: - - String str = \'...\'; - XMLNode xn = XMLNode.convertStringToXMLNode(str); - if ( xn == null ) - { - // returned value is null (error) - ... - } - else if ( xn.isEOF() ) - { - // root node is a dummy node - for ( int i = 0; i < xn.getNumChildren(); i++ ) - { - // access to each child node of the dummy node. - XMLNode xnChild = xn.getChild(i); - ... - } - } - else - { - // root node is NOT a dummy node - ... - } - @endverbatim - @endif@if python - @verbatim - xn = XMLNode.convertStringToXMLNode(\'<p></p>\') - if xn == None: - # Do something to handle exceptional situation. - - elif xn.isEOF(): - # Node is a dummy node. - - else: - # None is not a dummy node. - @endverbatim - @endif@~ -"; - - -%feature("docstring") XMLNode::XMLNode " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode(XMLToken token)</pre> - - Creates a new XMLNode by copying token. - - @param token XMLToken to be copied to XMLNode - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode( XMLTriple triple , XMLAttributes attributes , XMLNamespaces namespaces , const long line = 0 , const long column = 0 )</pre> - - Creates a new start element XMLNode with the given set of attributes and - namespace declarations. - - @param triple XMLTriple. - @param attributes XMLAttributes, the attributes to set. - @param namespaces XMLNamespaces, the namespaces to set. - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode(XMLNode orig)</pre> - - Copy constructor; creates a copy of this XMLNode. - - @param orig the XMLNode instance to copy. - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode()</pre> - - Creates a new empty XMLNode with no children. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode( XMLTriple triple , XMLAttributes attributes , const long line = 0 , const long column = 0 )</pre> - - Creates a start element XMLNode with the given set of attributes. - - @param triple XMLTriple. - @param attributes XMLAttributes, the attributes to set. - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode( XMLTriple triple , const long line = 0 , const long column = 0 )</pre> - - Creates an end element XMLNode. - - @param triple XMLTriple. - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLNode( string chars , const long line = 0 , const long column = 0 )</pre> - - Creates a text XMLNode. - - @param chars a string, the text to be added to the XMLToken - @param line a long integer, the line number (default = 0). - @param column a long integer, the column number (default = 0). - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLNode::clone " - Creates and returns a deep copy of this XMLNode. - - @return a (deep) copy of this XMLNode. -"; - - -%feature("docstring") XMLNode::addChild " - Adds a copy of @p node as a child of this XMLNode. - - The given @p node is added at the end of the list of children. - - @param node the XMLNode to be added as child. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink - - @note The given node is added at the end of the children list. -"; - - -%feature("docstring") XMLNode::insertChild " - Inserts a copy of the given node as the <code>n</code>th child of this - XMLNode. - - If the given index @p n is out of range for this XMLNode instance, - the @p node is added at the end of the list of children. Even in - that situation, this method does not throw an error. - - @param n an integer, the index at which the given node is inserted - @param node an XMLNode to be inserted as <code>n</code>th child. - - @return a reference to the newly-inserted child @p node -"; - - -%feature("docstring") XMLNode::removeChild " - Removes the <code>n</code>th child of this XMLNode and returns the - removed node. - - It is important to keep in mind that a given XMLNode may have more - than one child. Calling this method erases all existing references to - child nodes @em after the given position @p n. If the index @p n is - greater than the number of child nodes in this XMLNode, this method - takes no action (and returns @c None). - - @param n an integer, the index of the node to be removed - - @return the removed child, or @c None if @p n is greater than the number - of children in this node - - @note The caller owns the returned node and is responsible for deleting it. -"; - - -%feature("docstring") XMLNode::removeChildren " - Removes all children from this node. - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") XMLNode::getChild " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getChild(long n)</pre> - - Returns the <code>n</code>th child of this XMLNode. - - If the index @p n is greater than the number of child nodes, or it is - 0 or less, this method returns an empty node. - - @param n an integer, the index of the node to return - - @return the <code>n</code>th child of this XMLNode. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getChild(string name)</pre> - - Returns the first child of this XMLNode with the corresponding name. - - If no child with corrsponding name can be found, - this method returns an empty node. - - @param name the name of the node to return - - @return the first child of this XMLNode with given name. -"; - - -%feature("docstring") XMLNode::getIndex " - Return the index of the first child of this XMLNode with the given name. - - @param name a string, the name of the child for which the - index is required. - - @return the index of the first child of this XMLNode with the given - name, or -1 if not present. -"; - - -%feature("docstring") XMLNode::hasChild " - Return a boolean indicating whether this XMLNode has a child with the - given name. - - @param name a string, the name of the child to be checked. - - @return boolean indicating whether this XMLNode has a child with the - given name. -"; - - -%feature("docstring") XMLNode::equals " - Compare this XMLNode against another XMLNode returning true if both - nodes represent the same XML tree, or false otherwise. - - @param other another XMLNode to compare against. - - @param ignoreURI whether to ignore the namespace URI when doing the - comparison. - - @return boolean indicating whether this XMLNode represents the same XML - tree as another. -"; - - -%feature("docstring") XMLNode::getNumChildren " - Returns the number of children for this XMLNode. - - @return the number of children for this XMLNode. -"; - - -%feature("docstring") XMLNode::write " - @internal - Writes this XMLNode and its children to stream. - - @param stream XMLOutputStream, stream to which this XMLNode - is to be written. -"; - - -%feature("docstring") XMLNode::toXMLString " - Returns a string representation of this XMLNode. - - @return a string derived from this XMLNode. -"; - - -%feature("docstring") XMLNode::convertXMLNodeToString " - Returns a string representation of a given XMLNode. - - @param node the XMLNode to be represented as a string - - @return a string-form representation of @p node -"; - - -%feature("docstring") XMLNode::convertStringToXMLNode " - Returns an XMLNode which is derived from a string containing XML - content. - - The XML namespace must be defined using argument @p xmlns if the - corresponding XML namespace attribute is not part of the string of the - first argument. - - @param xmlstr string to be converted to a XML node. - @param xmlns XMLNamespaces the namespaces to set (default value is @c None). - - @note The caller owns the returned XMLNode and is reponsible for - deleting it. The returned XMLNode object is a dummy root (container) - XMLNode if the top-level element in the given XML string is NOT - <code><html></code>, <code><body></code>, - <code><annotation></code>, or <code><notes></code>. In - the dummy root node, each top-level element in the given XML string is - contained as a child XMLNode. XMLToken.isEOF() can be used to - identify if the returned XMLNode object is a dummy node. - - @return a XMLNode which is converted from string @p xmlstr. If the - conversion failed, this method returns @c None. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLTriple " - @ingroup Core - Representation of a qualified XML name. - - @htmlinclude not-sbml-warning.html - - A \'triple\' in the libSBML XML layer encapsulates the notion of qualified - name, meaning an element name or an attribute name with an optional - namespace qualifier. An XMLTriple instance carries up to three data items: - - <ul> - - <li> The name of the attribute or element; that is, the attribute name - as it appears in an XML document or data stream; - - <li> The XML namespace prefix (if any) of the attribute. For example, - in the following fragment of XML, the namespace prefix is the string - <code>mysim</code> and it appears on both the element - <code>someelement</code> and the attribute <code>attribA</code>. When - both the element and the attribute are stored as XMLTriple objects, - their <i>prefix</i> is <code>mysim</code>. - @verbatim - <mysim:someelement mysim:attribA=\'value\' /> - @endverbatim - - <li> The XML namespace URI with which the prefix is associated. In - XML, every namespace used must be declared and mapped to a URI. - - </ul> - - XMLTriple objects are the lowest-level data item in the XML layer - of libSBML. Other objects such as XMLToken make use of XMLTriple - objects. -"; - - -%feature("docstring") XMLTriple::XMLTriple " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLTriple( string name , string uri , string prefix )</pre> - - Creates a new XMLTriple with the given @p name, @p uri and and @p - prefix. - - @param name a string, name for the XMLTriple. - @param uri a string, URI of the XMLTriple. - @param prefix a string, prefix for the URI of the XMLTriple, - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLTriple(string triplet, const char sepchar = \' \')</pre> - - Creates a new XMLTriple by splitting the given @p triplet on the - separator character @p sepchar. - - Triplet may be in one of the following formats: - <ul> - <li> name - <li> URI sepchar name - <li> URI sepchar name sepchar prefix - </ul> - @param triplet a string representing the triplet as above - @param sepchar a character, the sepchar used in the triplet - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLTriple()</pre> - - Creates a new, empty XMLTriple. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLTriple(XMLTriple orig)</pre> - - Copy constructor; creates a copy of this XMLTriple set. - - @param orig the XMLTriple object to copy. - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") XMLTriple::clone " - Creates and returns a deep copy of this XMLTriple set. - - @return a (deep) copy of this XMLTriple set. -"; - - -%feature("docstring") XMLTriple::getName " - Returns the @em name portion of this XMLTriple. - - @return a string, the name from this XMLTriple. -"; - - -%feature("docstring") XMLTriple::getPrefix " - Returns the @em prefix portion of this XMLTriple. - - @return a string, the @em prefix portion of this XMLTriple. -"; - - -%feature("docstring") XMLTriple::getURI " - Returns the @em URI portion of this XMLTriple. - - @return URI a string, the @em prefix portion of this XMLTriple. -"; - - -%feature("docstring") XMLTriple::getPrefixedName " - Returns the prefixed name from this XMLTriple. - - @return a string, the prefixed name from this XMLTriple. -"; - - -%feature("docstring") XMLTriple::isEmpty " - Predicate returning @c True or @c False depending on whether - this XMLTriple is empty. - - @return @c True if this XMLTriple is empty, @c False otherwise. -"; - - -%feature("docstring") XMLOutputStream " - @ingroup Core - - @if notclike @internal @endif@~ -"; - - -%feature("docstring") XMLOutputStream::endElement " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>endElement(XMLTriple triple)</pre> - - Writes the given XML end element \'prefix:name\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>endElement(string name, string prefix = \'\')</pre> - - Writes the given XML end element name to this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::setAutoIndent " - Turns automatic indentation on or off for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::startElement " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>startElement(XMLTriple triple)</pre> - - Writes the given XML start element \'prefix:name\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>startElement(string name, string prefix = \'\')</pre> - - Writes the given XML start element name to this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::startEndElement " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>startEndElement(XMLTriple triple)</pre> - - Writes the given XML start and end element \'prefix:name\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>startEndElement(string name, string prefix = \'\')</pre> - - Writes the given XML start and end element name to this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::writeAttribute " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, string value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string prefix, const double& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string prefix, string value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, const bool& value)</pre> - - Writes the given attribute, prefix:name=\'true\' or prefix:name=\'false\' - to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, const double& value)</pre> - - Writes the given attribute, name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, const long& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, const double& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, const long& value)</pre> - - Writes the given attribute, name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string value)</pre> - - Writes the given attribute, name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string value)</pre> - - Writes the given attribute, name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string prefix, const long& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string prefix, const long& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string prefix, const int& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, const long& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, const int& value)</pre> - - Writes the given attribute, name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, const int& value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, const bool& value)</pre> - - Writes the given attribute, name=\'true\' or name=\'false\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(XMLTriple triple, string value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this - XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, const long& value)</pre> - - Writes the given attribute, name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string prefix, string value)</pre> - - Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. - - - <hr> - Method variant with the following signature: - <pre class='signature'>writeAttribute(string name, string &prefix, const bool& value)</pre> - - Writes the given attribute, prefix:name=\'true\' or prefix:name=\'false\' to this - XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::writeXMLDecl " - Writes the XML declaration: - <?xml version=\'1.0\' encoding=\'...\'?> -"; - - -%feature("docstring") XMLOutputStream::writeComment " - Writes an XML comment: - <?xml version=\'1.0\' encoding=\'...\'?> -"; - - -%feature("docstring") XMLOutputStream::downIndent " - Decreases the indentation level for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::upIndent " - Increases the indentation level for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::getStringStream " - @internal - Increases the indentation level for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::writeChars " - @internal - Outputs the given characters to the underlying stream. -"; - - -%feature("docstring") XMLOutputStream::writeIndent " - @internal - Outputs indentation whitespace. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLOutputStream::setStringStream " - @internal - Outputs the int value in quotes. -"; - - -%feature("docstring") XMLOutputStream::unsetStringStream " - @internal - Outputs the int value in quotes. -"; - - -%feature("docstring") XMLOutputStringStream::XMLOutputStringStream " - @internal - Creates a new XMLOutputStream that wraps stream. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLOutputStringStream::getString " - @internal - Creates a new XMLOutputStream that wraps stream. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLOutputFileStream::XMLOutputFileStream " - @internal - Creates a new XMLOutputStream that wraps stream. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLInputStream " - @ingroup Core - - @if notclike @internal @endif@~ -"; - - -%feature("docstring") XMLInputStream::getEncoding " - @internal - @return the encoding of the XML stream. -"; - - -%feature("docstring") XMLInputStream::getVersion " - @internal - @return the version of the XML stream. -"; - - -%feature("docstring") XMLInputStream::getErrorLog " - @internal - @return an XMLErrorLog which can be used to log XML parse errors and - other validation errors (and messages). -"; - - -%feature("docstring") XMLInputStream::isEOF " - @internal - @return true if end of file (stream) has been reached, false - otherwise. -"; - - -%feature("docstring") XMLInputStream::isError " - @internal - @return true if a fatal error occurred while reading from this stream. -"; - - -%feature("docstring") XMLInputStream::isGood " - @internal - @return true if the stream is in a good state (i.e. isEOF() and - isError() are both false), false otherwise. -"; - - -%feature("docstring") XMLInputStream::next " - @internal - Consumes the next XMLToken and return it. - - @return the next XMLToken or EOF (XMLToken.isEOF() == true). -"; - - -%feature("docstring") XMLInputStream::peek " - @internal - Returns the next XMLToken without consuming it. A subsequent call to - either peek() or next() will return the same token. - - @return the next XMLToken or EOF (XMLToken.isEOF() == true). -"; - - -%feature("docstring") XMLInputStream::skipPastEnd " - @internal - Consume zero or more XMLTokens up to and including the corresponding - end XML element or EOF. -"; - - -%feature("docstring") XMLInputStream::skipText " - @internal - Consume zero or more XMLTokens up to but not including the next XML - element or EOF. -"; - - -%feature("docstring") XMLInputStream::setErrorLog " - @internal - Sets the XMLErrorLog this stream will use to log errors. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") XMLInputStream::toString " - @internal - Prints a string representation of the underlying token stream, for - debugging purposes. -"; - - -%feature("docstring") XMLInputStream::getSBMLNamespaces " - @internal - Prints a string representation of the underlying token stream, for - debugging purposes. -"; - - -%feature("docstring") XMLInputStream::setSBMLNamespaces " - @internal - Prints a string representation of the underlying token stream, for - debugging purposes. -"; - - -%feature("docstring") XMLInputStream::queueToken " - @internal - Runs mParser until mTokenizer is ready to deliver at least one - XMLToken or a fatal error occurs. -"; - - -%feature("docstring") XMLError " - @ingroup Core - Representation of errors, warnings and other diagnostics - - @htmlinclude not-sbml-warning.html - - LibSBML can be configured to use any of a number of XML parsers; at the - time of this writing, libSBML supports Xerces versions 2.4 through 3.1, - Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher. - These parsers each report different status codes for the various - exceptions that can occur during XML processing. The XMLError object - class abstracts away from the particular diagnostics reported by the - different parsers and presents a single uniform interface and set of - status codes, along with operations for manipulating the error objects. - - When the libSBML XML parser layer encounters an error in the XML content - being processed, or when there is something else wrong (such as an - out-of-memory condition), the problems are reported as XMLError objects. - Each XMLError object instance has an identification number that - identifies the nature of the problem. - @if clike This error identifier will be up to five digits - long and drawn from the enumeration <a class=\'el\' - href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>. Applications can use the - error identifiers as a means of recognizing the error encountered and - changing their behavior if desired. @else This - error identifier is one of the constants listed in the next section below. - Applications can use the error identifiers as a means of recognizing the - error encountered and changing their behavior if desired. @endif@~ - - Integer error codes are useful for software, but not so much for telling - humans what happened. For this reason, XMLError also provides two text - messages describing the nature of the error. These messages are - accessible by means of the methods XMLError.getShortMessage() and - XMLError.getMessage(). The method XMLError.getShortMessage() returns - a very brief synopsis of the warning or error condition, whereas - XMLError.getMessage() returns a longer explanation. These text strings - are suitable for displaying to human users. - - Each XMLError object also contains a category code; its value may be - retrieved using the method XMLError.getCategory(). Category values - are drawn from @if clike the enumeration <a class=\'el\' href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a> described below.@else a - set of constants whose names begin with the characters @c LIBSBML_CAT_, described below.@endif@~  Categories - are used by libSBML to provide more information to calling programs about - the nature of a given error. - - In addition to category codes, each XMLError object also has a severity - code; its value may be retrieved using the method - XMLError.getSeverity(). Severity code values are drawn from - @if clike the enumeration <a class=\'el\' href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a>@else a - set of constants whose names begin with the characters @c LIBSBML_SEV_@endif, - described below. Severity levels range from informational - (@link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) to - fatal errors (@link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink). - - Finally, XMLError objects record the line and column near where the - problem occurred in the XML content. The values can be retrieved using - the methods XMLError.getLine() and XMLError.getColumn(). We say \'near - where the problem occurred\', because many factors affect how accurate - the line/column information ultimately is. For example, sometimes, the - underlying XML parsers can only report such information for the parent - XML element where an error occurs, and not for the specific point where - the problem occurs. In other situations, some parsers report invalid - line and/or column numbers altogether. If this occurs, libSBML sets the - line and/or column number in the XMLError object to either - <code>0</code> or the value of the maximum unsigned long integer - representable on the platform where libSBML is running. The probability - that a true line or column number in an SBML model would equal this - value is vanishingly small; thus, if an application encounters these - values in an XMLError object, it can assume no valid line/column number - could be provided by libSBML in that situation. - - @if clike - <h3><a class=\'anchor\' name=\'XMLErrorCode_t\'>XMLErrorCode_t</a></h3> - - This is an enumeration of all the error and warning codes returned by - the XML layer in libSBML. Each code is an integer with a 4-digit value - less than 10000. The following table lists each possible value and a - brief description of its meaning. - @endif@if java <h3><a class=\'anchor\' - name=\'XMLErrorCode_t\'>Error codes associated with XMLError objects</a></h3> - - The error and warning codes returned by the XML layer in libSBML are - listed in the table below. In the libSBML Java language interface, - these error identifiers are currently implemented as static integer - constants defined in the interface class <code><a - href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. This is - admittedly not an ideal approach from the standpoint of modern Java - programming, but it was necessary to work around the lack of - enumerations in Java prior to JDK 1.5. Future versions of libSBML may - use a proper Java enumeration type to define the error - identifiers. @endif@if csharp <h3><a class=\'anchor\' - name=\'XMLErrorCode_t\'>Error codes associated with XMLError objects</a></h3> - - The error and warning codes returned by the XML layer in libSBML are - listed in the table below. In the libSBML C# language interface, - these error identifiers are currently implemented as static integer - constants defined in the interface class @link libsbmlcs.libsbml@endlink.@endif@~ - - <center> - <table cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> - <caption>Possible XMLError error codes. Depending on the programming - language in use, the <em>Enumerator</em> values will be defined either - as a value from the enumeration XMLErrorCode_t or as integer constants. - To make this table more compact, we have shortened the identifiers for - the category and severity codes to their essential parts. To get the - actual names of the constants, prepend <code>LIBSBML_CAT_</code> to the - category names and <code>LIBSBML_SEV_</code> to the severity names - shown in the two right-hand columns. - </caption> - <tr style=\'background: lightgray\' class=\'normal-font\'> - <th>Enumerator</th> - <th>Meaning</th> - <th width=\'90\'>Category</th> - <th width=\'90\'>Severity</th> - </tr> - <tr><td>@link libsbml.XMLUnknownError XMLUnknownError@endlink</td><td>Unrecognized error encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>@link libsbml.XMLOutOfMemory XMLOutOfMemory@endlink</td> <td>Out of memory</td><td>SYSTEM</td><td>FATAL</td></tr> - <tr><td>@link libsbml.XMLFileUnreadable XMLFileUnreadable@endlink</td> <td>File unreadable</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLFileUnwritable XMLFileUnwritable@endlink</td> <td>File unwritable</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLFileOperationError XMLFileOperationError@endlink</td><td>Error encountered while attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLNetworkAccessError XMLNetworkAccessError@endlink</td><td>Network access error</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>@link libsbml.InternalXMLParserError InternalXMLParserError@endlink</td><td>Internal XML parser state error</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>@link libsbml.UnrecognizedXMLParserCode UnrecognizedXMLParserCode@endlink</td><td>XML parser returned an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>@link libsbml.XMLTranscoderError XMLTranscoderError@endlink</td><td>Character transcoder error</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>@link libsbml.MissingXMLDecl MissingXMLDecl@endlink</td><td>Missing XML declaration at beginning of XML input</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.MissingXMLEncoding MissingXMLEncoding@endlink</td><td>Missing encoding attribute in XML declaration</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLDecl BadXMLDecl@endlink</td><td>Invalid or unrecognized XML declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLDOCTYPE BadXMLDOCTYPE@endlink</td><td>Invalid, malformed or unrecognized XML DOCTYPE declaration</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.InvalidCharInXML InvalidCharInXML@endlink</td><td>Invalid character in XML content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadlyFormedXML BadlyFormedXML@endlink</td><td>XML content is not well-formed</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.UnclosedXMLToken UnclosedXMLToken@endlink</td><td>Unclosed XML token</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.InvalidXMLConstruct InvalidXMLConstruct@endlink</td><td>XML construct is invalid or not permitted</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLTagMismatch XMLTagMismatch@endlink</td><td>Element tag mismatch or missing tag</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.DuplicateXMLAttribute DuplicateXMLAttribute@endlink</td><td>Duplicate XML attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.UndefinedXMLEntity UndefinedXMLEntity@endlink</td><td>Undefined XML entity</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadProcessingInstruction BadProcessingInstruction@endlink</td><td>Invalid, malformed or unrecognized XML processing instruction</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLPrefix BadXMLPrefix@endlink</td><td>Invalid or undefined XML namespace prefix</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLPrefixValue BadXMLPrefixValue@endlink</td><td>Invalid XML namespace prefix value</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.MissingXMLRequiredAttribute MissingXMLRequiredAttribute@endlink</td><td>Missing a required XML attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLAttributeTypeMismatch XMLAttributeTypeMismatch@endlink</td><td>Data type mismatch for the value of an attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLBadUTF8Content XMLBadUTF8Content@endlink</td><td>Invalid UTF8 content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.MissingXMLAttributeValue MissingXMLAttributeValue@endlink</td><td>Missing or improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLAttributeValue BadXMLAttributeValue@endlink</td><td>Invalid or unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLAttribute BadXMLAttribute@endlink</td><td>Invalid, unrecognized or malformed attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.UnrecognizedXMLElement UnrecognizedXMLElement@endlink</td><td>Element either not recognized or not permitted</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLComment BadXMLComment@endlink</td><td>Badly formed XML comment</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLDeclLocation BadXMLDeclLocation@endlink</td><td>XML declaration not permitted in this location</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLUnexpectedEOF XMLUnexpectedEOF@endlink</td><td>Reached end of input unexpectedly</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLIDValue BadXMLIDValue@endlink</td><td>Value is invalid for XML ID, or has already been used</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLIDRef BadXMLIDRef@endlink</td><td>XML ID value was never declared</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.UninterpretableXMLContent UninterpretableXMLContent@endlink</td><td>Unable to interpret content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.BadXMLDocumentStructure BadXMLDocumentStructure@endlink</td><td>Bad XML document structure</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.InvalidAfterXMLContent InvalidAfterXMLContent@endlink</td><td>Encountered invalid content after expected content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLExpectedQuotedString XMLExpectedQuotedString@endlink</td><td>Expected to find a quoted string</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted@endlink</td><td>An empty value is not permitted in this context</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLBadNumber XMLBadNumber@endlink</td><td>Invalid or unrecognized number</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLBadColon XMLBadColon@endlink</td><td>Colon characters are invalid in this context</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.MissingXMLElements MissingXMLElements@endlink</td><td>One or more expected elements are missing</td><td>XML</td><td>ERROR</td></tr> - <tr><td>@link libsbml.XMLContentEmpty XMLContentEmpty@endlink</td><td>Main XML content is empty</td><td>XML</td><td>ERROR</td></tr> - </table> - </center> - - - @if clike - <h3><a class=\'anchor\' name=\'XMLErrorCategory_t\'>XMLErrorCategory_t</a></h3> - - As discussed above, each XMLError object contains a value for a category - identifier, describing the type of issue that the XMLError object - represents. The category can be retrieved from an XMLError object using - the method XMLError.getCategory(). The value is chosen from the - enumeration of category codes <a class=\'el\' href=\'#XMLErrorCategory_t\'> - XMLErrorCategory_t</a>. The following table - lists each possible value and a brief description of its meaning. - @endif@if java <h3><a class=\'anchor\' - name=\'XMLErrorCategory_t\'>Category codes associated with XMLError objects</a></h3> - - As discussed above, each XMLError object contains a value for a category - identifier, describing the type of issue that the XMLError object represents. - The category can be retrieved from an XMLError object using the method - XMLError.getCategory(). The following table lists each possible value - and a brief description of its meaning. - - As is the case with the error codes, in the libSBML Java language - interface, the category identifiers are currently implemented as static - integer constants defined in the interface class - <code>libsbmlConstants</code> in the file \'<a - href=\'libsbmlConstants.html\'>libsbmlConstants.java</a>\'. - @endif@if csharp <h3><a class=\'anchor\' - name=\'XMLErrorCategory_t\'>Category codes associated with XMLError objects</a></h3> - - As discussed above, each XMLError object contains a value for a category - identifier, describing the type of issue that the XMLError object represents. - The category can be retrieved from an XMLError object using the method - XMLError.getCategory(). The following table lists each possible value - and a brief description of its meaning. - - As is the case with the error codes, in the libSBML C# language - interface, the category identifiers are currently implemented as static - integer constants defined in the interface - class @link libsbmlcs.libsbml@endlink. @endif@~ - - <center> - <table width=\'90%\' cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> - <tr style=\'background: lightgray\' class=\'normal-font\'> - <th>Enumerator</th> - <th>Meaning</th> - </tr> - <tr><td>@link libsbml.LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink</td> - <td>A problem involving the libSBML - software itself or the underlying XML parser. This almost certainly - indicates a software defect (i.e., bug) in libSBML. Please report - instances of this to the libSBML developers.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink</td> - <td>A problem reported by the operating - system, such as an inability to read or write a file. This indicates - something that is not a program error but is outside of the control of - libSBML.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink</td> - <td>A problem in the XML content itself. This - usually arises from malformed XML or the use of - constructs not permitted in SBML.</td></tr> - </table> - </center> - - - @if clike - <h3><a class=\'anchor\' name=\'XMLErrorSeverity_t\'>XMLErrorSeverity_t</a></h3> - - As described above, each XMLError object contains a value for a severity - code, describing how critical is the issue that the XMLError object - represents. The severity can be retrieved from an XMLError object using - the method XMLError.getSeverity(). The value is chosen from the - enumeration of category codes <a class=\'el\' href=\'#XMLErrorSeverity_t\'> - XMLErrorSeverity_t</a>. The following table - lists each possible value and a brief description of its meaning. - @endif@if java <h3><a class=\'anchor\' - name=\'XMLErrorSeverity_t\'>Severity codes associated with XMLError objects</a></h3> - - As described above, each XMLError object contains a value for a severity - code, describing how severe is the issue that the XMLError object - represents. The severity be retrieved from an XMLError object using the - method XMLError.getSeverity(). The following table lists each possible - value and a brief description of its meaning. - - As is the case with the category codes, in the libSBML Java language - interface, these severity codes are currently - implemented as static integer constants defined in the interface class - <code>libsbmlConstants</code> in the file \'<a - href=\'libsbmlConstants.html\'>libsbmlConstants.java</a>\'. This - is admittedly not an ideal approach from the standpoint of modern Java - programming, but it was necessary to work around the lack of - enumerations in Java prior to JDK 1.5. Future versions of libSBML may - use a proper Java enumeration type to define the severity - codes. @endif@if csharp <h3><a class=\'anchor\' - name=\'XMLErrorSeverity_t\'>Severity codes associated with XMLError objects</a></h3> - - As described above, each XMLError object contains a value for a severity - code, describing how severe is the issue that the XMLError object - represents. The severity be retrieved from an XMLError object using the - method XMLError.getSeverity(). The following table lists each possible - value and a brief description of its meaning. - - As is the case with the category codes, in the libSBML C# language - interface, these severity codes are currently - implemented as static integer constants defined in the interface class - @link libsbmlcs.libsbml@endlink.@endif@~ - - <center> - <table width=\'90%\' cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> - <tr style=\'background: lightgray\' class=\'normal-font\'> - <th>Enumerator</th> - <th>Meaning</th> - </tr> - <tr><td>@link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink</td> - <td>The error is actually informational and - not necessarily a serious problem.</td></tr> - <tr><td>@link libsbml.LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink</td> - <td>The error object represents a problem - that is not serious enough to necessarily stop the problem, but - applications should take note of the problem and evaluate what its - implications may be.</td></tr> - <tr><td>@link libsbml.LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink</td> - <td>The error object represents a serious - error. The application may continue running but it is unlikely to be - able to continue processing the same XML file or data stream.</td></tr> - <tr><td>@link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink</td> - <td>A serious error occurred, such as an - out-of-memory condition, and the software should terminate - immediately.</td></tr> - </table> - </center> -"; - - -%feature("docstring") XMLError::XMLError " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLError(XMLError orig)</pre> - - Copy constructor; creates a copy of this XMLError. - - @p orig the XMLError object to copy. - - @throws @if python ValueError @else XMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>XMLError( const int errorId = 0 , string details = \'\' , const long line = 0 , const long column = 0 , const long severity = LIBSBML_SEV_FATAL , const long category = LIBSBML_CAT_INTERNAL )</pre> - - Creates a new XMLError to report that something occurred during XML - processing. - - XMLError objects have identification numbers to indicate the nature of - the exception. @if clike These numbers are drawn from - the enumeration <a class=\'el\' - href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>. - @else These numbers are defined as unsigned - integer constants in the file - \'libsbmlConstants.java\'. See the <a class=\'el\' - href=\'#XMLErrorCode_t\'>top of this documentation</a> for a table - listing the possible values and their meanings. @endif@~ The argument @p - errorId to this constructor @em can be (but does not have to be) a - value from this @if clike enumeration. If it is a value - from <a class=\'el\' href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>, the - XMLError class assumes the error is a low-level system or XML layer - error and <em>prepends</em> a built-in, predefined error message to - any string passed in the argument @p details to this constructor. In - addition, all <a class=\'el\' href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a> - errors have associated values for the @p severity and @p category - codes, and these fields are filled-in as well from the enumerations <a - class=\'el\' href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a> and <a - class=\'el\' href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a>, - respectively. @else set of constants. If it is - one of the predefined error identifiers, the XMLError class assumes - the error is a low-level system or XML layer error and - <em>prepends</em> a built-in, predefined error message to any string - passed in the argument @p details to this constructor. In addition, - all the predefined error identifiers have associated values for the @p - severity and @p category codes, and these fields are filled-in as - well. @endif@~ - - If the error identifier @p errorId is a number greater than 9999, this - constructor assumes that the error was generated from another part of - the software, and does not do additional filling in of values beyond - the defaults in the constructor itself. This allows XMLError to serve - as a base class for other errors (and is used in this way elsewhere in - libSBML). Callers should fill in all the parameters with suitable - values if generating errors with codes greater than 9999 to make - maximum use of the XMLError facilities. - - @if clike As mentioned above, there are two other - enumerations, <a class=\'el\' - href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a> and <a class=\'el\' - href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a>, used for indicating - the severity and category of error for the predefined XMLError codes. - The values passed in @p severity and @p category override the defaults - assigned based on the error code. If the value of @p errorId is a - value from <a class=\'el\' href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>, - callers do not need to fill in @p severity and @p category. - Conversely, if @p errorId is not a value from <a class=\'el\' - href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>, callers can use other - values (not just those from <a class=\'el\' - href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a> and <a class=\'el\' - href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a>, but their own - special values) for @p severity and @p - category. @else As mentioned above, - there are additional constants defined for <a class=\'el\' - href=\'#XMLErrorSeverity_t\'>standard severity</a> and <a class=\'el\' - href=\'#XMLErrorCategory_t\'>standard category</a> codes, and every predefined - error in libSBML has an associated value for severity and category taken - from these predefined sets. These constants have symbol names - prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>, - respectively. If the value of @p errorId is one of the standard error - codes, callers do not need to fill in @p severity and @p category in a - call to this constructor. Conversely, if @p errorId is not an existing - XML-level error code, callers can use other values for @p severity and - @p category. @endif@~ - - @param errorId a long integer, the identification number of the error. - - @param details a string containing additional details about the error. - If the error code in @p errorId is one that is recognized by XMLError, - the given message is @em appended to a predefined message associated - with the given code. If the error code is not recognized, the message - is stored as-is as the text of the error. - - @param line a long integer, the line number at which the error occured. - - @param column a long integer, the column number at which the error occured. - - @param severity an integer indicating severity of the error. - - @param category an integer indicating the category to which the error - belongs. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLError::getErrorId " - Returns the identifier of this error. - - @return the error code for this error. - - @see getMessage() - @see getShortMessage() - @see getCategory() - @see getSeverity() -"; - - -%feature("docstring") XMLError::getMessage " - Returns the message text of this error. - - The message associated with an error object describes the nature of - the problem. The message returned by this method is generally longer - and clearer than the message returned by XMLError.getShortMessage(), - but not in all cases. - - Callers may use XMLError.getCategory() and XMLError.getSeverity() to - obtain additional information about the nature and severity of the - problem. - - @return the message text - - @see getErrorId() - @see getShortMessage() - @see getCategory() - @see getSeverity() -"; - - -%feature("docstring") XMLError::getShortMessage " - Returns a brief message for this error. - - This is an alternative error message that, in general, is as short as - the authors could make it. However, brevity is often inversely - proportional to clarity, so this short message may not be sufficiently - informative to understand the nature of the error. Calling - applications may wish to check XMLError.getMessage() in addition or - instead. - - @return the short error message text - - @see getErrorId() - @see getMessage() - @see getCategory() - @see getSeverity() -"; - - -%feature("docstring") XMLError::getLine " - Returns the line number in the XML input near where the error, warning - or other diagnostic occurred. - - We say \'near where the problem occurred\', because many factors affect - how accurate the line/column information ultimately is. For example, - sometimes, the underlying XML parsers can only report such information - for the parent XML element where an error occurs, and not for the - specific point where the problem occurs. In other situations, some - parsers report invalid line and/or column numbers altogether. If this - occurs, libSBML sets the line and/or column number in the XMLError - object to either <code>0</code> or the value of the maximum unsigned - long integer representable on the platform where libSBML is running. - The probability that a true line or column number in an SBML model - would equal this value is vanishingly small; thus, if an application - encounters these values in an XMLError object, it can assume no valid - line/column number could be provided by libSBML in that situation. - - @return the line number - - @see getColumn() -"; - - -%feature("docstring") XMLError::getColumn " - Returns the column number in the XML input near where the error, - warning or other diagnostic occurred. - - We say \'near where the problem occurred\', because many factors affect - how accurate the line/column information ultimately is. For example, - sometimes, the underlying XML parsers can only report such information - for the parent XML element where an error occurs, and not for the - specific point where the problem occurs. In other situations, some - parsers report invalid line and/or column numbers altogether. If this - occurs, libSBML sets the line and/or column number in the XMLError - object to either <code>0</code> or the value of the maximum unsigned - long integer representable on the platform where libSBML is running. - The probability that a true line or column number in an SBML model - would equal this value is vanishingly small; thus, if an application - encounters these values in an XMLError object, it can assume no valid - line/column number could be provided by libSBML in that situation. - - @return the column number - - @see getLine() -"; - - -%feature("docstring") XMLError::getSeverity " - Returns the severity of this error. - - XMLError defines an enumeration of severity codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own severity codes with numbers higher than those in the predefined - set of severity codes. - - @return the severity of this XMLError. - - @see getSeverityAsString() - @see getCategory() -"; - - -%feature("docstring") XMLError::getSeverityAsString " - Returns a string describing the severity level of this error. - - XMLError defines an enumeration of severity codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own severity codes with numbers higher than those in the predefined - set of severity codes. - - @return string representing the severity of this XMLError. - - @see getSeverity() - @see getCategoryAsString() -"; - - -%feature("docstring") XMLError::getCategory " - Returns the category of this error. - - XMLError defines an enumeration of category codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own categories with numbers higher than those in the predefined - set of category codes. - - Categories can be used to partition errors into distinct groups. - Among other things, this can be used to prevent id conflicts by - uniquely identifying an XMLError by both id and category. - - @return the category of this XMLError. - - @see getSeverity() - @see getCategoryAsString() -"; - - -%feature("docstring") XMLError::getCategoryAsString " - Returns a string describing the category of this error. - - XMLError defines an enumeration of category codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own categories with numbers higher than those in the predefined - set of category codes. - - Categories can be used to partition errors into distinct groups. - Among other things, this can be used to prevent id conflicts by - uniquely identifying an XMLError by both id and category. - - @return string representing the category of this XMLError. - - @see getCategory() - @see getSeverityAsString() -"; - - -%feature("docstring") XMLError::isInfo " - Predicate returning @c True or @c False depending on whether this - error object is for information purposes only. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value @link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink from the - @if clike enumeration #XMLErrorSeverity_t. @else set of predefined - severity codes.@endif@~ - - @return @c True if this XMLError is for informational purposes only, - @c False otherwise. - - @see isWarning() - @see isError() - @see isFatal() -"; - - -%feature("docstring") XMLError::isWarning " - Predicate returning @c True or @c False depending on whether - this error object is a warning. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value @link libsbml.LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink from the - @if clike enumeration #XMLErrorSeverity_t. @else set of predefined - severity codes.@endif@~ - - @return @c True if this error is a warning, @c False otherwise. - - @see isInfo() - @see isError() - @see isFatal() -"; - - -%feature("docstring") XMLError::isError " - Predicate returning @c True or @c False depending on whether this - error is a significant error. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value @link libsbml.LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink from the - @if clike enumeration #XMLErrorSeverity_t. @else set of predefined - severity codes.@endif@~ - - @return @c True if this error is an error, @c False otherwise. - - @see isInfo() - @see isWarning() - @see isFatal() -"; - - -%feature("docstring") XMLError::isFatal " - Predicate returning @c True or @c False depending on whether this - error is a fatal run-time error. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value @link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink from the - @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~ - - @return @c True if this error is a fatal error, @c False otherwise. - - @see isInfo() - @see isWarning() - @see isError() -"; - - -%feature("docstring") XMLError::isInternal " - Predicate returning @c True or @c False depending on whether this - error resulted from an internal program error. - - This is equivalent to obtaining the category identifier from an - XMLError object (via XMLError.getCategory()) and then comparing it to - the value @link libsbml.LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink from the - @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ - - @return @c True or @c False - - @see isSystem() - @see isXML() -"; - - -%feature("docstring") XMLError::isSystem " - Predicate returning @c True or @c False depending on whether this - error was generated by the operating system. - - This is equivalent to obtaining the category identifier from an - XMLError object (via XMLError.getCategory()) and then comparing it to - the value @link libsbml.LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink from the - @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ - - @return @c True or @c False - - @see isInternal() - @see isXML() -"; - - -%feature("docstring") XMLError::isXML " - Predicate returning @c True or @c False depending on whether this - error resulted from a problem in the XML input (e.g., an XML syntax - error). - - This is equivalent to obtaining the category identifier from an - XMLError object (via XMLError.getCategory()) and then comparing it to - the value @link libsbml.LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink from the - @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ - - @return @c True or @c False - - @see isInternal() - @see isSystem() -"; - - -%feature("docstring") XMLError::isValid " - Predicate returning @c True or @c False depending on whether this - error resulted from a problem or whether it was logged as an unknown - error. - - This is equivalent to obtaining the error identifier from an - XMLError object (via XMLError.getErrorId()) and then comparing it to - the value XMLUnknownError or UnknownError from the - @if clike enumeration #XMLErrorCode_t. @else set of predefined error codes.@endif@~ - - @return @c True or @c False -"; - - -%feature("docstring") XMLError::setLine " - Sets the line number where this error occurred. - - @param line a long integer, the line number to set. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see setColumn() -"; - - -%feature("docstring") XMLError::setColumn " - Sets the column number where this error occurred. - - @param column a long integer, the column number to set. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see setLine() -"; - - -%feature("docstring") XMLError::getStandardMessage " - Returns a copy of the message string associated with the given - predefined XMLError code. - - @param code the error code whose message is sought; it must be a - predefined value from @if clike <a class=\'el\' href=\'#XMLErrorCode_t\'> - XMLErrorCode_t</a>. @else <a class=\'el\' href=\'#XMLErrorCode_t\'>the set - of predefined error identifiers</a>.@endif@~ -"; - - -%feature("docstring") XMLError::getPackage " - Returns a copy of the message string associated with the given - predefined XMLError code. - - @param code the error code whose message is sought; it must be a - predefined value from @if clike <a class=\'el\' href=\'#XMLErrorCode_t\'> - XMLErrorCode_t</a>. @else <a class=\'el\' href=\'#XMLErrorCode_t\'>the set - of predefined error identifiers</a>.@endif@~ -"; - - -%feature("docstring") XMLError::getErrorIdOffset " - Returns a copy of the message string associated with the given - predefined XMLError code. - - @param code the error code whose message is sought; it must be a - predefined value from @if clike <a class=\'el\' href=\'#XMLErrorCode_t\'> - XMLErrorCode_t</a>. @else <a class=\'el\' href=\'#XMLErrorCode_t\'>the set - of predefined error identifiers</a>.@endif@~ -"; - - -%feature("docstring") XMLErrorLog " - @ingroup Core - Log of errors and other events encountered while processing an XML - file or data stream. - - @htmlinclude not-sbml-warning.html - - The error log is a list. The XML layer of libSBML maintains an error - log associated with a given XML document or data stream. When an - operation results in an error, or when there is something wrong with the - XML content, the problem is reported as an XMLError object stored in the - XMLErrorLog list. Potential problems range from low-level issues (such - as the inability to open a file) to XML syntax errors (such as - mismatched tags or other problems). - - A typical approach for using this error log is to first use - @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ - to inquire how many XMLError object instances it contains, and then to - iterate over the list of objects one at a time using - getError(long n) const. Indexing in the list begins at 0. - - In normal circumstances, programs using libSBML will actually obtain an - SBMLErrorLog rather than an XMLErrorLog. The former is subclassed from - XMLErrorLog and simply wraps commands for working with SBMLError objects - rather than the low-level XMLError objects. Classes such as - SBMLDocument use the higher-level SBMLErrorLog. -"; - - -%feature("docstring") XMLErrorLog::getNumErrors " - Returns the number of errors that have been logged. - - To retrieve individual errors from the log, callers may use - @if clike getError() @else XMLErrorLog.getError() @endif. - - @return the number of errors that have been logged. -"; - - -%feature("docstring") XMLErrorLog::getError " - Returns the <i>n</i>th XMLError object in this log. - - Index @p n is counted from 0. Callers should first inquire about the - number of items in the log by using the method - @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif. - Attempts to use an error index number that exceeds the actual number - of errors in the log will result in a @c None being returned. - - @param n the index number of the error to retrieve (with 0 being the - first error). - - @return the <i>n</i>th XMLError in this log, or @c None if @p n is - greater than or equal to - @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif. - - @see getNumErrors() -"; - - -%feature("docstring") XMLErrorLog::clearLog " - Deletes all errors from this log. -"; - - -%feature("docstring") XMLErrorLog::XMLErrorLog " - @internal - Creates a new empty XMLErrorLog. -"; - - -%feature("docstring") XMLErrorLog::setParser " - @internal - Sets the XMLParser associated with this XMLErrorLog. - - The XMLParser will be used to obtain the current line and column - number for XMLError objects that lack line and column numbers when - they are logged. This method is used by libSBML\'s internal XML - parsing code and probably has no useful reason to be called from - application programs. - - @param p XMLParser, the parser to use - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") XMLErrorLog::toString " - Writes all errors contained in this log to a string and returns it. - - This method uses printErrors() to format the diagnostic messages. - Please consult that method for information about the organization - of the messages in the string returned by this method. - - @return a string containing all logged errors and warnings. - - @see printErrors() -"; - - -%feature("docstring") XMLErrorLog::printErrors " - Prints all the errors or warnings stored in this error log - - It prints the text to the stream given by the optional parameter @p - stream. If no parameter is given, it prints the output to the - standard error stream. - - If no errors have occurred, i.e., <code>getNumErrors() == 0</code>, no - output will be sent to the stream. - - The format of the output is: - @verbatim - N error(s): - line NNN: (id) message - @endverbatim - - @param stream the ostream or ostringstream object indicating where - the output should be printed. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") XMLErrorLog::isSeverityOverridden " - Returns a boolean indicating whether or not the severity is overriden -"; - - -%feature("docstring") XMLErrorLog::unsetSeverityOverride " - usets an existing override -"; - - -%feature("docstring") XMLErrorLog::getSeverityOverride " - Returns the current override -"; - - -%feature("docstring") XMLErrorLog::setSeverityOverride " - Set the severity override. - - If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be - logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG - no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then - all errors will be logged as warnings. -"; - - -%feature("docstring") XMLErrorLog::changeErrorSeverity " - Set the severity override. - - If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be - logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG - no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then - all errors will be logged as warnings. -"; - - -%feature("docstring") SBMLErrorLog " - @ingroup Core - Log of errors and other events encountered during SBML processing. - - @htmlinclude not-sbml-warning.html - - The error log is a list. Each SBMLDocument maintains its own - SBMLErrorLog. When a libSBML operation on SBML content results in an - error, or when there is something worth noting about the SBML content, - the issue is reported as an SBMLError object stored in the SBMLErrorLog - list. - - SBMLErrorLog is derived from XMLErrorLog, an object class that serves - exactly the same purpose but for the XML parsing layer. XMLErrorLog - provides crucial methods such as - @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ - for determining how many SBMLError or XMLError objects are in the log. - SBMLErrorLog inherits these methods. - - The general approach to working with SBMLErrorLog in user programs - involves first obtaining a pointer to a log from a libSBML object such - as SBMLDocument. Callers should then use - @if java XMLErrorLog.getNumErrors()@else getNumErrors() @endif@~ to inquire how - many objects there are in the list. (The answer may be 0.) If there is - at least one SBMLError object in the SBMLErrorLog instance, callers can - then iterate over the list using - SBMLErrorLog.getError()@if clike const@endif, - using methods provided by the SBMLError class to find out the error code - and associated information such as the error severity, the message, and - the line number in the input. - - If you wish to simply print the error strings for a human to read, an - easier and more direct way might be to use SBMLDocument.printErrors(). - - @see SBMLError - @see XMLErrorLog - @see XMLError -"; - - -%feature("docstring") SBMLErrorLog::getError " - Returns the <i>n</i>th SBMLError object in this log. - - Index @p n is counted from 0. Callers should first inquire about the - number of items in the log by using the - @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ method. - Attempts to use an error index number that exceeds the actual number - of errors in the log will result in a @c None being returned. - - @param n the index number of the error to retrieve (with 0 being the - first error). - - @return the <i>n</i>th SBMLError in this log, or @c None if @p n is - greater than or equal to - @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif. - - @see getNumErrors() -"; - - -%feature("docstring") SBMLErrorLog::getNumFailsWithSeverity " - Returns the number of errors that have been logged with the given - severity code. - - LibSBML associates severity levels with every SBMLError object to - provide an indication of how serious the problem is. Severities range - from informational diagnostics to fatal (irrecoverable) errors. Given - an SBMLError object instance, a caller can interrogate it for its - severity level using methods such as SBMLError.getSeverity(), - SBMLError.isFatal(), and so on. The present method encapsulates - iteration and interrogation of all objects in an SBMLErrorLog, making - it easy to check for the presence of error objects with specific - severity levels. - - @if clike @param severity a value from - #SBMLErrorSeverity_t @endif@if java @param severity a - value from the set of <code>LIBSBML_SEV_</code> constants defined by - the interface class <code><a - href=\'libsbmlConstants.html\'>libsbmlConstants</a></code> @endif@if python @param severity a - value from the set of <code>LIBSBML_SEV_</code> constants defined by - the interface class @link libsbml libsbml@endlink. @endif@~ - - @return a count of the number of errors with the given severity code. - - @see getNumErrors() -"; - - -%feature("docstring") SBMLErrorLog::SBMLErrorLog " - @internal - Creates a new, empty SBMLErrorLog. -"; - - -%feature("docstring") SBMLErrorLog::logError " - @internal - Convenience function that combines creating an SBMLError object and - adding it to the log. - - @param errorId a long integer, the identification number of the error. - - @param level a long integer, the SBML Level - - @param version a long integer, the SBML Level\'s Version - - @param details a string containing additional details about the error. - If the error code in @p errorId is one that is recognized by SBMLError, - the given message is @em appended to a predefined message associated - with the given code. If the error code is not recognized, the message - is stored as-is as the text of the error. - - @param line a long integer, the line number at which the error occured. - - @param column a long integer, the column number at which the error occured. - - @param severity an integer indicating severity of the error. - - @param category an integer indicating the category to which the error - belongs. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SBMLErrorLog::logPackageError " - @internal - Convenience function that combines creating an SBMLError object and - adding it to the log. - - @param errorId a long integer, the identification number of the error. - - @param level a long integer, the SBML Level - - @param version a long integer, the SBML Level\'s Version - - @param details a string containing additional details about the error. - If the error code in @p errorId is one that is recognized by SBMLError, - the given message is @em appended to a predefined message associated - with the given code. If the error code is not recognized, the message - is stored as-is as the text of the error. - - @param line a long integer, the line number at which the error occured. - - @param column a long integer, the column number at which the error occured. - - @param severity an integer indicating severity of the error. - - @param category an integer indicating the category to which the error - belongs. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") SBMLErrorLog::remove " - Removes an error having errorId from the SBMLError list. - - Only the first item will be removed if there are multiple errors - with the given errorId. - - @param errorId the error identifier of the error to be removed. -"; - - -%feature("docstring") SBMLErrorLog::contains " - Returns true if SBMLErrorLog contains an errorId - - @param errorId the error identifier of the error to be found. -"; - - -%feature("docstring") SBMLError " - @ingroup Core - Representation of errors, warnings and other diagnostics - - @htmlinclude not-sbml-warning.html - - When a libSBML operation on SBML content results in an error, or when - there is something wrong with the SBML content, the problems are - reported as SBMLError objects. These are generally stored in an - SBMLErrorLog object; this log object, in turn, is kept in the - SBMLDocument object containing the SBML content. Applications can - obtain the list of logged errors using SBMLDocument.getErrorLog() and - then use the methods provided by SBMLErrorLog to access individual - SBMLError objects. (Note that despite the word \'error\' in the name, - SBMLError objects are used to represent not only \'true\' errors, but also - warnings and some informational diagnostics. The name is a historical - hold-over from early versions of libSBML, in which the object really was - only used to report errors.) - - @if clike - Each SBMLError object instance has an identification number that - identifies the nature of the problem. This \'error id\' number will be up - to five digits long, and it will be listed in one of two enumerations: - <a class=\'el\' href=\'#SBMLErrorCode_t\'> SBMLErrorCode_t</a> (described <a - class=\'el\' href=\'#SBMLErrorCode_t\'> below</a>) or @link - XMLError::XMLErrorCode_t XMLErrorCode_t @endlink (described in the - documentation for the class XMLError). The former enumeration contains - all the SBML validation rule numbers listed in the appendices of the - SBML specification documents, as well as some additional - libSBML-specific error codes. - @endif@if java - Each SBMLError object instance has an identification number that - identifies the nature of the problem. This \'error id\' number will be up - to five digits long, and it will come from one of two sets of static - integer constants defined in the interface class <code><a - href=\'libsbmlConstants.html\'> libsbmlConstants</a></code>: either the - SBML error identifiers <a class=\'el\' href=\'#SBMLErrorCode_t\'> (described - below)</a> or the XML error identifiers (described in the documentation - for the class <code><a href=\'XMLError.html\'> XMLError</a></code>). The - former set of constants includes all the SBML validation rule numbers - listed in the appendices of the SBML specification documents, as well as - some additional libSBML-specific error codes. - @endif@if python - Each SBMLError object instance has an identification number that - identifies the nature of the problem. This \'error id\' number will be up - to five digits long, and it will come from one - of two sets of static integer constants defined in - the interface class @link libsbml libsbml@endlink: either the SBML - error identifiers <a - class=\'el\' href=\'#SBMLErrorCode_t\'> (described below)</a> or the XML - error identifiers (described in the documentation for the class XMLError). - The former set of constants - includes all the SBML validation rule numbers listed in the appendices - of the SBML specification documents, as well as some additional - libSBML-specific error codes. - @endif@~ - - Error codes are useful mainly for software. For human readers, - SBMLError also includes text messages that describe the nature of a - given problem. The messages can be accessed using - SBMLError.getShortMessage() and SBMLError.getMessage(). The former - provides a brief one-line description of the issue, while - SBMLError.getMessage() provides a more detailed text, including (if - appropriate) references to sections of the SBML specifications where - relevant topics are discussed. These text strings are suitable for - displaying to human users. - - @if clike - An SBMLError object also contains a category code; its value may be - retrieved using the method SBMLError.getCategory(). Category values - are drawn from the enumeration <a class=\'el\' - href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a> described below. - Categories are used to partition errors into distinct conceptual groups. - This is principally used by the libSBML validation system to group - classes of validation checks. For example, - @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink - is the category for tests that check identifier consistency; - @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink - is the category for MathML consistency checking; and - so on. - @endif@if java - An SBMLError object also contains a category code; its value may be - retrieved using the method SBMLError.getCategory(). Category values - are drawn from a set of static integer constants - defined in <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>, - and having names beginning with the characters - <code>LIBSBML_CAT_</code>. The list of possible codes is described in a - separate section below. Categories are used to partition errors into - distinct conceptual groups. This is principally used by the libSBML - validation system to group classes of validation checks. For example, - @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink - is the category for tests that check identifier consistency; - @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink - is the category for MathML consistency checking; and - so on. - @endif@if python - An SBMLError object also contains a category code; its value may be - retrieved using the method SBMLError.getCategory(). Category values - are drawn from a set of static integer constants - defined in @link libsbml libsbml@endlink and having names beginning with the characters - <code>LIBSBML_CAT_</code>. The list of possible codes is described in a - separate section below. Categories are used to partition errors into - distinct conceptual groups. This is principally used by the libSBML - validation system to group classes of validation checks. For example, - @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink - is the category for tests that check identifier consistency; - @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink - is the category for MathML consistency checking; and - so on. - @endif@~ - - In addition, SBMLError also has a severity code. Its value may be - retrieved using the method SBMLError.getSeverity(). The possible - severity values are the same as those reported by @if clike XMLError.@endif@if python XMLError.@endif@if java <code><a href=\'XMLError.html\'>XMLError</a></code>.@endif@~ - Severity levels currently range from informational - (@link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) - to fatal errors - (@link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink). - They can be - used by an application to evaluate how serious a given problem - is. - - Finally, SBMLError records the line and column near where the problem - occurred in the SBML content. The values may be retrieved using the - methods SBMLError.getLine() and SBMLError.getColumn(). We say \'near\', - because a lot of factors affect how accurate the line/column information - ultimately is. For example, different XML parsers have different - conventions for which line and column number they report for a - particular problem (which makes a difference when a problem involves an - opening XML tag on one line and a closing tag on another line). In some - situations, some parsers report invalid line and/or column numbers - altogether. If this occurs, libSBML sets the line and/or column number - in the SBMLError object to the the value of the maximum unsigned long - integer representable on the platform where libSBML is running. (This - is equal to the constant named <code>ULONG_MAX</code> in C and C++.) - The probability that a true line or column number in an SBML model would - equal this value is vanishingly small; thus, if an application - encounters these values in an XMLError object, it can assume no valid - line/column number could be provided by libSBML in that situation. - - @if clike - <h3><a class=\'anchor\' name=\'SBMLErrorCode_t\'>SBMLErrorCode_t</a></h3> - - SBMLErrorCode_t is an enumeration of all SBML-level error, warning and - informational diagnostic codes. Every SBMLError object has an error - code value that can be either a value from this enumeration, or a value - from the @link XMLError::XMLErrorCode_t XMLErrorCode_t @endlink - enumeration (see the documentation for XMLError). The latter values - apply when the error or warning signifies a basic XML issue rather than - an SBML issue per se. The values of SBMLErrorCode_t are distinguished - from those of @link XMLError::XMLErrorCode_t XMLErrorCode_t @endlink by - being numbered 10000 and higher, while the XML layer\'s codes are 9999 and - lower. The method SBMLError.getErrorId() returns the error code of a - given SBMLError object instance. - - The following is a table of the symbolic names of SBMLErrorCode_t values - and the meaning of each code. In this table, the right-hand columns - titled \'L1V1\', \'L1V2\', etc. refer to Levels and Versions of the SBML - specifications, and the entries in each column refer to whether the - severity of the condition in that particular Level+Version of SBML. - The codes stand for the following: - - @endif@if java <h3><a class=\'anchor\' - name=\'SBMLErrorCode_t\'>Error codes associated with SBMLError objects</a></h3> - - The error and warning codes returned by libSBML are listed in the table - below. The method SBMLError.getErrorId() returns the error code of a - given SBMLError object instance. In the libSBML Java language - interface, these error identifiers are currently - implemented as static integer constants defined in the interface class - <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. This - is admittedly not an ideal approach from the standpoint of modern Java - programming, but it was necessary to work around the lack of - enumerations in Java prior to JDK 1.5. Future versions of libSBML may - use a proper Java enumeration type to define the error identifiers. - - In this table, the right-hand columns titled \'L1V1\', \'L1V2\', etc. refer - to Levels and Versions of the SBML specifications, and the entries in - each column refer to whether the severity of the condition in that - particular Level+Version of SBML. The codes stand for the following: - - @endif@if python <h3><a class=\'anchor\' - name=\'SBMLErrorCode_t\'>Error codes associated with SBMLError objects</a></h3> - - The error and warning codes returned by libSBML are listed in the table - below. The method SBMLError.getErrorId() returns the error code of a - given SBMLError object instance. In the libSBML Python language - interface, these error identifiers are currently - implemented as static integer constants defined in the interface class - @link libsbml libsbml@endlink. - - In this table, the right-hand columns titled \'L1V1\', \'L1V2\', etc. refer - to Levels and Versions of the SBML specifications, and the entries in - each column refer to whether the severity of the condition in that - particular Level+Version of SBML. The codes stand for the following: - - @endif@~ - - <table cellspacing=\'1\' cellpadding=\'2\' border=\'0\' class=\'normal-font\'> - <tr><td class=\'s-na\'>N</td><td>= Not applicable</td></tr> - <tr><td class=\'s-info\'>I</td><td>= Informational</td></tr> - <tr><td class=\'s-warning\'>W</td><td>= Warning</td></tr> - <tr><td class=\'s-error\'>E</td><td>= Error</td></tr> - <tr><td class=\'s-fatal\'>F</td><td>= Fatal</td></tr> - </table> - - The text shown in the \'Meaning\' is the text returned by the - SBMLError.getShortMessage() method on a given SBMLError object. A - longer and (hopefully) clearer explanation of the issue is returned by - SBMLError.getMessage(). - - @htmlinclude sbmlerror-table.html - - @if clike <h3><a class=\'anchor\' name=\'SBMLErrorCategory_t\'>SBMLErrorCategory_t</a></h3> - - SBMLErrorCategory_t is an enumeration of category codes for SBMLError - diagnostics. The category can be retrieved from an SBMLError object - using the method SBMLError.getCategory(). These enumeration values are - distinct from (and in addition to) the @link - XMLError::XMLErrorCategory_t XMLErrorCategory_t @endlink codes used by - the parent XMLError object. User programs receiving an SBMLError object - can use this distinction to check whether the error represents a - low-level XML problem or an SBML problem. - - The following table lists each possible value and a brief description of - its meaning. - - @endif@if python <h3><a class=\'anchor\' name=\'SBMLErrorCategory_t\'>Category codes associated with SBMLError objects</a></h3> - - As discussed above, each SBMLError object contains a value for a - category identifier, describing the type of issue that the SBMLError - object represents. The category can be retrieved from an SBMLError - object using the method SBMLError.getCategory(). The following table - lists each possible value and a brief description of its meaning. - - As is the case with the error codes, in the libSBML Python language - interface, the category identifiers are currently implemented as static - integer constants defined in the interface class - @link libsbml libsbml@endlink. - - The following table lists each possible value and a brief description of - its meaning. - - @endif@if java <h3><a class=\'anchor\' - name=\'SBMLErrorCategory_t\'>Category codes associated with SBMLError objects</a></h3> - - As discussed above, each SBMLError object contains a value for a - category identifier, describing the type of issue that the SBMLError - object represents. The category can be retrieved from an SBMLError - object using the method SBMLError.getCategory(). The following table - lists each possible value and a brief description of its meaning. - - As is the case with the error codes, in the libSBML Java language - interface, the category identifiers are currently implemented as static - integer constants defined in the interface class - {@link libsbmlConstants}. - - The following table lists each possible value and a brief description of - its meaning. - - @endif@if csharp <h3><a class=\'anchor\' - name=\'SBMLErrorCategory_t\'>Category codes associated with SBMLError objects</a></h3> - - As discussed above, each SBMLError object contains a value for a - category identifier, describing the type of issue that the SBMLError - object represents. The category can be retrieved from an SBMLError - object using the method SBMLError.getCategory(). The following table - lists each possible value and a brief description of its meaning. - - As is the case with the error codes, in the libSBML C# language - interface, the category identifiers are currently implemented as static - integer constants defined in the interface class - {@link libsbmlcs.libsbml}. - - The following table lists each possible value and a brief description of - its meaning. - - @endif@~ - - <center> - <table width=\'90%\' cellspacing=\'1\' cellpadding=\'4\' border=\'0\' class=\'text-table normal-font alt-row-colors\'> - <tr style=\'background: lightgray\' class=\'normal-font\'> - <th>Enumerator</td> - <th>Meaning</td> - </tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML LIBSBML_CAT_SBML@endlink</td><td>General error not falling into - another category below.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML_L1_COMPAT LIBSBML_CAT_SBML_L1_COMPAT@endlink</td><td>Category of errors - that can only occur during attempted translation from one Level/Version - of SBML to another. This particular category applies to errors - encountered while trying to convert a model from SBML Level 2 to SBML - Level 1.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V1_COMPAT LIBSBML_CAT_SBML_L2V1_COMPAT@endlink</td><td>Category of errors - that can only occur during attempted translation from one Level/Version - of SBML to another. This particular category applies to errors - encountered while trying to convert a model to SBML Level 2 - Version 1.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V2_COMPAT LIBSBML_CAT_SBML_L2V2_COMPAT@endlink</td><td>Category of errors - that can only occur during attempted translation from one Level/Version - of SBML to another. This particular category applies to errors - encountered while trying to convert a model to SBML Level 2 - Version 2.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink</td><td>Category of - errors that can occur while validating general SBML constructs. With - respect to the SBML specification, these concern failures in applying - the validation rules numbered 2xxxx in the Level 2 Versions 2–4 - and Level 3 Version 1 specifications.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink</td><td>Category of - errors that can occur while validating symbol identifiers in a model. - With respect to the SBML specification, these concern failures in - applying the validation rules numbered 103xx in the Level 2 Versions 2–4 - and Level 3 Version 1 specifications.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink</td><td>Category of - errors that can occur while validating the units of measurement on - quantities in a model. With respect to the SBML specification, these - concern failures in applying the validation rules numbered 105xx in the - Level 2 Versions 2–4 - and Level 3 Version 1 specifications.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink</td><td>Category of - errors that can occur while validating MathML formulas in a model. With - respect to the SBML specification, these concern failures in applying - the validation rules numbered 102xx in the Level 2 Versions 2–4 - and Level 3 Version 1 specifications.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink</td><td>Category of errors - that can occur while validating SBO identifiers in a model. With - respect to the SBML specification, these concern failures in applying - the validation rules numbered 107xx in the Level 2 Versions 2–4 - and Level 3 Version 1 specifications.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink</td><td>Error in the - system of equations in the model: the system is overdetermined, - therefore violating a tenet of proper SBML. With respect to the SBML - specification, this is validation rule #10601 in the SBML Level 2 Versions 2–4 - and Level 3 Version 1 specifications.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V3_COMPAT LIBSBML_CAT_SBML_L2V3_COMPAT@endlink</td><td>Category of errors - that can only occur during attempted translation from one Level/Version - of SBML to another. This particular category applies to errors - encountered while trying to convert a model to SBML Level 2 - Version 3.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink</td><td>Category of - warnings about recommended good practices involving SBML and - computational modeling. (These are tests performed by libSBML and do - not have equivalent SBML validation rules.)</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_INTERNAL_CONSISTENCY LIBSBML_CAT_INTERNAL_CONSISTENCY@endlink</td><td>Category of - errors that can occur while validating libSBML\'s internal representation - of SBML constructs. (These are tests performed by libSBML and do - not have equivalent SBML validation rules.)</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V4_COMPAT LIBSBML_CAT_SBML_L2V4_COMPAT@endlink</td><td>Category of errors - that can only occur during attempted translation from one Level/Version - of SBML to another. This particular category applies to errors - encountered while trying to convert a model to SBML Level 2 - Version 4.</td></tr> - <tr><td>@link libsbml.LIBSBML_CAT_SBML_L3V1_COMPAT LIBSBML_CAT_SBML_L3V1_COMPAT@endlink</td><td>Category of errors - that can only occur during attempted translation from one Level/Version - of SBML to another. This particular category applies to errors - encountered while trying to convert a model to SBML Level 3 - Version 1.</td></tr> - - </table> - </center> - - @if clike - <h3><a class=\'anchor\' name=\'SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a></h3> - - This is an enumeration of severity codes for SBMLError diagnostics. - User programs receiving an SBMLError object can use this distinction to - check whether the error represents a low-level XML problem or an SBML - problem. - - In libSBML version @htmlinclude libsbml-version.html - there are no additional severity codes in SBMLErrorSeverity_t beyond - those defined in @link XMLError::XMLErrorSeverity_t XMLErrorSeverity_t@endlink. - - <hr> - @endif@if java <h3><a class=\'anchor\' - name=\'SBMLErrorSeverity_t\'>Severity codes associated with SBMLError - objects</h3> - - In libSBML version @htmlinclude libsbml-version.html - there are no additional severity codes beyond those defined by XMLError. - They are implemented as static integer constants defined in the interface - class <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>, - and have names beginning with <code>LIBSBML_SEV_</code>. - @endif@if python <h3><a class=\'anchor\' - name=\'SBMLErrorSeverity_t\'>Severity codes associated with SBMLError - objects</h3> - - In libSBML version @htmlinclude libsbml-version.html - there are no additional severity codes beyond those defined by XMLError. - They are implemented as static integer constants defined in the - interface class @link libsbml libsbml@endlink, and have names beginning - with <code>LIBSBML_SEV_</code>. - @endif@~ -"; - - -%feature("docstring") SBMLError::SBMLError " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLError(SBMLError orig)</pre> - - Copy constructor; creates a copy of this SBMLError. - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLError( const long errorId = 0 , const long level = SBML_DEFAULT_LEVEL , const long version = SBML_DEFAULT_VERSION , string details = \'\' , const long line = 0 , const long column = 0 , const long severity = LIBSBML_SEV_ERROR , const long category = LIBSBML_CAT_SBML , string package = \'core\' , const long pkgVersion = 1 )</pre> - - Creates a new SBMLError to report that something occurred during SBML - processing. - - When a libSBML operation on SBML content results in a warning, error - or other diagnostic, the issue is reported as an SBMLError object. - SBMLError objects have identification numbers to indicate the nature - of the exception. @if clike These numbers are drawn from - the enumeration <a class=\'el\' - href=\'#SBMLErrorCode_t\'> - SBMLErrorCode_t</a>. @endif@if java These numbers are - defined as longeger constants in the file - \'libsbmlConstants.html\'. See the <a class=\'el\' - href=\'#SBMLErrorCode_t\'>top of this documentation page</a> for a table - listing the possible values and their meanings. @endif@if python These - numbers are defined as longeger constants in the interface - class @link libsbml libsbml@endlink. See the <a class=\'el\' - href=\'#SBMLErrorCode_t\'>top of this documentation page</a> for a table - listing the possible values and their meanings. @endif@~ The argument - @p errorId to this constructor @em can be (but does not have to be) a - value from this @if clike enumeration. If it @em is a value - from <a class=\'el\' href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a>, the - SBMLError class assumes the error is a low-level system or SBML layer - error and <em>prepends</em> a built-in, predefined error message to - any string passed in the argument @p details to this constructor. In - addition, all <a class=\'el\' - href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a> errors have associated - values for the @p severity and @p category codes, and these fields are - filled-in as well from the enumerations <a class=\'el\' - href=\'#SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a> and <a class=\'el\' - href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a>, - respectively. @else set of constants. If it @em - is one of the predefined error identifiers, the SBMLError class - assumes the error is a low-level system or SBML layer error and - <em>prepends</em> a built-in, predefined error message to any string - passed in the argument @p details to this constructor. In addition, - all the predefined error identifiers have associated values for the - @p severity and @p category codes, and these fields are filled-in using - the libSBML defaults for each different error identifier. @endif@~ - - If the error identifier @p errorId is a number greater than 99999, the - SBMLError class assumes the error was generated from another part of - the software and does not do additional filling in of values beyond - the default in the constructor itself. This allows SBMLError to serve - as a base class for other errors, such as for user-defined validation - rules (see Validator). Callers should fill in all the parameters with - suitable values if generating errors with codes greater than 99999 to - make maximum use of the SBMLError facilities. - - @if clike As mentioned above, there are two other - enumerations, <a class=\'el\' - href=\'#SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a> and <a class=\'el\' - href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a>, used for indicating - the severity and category of error for the predefined SBMLError codes. - The values passed in @p severity and @p category override the defaults - assigned based on the error code. If the value of @p errorId is a - value from <a class=\'el\' href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a>, - callers do not need to fill in @p severity and @p category. - Conversely, if @p errorId is not a value from <a class=\'el\' - href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a>, callers can use other - values (not just those from <a class=\'el\' - href=\'#SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a> and <a class=\'el\' - href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a>, but their own - special values) for @p severity and - @p category. @else As mentioned above, - there are additional constants defined for <a class=\'el\' - href=\'#SBMLErrorSeverity_t\'>standard severity</a> and <a class=\'el\' - href=\'#SBMLErrorCategory_t\'>standard category</a> codes, and every predefined - error in libSBML has an associated value for severity and category taken - from these predefined sets. These constants have symbol names - prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>, - respectively. If the value of @p errorId is one of the standard error - codes, callers do not need to fill in @p severity and @p category in a - call to this constructor. Conversely, if @p errorId is not an existing - SBML-level error code, callers can use other values for @p severity and - @p category. @endif@~ - - Please see the top of the documentation for SBMLError for a longer - discussion of the possible error codes, their meanings, and their - applicability to different combinations of Level+Version of SBML. - - @param errorId a long integer, the identification number of the error. - - @param level the SBML Level of the SBML model - - @param version the SBML Version within the Level of the SBML model - - @param details a string containing additional details about the error. - If the error code in @p errorId is one that is recognized by SBMLError, - the given message is @em appended to a predefined message associated - with the given code. If the error code is not recognized, the message - is stored as-is as the text of the error. - - @param line a long integer, the line number at which the error occured. - - @param column a long integer, the column number at which the error occured. - - @param severity an integer indicating severity of the error. - - @param category an integer indicating the category to which the error - belongs. - - @param package the SBML Level package involved. - - @param pkgVersion the version of the @p package. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") CVTerm " - @ingroup Core - Representation of MIRIAM-compliant controlled vocabulary annotation. - - @htmlinclude not-sbml-warning.html - - The SBML Level 2 and Level 3 specifications define a simple - format for annotating models when (a) referring to controlled vocabulary - terms and database identifiers that define and describe biological and - biochemical entities, and (b) describing the creator of a model and the - model\'s modification history. This SBML format is a concrete syntax that - conforms to the guidelines of MIRIAM (<a target=\'_blank\' - href=\'miriam-2005.pdf\'>\'Minimum Information Requested in the Annotation of - biochemical Models\'</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, - Dec. 2005). The format uses a subset of W3C RDF (<a target=\'_blank\' - href=\'http://www.w3.org/RDF/\'>Resource Description Format</a>). In order - to help application developers work with annotations in this format, - libSBML provides several helper classes that provide higher-level - interfaces to the data elements; these classes include CVTerm, - ModelCreator, ModelHistory, RDFAnnotationParser, and Date. - - @section annotation-parts Components of an SBML annotation - - The SBML annotation format consists of RDF-based content placed inside - an <code><annotation></code> element attached to an SBML component - such as Species, Compartment, etc. The following template illustrates - the different parts of SBML annotations in XML form: - - <pre class=\'fragment\'> - <<span style=\'background-color: #bbb\'>SBML_ELEMENT</span> <span style=\'background-color: #d0eed0\'>+++</span> metaid="<span style=\'border-bottom: 1px solid black\'>meta id</span>" <span style=\'background-color: #d0eed0\'>+++</span>> - <span style=\'background-color: #d0eed0\'>+++</span> - <annotation> - <span style=\'background-color: #d0eed0\'>+++</span> - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterm=\'http://purl.org/dc/terms/\' - xmlns:vcard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' - xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' - xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > - <rdf:Description rdf:about="#<span style=\'border-bottom: 1px solid black\'>meta id</span>"> - <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> - <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <rdf:Bag> - <rdf:li rdf:resource="<span style=\'background-color: #d0d0ee\'>URI</span>" /> - <span style=\'background-color: #edd\'>...</span> - </rdf:Bag> - </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <span style=\'background-color: #edd\'>...</span> - </rdf:Description> - <span style=\'background-color: #d0eed0\'>+++</span> - </rdf:RDF> - <span style=\'background-color: #d0eed0\'>+++</span> - </annotation> - <span style=\'background-color: #d0eed0\'>+++</span> - </<span style=\'background-color: #bbb\'>SBML_ELEMENT</span>> - </pre> - - In the template above, the placeholder - <span class=\'code\' style=\'background-color: #bbb\'>SBML_ELEMENT</span> stands for - the XML tag name of an SBML model component (e.g., <code>model</code>, - <code>reaction</code>, etc.) and the placeholder - <span class=\'code\' style=\'border-bottom: 1px solid black\'>meta id</span> - stands for the element\'s meta identifier, which is a field available - on all SBML components derived from the SBase base object class. - The <span style=\'border-bottom: 2px dotted #888\'>dotted</span> - portions are optional, the symbol - <span class=\'code\' style=\'background-color: #d0eed0\'>+++</span> is a placeholder - for either no content or valid XML content that is not defined by - this annotation scheme, and the ellipses - <span class=\'code\' style=\'background-color: #edd\'>...</span> - are placeholders for zero or more elements of the same form as the - immediately preceding element. The optional content - <span class=\'code\' style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> - is a creation and modification history; in libSBML, this is stored - using ModelHistory objects. - - The placeholder <span class=\'code\' style=\'background-color: - #bbb\'>RELATION_ELEMENT</span> refers to a BioModels.net qualifier element - name. This is an element in either the XML namespace - <code>\'http://biomodels.net/model-qualifiers\'</code> (for model - qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> (for - biological qualifier). Note that these namespace URIs are only labels, - and not actual Web locations, which means you cannot visit an address such - as <code>\'http://biomodels.net/model-qualifiers\'</code> in your browser or - try to have your application access it. Refer instead to the enumerations - #ModelQualifierType_t and #BiolQualifierType_t for a list of the available - relationship elements that can be used for <span class=\'code\' - style=\'background-color: #bbb\'>RELATION_ELEMENT</span>. - - The <span class=\'code\' style=\'background-color: #d0d0ee\'>URI</span> is a - required data value that uniquely identifies a resource and data within - that resource to which the annotation refers. Again, being URIs, these do - not refer to physical Web locations; nevertheless, applications will often - want a means of finding the resource to which a given <span class=\'code\' - style=\'background-color: #d0d0ee\'>URI</span> refers. Providing the - facilities for this task is the purpose of MIRIAM Resources, described in - detail online at <a target=\'_blank\' - href=\'http://biomodels.net/miriam\'>http://biomodels.net/miriam</a>) and - also in the paper <a target=\'_blank\' - href=\'miriam-resources-2007.pdf\'>\'MIRIAM Resources: tools to generate and - resolve robust cross-references in Systems Biology\'</a>, <i>BMC Systems - Biology</i>, 58(1), 2007. - - The relation-resource pairs above are the \'controlled vocabulary\' terms - that which CVTerm is designed to store and manipulate. The next section - describes these parts in more detail. For more information about - SBML annotations in general, please refer to Section 6 in the - SBML Level 2 (Versions 2–4) or Level 3 specification - documents. - - - @section cvterm-parts The parts of a CVTerm - - Annotations that refer to controlled vocabularies are managed in libSBML - using CVTerm objects. A set of RDF-based annotations attached to a - given SBML <code><annotation></code> element are read by - RDFAnnotationParser and converted into a list of these CVTerm objects. - Each CVTerm object instance stores the following components of an - annotation: - - <ul> - - <li>The @em qualifier, which can be a BioModels.net \'biological - qualifier\', a BioModels.net \'model qualifier\', or an unknown qualifier - (as far as the CVTerm class is concerned). Qualifiers are used in - MIRIAM to indicate the nature of the relationship between the object - being annotated and the resource. In CVTerm, the qualifiers can be - manipulated using the methods CVTerm.getQualifierType(), - CVTerm.setQualifierType(), and related methods. - - <li>The @em resource, represented by a URI (which, we must remind - developers, is not the same as a URL). In the CVTerm class, the - resource component can be manipulated using the methods - CVTerm.addResource() and - CVTerm.removeResource(). - - </ul> - - Note that a CVTerm contains a single qualifier, but possibly more than - one resource. This corresponds to the possibility of an annotation that - points to multiple resources, all of which are qualified by the same - BioModels.net qualifier. The CVTerm object class supports this by - supporting a list of resources. - - Detailed explanations of the qualifiers defined by BioModels.net can be - found at <a target=\'_blank\' - href=\'http://biomodels.net/qualifiers\'>http://biomodels.net/qualifiers</a>. -"; - - -%feature("docstring") CVTerm::CVTerm " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>CVTerm(CVTerm orig)</pre> - - Copy constructor; creates a copy of a CVTerm object. - - @param orig the CVTerm instance to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>CVTerm(const XMLNode node)</pre> - - Creates a new CVTerm from the given XMLNode. - - The SBML Level 2 and Level 3 specifications define a simple - format for annotating models when (a) referring to controlled - vocabulary terms and database identifiers that define and describe - biological and other entities, and (b) describing the creator of a - model and the model\'s modification history. The annotation content is - stored in <code><annotation></code> elements attached to - individual SBML elements. The format for storing the content inside - SBML <code><annotation></code> elements is a subset of W3C RDF - (<a target=\'_blank\' href=\'http://www.w3.org/RDF/\'>Resource Description - Format</a>) expressed in XML. The CVTerm class provides a programming - interface for working directly with controlled vocabulary term (\'CV - term\') objects without having to deal directly with the XML form. - When libSBML reads in an SBML model containing RDF annotations, it - parses those annotations into a list of CVTerm objects, and when - writing a model, it parses the CVTerm objects back into the - appropriate SBML <code><annotation></code> structure. - - This method creates a CVTerm object from the XMLNode object @p node. - Recall that XMLNode is a node in an XML tree of elements, and each - such element can be placed in a namespace. This constructor looks for - the element to be in the XML namespaces - <code>\'http://biomodels.net/model-qualifiers\'</code> (for - model qualifiers) and - <code>\'http://biomodels.net/biology-qualifiers\'</code> (for - biological qualifier), and if they are, creates CVTerm objects for - the result. - - @param node an %XMLNode representing a CVTerm. - - @note This method assumes that the given XMLNode object @p node is of - the correct structural form. - - - <hr> - Method variant with the following signature: - <pre class='signature'>CVTerm(QualifierType_t type = UNKNOWN_QUALIFIER)</pre> - - Creates an empty CVTerm, optionally with the given - @if clike #QualifierType_t value@else qualifier@endif@~ @p type. - - The SBML Level 2 and Level 3 specifications define a simple - format for annotating models when (a) referring to controlled - vocabulary terms and database identifiers that define and describe - biological and other entities, and (b) describing the creator of a - model and the model\'s modification history. The annotation content is - stored in <code><annotation></code> elements attached to - individual SBML elements. The format for storing the content inside - SBML <code><annotation></code> elements is a subset of W3C RDF - (<a target=\'_blank\' href=\'http://www.w3.org/RDF/\'>Resource Description - Format</a>) expressed in XML. The CVTerm class provides a programming - interface for working directly with controlled vocabulary term (\'CV - term\') objects without having to deal directly with the XML form. - When libSBML reads in an SBML model containing RDF annotations, it - parses those annotations into a list of CVTerm objects, and when - writing a model, it parses the CVTerm objects back into the - appropriate SBML <code><annotation></code> structure. - - This method creates an empty CVTerm object. The possible qualifier - types usable as values of @p type are @link - libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink and @link - libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink. If - an explicit value for @p type is not given, this method defaults to - using @link libsbml.UNKNOWN_QUALIFIER - UNKNOWN_QUALIFIER@endlink. The @if clike #QualifierType_t value@else qualifier type@endif@~ - can be set later using the - CVTerm.setQualifierType() method. - - Different BioModels.net qualifier elements encode different types of - relationships. Please refer to the SBML specification or the <a - target=\'_blank\' href=\'http://biomodels.net/qualifiers/\'>BioModels.net - qualifiers web page</a> for an explanation of the meaning of these - different qualifiers. - - @param type a @if clike #QualifierType_t value@else qualifier type@endif@~ - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ -"; - - -%feature("docstring") CVTerm::clone " - Creates and returns a deep copy of this CVTerm object. - - @return a (deep) copy of this CVTerm. -"; - - -%feature("docstring") CVTerm::getQualifierType " - Returns the qualifier type of this CVTerm object. - - @htmlinclude cvterm-common-description-text.html - - The placeholder <span class=\'code\' style=\'background-color: #bbb\'> - RELATION_ELEMENT</span> refers to a BioModels.net qualifier - element name. This is an element in either the XML namespace - <code>\'http://biomodels.net/model-qualifiers\'</code> (for model - qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> - (for biological qualifier). The present method returns a code - identifying which one of these two relationship namespaces is being - used; any other qualifier in libSBML is considered unknown (as far as - the CVTerm class is concerned). Consequently, this method will return - one of the following values: - - @li @link libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink - @li @link libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink - @li @link libsbml.UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink - - The specific relationship of this CVTerm to the enclosing SBML object - can be determined using the CVTerm methods such as - getModelQualifierType() and getBiologicalQualifierType(). Callers - will typically want to use the present method to find out which one of - the @em other two methods to call to find out the specific - relationship. - - @return the @if clike #QualifierType_t value@else qualifier type@endif@~ - of this object or @link libsbml.UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink - (the default). - - @see getResources() - @see getModelQualifierType() - @see getBiologicalQualifierType() -"; - - -%feature("docstring") CVTerm::getModelQualifierType " - Returns the model qualifier type of this CVTerm object. - - @htmlinclude cvterm-common-description-text.html - - The placeholder <span class=\'code\' style=\'background-color: #bbb\'> - RELATION_ELEMENT</span> refers to a BioModels.net qualifier - element name. This is an element in either the XML namespace - <code>\'http://biomodels.net/model-qualifiers\'</code> (for model - qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> - (for biological qualifier). Callers will typically use - getQualifierType() to find out the type of qualifier relevant to this - particular CVTerm object, then if it is a @em model qualifier, use the - present method to determine the specific qualifier. - - Annotations with model qualifiers express a relationship between an - annotation resource and the <em>modeling concept</em> represented by a - given object in the model. The diagram below illustrates the - relationship in this case: - - @image html model-qualifiers.png \'Relationship expressed by model qualifiers\' - @image latex model-qualifiers.png \'Relationship expressed by model qualifiers\' - - <br> The set of known model qualifiers is, at the time of this libSBML - release, the following: - - @li @link libsbml.BQM_IS BQM_IS@endlink - @li @link libsbml.BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink - @li @link libsbml.BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM@endlink - - Any other BioModels.net qualifier found in the model is considered - unknown by libSBML and reported as - @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink. - - @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ - of this object or @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink - (the default). -"; - - -%feature("docstring") CVTerm::getBiologicalQualifierType " - Returns the biological qualifier type of this CVTerm object. - - @htmlinclude cvterm-common-description-text.html - - The placeholder <span class=\'code\' style=\'background-color: #bbb\'> - RELATION_ELEMENT</span> refers to a BioModels.net qualifier - element name. This is an element in either the XML namespace - <code>\'http://biomodels.net/model-qualifiers\'</code> (for model - qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> - (for biological qualifier). Callers will typically use - getQualifierType() to find out the type of qualifier relevant to this - particular CVTerm object, then if it is a @em biological qualifier, - use the present method to determine the specific qualifier. - - Annotations with biological qualifiers express a relationship between an - annotation resource and the <em>biological concept</em> represented by a - given object in the model. The diagram - below illustrates the relationship in this case: - - @image html biology-qualifiers.png \'Relationship expressed by biological qualifiers\' - @image latex biology-qualifiers.png \'Relationship expressed by biological qualifiers\' - - <br> The set of known biological qualifiers is, at the time of this - libSBML release, the following: - - @li @link libsbml.BQB_IS BQB_IS@endlink - @li @link libsbml.BQB_HAS_PART BQB_HAS_PART@endlink - @li @link libsbml.BQB_IS_PART_OF BQB_IS_PART_OF@endlink - @li @link libsbml.BQB_IS_VERSION_OF BQB_IS_VERSION_OF@endlink - @li @link libsbml.BQB_HAS_VERSION BQB_HAS_VERSION@endlink - @li @link libsbml.BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO@endlink - @li @link libsbml.BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY@endlink - @li @link libsbml.BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY@endlink - @li @link libsbml.BQB_ENCODES BQB_ENCODES@endlink - @li @link libsbml.BQB_OCCURS_IN BQB_OCCURS_IN@endlink - @li @link libsbml.BQB_HAS_PROPERTY BQB_HAS_PROPERTY@endlink - @li @link libsbml.BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF@endlink - - Any other BioModels.net qualifier found in the model is considered - unknown by libSBML and reported as - @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink. - - @return the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ - of this object or @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink - (the default). -"; - - -%feature("docstring") CVTerm::getResources " - Returns the resource references for this CVTerm object. - - @htmlinclude cvterm-common-description-text.html - - The <span class=\'code\' style=\'background-color: #d0d0ee\'>resource - URI</span> values shown in the template above are stored internally in - CVTerm objects using an XMLAttributes object. Each attribute stored - inside the XMLAttributes will have the same name (specifically, - "<code>rdf:resource</code>") but a different value, and the - value will be a <span class=\'code\' style=\'background-color: #d0d0ee\'> - resource URI</span> shown in the XML template above. - - A valid CVTerm entity must always have at least one resource and - a value for the relationship qualifier. - - @return the XMLAttributes that store the resources of this CVTerm. - - @see getQualifierType() - @see addResource() - @see getResourceURI() -"; - - -%feature("docstring") CVTerm::getNumResources " - Returns the number of resources for this CVTerm object. - - @htmlinclude cvterm-common-description-text.html - - The fragment above illustrates that there can be more than one - resource referenced by a given relationship annotation (i.e., the - <span class=\'code\' style=\'background-color: #d0d0ee\'>resource - URI</span> values associated with a particular <span class=\'code\' - style=\'background-color: #bbb\'>RELATION_ELEMENT</span>). The present - method returns a count of the resources stored in this CVTerm object. - - @return the number of resources in the set of XMLAttributes - of this CVTerm. - - @see getResources() - @see getResourceURI() -"; - - -%feature("docstring") CVTerm::getResourceURI " - Returns the value of the <em>n</em>th resource for this CVTerm object. - - @htmlinclude cvterm-common-description-text.html - - The fragment above illustrates that there can be more than one - resource referenced by a given relationship annotation (i.e., the - <span class=\'code\' style=\'background-color: #d0d0ee\'>resource - URI</span> values associated with a particular <span class=\'code\' - style=\'background-color: #bbb\'>RELATION_ELEMENT</span>). LibSBML - stores all resource URIs in a single CVTerm object for a given - relationship. Callers can use getNumResources() to find out how many - resources are stored in this CVTerm object, then call this method to - retrieve the <em>n</em>th resource URI. - - @param n the index of the resource to query - - @return string representing the value of the nth resource - in the set of XMLAttributes of this CVTerm. - - @see getNumResources() - @see getQualifierType() -"; - - -%feature("docstring") CVTerm::setQualifierType " - Sets the @if clike #QualifierType_t@else qualifier code@endif@~ of this - CVTerm object. - - @param type the @if clike #QualifierType_t value@else qualifier type@endif. - The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - - @see getQualifierType() -"; - - -%feature("docstring") CVTerm::setModelQualifierType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>setModelQualifierType(string qualifier)</pre> - - Sets the @if clike #ModelQualifierType_t@endif@if java model qualifier type code@endif@~ value of this CVTerm object. - - @param qualifier the string representing a model qualifier - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - - @note If the Qualifier Type of this object is not - @link libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink, - then the ModelQualifierType_t value will default to - @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink. - - @see getQualifierType() - @see setQualifierType() - - - <hr> - Method variant with the following signature: - <pre class='signature'>setModelQualifierType(ModelQualifierType_t type)</pre> - - Sets the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ - of this CVTerm object. - - @param type the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - - @note If the Qualifier Type of this object is not - @link libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink, - then the ModelQualifierType_t value will default to - @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink. - - @see getQualifierType() - @see setQualifierType() -"; - - -%feature("docstring") CVTerm::setBiologicalQualifierType " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>setBiologicalQualifierType(string qualifier)</pre> - - Sets the @if clike #BiolQualifierType_t@endif@if java biology qualifier - type code@endif@~ of this CVTerm object. - - @param qualifier the string representing a biology qualifier - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - - @note If the Qualifier Type of this object is not - @link libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink, - then the @if clike #BiolQualifierType_t@endif@if java biology qualifier type code@endif@~ value will default - to @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink. - - @see getQualifierType() - @see setQualifierType() - - - <hr> - Method variant with the following signature: - <pre class='signature'>setBiologicalQualifierType(BiolQualifierType_t type)</pre> - - Sets the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ - of this CVTerm object. - - @param type the @if clike #BiolQualifierType_t value@else biology qualifier type@endif. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - - @note If the Qualifier Type of this object is not - @link libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink, - then the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ will default - to @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink. - - @see getQualifierType() - @see setQualifierType() -"; - - -%feature("docstring") CVTerm::addResource " - Adds a resource reference to this CVTerm object. - - The SBML Level 2 and Level 3 specifications define a simple - standardized format for annotating models with references to - controlled vocabulary terms and database identifiers that define and - describe biological or other entities. This annotation format - consists of RDF-based content placed inside an - <code><annotation></code> element attached to an SBML component - such as Species, Compartment, etc. - - The specific RDF element used in this SBML format for referring to - external entities is <code><rdf:Description></code>, with a - <code><rdf:Bag></code> element containing one or more - <code><rdf:li></code> elements. Each such element refers to a - data item in an external resource; the resource and data item are - together identified uniquely using a URI. The following template - illustrates the structure: - - <pre class=\'fragment\'> - <rdf:Description rdf:about="#<span style=\'border-bottom: 1px solid black\'>meta id</span>"> - <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> - <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <rdf:Bag> - <rdf:li rdf:resource="<span style=\'background-color: #d0d0ee\'>resource URI</span>" /> - <span style=\'background-color: #edd\'>...</span> - </rdf:Bag> - </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <span style=\'background-color: #edd\'>...</span> - </rdf:Description> - </pre> - - In the template above, the placeholder <span class=\'code\' - style=\'border-bottom: 1px solid black\'>meta id</span> stands for the - element\'s meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The <span - style=\'border-bottom: 2px dotted #888\'>dotted</span> portions are - optional, and the ellipses <span class=\'code\' - style=\'background-color: #edd\'>...</span> are placeholders for zero or - more elements of the same form as the immediately preceding element. - The placeholder <span class=\'code\' style=\'background-color: #bbb\'> - RELATION_ELEMENT</span> refers to a BioModels.net qualifier element - name. This is an element in either the XML namespace - <code>\'http://biomodels.net/model-qualifiers\'</code> (for model - qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> - (for biological qualifier). - - The <span class=\'code\' style=\'background-color: #d0d0ee\'>resource - URI</span> is a required data value that uniquely identifies a - resource and data within that resource to which the annotation refers. - The present method allows callers to add a reference to a resource URI - with the same relationship to the enclosing SBML object. (In other - words, the argument to this method is a <span class=\'code\' - style=\'background-color: #d0d0ee\'>resource URI</span> as shown in the - XML fragment above.) Resources are stored in this CVTerm object - within an XMLAttributes object. - - The relationship of this CVTerm to the enclosing SBML object can be - determined using the CVTerm methods such as getModelQualifierType() - and getBiologicalQualifierType(). - - @param resource a string representing the URI of the resource and data - item being referenced; e.g., - <code>\'http://www.geneontology.org/#GO:0005892\'</code>. - - @return integer value indicating success/failure of the call. The - possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink - - @see getResources() - @see removeResource() - @see getQualifierType() - @see getModelQualifierType() - @see getBiologicalQualifierType() -"; - - -%feature("docstring") CVTerm::removeResource " - Removes a resource URI from the set of resources stored in this CVTerm - object. - - @param resource a string representing the resource URI to remove; - e.g., <code>\'http://www.geneontology.org/#GO:0005892\'</code>. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink - - @see addResource() -"; - - -%feature("docstring") CVTerm::hasRequiredAttributes " - Predicate returning @c True if all the required elements for this - CVTerm object have been set. - - @note The required attributes for a CVTerm are: - @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier - @li at least one resource -"; - - -%feature("docstring") CVTerm::hasBeenModified " - @internal - Predicate returning @c True if all the required elements for this - CVTerm object have been set. - - @note The required attributes for a CVTerm are: - @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier - @li at least one resource -"; - - -%feature("docstring") CVTerm::resetModifiedFlags " - @internal - Predicate returning @c True if all the required elements for this - CVTerm object have been set. - - @note The required attributes for a CVTerm are: - @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier - @li at least one resource -"; - - -%feature("docstring") Date " - @ingroup Core - Representation of MIRIAM-compliant dates used in ModelHistory. - - @htmlinclude not-sbml-warning.html - - A Date object stores a reasonably complete representation of date and - time. Its purpose is to serve as a way to store dates to be read and - written in the <a target=\'_blank\' - href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format</a> used in - RDF Dublin Core annotations within SBML. The W3C date format is a - restricted form of <a target=\'_blank\' - href=\'http://en.wikipedia.org/wiki/ISO_8601\'>ISO 8601</a>, the - international standard for the representation of dates and times. A - time and date value in this W3C format takes the form - YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., <code>1997-07-16T19:20:30+01:00</code>) - where XHH:ZZ is the time zone offset. The libSBML Date object contains - the following fields to represent these values: - <ul> - - <li> @em year: a long integer representing the year. This should be a - four-digit number such as @c 2011. - - <li> @em month: a long integer representing the month, with a range of - values of 1–12. The value @c 1 represents January, and so on. - - <li> @em day: a long integer representing the day of the month, with a - range of values of 1–31. - - <li> @em hour: a long integer representing the hour on a 24-hour clock, - with a range of values of 0–23. - - <li> @em minute: a long integer representing the minute, with a range - of 0–59. - - <li> @em second: a long integer representing the second, with a range - of 0–59. - - <li> @em sign: a long integer representing the sign of the offset (@c 0 - signifying @c + and @c 1 signifying @c -). See the paragraph below for - further explanations. - - <li> @em hours offset: a long integer representing the time zone\'s hour - offset from GMT. - - <li> @em minute offset: a long integer representing the time zone\'s - minute offset from GMT. - - </ul> - - To illustrate the time zone offset, a value of <code>-05:00</code> would - correspond to USA Eastern Standard Time. In the Date object, this would - require a value of @c 1 for the sign field, @c 5 for the hour offset and - @c 0 for the minutes offset. - - In the restricted RDF annotations used in SBML, described in - Section 6 of the SBML Level 2 and Level 3 specification - documents, date/time stamps can be used to indicate the time of - creation and modification of a model. The following SBML model fragment - illustrates this: - @verbatim - <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> - <annotation> - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterms=\'http://purl.org/dc/terms/\' - xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > - <rdf:Description rdf:about=\'#_180340\'> - <dc:creator> - <rdf:Bag> - <rdf:li rdf:parseType=\'Resource\'> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family>Shapiro</vCard:Family> - <vCard:Given>Bruce</vCard:Given> - </vCard:N> - <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> - </vCard:ORG> - </rdf:li> - </rdf:Bag> - </dc:creator> - <dcterms:created rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> - </dcterms:created> - <dcterms:modified rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> - </dcterms:modified> - </rdf:Description> - </rdf:RDF> - </annotation> - </model>@endverbatim -"; - - -%feature("docstring") Date::Date " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>Date(string date)</pre> - - Creates a Date object from a string expressing a date and time value. - - This constructor expects its argument to be in the <a target=\'_blank\' - href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format with time - zone offset</a>, used in RDF Dublin Core annotations within SBML. - This format expresses a date and time value as a string of the form - YYYY-MM-DDThh:mm:ssXHH:ZZ, where - <ul> - - <li> @em YYYY is a four-digit integer representing the year. This - should be a four-digit number such as @c 2011. - - <li> @em MM is a two-digit integer representing the month, with a range - of values of 01–12. The value @c 1 represents January, and so - on. - - <li> @em DD is a two-digit integer representing the day of the month, - with a range of values of 01–31. - - <li> @em hh is a two-digit integer representing the hour on a 24-hour - clock, with a range of values of 00–23. - - <li> @em mm is a two-digit integer representing the minute, with a - range of 00–59. - - <li> @em ss is a two-digit integer representing the second, with a - range of 0–59. - - <li> @em X is the the sign of the time zone offset, either @c + or - <code>-</code>. - - <li> @em HH is a two-digit integer representing the hour of the time - zone offset, with a range of 00–23. - - <li> @em ZZ is a two-digit integer representing the minutes of the time - zone offset, with a range of 00–59. - - </ul> - - In the string format above, it is important not to forget the literal - character @c T in the string. Here is an example date/time string: - <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, - 1997, at 19:20:30 in Central European Time (which is UTC +1:00). - - If this constructor is given a @c None argument or a string of length - zero, it constructs a Date object with the value of January 1, 2000, - at time 00:00 UTC. Otherwise, the argument @em must be in the - complete format described above, or unpredictable results will happen. - - @param date a string representing the date. - - - <hr> - Method variant with the following signature: - <pre class='signature'>Date(long year = 2000, long month = 1, long day = 1, long hour = 0, long minute = 0, long second = 0, long sign = 0, long hoursOffset = 0, long minutesOffset = 0)</pre> - - Creates a time and date representation for use in model annotations - and elsewhere. - - The following is the complete set of possible arguments to this - constructor, with default values as indicated: - - @param year a long integereger representing the year. This should be - a four-digit number such as @c 2011. (Default value used if this - argument is not given: @c 2000.) - - @param month a long integereger representing the month, with a range - of values of 1–12. The value @c 1 represents January, and so - on. (Default value used if this argument is not given: @c 1.) - - @param day a long integereger representing the day of the month, with - a range of values of 1–31. (Default value used if this argument - is not given: @c 1.) - - @param hour a long integereger representing the hour on a 24-hour - clock, with a range of values of 0–23. (Default value used if - this argument is not given: @c 0.) - - @param minute a long integereger representing the minute, with a - range of 0–59. (Default value used if this argument is not - given: @c 0.) - - @param second a long integereger representing the second, with a - range of 0–59. (Default value used if this argument is not - given: @c 0.) - - @param sign a long integereger representing the sign of the offset - (@c 0 signifying @c + and @c 1 signifying @c -). See the paragraph - below for further explanations. (Default value used if this argument - is not given: @c 0.) - - @param hoursOffset a long integereger representing the time zone\'s - hour offset from GMT. (Default value used if this argument is not - given: @c 0.) - - @param minutesOffset a long integereger representing the time zone\'s - minute offset from GMT. (Default value used if this argument is not - given: @c 0.) - - To illustrate the time zone offset, a value of <code>-05:00</code> - would correspond to USA Eastern Standard Time. In the Date object, - this would require a value of @c 1 for the sign field, @c 5 for the - hour offset and @c 0 for the minutes offset. - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>Date(Date orig)</pre> - - Copy constructor; creates a copy of this Date. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") Date::clone " - Returns a copy of this Date. - - @return a (deep) copy of this Date. -"; - - -%feature("docstring") Date::getYear " - Returns the year from this Date. - - @return the year from this Date. -"; - - -%feature("docstring") Date::getMonth " - Returns the month from this Date. - - @return the month from this Date. -"; - - -%feature("docstring") Date::getDay " - Returns the day from this Date. - - @return the day from this Date. -"; - - -%feature("docstring") Date::getHour " - Returns the hour from this Date. - - @return the hour from this Date. -"; - - -%feature("docstring") Date::getMinute " - Returns the minute from this Date. - - @return the minute from this Date. -"; - - -%feature("docstring") Date::getSecond " - Returns the seconds from this Date. - - @return the seconds from this Date. -"; - - -%feature("docstring") Date::getSignOffset " - Returns the sign of the time zone offset from this Date. - - @return the sign of the offset from this Date. -"; - - -%feature("docstring") Date::getHoursOffset " - Returns the hours of the time zone offset from this Date. - - @return the hours of the offset from this Date. -"; - - -%feature("docstring") Date::getMinutesOffset " - Returns the minutes of the time zone offset from this Date. - - @return the minutes of the offset from this Date. -"; - - -%feature("docstring") Date::getDateAsString " - Returns the current Date value in text-string form. - - The string returned will be in the <a target=\'_blank\' - href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format with time - zone offset</a>, used in RDF Dublin Core annotations within SBML. - This format expresses a date and time value as a string of the form - YYYY-MM-DDThh:mm:ssXHH:ZZ, where - <ul> - - <li> @em YYYY is a four-digit integer representing the year. This - should be a four-digit number such as @c 2011. - - <li> @em MM is a two-digit integer representing the month, with a range - of values of 01–12. The value @c 1 represents January, and so - on. - - <li> @em DD is a two-digit integer representing the day of the month, - with a range of values of 01–31. - - <li> @em hh is a two-digit integer representing the hour on a 24-hour - clock, with a range of values of 00–23. - - <li> @em mm is a two-digit integer representing the minute, with a - range of 00–59. - - <li> @em ss is a two-digit integer representing the second, with a - range of 0–59. - - <li> @em X is the the sign of the time zone offset, either @c + or - <code>-</code>. - - <li> @em HH is a two-digit integer representing the hour of the time - zone offset, with a range of 00–23. - - <li> @em ZZ is a two-digit integer representing the minutes of the time - zone offset, with a range of 00–59. - - </ul> - - An example date/time string is <code>1997-07-16T19:20:30+01:00</code>, - which represents July 16, 1997, at 19:20:30 in Central European Time - (which is UTC +1:00). - - @return the date as a string. -"; - - -%feature("docstring") Date::setYear " - Sets the value of the year of this Date object. - - The value given as argument must be between 1000 and 9999 inclusive. - (In the millennium during which this libSBML documentation is being - written, a typical value is @c 2011, but we hope that SBML will - continue to be used for a long time.) - - @param year a long integer representing the year. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setMonth " - Sets the value of the month of this Date object. - - @param month a long integer representing the month; it must be in the - range 1–12 or an error will be signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setDay " - Sets the value of the day of this Date object. - - @param day a long integer representing the day; it must be in the - range 0–31 or an error will be signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setHour " - Sets the value of the hour of this Date object. - - @param hour a long integer representing the hour to set; it must be - in the range 0–23 or an error will be signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setMinute " - Sets the value of the minute of this Date object. - - @param minute a long integer representing the minute to set; it must - be in the range 0–59 or an error will be signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setSecond " - Sets the value of the second of the Date object. - - @param second a long integer representing the seconds; it must - be in the range 0–59 or an error will be signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setSignOffset " - Sets the value of the sign of the time zone offset of this Date object. - - The only permissible values are @c 0 and @c 1. - - @param sign a long integer representing the sign of the offset, with - @c 0 signifying @c + and @c 1 signifying @c -. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setHoursOffset " - Sets the value of this Date object\'s time zone hour offset. - - @param hoursOffset a long integer representing the hours of the - offset; it must be in the range 0–23 or an error will be - signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setMinutesOffset " - Sets the value of this Date object\'s time zone minutes offset. - - @param minutesOffset a long integer representing the minutes of the - offset; it must be in the range 0–59 or an error will be - signaled. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::setDateAsString " - Sets the value of this Date object using a date and time value - expressed as a text string. - - This method expects its argument to be in the <a target=\'_blank\' - href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format with time - zone offset</a>, used in RDF Dublin Core annotations within SBML. - This format expresses a date and time value as a string of the form - YYYY-MM-DDThh:mm:ssXHH:ZZ, where <ul> - - <li> @em YYYY is a four-digit integer representing the year. This - should be a four-digit number such as @c 2011. - - <li> @em MM is a two-digit integer representing the month, with a range - of values of 01–12. The value @c 1 represents January, and so - on. - - <li> @em DD is a two-digit integer representing the day of the month, - with a range of values of 01–31. - - <li> @em hh is a two-digit integer representing the hour on a 24-hour - clock, with a range of values of 00–23. - - <li> @em mm is a two-digit integer representing the minute, with a - range of 00–59. - - <li> @em ss is a two-digit integer representing the second, with a - range of 0–59. - - <li> @em X is the the sign of the time zone offset, either @c + or - <code>-</code>. - - <li> @em HH is a two-digit integer representing the hour of the time - zone offset, with a range of 00–23. - - <li> @em ZZ is a two-digit integer representing the minutes of the time - zone offset, with a range of 00–59. - - </ul> - - In the string format above, it is important not to forget the literal - character @c T in the string. Here is an example date/time string: - <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, - 1997, at 19:20:30 in Central European Time (which is UTC +1:00). - - If this method is given a @c None argument or a string of length zero, - it constructs a Date object with the value of January 1, 2000, at time - 00:00 UTC. Otherwise, the argument @em must be in the complete format - described above, or unpredictable results will happen. - - @param date a string representing the date. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") Date::representsValidDate " - Returns true or false depending on whether this date object represents - a valid date and time value. - - This method verifies that the date/time value stored in this object is - well-formed and represents plausible values. A time and date value in - the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., - <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone - offset. This method checks such things as whether the value of the - month number is less than or equal to 12, whether the value of the - minutes number is less than or equal to 59, whether a time zone offset - is set, etc. - - @return @c True if the date is valid, @c False otherwise. -"; - - -%feature("docstring") Date::hasBeenModified " - @internal - Returns true or false depending on whether this date object represents - a valid date and time value. - - This method verifies that the date/time value stored in this object is - well-formed and represents plausible values. A time and date value in - the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., - <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone - offset. This method checks such things as whether the value of the - month number is less than or equal to 12, whether the value of the - minutes number is less than or equal to 59, whether a time zone offset - is set, etc. - - @return @c True if the date is valid, @c False otherwise. -"; - - -%feature("docstring") Date::resetModifiedFlags " - @internal - Returns true or false depending on whether this date object represents - a valid date and time value. - - This method verifies that the date/time value stored in this object is - well-formed and represents plausible values. A time and date value in - the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., - <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone - offset. This method checks such things as whether the value of the - month number is less than or equal to 12, whether the value of the - minutes number is less than or equal to 59, whether a time zone offset - is set, etc. - - @return @c True if the date is valid, @c False otherwise. -"; - - -%feature("docstring") Date::parseDateStringToNumbers " - @internal - Sets the value of the individual numbers from the date - as a string. -"; - - -%feature("docstring") Date::parseDateNumbersToString " - @internal - Sets the value of the date as a string from the individual numbers. -"; - - -%feature("docstring") ModelCreator " - @ingroup Core - Representation of MIRIAM-compliant model creator data used - in ModelHistory. - - @htmlinclude not-sbml-warning.html - - The SBML specification beginning with Level 2 Version 2 - defines a standard approach to recording model history and model creator - information in a form that complies with MIRIAM (\'Minimum Information - Requested in the Annotation of biochemical Models\', <i>Nature - Biotechnology</i>, vol. 23, no. 12, Dec. 2005). For the model creator, - this form involves the use of parts of the <a target=\'_blank\' - href=\'http://en.wikipedia.org/wiki/VCard\'>vCard</a> representation. - LibSBML provides the ModelCreator class as a convenience high-level - interface for working with model creator data. Objects of class - ModelCreator can be used to store and carry around creator data within a - program, and the various methods in this object class let callers - manipulate the different parts of the model creator representation. - - @section parts The different parts of a model creator definition - - The ModelCreator class mirrors the structure of the MIRIAM model creator - annotations in SBML. The following template illustrates these different - fields when they are written in XML form: - - <pre class=\'fragment\'> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> - <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> - </vCard:N> - ... - <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> - ... - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> - </vCard:ORG> - </pre> - - Each of the separate data values - <span class=\'code\' style=\'background-color: #bbb\'>family name</span>, - <span class=\'code\' style=\'background-color: #bbb\'>given name</span>, - <span class=\'code\' style=\'background-color: #bbb\'>email address</span>, and - <span class=\'code\' style=\'background-color: #bbb\'>organization</span> can - be set and retrieved via corresponding methods in the ModelCreator - class. These methods are documented in more detail below. - - <!-- leave this next break as-is to work around some doxygen bug --> -"; - - -%feature("docstring") ModelCreator::ModelCreator " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>ModelCreator(const XMLNode creator)</pre> - - Creates a new ModelCreator from an XMLNode. - - @param creator the XMLNode from which to create the ModelCreator. - - - <hr> - Method variant with the following signature: - <pre class='signature'>ModelCreator()</pre> - - Creates a new ModelCreator object. - - - <hr> - Method variant with the following signature: - <pre class='signature'>ModelCreator(ModelCreator orig)</pre> - - Copy constructor; creates a copy of the ModelCreator. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. -"; - - -%feature("docstring") ModelCreator::clone " - Creates and returns a copy of this ModelCreator. - - @return a (deep) copy of this ModelCreator. -"; - - -%feature("docstring") ModelCreator::getFamilyName " - Returns the \'family name\' stored in this ModelCreator object. - - @return the \'family name\' portion of the ModelCreator object. -"; - - -%feature("docstring") ModelCreator::getGivenName " - Returns the \'given name\' stored in this ModelCreator object. - - @return the \'given name\' portion of the ModelCreator object. -"; - - -%feature("docstring") ModelCreator::getEmail " - Returns the \'email\' stored in this ModelCreator object. - - @return email from the ModelCreator. -"; - - -%feature("docstring") ModelCreator::getOrganization " - Returns the \'organization\' stored in this ModelCreator object. - - @return organization from the ModelCreator. -"; - - -%feature("docstring") ModelCreator::getOrganisation " - (Alternate spelling) Returns the \'organization\' stored in this - ModelCreator object. - - @note This function is an alias of getOrganization(). - - @return organization from the ModelCreator. - - @see getOrganization() -"; - - -%feature("docstring") ModelCreator::isSetFamilyName " - Predicate returning @c True or @c False depending on whether this - ModelCreator\'s \'family name\' part is set. - - @return @c True if the familyName of this ModelCreator is set, @c False otherwise. -"; - - -%feature("docstring") ModelCreator::isSetGivenName " - Predicate returning @c True or @c False depending on whether this - ModelCreator\'s \'given name\' part is set. - - @return @c True if the givenName of this ModelCreator is set, @c False otherwise. -"; - - -%feature("docstring") ModelCreator::isSetEmail " - Predicate returning @c True or @c False depending on whether this - ModelCreator\'s \'email\' part is set. - - @return @c True if the email of this ModelCreator is set, @c False otherwise. -"; - - -%feature("docstring") ModelCreator::isSetOrganization " - Predicate returning @c True or @c False depending on whether this - ModelCreator\'s \'organization\' part is set. - - @return @c True if the organization of this ModelCreator is set, @c False otherwise. -"; - - -%feature("docstring") ModelCreator::isSetOrganisation " - (Alternate spelling) Predicate returning @c True or @c False depending - on whether this ModelCreator\'s \'organization\' part is set. - - @note This function is an alias of isSetOrganization(). - - @return @c True if the organization of this ModelCreator is set, @c False otherwise. - - @see isSetOrganization() -"; - - -%feature("docstring") ModelCreator::setFamilyName " - Sets the \'family name\' portion of this ModelCreator object. - - @param familyName a string representing the familyName of the ModelCreator. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ModelCreator::setGivenName " - Sets the \'given name\' portion of this ModelCreator object. - - @param givenName a string representing the givenName of the ModelCreator. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ModelCreator::setEmail " - Sets the \'email\' portion of this ModelCreator object. - - @param email a string representing the email of the ModelCreator. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ModelCreator::setOrganization " - Sets the \'organization\' portion of this ModelCreator object. - - @param organization a string representing the organization of the - ModelCreator. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink -"; - - -%feature("docstring") ModelCreator::setOrganisation " - (Alternate spelling) Sets the \'organization\' portion of this - ModelCreator object. - - @param organization a string representing the organization of the - ModelCreator. - - @note This function is an alias of setOrganization(string organization). - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - - @see setOrganization() -"; - - -%feature("docstring") ModelCreator::unsetFamilyName " - Unsets the \'family name\' portion of this ModelCreator object. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ModelCreator::unsetGivenName " - Unsets the \'given name\' portion of this ModelCreator object. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ModelCreator::unsetEmail " - Unsets the \'email\' portion of this ModelCreator object. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ModelCreator::unsetOrganization " - Unsets the \'organization\' portion of this ModelCreator object. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ModelCreator::unsetOrganisation " - (Alternate spelling) Unsets the \'organization\' portion of this ModelCreator object. - - @note This function is an alias of unsetOrganization(). - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see unsetOrganization() -"; - - -%feature("docstring") ModelCreator::getAdditionalRDF " - @internal - (Alternate spelling) Unsets the \'organization\' portion of this ModelCreator object. - - @note This function is an alias of unsetOrganization(). - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - - @see unsetOrganization() -"; - - -%feature("docstring") ModelCreator::hasRequiredAttributes " - Predicate returning @c True if all the required elements for this - ModelCreator object have been set. - - The only required elements for a ModelCreator object are the \'family - name\' and \'given name\'. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") ModelCreator::hasBeenModified " - @internal - Predicate returning @c True if all the required elements for this - ModelCreator object have been set. - - The only required elements for a ModelCreator object are the \'family - name\' and \'given name\'. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") ModelCreator::resetModifiedFlags " - @internal - Predicate returning @c True if all the required elements for this - ModelCreator object have been set. - - The only required elements for a ModelCreator object are the \'family - name\' and \'given name\'. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") ModelHistory " - @ingroup Core - Representation of MIRIAM-compliant model history data. - - @htmlinclude not-sbml-warning.html - - The SBML specification beginning with Level 2 Version 2 defines - a standard approach to recording optional model history and model creator - information in a form that complies with MIRIAM (<a target=\'_blank\' - href=\'miriam-2005.pdf\'>\'Minimum Information Requested in the Annotation of - biochemical Models\'</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, - Dec. 2005). LibSBML provides the ModelHistory class as a convenient - high-level interface for working with model history data. - - Model histories in SBML consist of one or more <em>model creators</em>, - a single date of @em creation, and one or more @em modification dates. - The overall XML form of this data takes the following form: - - <pre class=\'fragment\'> - <dc:creator> - <rdf:Bag> - <rdf:li rdf:parseType=\'Resource\'> - <span style=\'background-color: #d0eed0\'>+++</span> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> - <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> - </vCard:N> - <span style=\'background-color: #d0eed0\'>+++</span> - <span style=\'border-bottom: 2px dotted #888\'><vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL></span> - <span style=\'background-color: #d0eed0\'>+++</span> - <span style=\'border-bottom: 2px dotted #888\'><vCard:ORG rdf:parseType=\'Resource\'></span> - <span style=\'border-bottom: 2px dotted #888\'><vCard:Orgname><span style=\'background-color: #bbb\'>organization name</span></vCard:Orgname></span> - <span style=\'border-bottom: 2px dotted #888\'></vCard:ORG></span> - <span style=\'background-color: #d0eed0\'>+++</span> - </rdf:li> - <span style=\'background-color: #edd\'>...</span> - </rdf:Bag> - </dc:creator> - <dcterms:created rdf:parseType=\'Resource\'> - <dcterms:W3CDTF><span style=\'background-color: #bbb\'>creation date</span></dcterms:W3CDTF> - </dcterms:created> - <dcterms:modified rdf:parseType=\'Resource\'> - <dcterms:W3CDTF><span style=\'background-color: #bbb\'>modification date</span></dcterms:W3CDTF> - </dcterms:modified> - <span style=\'background-color: #edd\'>...</span> - </pre> - - In the template above, the <span style=\'border-bottom: 2px dotted #888\'>underlined</span> - portions are optional, the symbol - <span class=\'code\' style=\'background-color: #d0eed0\'>+++</span> is a placeholder - for either no content or valid XML content that is not defined by - the annotation scheme, and the ellipses - <span class=\'code\' style=\'background-color: #edd\'>...</span> - are placeholders for zero or more elements of the same form as the - immediately preceding element. The various placeholders for content, namely - <span class=\'code\' style=\'background-color: #bbb\'>family name</span>, - <span class=\'code\' style=\'background-color: #bbb\'>given name</span>, - <span class=\'code\' style=\'background-color: #bbb\'>email address</span>, - <span class=\'code\' style=\'background-color: #bbb\'>organization</span>, - <span class=\'code\' style=\'background-color: #bbb\'>creation date</span>, and - <span class=\'code\' style=\'background-color: #bbb\'>modification date</span> - are data that can be filled in using the various methods on - the ModelHistory class described below. - - - <!-- leave this next break as-is to work around some doxygen bug --> -"; - - -%feature("docstring") ModelCreator " - @ingroup Core - Representation of MIRIAM-compliant model creator data used - in ModelHistory. - - @htmlinclude not-sbml-warning.html - - The SBML specification beginning with Level 2 Version 2 - defines a standard approach to recording model history and model creator - information in a form that complies with MIRIAM (\'Minimum Information - Requested in the Annotation of biochemical Models\', <i>Nature - Biotechnology</i>, vol. 23, no. 12, Dec. 2005). For the model creator, - this form involves the use of parts of the <a target=\'_blank\' - href=\'http://en.wikipedia.org/wiki/VCard\'>vCard</a> representation. - LibSBML provides the ModelCreator class as a convenience high-level - interface for working with model creator data. Objects of class - ModelCreator can be used to store and carry around creator data within a - program, and the various methods in this object class let callers - manipulate the different parts of the model creator representation. - - @section parts The different parts of a model creator definition - - The ModelCreator class mirrors the structure of the MIRIAM model creator - annotations in SBML. The following template illustrates these different - fields when they are written in XML form: - - <pre class=\'fragment\'> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> - <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> - </vCard:N> - ... - <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> - ... - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> - </vCard:ORG> - </pre> - - Each of the separate data values - <span class=\'code\' style=\'background-color: #bbb\'>family name</span>, - <span class=\'code\' style=\'background-color: #bbb\'>given name</span>, - <span class=\'code\' style=\'background-color: #bbb\'>email address</span>, and - <span class=\'code\' style=\'background-color: #bbb\'>organization</span> can - be set and retrieved via corresponding methods in the ModelCreator - class. These methods are documented in more detail below. - - <!-- leave this next break as-is to work around some doxygen bug --> -"; - - -%feature("docstring") Date " - @ingroup Core - Representation of MIRIAM-compliant dates used in ModelHistory. - - @htmlinclude not-sbml-warning.html - - A Date object stores a reasonably complete representation of date and - time. Its purpose is to serve as a way to store dates to be read and - written in the <a target=\'_blank\' - href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format</a> used in - RDF Dublin Core annotations within SBML. The W3C date format is a - restricted form of <a target=\'_blank\' - href=\'http://en.wikipedia.org/wiki/ISO_8601\'>ISO 8601</a>, the - international standard for the representation of dates and times. A - time and date value in this W3C format takes the form - YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., <code>1997-07-16T19:20:30+01:00</code>) - where XHH:ZZ is the time zone offset. The libSBML Date object contains - the following fields to represent these values: - <ul> - - <li> @em year: a long integer representing the year. This should be a - four-digit number such as @c 2011. - - <li> @em month: a long integer representing the month, with a range of - values of 1–12. The value @c 1 represents January, and so on. - - <li> @em day: a long integer representing the day of the month, with a - range of values of 1–31. - - <li> @em hour: a long integer representing the hour on a 24-hour clock, - with a range of values of 0–23. - - <li> @em minute: a long integer representing the minute, with a range - of 0–59. - - <li> @em second: a long integer representing the second, with a range - of 0–59. - - <li> @em sign: a long integer representing the sign of the offset (@c 0 - signifying @c + and @c 1 signifying @c -). See the paragraph below for - further explanations. - - <li> @em hours offset: a long integer representing the time zone\'s hour - offset from GMT. - - <li> @em minute offset: a long integer representing the time zone\'s - minute offset from GMT. - - </ul> - - To illustrate the time zone offset, a value of <code>-05:00</code> would - correspond to USA Eastern Standard Time. In the Date object, this would - require a value of @c 1 for the sign field, @c 5 for the hour offset and - @c 0 for the minutes offset. - - In the restricted RDF annotations used in SBML, described in - Section 6 of the SBML Level 2 and Level 3 specification - documents, date/time stamps can be used to indicate the time of - creation and modification of a model. The following SBML model fragment - illustrates this: - @verbatim - <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> - <annotation> - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterms=\'http://purl.org/dc/terms/\' - xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > - <rdf:Description rdf:about=\'#_180340\'> - <dc:creator> - <rdf:Bag> - <rdf:li rdf:parseType=\'Resource\'> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family>Shapiro</vCard:Family> - <vCard:Given>Bruce</vCard:Given> - </vCard:N> - <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> - </vCard:ORG> - </rdf:li> - </rdf:Bag> - </dc:creator> - <dcterms:created rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> - </dcterms:created> - <dcterms:modified rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> - </dcterms:modified> - </rdf:Description> - </rdf:RDF> - </annotation> - </model>@endverbatim -"; - - -%feature("docstring") ModelHistory::ModelHistory " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>ModelHistory(ModelHistory orig)</pre> - - Copy constructor; creates a copy of this ModelHistory object. - - @param orig the object to copy. - - @throws @if python ValueError @else SBMLConstructorException @endif@~ - Thrown if the argument @p orig is @c None. - - - <hr> - Method variant with the following signature: - <pre class='signature'>ModelHistory()</pre> - - Creates a new ModelHistory object. -"; - - -%feature("docstring") ModelHistory::clone " - Creates and returns a copy of this ModelHistory object - - @return a (deep) copy of this ModelHistory object. -"; - - -%feature("docstring") ModelHistory::getCreatedDate " - Returns the \'creation date\' portion of this ModelHistory object. - - @return a Date object representing the creation date stored in - this ModelHistory object. -"; - - -%feature("docstring") ModelHistory::getModifiedDate " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>getModifiedDate()</pre> - - Returns the \'modified date\' portion of this ModelHistory object. - - Note that in the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of \'modified date\' values. If this ModelHistory object - contains more than one \'modified date\' value in the list, this method - will return the first one in the list. - - @return a Date object representing the date of modification - stored in this ModelHistory object. - - - <hr> - Method variant with the following signature: - <pre class='signature'>getModifiedDate(long n)</pre> - - Get the nth Date object in the list of \'modified date\' values stored - in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of \'modified date\' values. - - @return the nth Date in the list of ModifiedDates of this - ModelHistory. -"; - - -%feature("docstring") ModelHistory::isSetCreatedDate " - Predicate returning @c True or @c False depending on whether this - ModelHistory\'s \'creation date\' is set. - - @return @c True if the creation date value of this ModelHistory is - set, @c False otherwise. -"; - - -%feature("docstring") ModelHistory::isSetModifiedDate " - Predicate returning @c True or @c False depending on whether this - ModelHistory\'s \'modified date\' is set. - - @return @c True if the modification date value of this ModelHistory - object is set, @c False otherwise. -"; - - -%feature("docstring") ModelHistory::setCreatedDate " - Sets the creation date of this ModelHistory object. - - @param date a Date object representing the date to which the \'created - date\' portion of this ModelHistory should be set. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") ModelHistory::setModifiedDate " - Sets the modification date of this ModelHistory object. - - @param date a Date object representing the date to which the \'modified - date\' portion of this ModelHistory should be set. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") ModelHistory::addModifiedDate " - Adds a copy of a Date object to the list of \'modified date\' values - stored in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of \'modified date\' values. - - @param date a Date object representing the \'modified date\' that should - be added to this ModelHistory object. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink -"; - - -%feature("docstring") ModelHistory::getListModifiedDates " - Returns the list of \'modified date\' values (as Date objects) stored in - this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of \'modified date\' values. - - @return the list of modification dates for this ModelHistory object. -"; - - -%feature("docstring") ModelHistory::getNumModifiedDates " - Get the number of Date objects in this ModelHistory object\'s list of - \'modified dates\'. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of \'modified date\' values. - - @return the number of ModifiedDates in this ModelHistory. -"; - - -%feature("docstring") ModelHistory::addCreator " - Adds a copy of a ModelCreator object to the list of \'model creator\' - values stored in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of \'model creator\' values. - - @param mc the ModelCreator to add - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") ModelHistory::getListCreators " - Returns the list of ModelCreator objects stored in this ModelHistory - object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of \'model creator\' values. - - @return the list of ModelCreator objects. -"; - - -%feature("docstring") ModelHistory::getCreator " - Get the nth ModelCreator object stored in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of \'model creator\' values. - - @return the nth ModelCreator object. -"; - - -%feature("docstring") ModelHistory::getNumCreators " - Get the number of ModelCreator objects stored in this ModelHistory - object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of \'model creator\' values. - - @return the number of ModelCreators objects. -"; - - -%feature("docstring") ModelHistory::hasRequiredAttributes " - Predicate returning @c True if all the required elements for this - ModelHistory object have been set. - - The required elements for a ModelHistory object are \'created - name\', \'modified date\', and at least one \'model creator\'. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") ModelHistory::hasBeenModified " - @internal - Predicate returning @c True if all the required elements for this - ModelHistory object have been set. - - The required elements for a ModelHistory object are \'created - name\', \'modified date\', and at least one \'model creator\'. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") ModelHistory::resetModifiedFlags " - @internal - Predicate returning @c True if all the required elements for this - ModelHistory object have been set. - - The required elements for a ModelHistory object are \'created - name\', \'modified date\', and at least one \'model creator\'. - - @return a boolean value indicating whether all the required - elements for this object have been defined. -"; - - -%feature("docstring") RDFAnnotationParser " - @ingroup Core - Read/write/manipulate RDF annotations stored in SBML - annotation elements. - - @htmlinclude not-sbml-warning.html - - RDFAnnotationParser is a libSBML construct used as part of the libSBML - support for annotations conforming to the guidelines specified by MIRIAM - (<a target=\'_blank\' href=\'miriam-2005.pdf\'>\'Minimum Information Requested - in the Annotation of biochemical Models\'</a>, <i>Nature Biotechnology</i>, - vol. 23, no. 12, Dec. 2005). Section 6 of the SBML Level 2 and - Level 3 specification documents defines a recommended way of encoding - MIRIAM information using a subset of RDF (<a target=\'_blank\' - href=\'http://www.w3.org/RDF/\'>Resource Description Format</a>). The - general scheme is as follows. A set of RDF-based annotations attached to - a given SBML <code><annotation></code> element are read by - RDFAnnotationParser and converted into a list of CVTerm objects. There - are different versions of the main method, @if clike - RDFAnnotationParser.parseRDFAnnotation() @endif@if java RDFAnnotationParser.parseRDFAnnotation() @endif@~ and - RDFAnnotationParser.parseRDFAnnotation(), used - depending on whether the annotation in question concerns the MIRIAM model - history or other MIRIAM resource annotations. A special object class, - ModelHistory, is used to make it easier to manipulate model history - annotations. - - All of the methods on RDFAnnotationParser are static; the class exists - only to encapsulate the annotation and CVTerm parsing and manipulation - functionality. -"; - - -%feature("docstring") RDFAnnotationParser::parseRDFAnnotation " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>parseRDFAnnotation(XMLNodeannotation, ListCVTerms, string metaId = None, XMLInputStream* stream = None)</pre> - - Parses an annotation (given as an XMLNode tree) into a list of - CVTerm objects. - - This is used to take an annotation that has been read into an SBML - model, identify the RDF elements within it, and create a list of - corresponding CVTerm (controlled vocabulary term) objects. - - @param annotation XMLNode containing the annotation. - - @param CVTerms list of CVTerm objects to be created. - @param stream optional XMLInputStream that facilitates error logging - @param metaId optional metaId, if set only the rdf annotation for this metaId will be returned. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_parseRDFAnnotation(). They are functionally - identical. @endif@~ - - @see @if clike parseRDFAnnotation(XMLNodeannotation) @else RDFAnnotationParser.parseRDFAnnotation() @endif@~ - - - <hr> - Method variant with the following signature: - <pre class='signature'>parseRDFAnnotation(XMLNodeannotation, string metaId = None, XMLInputStream* stream = None)</pre> - - Parses an annotation into a ModelHistory class instance. - - This is used to take an annotation that has been read into an SBML - model, identify the RDF elements representing model history - information, and create a list of corresponding CVTerm objects. - - @param annotation XMLNode containing the annotation. - @param stream optional XMLInputStream that facilitates error logging - @param metaId optional metaId, if set only the rdf annotation for this metaId will be returned. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_parseRDFAnnotation(). They are functionally - identical. @endif@~ - - @return a pointer to the ModelHistory created. -"; - - -%feature("docstring") RDFAnnotationParser::createAnnotation " - Creates a blank annotation and returns its root XMLNode object. - - This creates a completely empty SBML <code><annotation></code> - element. It is not attached to any SBML element. An example of how - this might be used is illustrated in the following code fragment. In - this example, suppose that @c content is an XMLNode object previously - created, containing MIRIAM-style annotations, and that @c sbmlObject - is an SBML object derived from SBase (e.g., a Model, or a Species, or - a Compartment, etc.). Then:@if clike - @verbatim - int success; // Status code variable, used below. - - XMLNodeRDF = createRDFAnnotation(); // Create RDF annotation XML structure. - success = RDF->addChild(...content...); // Put some content into it. - ... // Check \'success\' return code value. - - XMLNodeann = createAnnotation(); // Create <annotation> container. - success = ann->addChild(RDF); // Put the RDF annotation into it. - ... // Check \'success\' return code value. - - success = sbmlObject->setAnnotation(ann); // Set object\'s annotation to what we built. - ... // Check \'success\' return code value. - @endverbatim - @endif@if java - @verbatim - int success; // Status code variable, used below. - - XMLNode RDF = createRDFAnnotation(); // Create RDF annotation XML structure. - success = RDF.addChild(...content...); // Put some content into it. - ... // Check \'success\' return code value. - - XMLNode ann = createAnnotation(); // Create <annotation> container. - success = ann.addChild(RDF); // Put the RDF annotation into it. - ... // Check \'success\' return code value. - - success = sbmlObject.setAnnotation(ann); // Set object\'s annotation to what we built. - ... // Check \'success\' return code value. - @endverbatim - @endif@if python - @verbatim - RDF = RDFAnnotationParser.createRDFAnnotation() # Create RDF annotation XML structure. - success = RDF.addChild(...content...) # Put some content into it. - ... # Check \'success\' return code value. - - annot = RDFAnnotationParser.createAnnotation() # Create <annotation> container. - success = annot.addChild(RDF) # Put the RDF annotation into it. - ... # Check \'success\' return code value. - - success = sbmlObject.setAnnotation(annot) # Set object\'s annotation to what we built. - ... # Check \'success\' return code value. - @endverbatim - @endif@~ - The SBML specification contains more information about the format of - annotations. We urge readers to consult Section 6 of the SBML - Level 2 (Versions 2–4) and SBML Level 3 specification - documents. - - @return a pointer to an XMLNode for the annotation - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_createAnnotation(). They are functionally - identical. @endif@~ - - @see @if clike createRDFAnnotation() @else RDFAnnotationParser.createRDFAnnotation() @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::createRDFAnnotation " - Creates a blank RDF element suitable for use in SBML annotations. - - The annotation created by this method has namespace declarations for - all the relevant XML namespaces used in RDF annotations and also has - an empty RDF element. The result is the following XML: - @verbatim - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterms=\'http://purl.org/dc/terms/\' - xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' - xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' - xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > - - </rdf:RDF> - @endverbatim - - Note that this does not create the containing SBML - <code><annotation></code> element; the method - @if clike createAnnotation()@else RDFAnnotationParser.createAnnotation()@endif@~ - is available for creating the container. - - @return a pointer to an XMLNode - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_createRDFAnnotation(). They are functionally - identical. @endif@~ - - @see @if clike createAnnotation() @else RDFAnnotationParser.createAnnotation() @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::createCVTerms " - Takes a list of CVTerm objects and creates a the RDF \'Description\' - element. - - This essentially takes the given SBML object, reads out the CVTerm - objects attached to it, creates an RDF \'Description\' element to hold - the terms, and adds each term with appropriate qualifiers. - - @param obj the SBML object to start from - - @return the XMLNode tree corresponding to the Description element of - an RDF annotation. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - createRDFDescription(@if java SBase obj@endif). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::parseCVTerms " - Takes a list of CVTerm objects and creates a complete SBML annotation - around it. - - This essentially takes the given SBML object, reads out the CVTerm - objects attached to it, calls @if clike createRDFAnnotation()@else - RDFAnnotationParser.createRDFAnnotation()@endif@~ to create an RDF - annotation to hold the terms, and finally calls @if clike - createAnnotation()@else - RDFAnnotationParser.createAnnotation()@endif@~ to wrap the result as - an SBML <code><annotation></code> element. - - @param obj the SBML object to start from - - @return the XMLNode tree corresponding to the annotation. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_parseCVTerms(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::parseModelHistory " - Reads the model history and cvTerms stored in @p obj and creates the - XML structure for an SBML annotation representing that metadata if - there is a model history stored in @p obj. - - @param obj any SBase object - - @return the XMLNode corresponding to an annotation containing - MIRIAM-compliant model history and CV term information in RDF format. - - @note If the object does not have a history element stored then - @c None is returned even if CVTerms are present. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_parseModelHistory(@if java Sbase obj@endif). They - are functionally identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::parseOnlyModelHistory " - Reads the model history stored in @p obj and creates the - XML structure for an SBML annotation representing that history. - - @param obj any SBase object - - @return the XMLNode corresponding to an annotation containing - MIRIAM-compliant model history information in RDF format. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_parseOnlyModelHistory(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::deleteRDFAnnotation " - Deletes any SBML MIRIAM RDF annotation found in the given XMLNode - tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove them if they conform to the syntax - of a History or CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::deleteRDFHistoryAnnotation " - Deletes any SBML MIRIAM RDF \'History\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - History element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::deleteRDFCVTermAnnotation " - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::hasRDFAnnotation " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::hasAdditionalRDFAnnotation " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::hasCVTermRDFAnnotation " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::hasHistoryRDFAnnotation " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithCVTerms " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithHistory " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::deriveCVTermsFromAnnotation " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::deriveHistoryFromAnnotation " - @internal - Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given - XMLNode tree and returns - any remaining annotation content. - - The name of the XMLNode given as parameter @p annotation must be - \'annotation\', or else this method returns @c None. The method will - walk down the XML structure looking for elements that are in the - RDF XML namespace, and remove any that conform to the syntax of a - CVTerm element. - - @param annotation the XMLNode tree within which the RDF annotation is - to be found and deleted - - @return the XMLNode structure that is left after RDF annotations are - deleted. - - @if notclike @note Because this is a @em static method, the non-C++ - language interfaces for libSBML will contain two variants. One will - be a static method on the class (i.e., RDFAnnotationParser), and the - other will be a standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @endif@~ -"; - - -%feature("docstring") ISBMLExtensionNamespaces " - @ingroup Core -"; - - -%feature("docstring") SBaseExtensionPoint " - @ingroup Core - Representation of an extension point of SBML\'s package extension. - - SBaseExtensionPoint represents an element to be extended (extension point) and the - extension point is identified by a combination of a package name and a typecode of the - element. - - <p> - For example, an SBaseExtensionPoint object which represents an extension point of the model - element defined in the <em>core</em> package can be created as follows: - - @verbatim - SBaseExtensionPoint modelextp(\'core\', SBML_MODEL); - @endverbatim - - Similarly, an SBaseExtensionPoint object which represents an extension point of - the layout element defined in the layout extension can be created as follows: - - @verbatim - SBaseExtensionPoint layoutextp(\'layout\', SBML_LAYOUT_LAYOUT); - @endverbatim - - SBaseExtensionPoint object is required as one of arguments of the constructor - of SBasePluginCreatorlt;class SBasePluginType, class SBMLExtensionType> - template class to identify an extension poitnt to which the plugin object created - by the creator class is plugged in. - For example, the SBasePluginCreator class which creates a LayoutModelPlugin object - of the layout extension which is plugged in to the model element of the <em>core</em> - package can be created with the corresponding SBaseExtensionPoint object as follows: - - @verbatim - // std::vector object that contains a list of URI (package versions) supported - // by the plugin object. - std::vector<string> packageURIs; - packageURIs.push_back(getXmlnsL3V1V1()); - packageURIs.push_back(getXmlnsL2()); - - // creates an extension point (model element of the \'core\' package) - SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); - - // creates an SBasePluginCreator object - SBasePluginCreator<LayoutModelPlugin, LayoutExtension> modelPluginCreator(modelExtPoint,packageURIs); - @endverbatim - - This kind of code is implemented in init() function of each SBMLExtension derived classes. -"; - - -%feature("docstring") SBaseExtensionPoint::SBaseExtensionPoint " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBaseExtensionPoint(SBaseExtensionPoint rhs)</pre> - - copy constructor - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBaseExtensionPoint(string pkgName, int typeCode)</pre> - - constructor -"; - - -%feature("docstring") SBaseExtensionPoint::clone " - clone -"; - - -%feature("docstring") SBaseExtensionPoint::getPackageName " - Returns the package name of this extension point. -"; - - -%feature("docstring") SBaseExtensionPoint::getTypeCode " - Returns the typecode of this extension point. -"; - - -%feature("docstring") SBasePlugin " - @ingroup Core - Representation of a plug-in object of SBML\'s package extension. - - Additional attributes and/or elements of a package extension which are directly - contained by some pre-defined element are contained/accessed by <a href=\'#SBasePlugin\'> - SBasePlugin </a> class which is extended by package developers for each extension point. - The extension point, which represents an element to be extended, is identified by a - combination of a Package name and a typecode of the element, and is represented by - SBaseExtensionPoint class. - </p> - - <p> - For example, the layout extension defines <em><listOfLayouts></em> element which is - directly contained in <em><model></em> element of the core package. - In the layout package (provided as one of example packages in libSBML-5), the additional - element for the model element is implemented as ListOfLayouts class (an SBase derived class) and - the object is contained/accessed by a LayoutModelPlugin class (an SBasePlugin derived class). - </p> - - <p> - SBasePlugin class defines basic virtual functions for reading/writing/checking - additional attributes and/or top-level elements which should or must be overridden by - subclasses like SBase class and its derived classes. - </p> - - <p> - Package developers must implement an SBasePlugin exntended class for - each element to be extended (e.g. SBMLDocument, Model, ...) in which additional - attributes and/or top-level elements of the package extension are directly contained. -</p> - - To implement reading/writing functions for attributes and/or top-level - elements of the SBsaePlugin extended class, package developers should or must - override the corresponding virtual functions below provided in the SBasePlugin class: - - <ul> - <li> <p>reading elements : </p> - <ol> - <li> <code>virtual SBase createObject (XMLInputStream& stream) </code> - <p>This function must be overridden if one or more additional elements are defined.</p> - </li> - <li> <code>virtual bool readOtherXML (SBase parentObject, XMLInputStream& stream)</code> - <p>This function should be overridden if elements of annotation, notes, MathML, etc. need - to be directly parsed from the given XMLInputStream object instead of the - SBase.readAnnotation() - and/or SBase.readNotes() functions. - </p> - </li> - </ol> - </li> - <li> <p>reading attributes (must be overridden if additional attributes are defined) :</p> - <ol> - <li><code>virtual void addExpectedAttributes(ExpectedAttributes& attributes) </code></li> - <li><code>virtual void readAttributes (XMLAttributes attributes, const ExpectedAttributes& expectedAttributes)</code></li> - </ol> - </li> - <li> <p>writing elements (must be overridden if additional elements are defined) :</p> - <ol> - <li><code>virtual void writeElements (XMLOutputStream& stream) const </code></li> - </ol> - </li> - <li> <p>writing attributes : </p> - <ol> - <li><code>virtual void writeAttributes (XMLOutputStream& stream) const </code> - <p>This function must be overridden if one or more additional attributes are defined.</p> - </li> - <li><code>virtual void writeXMLNS (XMLOutputStream& stream) const </code> - <p>This function must be overridden if one or more additional xmlns attributes are defined.</p> - </li> - </ol> - </li> - - <li> <p>checking elements (should be overridden) :</p> - <ol> - <li><code>virtual bool hasRequiredElements() const </code></li> - </ol> - </li> - - <li> <p>checking attributes (should be overridden) :</p> - <ol> - <li><code>virtual bool hasRequiredAttributes() const </code></li> - </ol> - </li> - </ul> - -<p> - To implement package-specific creating/getting/manipulating functions of the - SBasePlugin derived class (e.g., getListOfLayouts(), createLyout(), getLayout(), - and etc are implemented in LayoutModelPlugin class of the layout package), package - developers must newly implement such functions (as they like) in the derived class. -</p> - -<p> - SBasePlugin class defines other virtual functions of internal implementations - such as: - - <ul> - <li><code> virtual void setSBMLDocument(SBMLDocument d) </code> - <li><code> virtual void connectToParent(SBasesbase) </code> - <li><code> virtual void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) </code> - </ul> - - These functions must be overridden by subclasses in which one or more top-level elements are defined. -</p> - -<p> - For example, the following three SBasePlugin extended classes are implemented in - the layout extension: -</p> - -<ol> - - <li> <p><a href=\'class_s_b_m_l_document_plugin.html\'> SBMLDocumentPlugin </a> class for SBMLDocument element</p> - - <ul> - <li> <em> required </em> attribute is added to SBMLDocument object. - </li> - </ul> - -<p> -(<a href=\'class_s_b_m_l_document_plugin.html\'> SBMLDocumentPlugin </a> class is a common SBasePlugin -extended class for SBMLDocument class. Package developers can use this class as-is if no additional -elements/attributes (except for <em> required </em> attribute) is needed for the SBMLDocument class -in their packages, otherwise package developers must implement a new SBMLDocumentPlugin derived class.) -</p> - - <li> <p>LayoutModelPlugin class for Model element</p> - <ul> - <li> <listOfLayouts> element is added to Model object. - </li> - - <li> <p> - The following virtual functions for reading/writing/checking - are overridden: (type of arguments and return values are omitted) - </p> - <ul> - <li> <code> createObject() </code> : (read elements) - </li> - <li> <code> readOtherXML() </code> : (read elements in annotation of SBML L2) - </li> - <li> <code> writeElements() </code> : (write elements) - </li> - </ul> - </li> - - <li> <p> - The following virtual functions of internal implementations - are overridden: (type of arguments and return values are omitted) - </p> - <ul> - <li> <code> setSBMLDocument() </code> - </li> - <li> <code> connectToParent() </code> - </li> - <li> <code> enablePackageInternal() </code> - </li> - </ul> - </li> - - - <li> <p> - The following creating/getting/manipulating functions are newly - implemented: (type of arguments and return values are omitted) - </p> - <ul> - <li> <code> getListOfLayouts() </code> - </li> - <li> <code> getLayout () </code> - </li> - <li> <code> addLayout() </code> - </li> - <li> <code> createLayout() </code> - </li> - <li> <code> removeLayout() </code> - </li> - <li> <code> getNumLayouts() </code> - </li> - </ul> - </li> - - </ul> - </li> - - <li> <p>LayoutSpeciesReferencePlugin class for SpeciesReference element (used only for SBML L2V1) </p> - - <ul> - <li> - <em> id </em> attribute is internally added to SpeciesReference object - only for SBML L2V1 - </li> - - <li> - The following virtual functions for reading/writing/checking - are overridden: (type of arguments and return values are omitted) - </li> - - <ul> - <li> - <code> readOtherXML() </code> - </li> - <li> - <code> writeAttributes() </code> - </li> - </ul> - </ul> - </li> - - </ol> -"; - - -%feature("docstring") SBasePlugin::getElementNamespace " - Returns the XML namespace (URI) of the package extension - of this plugin object. - - @return the URI of the package extension of this plugin object. -"; - - -%feature("docstring") SBasePlugin::getPrefix " - Returns the prefix of the package extension of this plugin object. - - @return the prefix of the package extension of this plugin object. -"; - - -%feature("docstring") SBasePlugin::getPackageName " - Returns the package name of this plugin object. - - @return the package name of this plugin object. -"; - - -%feature("docstring") SBasePlugin::clone " - Creates and returns a deep copy of this SBasePlugin object. - - @return a (deep) copy of this SBase object -"; - - -%feature("docstring") SBasePlugin::getElementBySId " - Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. - - @param id string representing the id of objects to find - - @return pointer to the first element found with the given @p id. -"; - - -%feature("docstring") SBasePlugin::getElementByMetaId " - Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. - - @param metaid string representing the metaid of objects to find - - @return pointer to the first element found with the given @p metaid. -"; - - -%feature("docstring") SBasePlugin::getAllElements " - Returns a List of all child SBase objects, including those nested to an arbitrary depth - - @return a List of pointers to all children objects. -"; - - -%feature("docstring") SBasePlugin::setSBMLDocument " - @internal - Sets the parent SBMLDocument of this plugin object. - - Subclasses which contain one or more SBase derived elements must - override this function. - - @param d the SBMLDocument object to use - - @see connectToParent - @see enablePackageInternal -"; - - -%feature("docstring") SBasePlugin::connectToParent " - @internal - Sets the parent SBML object of this plugin object to - this object and child elements (if any). - (Creates a child-parent relationship by this plugin object) - - This function is called when this object is created by - the parent element. - Subclasses must override this this function if they have one - or more child elements. Also, SBasePlugin.connectToParent() - must be called in the overridden function. - - @param sbase the SBase object to use - - @see setSBMLDocument - @see enablePackageInternal -"; - - -%feature("docstring") SBasePlugin::enablePackageInternal " - @internal - Enables/Disables the given package with child elements in this plugin - object (if any). - (This is an internal implementation invoked from - SBase.enablePackageInternal() function) - - Subclasses which contain one or more SBase derived elements should - override this function if elements defined in them can be extended by - some other package extension. - - @see setSBMLDocument - @see connectToParent -"; - - -%feature("docstring") SBasePlugin::stripPackage " - @internal - Enables/Disables the given package with child elements in this plugin - object (if any). - (This is an internal implementation invoked from - SBase.enablePackageInternal() function) - - Subclasses which contain one or more SBase derived elements should - override this function if elements defined in them can be extended by - some other package extension. - - @see setSBMLDocument - @see connectToParent -"; - - -%feature("docstring") SBasePlugin::getSBMLDocument " - Returns the parent SBMLDocument of this plugin object. - - @return the parent SBMLDocument object of this plugin object. -"; - - -%feature("docstring") SBasePlugin::getURI " - Gets the URI to which this element belongs to. - For example, all elements that belong to SBML Level 3 Version 1 Core - must would have the URI \'http://www.sbml.org/sbml/level3/version1/core\'; - all elements that belong to Layout Extension Version 1 for SBML Level 3 - Version 1 Core must would have the URI - \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' - - Unlike getElementNamespace, this function first returns the URI for this - element by looking into the SBMLNamespaces object of the document with - the its package name. if not found it will return the result of - getElementNamespace - - @return the URI this elements - - @see getPackageName - @see getElementNamespace - @see SBMLDocument::getSBMLNamespaces - @see getSBMLDocument -"; - - -%feature("docstring") SBasePlugin::getParentSBMLObject " - Returns the parent SBase object to which this plugin - object connected. - - @return the parent SBase object to which this plugin - object connected. -"; - - -%feature("docstring") SBasePlugin::setElementNamespace " - Sets the XML namespace to which this element belongs to. - For example, all elements that belong to SBML Level 3 Version 1 Core - must set the namespace to \'http://www.sbml.org/sbml/level3/version1/core\'; - all elements that belong to Layout Extension Version 1 for SBML Level 3 - Version 1 Core must set the namespace to - \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SBasePlugin::getLevel " - Returns the SBML level of the package extension of - this plugin object. - - @return the SBML level of the package extension of - this plugin object. -"; - - -%feature("docstring") SBasePlugin::getVersion " - Returns the SBML version of the package extension of - this plugin object. - - @return the SBML version of the package extension of - this plugin object. -"; - - -%feature("docstring") SBasePlugin::getPackageVersion " - Returns the package version of the package extension of - this plugin object. - - @return the package version of the package extension of - this plugin object. -"; - - -%feature("docstring") SBasePlugin::replaceSIDWithFunction " - @internal - If this object has a child \'math\' object (or anything with ASTNodes in general), replace all nodes with the name \'id\' with the provided function. - - @note This function does nothing itself--subclasses with ASTNode subelements must override this function. -"; - - -%feature("docstring") SBasePlugin::divideAssignmentsToSIdByFunction " - @internal - If the function of this object is to assign a value has a child \'math\' object (or anything with ASTNodes in general), replace the \'math\' object with the function (existing/function). - - @note This function does nothing itself--subclasses with ASTNode subelements must override this function. -"; - - -%feature("docstring") SBasePlugin::multiplyAssignmentsToSIdByFunction " - @internal - If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). -"; - - -%feature("docstring") SBasePlugin::hasIdentifierBeginningWith " - @internal - Check to see if the given prefix is used by any of the IDs defined by extension elements. A package that defines its own \'id\' attribute for a core element would check that attribute here. -"; - - -%feature("docstring") SBasePlugin::prependStringToAllIdentifiers " - @internal - Add the given string to all identifiers in the object. If the string is added to anything other than an id or a metaid, this code is responsible for tracking down and renaming all *idRefs in the package extention that identifier comes from. -"; - - -%feature("docstring") SBasePlugin::transformIdentifiers " - @internal - Add the given string to all identifiers in the object. If the string is added to anything other than an id or a metaid, this code is responsible for tracking down and renaming all *idRefs in the package extention that identifier comes from. -"; - - -%feature("docstring") SBasePlugin::getLine " - @internal - Returns the line number on which this object first appears in the XML - representation of the SBML document. - - @return the line number of the underlying SBML object. - - @note The line number for each construct in an SBML model is set upon - reading the model. The accuracy of the line number depends on the - correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real line number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100% accurate in all situations. (At this - time, libSBML supports the use of <a target=\'_blank\' - href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' - href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' - href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) - - @see getColumn() -"; - - -%feature("docstring") SBasePlugin::getColumn " - @internal - Returns the column number on which this object first appears in the XML - representation of the SBML document. - - @return the column number of the underlying SBML object. - - @note The column number for each construct in an SBML model is set - upon reading the model. The accuracy of the column number depends on - the correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real column number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100% accurate in all situations. (At this - time, libSBML supports the use of <a target=\'_blank\' - href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' - href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' - href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) - - @see getLine() -"; - - -%feature("docstring") SBasePlugin::getSBMLNamespaces " - @internal - Returns the column number on which this object first appears in the XML - representation of the SBML document. - - @return the column number of the underlying SBML object. - - @note The column number for each construct in an SBML model is set - upon reading the model. The accuracy of the column number depends on - the correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real column number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100% accurate in all situations. (At this - time, libSBML supports the use of <a target=\'_blank\' - href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' - href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' - href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) - - @see getLine() -"; - - -%feature("docstring") SBasePlugin::logUnknownElement " - @internal - Helper to log a common type of error for elements. -"; - - -%feature("docstring") SBasePlugin::getErrorLog " - @internal - @return the SBMLErrorLog used to log errors during while reading and - validating SBML. -"; - - -%feature("docstring") SBasePlugin::logUnknownAttribute " - @internal - Helper to log a common type of error. -"; - - -%feature("docstring") SBasePlugin::logEmptyString " - @internal - Helper to log a common type of error. -"; - - -%feature("docstring") SBMLDocumentPlugin " - @ingroup Core - Template class for the %SBMLDocument Plugin class needed by all packages. - - Plugin objects for the SBMLDocument element must be this class or - a derived class of this class. - Package developers should use this class as-is if only \'required\' - attribute is added in the SBMLDocument element by their packages. - Otherwise, developers must implement a derived class of this class - and use that class as the plugin object for the SBMLDocument element. -"; - - -%feature("docstring") SBMLDocumentPlugin::SBMLDocumentPlugin " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLDocumentPlugin(string &uri, string &prefix, SBMLNamespacessbmlns)</pre> - - Constructor - - @param uri the URI of package - @param prefix the prefix for the given package - @param sbmlns the SBMLNamespaces object for the package - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLDocumentPlugin(SBMLDocumentPlugin orig)</pre> - - Copy constructor. Creates a copy of this object. -"; - - -%feature("docstring") SBMLDocumentPlugin::clone " - Creates and returns a deep copy of this SBMLDocumentPlugin object. - - @return a (deep) copy of this object -"; - - -%feature("docstring") SBMLDocumentPlugin::setRequired " - Sets the bool value of \'required\' attribute of corresponding package - in SBMLDocument element. - - @param value the bool value of \'required\' attribute of corresponding - package in SBMLDocument element. - - @return integer value indicating success/failure of the - function. The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink -"; - - -%feature("docstring") SBMLDocumentPlugin::getRequired " - Returns the bool value of \'required\' attribute of corresponding - package in SBMLDocument element. - - @return the bool value of \'required\' attribute of corresponding - package in SBMLDocument element. -"; - - -%feature("docstring") SBMLDocumentPlugin::isSetRequired " - Predicate returning @c True or @c False depending on whether this - SBMLDocumentPlugin\'s \'required\' attribute has been set. - - @return @c True if the \'required\' attribute of this SBMLDocument has been - set, @c False otherwise. -"; - - -%feature("docstring") SBMLDocumentPlugin::unsetRequired " - Unsets the value of the \'required\' attribute of this SBMLDocumentPlugin. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBMLDocumentPlugin::isFlatteningImplemented " - @internal - Unsets the value of the \'required\' attribute of this SBMLDocumentPlugin. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBMLDocumentPlugin::checkConsistency " - @internal - Unsets the value of the \'required\' attribute of this SBMLDocumentPlugin. - - @return integer value indicating success/failure of the - function. @if clike The value is drawn from the - enumeration #OperationReturnValues_t. @endif@~ The possible values - returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink -"; - - -%feature("docstring") SBMLExtension " - @ingroup Core - The core component of SBML\'s package extension. - - SBMLExtension class (abstract class) is a core component of package extension - which needs to be extended by package developers. - The class provides functions for getting common attributes of package extension - (e.g., package name, package version, and etc.), functions for adding (registering) - each instantiated SBasePluginCreator object, and a static function (defined in each - SBMLExtension extended class) for initializing/registering the package extension - when the library of the package is loaded. - - @section howto How to implement an SBMLExtension extended class for each package extension - - Package developers must implement an SBMLExtension extended class for - their packages (e.g. GroupsExtension class is implemented for groups extension). - The extended class is implemented based on the following steps: - - (NOTE: - \'src/pacakges/groups/extension/GroupsExtension.{h,cpp}\' and - \'src/pacakges/layout/extension/LayoutExtension.{h,cpp}\' are - example files in which SBMLExtension derived classes are implemented) - - <ol> - - <li> Define the following static functions in the extended class: - (examples of groups extension are shown respectively) - <ol> - <li> <p>A string of package name (label) (The function name must be \'getPackageName\'.)</p> - - @verbatim - string GroupsExtension.getPackageName () - { - static string pkgName = \'groups\'; - return pkgName; - } - @endverbatim - </li> - - <li> <p> - Methods returning an integer of Default SBML level, version, and package version - (The method names must be \'getDefaultLevel()\', \'getDefaultVersion()\', and - \'getDefaultPackageVersion()\' respectively.) - </p> - @verbatim - long GroupsExtension.getDefaultLevel() - { - return 3; - } - long GroupsExtension.getDefaultVersion() - { - return 1; - } - long GroupsExtension.getDefaultPackageVersion() - { - return 1; - } - @endverbatim - </li> - <li> <p> Methods returning Strings that represent the URI of packages </p> - @verbatim - string GroupsExtension.getXmlnsL3V1V1 () - { - static string xmlns = \'http://www.sbml.org/sbml/level3/version1/groups/version1\'; - return xmlns; - } - @endverbatim - </li> - <li> <p>Strings that represent the other URI needed in this package (if any) </p> - </li> - </ol> - </li> - - <li> Override the following pure virtual functions - <ul> - <li> <code>virtual string getName () const =0</code>. This function returns the name of the package (e.g., \'layout\', \'groups\'). </li> - <li> <code>virtual long getLevel (string &uri) const =0</code>. This function returns the SBML level with the given URI of this package. </li> - <li> <code>virtual long getVersion (string &uri) const =0</code>. This function returns the SBML version with the given URI of this package. </li> - <li> <code>virtual long getPackageVersion (string &uri) const =0</code>. This function returns the package version with the given URI of this package.</li> - <li> <code>virtual long getURI (long sbmlLevel, long sbmlVersion, long pkgVersion) const =0</code>. - This function returns the URI (namespace) of the package corresponding to the combination of the given sbml level, sbml version, and pacakege version</li> - <li> <code>virtual SBMLExtension clone () const = 0</code>. This function creates and returns a deep copy of this derived object.</li> - </ul> - <p>For example, the above functions are overridden in the groups - package (\'src/packages/groups/extension/GroupsExtension.cpp\') as follows:</p> - @verbatim - string - GroupsExtension.getName() const - { - return getPackageName(); - } - - long - GroupsExtension.getLevel() const - { - if (uri == getXmlnsL3V1V1()) - { - return 3; - } - - return 0; - } - - long - GroupsExtension.getVersion() const - { - if (uri == getXmlnsL3V1V1()) - { - return 1; - } - - return 0; - } - - long - GroupsExtension.getPackageVersion() const - { - if (uri == getXmlnsL3V1V1()) - { - return 1; - } - - return 0; - } - - string - GroupsExtension.getURI() const - { - if (sbmlLevel == 3) - { - if (sbmlVersion == 1) - { - if (pkgVersion == 1) - { - return getXmlnsL3V1V1(); - } - } - } - - static string empty = \'\'; - - return empty; - } - - GroupsExtension* - GroupsExtension.clone () const - { - return new GroupsExtension(*this); - } - @endverbatim - - Constructor, copy Constructor, and destructor also must be overridden - if additional data members are defined in the derived class. - - </li> - - <li> <p> - Define typedef and template instantiation code for the package specific SBMLExtensionNamespaces template class - </p> - - <ol> - <li> typedef for the package specific SBMLExtensionNamespaces template class - <p> For example, the typedef for GroupsExtension (defined in the groups package) is implemented in GroupsExtension.h as follows:</p> - @verbatim - // GroupsPkgNamespaces is derived from the SBMLNamespaces class and used when creating an object of - // SBase derived classes defined in groups package. - typedef SBMLExtensionNamespaces<GroupsExtension> GroupsPkgNamespaces; - @endverbatim - </li> - - <li> template instantiation code for the above typedef definition in the implementation file (i.e., *.cpp file). - <p> For example, the template instantiation code for GroupsExtension is implemented in GroupsExtension.cpp - as follows: - </p> - - @verbatim - // Instantiate SBMLExtensionNamespaces<GroupsExtension> (GroupsPkgNamespaces) for DLL. - template class LIBSBML_EXTERN SBMLExtensionNamespaces<GroupsExtension>; - @endverbatim - - </li> - </ol> - - <p> The SBMLExtensionNamespaces template class is a derived class of - SBMLNamespaces and can be used as an argument of constructors - of SBase derived classes defined in the package extensions. - For example, a GroupsPkgNamespaces object can be used when creating a group - object as follows: - </P> - @verbatim - GroupPkgNamespaces gpns(3,1,1); // The arguments are SBML Level, SBML Version, and Groups Package Version. - - Group g = new Group(&gpns); // Creates a group object of L3V1 Groups V1. - @endverbatim - - <p> - Also, the GroupsPkgNamespaces object can be used when creating an - SBMLDocument object with the groups package as follows: - </p> - - @verbatim - GroupsPkgNamespaces gpns(3,1,1); - SBMLDocument doc; - - doc = new SBMLDocument(&gnps); // Creates an SBMLDocument of L3V1 with Groups V1. - @endverbatim - - </li> - - <li> Override the following pure virtual function which returns the SBMLNamespaces derived object - @verbatim - virtual SBMLNamespaces getSBMLExtensionNamespaces (string &uri) const =0 - @endverbatim - <p> For example, the function is overridden in GroupsExtension - class as follows:</p> - @verbatim - SBMLNamespaces - GroupsExtension.getSBMLExtensionNamespaces() const - { - GroupsPkgNamespaces* pkgns = None; - if ( uri == getXmlnsL3V1V1()) - { - pkgns = new GroupsPkgNamespaces(3,1,1); - } - return pkgns; - } - @endverbatim - </li> - - - <li> Define an enum type for representing the typecode of elements (SBase extended classes) defined in the package extension - - <p> For example, SBMLGroupsTypeCode_t for groups package is - defined in GroupsExtension.h as follows: </p> - @verbatim - typedef enum - { - SBML_GROUPS_GROUP = 200 - , SBML_GROUPS_MEMBER = 201 - } SBMLGroupsTypeCode_t; - @endverbatim - - <p> <em>SBML_GROUPS_GROUP</em> corresponds to the Group class (<group>) - and <em>SBML_GROUPS_MEMBER</em> corresponds to the Member (<member>) class, respectively. - - - <p> Similarly, SBMLLayoutTypeCode_t - for layout package is defined in LayoutExtension.h as follows: </p> - - @verbatim - typedef enum - { - SBML_LAYOUT_BOUNDINGBOX = 100 - , SBML_LAYOUT_COMPARTMENTGLYPH = 101 - , SBML_LAYOUT_CUBICBEZIER = 102 - , SBML_LAYOUT_CURVE = 103 - , SBML_LAYOUT_DIMENSIONS = 104 - , SBML_LAYOUT_GRAPHICALOBJECT = 105 - , SBML_LAYOUT_LAYOUT = 106 - , SBML_LAYOUT_LINESEGMENT = 107 - , SBML_LAYOUT_POINT = 108 - , SBML_LAYOUT_REACTIONGLYPH = 109 - , SBML_LAYOUT_SPECIESGLYPH = 110 - , SBML_LAYOUT_SPECIESREFERENCEGLYPH = 111 - , SBML_LAYOUT_TEXTGLYPH = 112 - } SBMLLayoutTypeCode_t; - @endverbatim - - <p> - These enum values are returned by corresponding getTypeCode() functions. - (e.g. SBML_GROUPS_GROUP is returned in Group.getTypeCode()) - </p> - - <p> - The value of each typecode can be duplicated between those of different - packages (In the above SBMLayoutTypeCode_t and SBMLGroupsTypeCode_t types, - unique values are assigned to enum values, but this is not mandatory.) - </p> - - <p> - Thus, to distinguish the typecodes of different packages, not only the return - value of getTypeCode() function but also that of getPackageName() - function should be checked as follows: - </p> - @verbatim - void example (SBasesb) - { - 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: - .... - } - } - else if (pkgName == \'groups\') { - switch (sb->getTypeCode()) { - case SBML_GROUPS_GROUP: - .... - break; - case SBML_GROUPS_MEMBER: - .... - } - } - ... - } - @endverbatim - - </li> - <li> Override the following pure virtual function which returns a string corresponding to the given typecode: - - @verbatim - virtual string SBMLExtension.getStringFromTypeCode() const; - @endverbatim - - <p> For example, the function for groups extension is implemented as follows: </p> - @verbatim - static - string SBML_GROUPS_TYPECODE_STRINGS[] = - { - \'Group\' - , \'Member\' - }; - - string - GroupsExtension.getStringFromTypeCode() const - { - int min = SBML_GROUPS_GROUP; - int max = SBML_GROUPS_MEMBER; - - if ( typeCode < min || typeCode > max) - { - return \'(Unknown SBML Groups Type)\'; - } - - return SBML_GROUPS_TYPECODE_STRINGS[typeCode - min]; - } - @endverbatim - - </li> - - <li> Implements a \'static void init()\' function in the derived class - - <p> In the init() function, initialization code which creates an instance of - the derived class and registering code which registers the instance to - SBMLExtensionRegistry class are implemented. - </p> - - For example, the init() function for groups package is implemented as follows: - @verbatim - void - GroupsExtension.init() - { - //------------------------------------------------------------------------- - // - // 1. Checks if the groups pacakge has already been registered. - // - //------------------------------------------------------------------------- - - if (SBMLExtensionRegistry.getInstance().isRegistered(getPackageName())) - { - // do nothing; - return; - } - - //------------------------------------------------------------------------- - // - // 2. Creates an SBMLExtension derived object. - // - //------------------------------------------------------------------------- - - GroupsExtension groupsExtension; - - //------------------------------------------------------------------------------------- - // - // 3. Creates SBasePluginCreatorBase derived objects required for this - // extension. The derived classes can be instantiated by using the following - // template class. - // - // temaplate<class SBasePluginType> class SBasePluginCreator - // - // The constructor of the creator class has two arguments: - // - // (1) SBaseExtensionPoint : extension point to which the plugin object connected - // (2) std::vector<string> : a std::vector object that contains a list of URI - // (package versions) supported by the plugin object. - // - // For example, two plugin objects (plugged in SBMLDocument and Model elements) are - // required for the groups extension. - // - // Since only \'required\' attribute is used in SBMLDocument by the groups package, and - // the \'required\' flag must always be \'false\', the existing - // SBMLDocumentPluginNotRequired class can be used as-is for the plugin. - // - // Since the lists of supported package versions (currently only L3V1-groups-V1 supported ) - // are equal in the both plugin objects, the same vector object is given to each - // constructor. - // - //--------------------------------------------------------------------------------------- - - std::vector<string> packageURIs; - packageURIs.push_back(getXmlnsL3V1V1()); - - SBaseExtensionPoint sbmldocExtPoint(\'core\',SBML_DOCUMENT); - SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); - - SBasePluginCreator<SBMLDocumentPluginNotRequired, GroupsExtension> sbmldocPluginCreator(sbmldocExtPoint,packageURIs); - SBasePluginCreator<GroupsModelPlugin, GroupsExtension> modelPluginCreator(modelExtPoint,packageURIs); - - //-------------------------------------------------------------------------------------- - // - // 3. Adds the above SBasePluginCreatorBase derived objects to the SBMLExtension derived object. - // - //-------------------------------------------------------------------------------------- - - groupsExtension.addSBasePluginCreator(&sbmldocPluginCreator); - groupsExtension.addSBasePluginCreator(&modelPluginCreator); - - //------------------------------------------------------------------------- - // - // 4. Registers the SBMLExtension derived object to SBMLExtensionRegistry - // - //------------------------------------------------------------------------- - - int result = SBMLExtensionRegistry.getInstance().addExtension(&groupsExtension); - - if (result != LIBSBML_OPERATION_SUCCESS) - { - std::cerr << \'[Error] GroupsExtension.init() failed.\' << std::endl; - } - } - @endverbatim - </p> - </li> - - <li> Instantiate a global SBMLExtensionRegister variable in appropriate - implementation file - - <p> For example, the global variable for the groups extension is instantiated in GroupsExtension.cpp as follows: </p> - @verbatim - static SBMLExtensionRegister<GroupsExtension> groupsExtensionRegister; - @endverbatim - The init() function is invoked when the global variable is instantiated, - by which initialization and registering the package extension are performed. - </li> - - - </ol> -"; - - -%feature("docstring") getNumOfSBasePlugins " - @internal - Returns the number of SBasePlugin objects stored in this object. - - @return the number of SBasePlugin objects stored in this object. -"; - - -%feature("docstring") getNumOfSupportedPackageURI " - @internal - Returns the number of supported package Namespace (package versions) of this - package extension. - - @return the number of supported package Namespace (package versions) of this - package extension. -"; - - -%feature("docstring") isSupported " - @internal - Returns a flag indicating, whether the given URI (package version) is - supported by this package extension. - - @return true if the given URI (package version) is supported by this - package extension, otherwise false is returned. -"; - - -%feature("docstring") getSupportedPackageURI " - @internal - - Returns the ith URI (the supported package version) - - @param i the index of the list of URI (the list of supporeted pacakge versions) - @return the URI of supported package version with the given index. -"; - - -%feature("docstring") clone " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - Creates and returns a deep copy of this SBMLExtension object. - - @return a (deep) copy of this SBase object -"; - - -%feature("docstring") getName " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - Returns the name of this package (e.g. \'layout\', \'multi\'). - - @return the name of package extension -"; - - -%feature("docstring") getURI " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - Returns the uri corresponding to the given SBML level, SBML version, and package version. - - @param sbmlLevel the level of SBML - @param sbmlVersion the version of SBML - @param pkgVersion the version of package - - @return a string of the package URI -"; - - -%feature("docstring") getLevel " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - Returns the SBML level associated with the given URI of this package. - - @param uri the string of URI that represents a versions of the package - @return the SBML level associated with the given URI of this package. -"; - - -%feature("docstring") getVersion " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - Returns the SBML version associated with the given URI of this package. - - @param uri the string of URI that represents a versions of the package - @return the SBML version associated with the given URI of this package. -"; - - -%feature("docstring") getPackageVersion " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - Returns the package version associated with the given URI of this package. - - @param uri the string of URI that represents a versions of this package - @return the package version associated with the given URI of this package. -"; - - -%feature("docstring") getStringFromTypeCode " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function - in their derived class. - - This method takes a type code of this package and returns a string - representing the code. -"; - - -%feature("docstring") getSBMLExtensionNamespaces " - @internal - (NOTICE) Package developers MUST OVERRIDE this pure virtual function in - their derived class. - - Returns an SBMLExtensionNamespaces<class SBMLExtensionType> object - (e.g. SBMLExtensionNamespaces<LayoutExtension> whose alias type is - LayoutPkgNamespaces) corresponding to the given uri. - Null will be returned if the given uri is not defined in the corresponding - package. - - @param uri the string of URI that represents one of versions of the package - @return an SBMLExtensionNamespaces<class SBMLExtensionType> object. None - will be returned if the given uri is not defined in the corresponding - package. -"; - - -%feature("docstring") setEnabled " - @internal - enable/disable this package. - Returned value is the result of this function. - - @param isEnabled the bool value: true (enabled) or false (disabled) - - @return true if this function call succeeded, otherwise false is returned. -"; - - -%feature("docstring") isEnabled " - @internal - Check if this package is enabled (true) or disabled (false). - - @return true if this package is enabled, otherwise false is returned. -"; - - -%feature("docstring") removeL2Namespaces " - @internal - Removes the L2 Namespaces. - - This method should be overridden by all extensions that want to serialize - to an L2 annotation. -"; - - -%feature("docstring") addL2Namespaces " - @internal - adds all L2 Extension namespaces to the namespace list. - - This method should be overridden by all extensions that want to serialize - to an L2 annotation. -"; - - -%feature("docstring") enableL2NamespaceForDocument " - @internal - Adds the L2 Namespace to the document and enables the extension. - - If the extension supports serialization to SBML L2 Annotations, this - method should be overrridden, so it will be activated. -"; - - -%feature("docstring") isInUse " - @internal - Determines whether this extension is being used by the given SBMLDocument - - The default implementation returns true. This means that when a document - had this extension enabled, it will not be possible to convert it to L2 - as we cannot make sure that the extension can be converted. - - @param doc the sbml document to test. - - @return a boolean indicating whether the extension is actually being used - byy the document. -"; - - -%feature("docstring") getErrorTableIndex " - @internal - Determines whether this extension is being used by the given SBMLDocument - - The default implementation returns true. This means that when a document - had this extension enabled, it will not be possible to convert it to L2 - as we cannot make sure that the extension can be converted. - - @param doc the sbml document to test. - - @return a boolean indicating whether the extension is actually being used - byy the document. -"; - - -%feature("docstring") SBMLExtensionException::SBMLExtensionException " - constructor -"; - - -%feature("docstring") SBMLExtensionNamespaces " - @ingroup Core - Class to store level, version and namespace information of SBML extension - package. -"; - - -%feature("docstring") SBMLExtensionNamespaces::SBMLExtensionNamespaces " - Copy constructor; creates a copy of a SBMLExtensionNamespaces. - - @param orig the SBMLExtensionNamespaces instance to copy. -"; - - -%feature("docstring") SBMLExtensionRegistry " - @ingroup Core - Registry class in which extension packages are registered. -"; - - -%feature("docstring") SBMLExtensionRegistry::getInstance " - Returns an instance (singleton) of the SBMLExtensionRegistry class. - This function needs to be invoked when manipulating the SBMLExtensionRegistry class. - - @return the instance of the SBMLExtensionRegistry object. -"; - - -%feature("docstring") SBMLExtensionRegistry::addExtension " - Add the given SBMLExtension to this SBMLExtensionRegistry. - - @param ext the SBMLExtension object to be added. - - @return integer value indicating success/failure of the - function. The possible values returned by this function are: - @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink - @li @link libsbml.LIBSBML_PKG_CONFLICT LIBSBML_PKG_CONFLICT @endlink - @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink -"; - - -%feature("docstring") SBMLExtensionRegistry::getExtension " - Returns an SBMLExtension object with the given package URI or package name (string). - - @param package the URI or name of the package extension - - @return a clone of the SBMLExtension object with the given package URI or name. The returned - extension is to be freed (i.e.: deleted) by the caller! -"; - - -%feature("docstring") SBMLExtensionRegistry::removeL2Namespaces " - Remove all L2 Extension namespaces from the namespace list. This will call all - overriden SBMLExtension::removeL2Namespaces methods. -"; - - -%feature("docstring") SBMLExtensionRegistry::addL2Namespaces " - adds all L2 Extension namespaces to the namespace list. This will call all - overriden SBMLExtension::addL2Namespaces methods. -"; - - -%feature("docstring") SBMLExtensionRegistry::enableL2NamespaceForDocument " - Enables all extensions that support serialization / deserialization with - SBML Annotations. -"; - - -%feature("docstring") SBMLExtensionRegistry::disableUnusedPackages " - Goes through all extensions in the list of plugins of the given document - and disables all plugins that are not being used. -"; - - -%feature("docstring") SBMLExtensionRegistry::disablePackage " - Disables the package with the given URI / name. -"; - - -%feature("docstring") SBMLExtensionRegistry::getNumExtension " - Returns the number of SBMLExtension with the given extension point. - - @param extPoint the SBaseExtensionPoint - - @return the number of SBMLExtension with the given extension point. -"; - - -%feature("docstring") SBMLExtensionRegistry::setEnabled " - Enable/disable the package with the given uri. - - @param uri the URI of the target package. - @param isEnabled the bool value corresponding to enabled (true) or - disabled (false) - - @return false will be returned if the given bool value is false - or the given package is not registered, otherwise true will be - returned. -"; - - -%feature("docstring") SBMLExtensionRegistry::isEnabled " - Checks if the extension with the given URI is enabled (true) or - disabled (false) - - @param uri the URI of the target package. - - @return false will be returned if the given package is disabled - or not registered, otherwise true will be returned. -"; - - -%feature("docstring") SBMLExtensionRegistry::isRegistered " - Checks if the extension with the given URI is registered (true) - or not (false) - - @param uri the URI of the target package. - - @return true will be returned if the package with the given URI - is registered, otherwise false will be returned. -"; - - -%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageNames " - Returns a list of registered packages (such as \'layout\', \'fbc\' or \'comp\') - the list contains char* strings and has to be freed by the caller. - - @return the names of the registered packages in a list -"; - - -%feature("docstring") SBMLExtensionRegistry::getNumRegisteredPackages " - Returns the number of registered packages. - - @return the number of registered packages. -"; - - -%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageName " - Returns the registered package name at the given index - - @param index zero based index of the package name to return - - @return the package name with the given index or None -"; - - -%feature("docstring") SBMLExtensionRegistry::SBMLExtensionRegistry " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLExtensionRegistry()</pre> - - Returns the registered package name at the given index - - @param index zero based index of the package name to return - - @return the package name with the given index or None - - - <hr> - Method variant with the following signature: - <pre class='signature'>SBMLExtensionRegistry(SBMLExtensionRegistry orig)</pre> - - Returns the registered package name at the given index - - @param index zero based index of the package name to return - - @return the package name with the given index or None -"; - - -%feature("docstring") OStream " - Wrapper class for the C++ standard streams <code>cout</code>, - <code>cerr</code>, and <code>clog</code>. - - A few libSBML methods accept an argument for indicating where to send - text string output. An example is the SBMLDocument.printErrors() method. However, the methods use C++ style streams and not Java - stream objects. The OStream object exists to bridge the Java and - underlying native implementation. It is a simple wrapper around the - underlying stream object and provides a few basic methods for - manipulating it. -"; - - -%feature("docstring") OFStream " - Wrapper class for the C++ standard file stream <code>ofstream</code>. - - The C++ <code>ofstream</code> (\'output file stream\') provides an - interface for writing data to files as output streams. This class, - OFStream, wraps the C++ <code>ofstream</code> and provides an OStream - interface to it. The file to be associated with the stream can be - specified as a parameter to the constructors in this class. - - This class may be useful because some libSBML methods accept an argument - for indicating where to send text string output. An example is the - SBMLDocument.printErrors() method. The methods use C++ style streams - and not Java stream objects. The OStream object exists to bridge the - Java and underlying native implementation. It is a simple wrapper - around the underlying stream object and provides a few basic methods for - manipulating it. -"; - - -%feature("docstring") OStringStream " - Wrapper class for the C++ standard stream <code>ostringstream</code>. - - The C++ <code>ostringstream</code> (\'output string stream class\') - provides an interface to manipulating strings as if they were output - streams. This class class, OStringStream, wraps the - <code>ostringstream</code> and provides an OStream interface to it. - - This class may be useful because some libSBML methods accept an argument - for indicating where to send text string output. An example is the - SBMLDocument.printErrors() method. The methods use - C++ style streams and not Java stream objects. The OStream object - exists to bridge the Java and underlying native implementation. It is a - simple wrapper around the underlying stream object and provides a few - basic methods for manipulating it. -"; - - -%feature("docstring") OStream::OStream " - Creates a new OStream object with one of standard output stream objects. - - @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) - indicating the type of stream to create. -"; - - -%feature("docstring") OStream::get_ostream " - Returns the stream object. - <p> - @return the stream object -"; - - -%feature("docstring") OStream::endl " - Writes an end-of-line character on this tream. -"; - - -%feature("docstring") OFStream::OFStream " - Creates a new OFStream object for a file. - <p> - This opens the given file @p filename with the @p is_append flag - (default is <code>false</code>), and creates an OFStream object - instance that associates the file\'s content with an OStream object. - <p> - @param filename the name of the file to open - @param is_append whether to open the file for appending (default: - <code>false</code>, meaning overwrite the content instead) - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif -"; - - -%feature("docstring") OFStream::open " - Opens a file and associates this stream object with it. - <p> - This method opens a given file @p filename with the given - @p is_append flag (whose default value is <code>false</code>), - and associates <i>this</i> stream object with the file\'s content. - <p> - @param filename the name of the file to open - @param is_append whether to open the file for appending (default: - <code>false</code>, meaning overwrite the content instead) - - @if notcpp @htmlinclude warn-default-args-in-docs.html @endif -"; - - -%feature("docstring") OFStream::close " - Closes the file currently associated with this stream object. -"; - - -%feature("docstring") OFStream::is_open " - Returns <code>true</code> if this stream object is currently - associated with a file. - <p> - @return <code>true</code> if the stream object is currently - associated with a file, <code>false</code> otherwise -"; - - -%feature("docstring") OStringStream::OStringStream " - Creates a new OStringStream object -"; - - -%feature("docstring") OStringStream::str " - This method has multiple variants that differ in the arguments - they accept. Each is described separately below. - - <hr> - Method variant with the following signature: - <pre class='signature'>str()</pre> - - Returns the copy of the string object currently assosiated - with this <code>ostringstream</code> buffer. - <p> - @return a copy of the string object for this stream - - - <hr> - Method variant with the following signature: - <pre class='signature'>str(string s)</pre> - - Sets string @p s to the string object currently assosiated with - this stream buffer. - <p> - @param s the string to write to this stream -"; - - +%feature("docstring") getLibSBMLVersion " + Returns the version number of this copy of libSBML as an integer. + + @return the libSBML version as an integer; version 1.2.3 becomes 10203. +"; + + +%feature("docstring") getLibSBMLDottedVersion " + Returns the version number of this copy of libSBML as a string. + + @return the libSBML version as a string; version 1.2.3 becomes + \'1.2.3\'. + + @see getLibSBMLVersionString() +"; + + +%feature("docstring") getLibSBMLVersionString " + Returns the version number of this copy of libSBML as a string without + periods. + + @return the libSBML version as a string: version 1.2.3 becomes \'10203\'. + + @see getLibSBMLDottedVersion() +"; + + +%feature("docstring") SBMLReader " + @ingroup Core + Methods for reading SBML from files and text strings. + + @htmlinclude not-sbml-warning.html + + The SBMLReader class provides the main interface for reading SBML + content from files and strings. The methods for reading SBML all return + an SBMLDocument object representing the results. + + In the case of failures (such as if the SBML contains errors or a file + cannot be read), the errors will be recorded with the SBMLErrorLog + object kept in the SBMLDocument returned by SBMLReader. Consequently, + immediately after calling a method on SBMLReader, callers should always + check for errors and warnings using the methods for this purpose + provided by SBMLDocument. + + For convenience as well as easy access from other languages besides C++, + this file also defines two global functions, + libsbml.readSBML() + and libsbml.readSBMLFromString(). + They are equivalent to creating an SBMLReader + object and then calling the + SBMLReader.readSBML() or + SBMLReader.readSBMLFromString() + methods, respectively. + + @section compression Support for reading compressed files + + LibSBML provides support for reading (as well as writing) compressed + SBML files. The process is transparent to the calling + application—the application does not need to do anything + deliberate to invoke the functionality. If a given SBML filename ends + with an extension for the @em gzip, @em zip or @em bzip2 compression + formats (respectively, @c .gz, @c .zip, or @c .bz2), then the methods + SBMLReader.readSBML() and + SBMLWriter.writeSBML() + will automatically decompress and compress the file while writing and + reading it. If the filename has no such extension, it + will be read and written uncompressed as normal. + + The compression feature requires that the @em zlib (for @em gzip and @em + zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the + system running libSBML, and that libSBML was configured with their + support compiled-in. Please see the libSBML @if clike <a href=\'libsbml-installation.html\'>installation instructions</a> @endif@if python <a href=\'libsbml-installation.html\'>installation instructions</a> @endif@if java <a href=\'../../../libsbml-installation.html\'>installation instructions</a> @endif@~ for more information about this. The methods + @if java SBMLReader.hasZlib()@else hasZlib()@endif@~ and + @if java SBMLReader.hasBzip2()@else hasBzip2()@endif@~ + can be used by an application to query at run-time whether support + for the compression libraries is available in the present copy of + libSBML. + + Support for compression is not mandated by the SBML standard, but + applications may find it helpful, particularly when large SBML models + are being communicated across data links of limited bandwidth. +"; + + +%feature("docstring") SBMLReader::SBMLReader " + Creates a new SBMLReader and returns it. + + The libSBML SBMLReader objects offer methods for reading SBML in + XML form from files and text strings. +"; + + +%feature("docstring") SBMLReader::readSBML " + Reads an SBML document from a file. + + This method is identical to SBMLReader.readSBMLFromFile(). + + If the file named @p filename does not exist or its content is not + valid SBML, one or more errors will be logged with the SBMLDocument + object returned by this method. Callers can use the methods on + SBMLDocument such as SBMLDocument.getNumErrors() and + SBMLDocument.getError() to get the errors. The object returned by + SBMLDocument.getError() is an SBMLError object, and it has methods to + get the error code, category, and severity level of the problem, as + well as a textual description of the problem. The possible severity + levels range from informational messages to fatal errors; see the + documentation for SBMLError for more information. + + If the file @p filename could not be read, the file-reading error will + appear first. The error code @if clike (a value drawn from the enumeration + #XMLErrorCode_t) @endif@~ can provide a clue about what happened. For example, + a file might be unreadable (either because it does not actually exist + or because the user does not have the necessary access priviledges to + read it) or some sort of file operation error may have been reported + by the underlying operating system. Callers can check for these + situations using a program fragment such as the following: + @if clike + @verbatim + SBMLReader reader; + SBMLDocument doc = reader.readSBMLFromFile(filename); + + if (doc->getNumErrors() > 0) + { + if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable) + { + // Handle case of unreadable file here. + } + else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError) + { + // Handle case of other file operation error here. + } + else + { + // Handle other cases -- see error codes defined in XMLErrorCode_t + // for other possible cases to check. + } + } + @endverbatim + @endif@if java + @verbatim + SBMLReader reader = new SBMLReader(); + SBMLDocument doc = reader.readSBMLFromFile(filename); + + if (doc.getNumErrors() > 0) + { + if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable) + { + // Handle case of unreadable file here. + } + else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError) + { + // Handle case of other file operation error here. + } + else + { + // Handle other error cases. + } + } + @endverbatim + @endif@if python + @verbatim + reader = SBMLReader() + doc = reader.readSBMLFromFile(filename) + + if doc.getNumErrors() > 0: + if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: + # Handle case of unreadable file here. + elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: + # Handle case of other file error here. + else: + # Handle other error cases here. + + @endverbatim + @endif@if csharp + @verbatim + SBMLReader reader = new SBMLReader(); + SBMLDocument doc = reader.readSBMLFromFile(filename); + + if (doc.getNumErrors() > 0) + { + if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable) + { + // Handle case of unreadable file here. + } + else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError) + { + // Handle case of other file operation error here. + } + else + { + // Handle other cases -- see error codes defined in XMLErrorCode_t + // for other possible cases to check. + } + } + @endverbatim + @endif@~ + + If the given filename ends with the suffix @c \'.gz\' (for example, @c + \'myfile.xml.gz\'), the file is assumed to be compressed in @em gzip + format and will be automatically decompressed upon reading. + Similarly, if the given filename ends with @c \'.zip\' or @c \'.bz2\', the + file is assumed to be compressed in @em zip or @em bzip2 format + (respectively). Files whose names lack these suffixes will be read + uncompressed. Note that if the file is in @em zip format but the + archive contains more than one file, only the first file in the + archive will be read and the rest ignored. + + @htmlinclude note-reading-zipped-files.html + + @param filename the name or full pathname of the file to be read. + + @return a pointer to the SBMLDocument created from the SBML content. + + @note LibSBML versions 2.x and later versions behave differently in + error handling in several respects. One difference is how early some + errors are caught and whether libSBML continues processing a file in + the face of some early errors. In general, libSBML versions after 2.x + stop parsing SBML inputs sooner than libSBML version 2.x in the face + of XML errors, because the errors may invalidate any further SBML + content. For example, a missing XML declaration at the beginning of + the file was ignored by libSBML 2.x but in version 3.x and later, it + will cause libSBML to stop parsing the rest of the input altogether. + While this behavior may seem more severe and intolerant, it was + necessary in order to provide uniform behavior regardless of which + underlying XML parser (Expat, Xerces, libxml2) is being used by + libSBML. The XML parsers themselves behave differently in their error + reporting, and sometimes libSBML has to resort to the lowest common + denominator. + + @see SBMLError +"; + + +%feature("docstring") SBMLReader::readSBMLFromFile " + Reads an SBML document from a file. + + This method is identical to SBMLReader.readSBML(). + + If the file named @p filename does not exist or its content is not + valid SBML, one or more errors will be logged with the SBMLDocument + object returned by this method. Callers can use the methods on + SBMLDocument such as SBMLDocument.getNumErrors() and + SBMLDocument.getError() to get the errors. The object returned by + SBMLDocument.getError() is an SBMLError object, and it has methods to + get the error code, category, and severity level of the problem, as + well as a textual description of the problem. The possible severity + levels range from informational messages to fatal errors; see the + documentation for SBMLError for more information. + + If the file @p filename could not be read, the file-reading error will + appear first. The error code @if clike (a value drawn from the enumeration + #XMLErrorCode_t)@endif@~ can provide a clue about what happened. For example, + a file might be unreadable (either because it does not actually exist + or because the user does not have the necessary access priviledges to + read it) or some sort of file operation error may have been reported + by the underlying operating system. Callers can check for these + situations using a program fragment such as the following: + @if clike + @verbatim + SBMLReader reader = new SBMLReader(); + SBMLDocument doc = reader.readSBML(filename); + + if (doc->getNumErrors() > 0) + { + if (doc->getError(0)->getErrorId() == XMLError::FileUnreadable) + { + // Handle case of unreadable file here. + } + else if (doc->getError(0)->getErrorId() == XMLError::FileOperationError) + { + // Handle case of other file operation error here. + } + else + { + // Handle other cases -- see error codes defined in XMLErrorCode_t + // for other possible cases to check. + } + } + @endverbatim + @endif@if java + @verbatim + SBMLReader reader = new SBMLReader(); + SBMLDocument doc = reader.readSBMLFromFile(filename); + + if (doc.getNumErrors() > 0) + { + if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable) + { + // Handle case of unreadable file here. + } + else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError) + { + // Handle case of other file operation error here. + } + else + { + // Handle other error cases. + } + } + @endverbatim + @endif@if python + @verbatim + reader = SBMLReader() + doc = reader.readSBMLFromFile(filename) + + if doc.getNumErrors() > 0: + if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: + # Handle case of unreadable file here. + elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: + # Handle case of other file error here. + else: + # Handle other error cases here. + + @endverbatim + @endif@~ + + If the given filename ends with the suffix @c \'.gz\' (for example, @c + \'myfile.xml.gz\'), the file is assumed to be compressed in @em gzip + format and will be automatically decompressed upon reading. + Similarly, if the given filename ends with @c \'.zip\' or @c \'.bz2\', the + file is assumed to be compressed in @em zip or @em bzip2 format + (respectively). Files whose names lack these suffixes will be read + uncompressed. Note that if the file is in @em zip format but the + archive contains more than one file, only the first file in the + archive will be read and the rest ignored. + + @htmlinclude note-reading-zipped-files.html + + @param filename the name or full pathname of the file to be read. + + @return a pointer to the SBMLDocument created from the SBML content. + + @note LibSBML versions 2.x and later versions behave differently in + error handling in several respects. One difference is how early some + errors are caught and whether libSBML continues processing a file in + the face of some early errors. In general, libSBML versions after 2.x + stop parsing SBML inputs sooner than libSBML version 2.x in the face + of XML errors, because the errors may invalidate any further SBML + content. For example, a missing XML declaration at the beginning of + the file was ignored by libSBML 2.x but in version 3.x and later, it + will cause libSBML to stop parsing the rest of the input altogether. + While this behavior may seem more severe and intolerant, it was + necessary in order to provide uniform behavior regardless of which + underlying XML parser (Expat, Xerces, libxml2) is being used by + libSBML. The XML parsers themselves behave differently in their error + reporting, and sometimes libSBML has to resort to the lowest common + denominator. + + @see SBMLError + @see SBMLDocument +"; + + +%feature("docstring") SBMLReader::readSBMLFromString " + Reads an SBML document from the given XML string. + + This method is flexible with respect to the presence of an XML + declaration at the beginning of the string. In particular, if the + string in @p xml does not begin with the XML declaration + <code><?xml version=\'1.0\' encoding=\'UTF-8\'?></code>, then this + method will automatically prepend the declaration to @p xml. + + This method will log a fatal error if the content given in the + parameter @p xml is not SBML. See the method documentation for + SBMLReader.readSBML() + for an example of code for testing the returned error code. + + @param xml a string containing a full SBML model + + @return a pointer to the SBMLDocument created from the SBML content. + + @see SBMLReader.readSBML() +"; + + +%feature("docstring") SBMLReader::hasZlib " + Static method; returns @c True if this copy of libSBML supports + <i>gzip</I> and <i>zip</i> format compression. + + @return @c True if libSBML has been linked with the <i>zlib</i> + library, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLReader), and the other + will be a standalone top-level function with the name + SBMLReader_hasZlib(). They are functionally identical. @endif@~ + + @see @if clike hasBzip2() @else SBMLReader.hasBzip2() @endif@~ +"; + + +%feature("docstring") SBMLReader::hasBzip2 " + Static method; returns @c True if this copy of libSBML supports + <i>bzip2</i> format compression. + + @return @c True if libSBML is linked with the <i>bzip2</i> + libraries, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLReader), and the other + will be a standalone top-level function with the name + SBMLReader_hasBzip2(). They are functionally identical. @endif@~ + + @see @if clike hasZlib() @else SBMLReader.hasZlib() @endif@~ +"; + + +%feature("docstring") SBMLReader::readInternal " + @internal + Used by readSBML() and readSBMLFromString(). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") readSBML " + Reads an SBML document from the given file @p filename. + + If @p filename does not exist, or it is not an SBML file, an error will + be logged in the error log of the SBMLDocument object returned by this + method. Calling programs can inspect this error log to determine + the nature of the problem. Please refer to the definition of + SBMLDocument for more information about the error reporting mechanism. + + @return a pointer to the SBMLDocument read. +"; + + +%feature("docstring") readSBMLFromFile " + Reads an SBML document from the given file @p filename. + + If @p filename does not exist, or it is not an SBML file, an error will + be logged in the error log of the SBMLDocument object returned by this + method. Calling programs can inspect this error log to determine + the nature of the problem. Please refer to the definition of + SBMLDocument for more information about the error reporting mechanism. + + @return a pointer to the SBMLDocument read. +"; + + +%feature("docstring") readSBMLFromString " + Reads an SBML document from a string assumed to be in XML format. + + If the string does not begin with XML declaration, + @verbatim + <?xml version=\'1.0\' encoding=\'UTF-8\'?> + @endverbatim + + an XML declaration string will be prepended. + + This method will report an error if the given string @p xml is not SBML. + The error will be logged in the error log of the SBMLDocument object + returned by this method. Calling programs can inspect this error log to + determine the nature of the problem. Please refer to the definition of + SBMLDocument for more information about the error reporting mechanism. + + @return a pointer to the SBMLDocument read. +"; + + +%feature("docstring") SBMLWriter " + @ingroup Core + Methods for writing SBML to files and text strings. + + @htmlinclude not-sbml-warning.html + + The SBMLWriter class is the converse of SBMLReader, and provides the + main interface for serializing SBML models into XML and writing the + result to an output stream or to files and text strings. The methods + for writing SBML all take an SBMLDocument object and a destination. + They return a boolean or integer value to indicate success or failure. + + @section compression Support for writing compressed files + + LibSBML provides support for writing (as well as reading) compressed + SBML files. The process is transparent to the calling + application—the application does not need to do anything + deliberate to invoke the functionality. If a given SBML filename ends + with an extension for the @em gzip, @em zip or @em bzip2 compression + formats (respectively, <code>".gz"</code>, + <code>".zip"</code>, or <code>".bz2"</code>), + then the methods + SBMLWriter.writeSBML() + and SBMLReader.readSBML() + will automatically compress and decompress the file while writing and + reading it. If the filename has no such extension, it + will be written and read uncompressed as normal. + + The compression feature requires that the @em zlib (for @em gzip and @em + zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the + system running libSBML, and that libSBML was configured with their + support compiled-in. Please see the libSBML @if clike <a href=\'libsbml-installation.html\'>installation instructions</a>@endif@if python <a href=\'libsbml-installation.html\'>installation instructions</a>@endif@if java <a href=\'../../../libsbml-installation.html\'>installation instructions</a>@endif@~ for + more information about this. The methods + SBMLWriter.hasZlib() and + SBMLWriter.hasBzip2() + can be used by an application to query at run-time whether support + for the compression libraries is available in the present copy of + libSBML. + + Support for compression is not mandated by the SBML standard, but + applications may find it helpful, particularly when large SBML models + are being communicated across data links of limited bandwidth. +"; + + +%feature("docstring") SBMLWriter::SBMLWriter " + Creates a new SBMLWriter. + + The libSBML SBMLWriter objects offer methods for writing SBML in + XML form to files and text strings. +"; + + +%feature("docstring") SBMLWriter::setProgramName " + Sets the name of this program, i.e., the program that is about to + write out the SBMLDocument. + + If the program name and version are set (see + SBMLWriter.setProgramVersion()), the + following XML comment, intended for human consumption, will be written + at the beginning of the XML document: + @verbatim + <!-- Created by <program name> version <program version> + on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> + @endverbatim + + If the program name and version are not set at some point before + calling the writeSBML() methods, no such comment is written out. + + @param name the name of this program (where \'this program\' refers to + program in which libSBML is embedded, not libSBML itself!) + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see setProgramVersion() +"; + + +%feature("docstring") SBMLWriter::setProgramVersion " + Sets the version of this program, i.e., the program that is about to + write out the SBMLDocument. + + If the program version and name are set (see + SBMLWriter.setProgramName()), the + following XML comment, intended for human consumption, will be written + at the beginning of the document: + @verbatim + <!-- Created by <program name> version <program version> + on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> + @endverbatim + + If the program version and name are not set at some point before + calling the writeSBML() methods, no such comment is written out. + + @param version the version of this program (where \'this program\' + refers to program in which libSBML is embedded, not libSBML itself!) + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see setProgramName() +"; + + +%feature("docstring") SBMLWriter::writeSBML " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>writeSBML(SBMLDocument d, string filename)</pre> + + Writes the given SBML document to filename. + + @htmlinclude assuming-compressed-file.html + + @param d the SBML document to be written + + @param filename the name or full pathname of the file where the SBML + is to be written. + + @return @c True on success and @c False if the filename could not be + opened for writing. + + @note @htmlinclude note-writing-zipped-files.html + + @see setProgramVersion() + @see setProgramName() + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeSBML(SBMLDocument d, std::ostream& stream)</pre> + + Writes the given SBML document to the output stream. + + @param d the SBML document to be written + + @param stream the stream object where the SBML is to be written. + + @return @c True on success and @c False if one of the underlying + parser components fail (rare). + + @see setProgramVersion() + @see setProgramName() +"; + + +%feature("docstring") SBMLWriter::writeToString " + @internal + Writes the given SBML document to an in-memory string and returns a + pointer to it. + + The string is owned by the caller and should be freed (with @c free()) + when no longer needed. + + @param d the SBML document to be written + + @return the string on success and @c 0 if one of the underlying parser + components fail. + + @see setProgramVersion() + @see setProgramName() +"; + + +%feature("docstring") SBMLWriter::writeSBMLToFile " + Writes the given SBML document to filename. + + @htmlinclude assuming-compressed-file.html + + @param d the SBML document to be written + + @param filename the name or full pathname of the file where the SBML + is to be written. + + @return @c True on success and @c False if the filename could not be + opened for writing. + + @note @htmlinclude note-writing-zipped-files.html + + @see setProgramVersion() + @see setProgramName() +"; + + +%feature("docstring") SBMLWriter::writeSBMLToString " + Writes the given SBML document to an in-memory string and returns a + pointer to it. + + The string is owned by the caller and should be freed (with @c free()) + when no longer needed. + + @param d the SBML document to be written + + @return the string on success and @c 0 if one of the underlying parser + components fail. + + @see setProgramVersion() + @see setProgramName() +"; + + +%feature("docstring") SBMLWriter::hasZlib " + Predicate returning @c True if this copy of libSBML has been linked + with the <em>zlib</em> library. + + LibSBML supports reading and writing files compressed with either + bzip2 or zip/gzip compression. The facility depends on libSBML having + been compiled with the necessary support libraries. This method + allows a calling program to inquire whether that is the case for the + copy of libSBML it is using. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLWriter), and the other + will be a standalone top-level function with the name + SBMLWriter_hasZlib(). They are functionally identical. @endif@~ + + @return @c True if libSBML is linked with zlib, @c False otherwise. + + @see @if clike hasBzip2() @else SBMLWriter.hasBzip2() @endif@~ +"; + + +%feature("docstring") SBMLWriter::hasBzip2 " + Predicate returning @c True if this copy of libSBML has been linked + with the <em>bzip2</em> library. + + LibSBML supports reading and writing files compressed with either + bzip2 or zip/gzip compression. The facility depends on libSBML having + been compiled with the necessary support libraries. This method + allows a calling program to inquire whether that is the case for the + copy of libSBML it is using. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLWriter), and the other + will be a standalone top-level function with the name + SBMLWriter_hasZlib(). They are functionally identical. @endif@~ + + @return @c True if libSBML is linked with bzip2, @c False otherwise. + + @see @if clike hasZlib() @else SBMLWriter.hasZlib() @endif@~ +"; + + +%feature("docstring") writeSBML " + Writes the given SBML document @p d to the file named by @p filename. + + This function is identical to @if clike SBMLWriter.writeSBMLToFile ()@endif@if java <a href=\'#writeSBMLToFile(org.sbml.libsbml.SBMLDocument, java.lang.String)\'><code>writeSBMLToFile(SBMLDocument d, String filename)</code></a>@endif. + + @htmlinclude assuming-compressed-file.html + + @param d the SBMLDocument object to be written out in XML format + + @param filename a string giving the path to a file where the XML + content is to be written. + + @return @c 1 on success and @c 0 (zero) if @p filename could not be + written. Some possible reasons for failure include (a) being unable to + open the file, and (b) using a filename that indicates a compressed SBML + file (i.e., a filename ending in <code>".zip"</code> or + similar) when the compression functionality has not been enabled in + the underlying copy of libSBML. + + @if clike @warning Note that the string is owned by the caller and + should be freed (with the normal string <code>free()</code> C++ + function) after it is no longer needed.@endif@~ + + @see SBMLWriter.hasZlib() + @see SBMLWriter.hasBzip2() +"; + + +%feature("docstring") writeSBMLToString " + Writes the given SBML document @p d to an in-memory string and + returns the string. + + This is a convenience function that uses the + SBMLWriter.writeSBMLToString() method internally, + yet does not require the caller to create an SBMLWriter object first. + + @param d an SBMLDocument object to be written out in XML format + + @return the string on success and @c None if one of the underlying parser + components fail. + + @if clike @warning Note that the string is owned by the caller and + should be freed (with the normal string <code>free()</code> C++ + function) after it is no longer needed.@endif@~ +"; + + +%feature("docstring") writeSBMLToFile " + Writes the given SBML document @p d to the file @p filename. + + This is a convenience function that uses the + SBMLWriter.writeSBMLToFile() method internally, yet does not require the caller to create + an SBMLWriter object first. + + @htmlinclude assuming-compressed-file.html + + @param d an SBMLDocument object to be written out in XML format + + @param filename a string giving the path to a file where the XML + content is to be written. + + @return @c 1 on success and @c 0 (zero) if @p filename could not be + written. Some possible reasons for failure include (a) being unable to + open the file, and (b) using a filename that indicates a compressed SBML + file (i.e., a filename ending in <code>".zip"</code> or + similar) when the compression functionality has not been enabled in + the underlying copy of libSBML. + + @if clike @warning Note that the string is owned by the caller and + should be freed (with the normal string <code>free()</code> C++ + function) after it is no longer needed.@endif@~ + + @see SBMLWriter.hasZlib() + @see SBMLWriter.hasBzip2() +"; + + +%feature("docstring") SBMLTypeCode_toString " + This method takes an SBML type code and returns a string representing + the code. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return a human readable name for the given + @if clike #SBMLTypeCode_t value@else SBML type code@endif. + + @note The caller does not own the returned string and is therefore not + allowed to modify it. +"; + + +%feature("docstring") SBase " + @ingroup Core + Implementation of %SBase, the base class of most SBML objects. + + Most components in SBML are derived from a single abstract base type, + SBase. In addition to serving as the parent class for most other + classes of objects in SBML, this base type is designed to allow a + modeler or a software package to attach arbitrary information to each + major element or list in an SBML model. + + SBase has an optional subelement called \'notes\'. It is intended to + serve as a place for storing optional information intended to be seen by + humans. An example use of the \'notes\' element would be to contain + formatted user comments about the model element in which the \'notes\' + element is enclosed. There are certain conditions on the XHTML content + permitted inside the \'notes\' element; please consult the <a + target=\'_blank\' href=\'http://sbml.org/Documents/Specifications\'>SBML + specification document</a> corresponding to the SBML Level and Version + of your model for more information about the requirements for \'notes\' + content. + + SBase has another optional subelement called \'annotation\'. Whereas the + \'notes\' element described above is a container for content to be shown + directly to humans, the \'annotation\' element is a container for optional + software-generated content @em not meant to be shown to humans. The + element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary data content. SBML places + only a few restrictions on the organization of the content; these are + intended to help software tools read and write the data as well as help + reduce conflicts between annotations added by different tools. As is + the case with \'notes\', it is important to refer to the <a + target=\'_blank\' href=\'http://sbml.org/Documents/Specifications\'>SBML + specification document</a> corresponding to the SBML Level and Version + of your model for more information about the requirements for + \'annotation\' content. + + It is worth pointing out that the \'annotation\' element in the definition + of SBase exists in order that software developers may attach optional + application-specific data to the elements in an SBML model. However, it + is important that this facility not be misused. In particular, it is + <em>critical</em> that data essential to a model definition or that can + be encoded in existing SBML elements is <em>not</em> stored in + \'annotation\'. Parameter values, functional dependencies between model + elements, etc., should not be recorded as annotations. It is crucial to + keep in mind the fact that data placed in annotations can be freely + ignored by software applications. If such data affects the + interpretation of a model, then software interoperability is greatly + impeded. + + SBML Level 2 introduced an optional SBase attribute named \'metaid\' for + supporting metadata annotations using RDF (<a target=\'_blank\' + href=\'http://www.w3.org/RDF/\'>Resource Description Format</a>). The + attribute value has the data type <a + href=\'http://www.w3.org/TR/REC-xml/#id\'>XML ID</a>, the XML identifier + type, which means each \'metaid\' value must be globally unique within an + SBML file. (Importantly, this uniqueness criterion applies across any + attribute with type <a href=\'http://www.w3.org/TR/REC-xml/#id\'>XML + ID</a>, not just the \'metaid\' attribute used by SBML—something to + be aware of if your application-specific XML content inside the + \'annotation\' subelement happens to use <a + href=\'http://www.w3.org/TR/REC-xml/#id\'>XML ID</a>.) The \'metaid\' value + serves to identify a model component for purposes such as referencing + that component from metadata placed within \'annotation\' subelements. + + Beginning with SBML Level 2 Version 3, SBase also has an optional + attribute named \'sboTerm\' for supporting the use of the Systems Biology + Ontology. In SBML proper, the data type of the attribute is a string of + the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a seven digit integer number; + libSBML simplifies the representation by only storing the \'NNNNNNN\' + integer portion. Thus, in libSBML, the \'sboTerm\' attribute on SBase has + data type @c int, and SBO identifiers are stored simply as integers. + (For convenience, SBase offers methods for returning both the integer + form and a text-string form of the SBO identifier.) SBO terms are a + type of optional annotation, and each different class of SBML object + derived from SBase imposes its own requirements about the values + permitted for \'sboTerm\'. Please consult the SBML Level 2 + Version 4 specification for more information about the use of SBO + and the \'sboTerm\' attribute. + + Finally, note that, in the list of methods on SBase, there is no public + constructor because SBase is an abstract class. The constructors reside + in the subclasses derived from SBase. + + + @section sbase-miriam Standard format for annotations linking data resources + + SBML Level 2 Versions 2, 3 and 4, and Level 3, define a proposed + regular format for encoding two particular categories of annotations: + (a) references to controlled vocabulary terms and database identifiers + which define and describe biological and biochemical entities in a + model; and (b) descriptions of the provenance of a model, including its + author(s) and modification history. +"; + + +%feature("docstring") SBase::accept " + Accepts the given SBMLVisitor for this SBase object. + + @param v the SBMLVisitor instance to be used + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") SBase::clone " + Creates and returns a deep copy of this SBase object. + + @return a (deep) copy of this SBase object. +"; + + +%feature("docstring") SBase::getElementBySId " + Returns the first child element found that has the given @p id in the + model-wide @c SId namespace, or @c None if no such object is found. + + @param id string representing the \'id\' attribute value of the object + to find. + + @return pointer to the first element found with the given identifier. +"; + + +%feature("docstring") SBase::getElementByMetaId " + Returns the first child element it can find with a specific \'metaid\' + attribute value, or @c None if no such object is found. + + @htmlinclude what-is-metaid.html + + @param metaid string representing the \'metaid\' attribute value of the + object to find. + + @return pointer to the first element found with the given meta-identifier. +"; + + +%feature("docstring") SBase::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth. + + @return a pointer to a List of pointers to all children objects. +"; + + +%feature("docstring") SBase::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML content (if such exists). + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") SBase::renameMetaIdRefs " + Renames all the meta-identifier attributes on this element. + + @htmlinclude what-is-metaidref.html + + This method works by looking at all meta-identifier attribute values, + comparing the identifiers to the value of @p oldid. If any matches are + found, the matching identifiers are replaced with @p newid. The method + does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") SBase::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") SBase::replaceSIDWithFunction " + @internal + If this object has a child \'math\' object (or anything with ASTNodes in + general), replace all nodes with the name \'id\' with the provided + function. + + @note This function does nothing itself—subclasses with ASTNode + subelements must override this function. +"; + + +%feature("docstring") SBase::divideAssignmentsToSIdByFunction " + @internal + If the function of this object is to assign a value has a child \'math\' + object (or anything with ASTNodes in general), replace the \'math\' + object with the function (existing/function). + + @note This function does nothing itself—subclasses with ASTNode + subelements must override this function. +"; + + +%feature("docstring") SBase::multiplyAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). +"; + + +%feature("docstring") SBase::getElementFromPluginsBySId " + @internal + Returns the first child element found that has the given @p id in the + model-wide SId namespace from all plug-ins associated with this + element, or @c None if no such object is found. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") SBase::getElementFromPluginsByMetaId " + @internal + Returns the first child element it can find with the given @p metaid from + all plug-ins associated with this element, or @c None if no such object + is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") SBase::hasNonstandardIdentifierBeginningWith " + @internal + Check to see if the given prefix is used by any of the IDs defined by + extension elements *excluding* \'id\' and \'metaid\' attributes (as, for + example, the spatial id attributes \'spid\'). +"; + + +%feature("docstring") SBase::prependStringToAllIdentifiers " + @internal + Add the given string to all identifiers in the object. If the string + is added to anything other than an id or a metaid, this code is + responsible for tracking down and renaming all *idRefs in the package + extention that identifier comes from. +"; + + +%feature("docstring") SBase::transformIdentifiers " + @internal + Add the given string to all identifiers in the object. If the string + is added to anything other than an id or a metaid, this code is + responsible for tracking down and renaming all *idRefs in the package + extention that identifier comes from. +"; + + +%feature("docstring") SBase::getAllElementsFromPlugins " + Returns a List of all child SBase objects contained in SBML package + plug-ins. + + @htmlinclude what-are-plugins.html + + This method walks down the list of all SBML Level 3 packages used + by this object and returns all child objects defined by those packages. + + @return a pointer to a List of pointers to all children objects from + plug-ins. +"; + + +%feature("docstring") SBase::getMetaId " + Returns the value of the \'metaid\' attribute of this object. + + @htmlinclude what-is-metaid.html + + @return the meta-identifier of this SBML object. + + @see isSetMetaId() + @see setMetaId() +"; + + +%feature("docstring") SBase::getId " + @internal + Returns the value of the \'metaid\' attribute of this object. + + @htmlinclude what-is-metaid.html + + @return the meta-identifier of this SBML object, as a string. + + @see isSetMetaId() + @see setMetaId() +"; + + +%feature("docstring") SBase::getName " + @internal + Returns the value of the \'metaid\' attribute of this object. + + @htmlinclude what-is-metaid.html + + @return the meta-identifier of this SBML object, as a string. + + @see isSetMetaId() + @see setMetaId() +"; + + +%feature("docstring") SBase::getNotes " + Returns the content of the \'notes\' subelement of this object as + a tree of XMLNode objects. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + The \'notes\' element content returned by this method will be in XML + form, but libSBML does not provide an object model specifically for + the content of notes. Callers will need to traverse the XML tree + structure using the facilities available on XMLNode and related + objects. For an alternative method of accessing the notes, see + getNotesString(). + + @return the content of the \'notes\' subelement of this SBML object as a + tree structure composed of XMLNode objects. + + @see getNotesString() + @see isSetNotes() + @see setNotes() + @see setNotes() + @see appendNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() +"; + + +%feature("docstring") SBase::getNotesString " + Returns the content of the \'notes\' subelement of this object as a + string. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + For an alternative method of accessing the notes, see getNotes(), + which returns the content as an XMLNode tree structure. Depending on + an application\'s needs, one or the other method may be more + convenient. + + @return the content of the \'notes\' subelement of this SBML object as a + string. + + @see getNotes() + @see isSetNotes() + @see setNotes() + @see setNotes() + @see appendNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() +"; + + +%feature("docstring") SBase::getAnnotation " + Returns the content of the \'annotation\' subelement of this object as + a tree of XMLNode objects. + + Whereas the SBML \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary well-formed XML data + content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + The annotations returned by this method will be in XML form. LibSBML + provides an object model and related interfaces for certain specific + kinds of annotations, namely model history information and RDF + content. See the ModelHistory, CVTerm and RDFAnnotationParser classes + for more information about the facilities available. + + @return the annotation of this SBML object as a tree of XMLNode objects. + + @see getAnnotationString() + @see isSetAnnotation() + @see setAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see appendAnnotation() + @see unsetAnnotation() +"; + + +%feature("docstring") SBase::getAnnotationString " + Returns the content of the \'annotation\' subelement of this object as a + character string. + + Whereas the SBML \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary well-formed XML data + content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + The annotations returned by this method will be in string form. + + @return the annotation of this SBML object as a character string. + + @see getAnnotation() + @see isSetAnnotation() + @see setAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see appendAnnotation() + @see unsetAnnotation() +"; + + +%feature("docstring") SBase::getNamespaces " + Returns a list of the XML Namespaces declared on this SBML document. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in SBML Level 3) packages used in addition to SBML Level 3 + Core. + + @return the XML Namespaces associated with this SBML object + + @see getLevel() + @see getVersion() +"; + + +%feature("docstring") SBase::getSBMLDocument " + Returns the SBMLDocument object containing @em this object instance. + + LibSBML uses the class SBMLDocument as a top-level container for + storing SBML content and data associated with it (such as warnings and + error messages). An SBML model in libSBML is contained inside an + SBMLDocument object. SBMLDocument corresponds roughly to the class + <i>SBML</i> defined in the SBML Level 3 and Level 2 + specifications, but it does not have a direct correspondence in SBML + Level 1. (But, it is created by libSBML no matter whether the + model is Level 1, Level 2 or Level 3.) + + This method allows the caller to obtain the SBMLDocument for the + current object. + + @return the parent SBMLDocument object of this SBML object. + + @see getParentSBMLObject() + @see getModel() +"; + + +%feature("docstring") SBase::getParentSBMLObject " + Returns the parent SBML object containing this object. + + This returns the immediately-containing object. This method is + convenient when holding an object nested inside other objects in an + SBML model. + + @return the parent SBML object of this SBML object. + + @see getSBMLDocument() + @see getModel() +"; + + +%feature("docstring") SBase::getAncestorOfType " + Returns the first ancestor object that has the given SBML type code. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + This method searches the tree of objects that are parents of this + object, and returns the first one that has the given SBML type code. + If the optional argument @p pkgName is given, it will cause the search + to be limited to the SBML Level 3 package given. + + @param type the SBML type code of the object sought + + @param pkgName (optional) the short name of an SBML Level 3 + package to which the sought-after object must belong + + @return the ancestor SBML object of this SBML object that corresponds + to the given @if clike #SBMLTypeCode_t value@else SBML object type + code@endif, or @c None if no ancestor exists. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SBase::getSBOTerm " + Returns the integer portion of the value of the \'sboTerm\' attribute of + this object. + + Beginning with SBML Level 2 Version 3, objects derived from SBase have + an optional attribute named \'sboTerm\' for supporting the use of the + Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a + seven digit integer number; libSBML simplifies the representation by + only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the + \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers + are stored simply as integers. (For convenience, libSBML offers + methods for returning both the integer form and a text-string form of + the SBO identifier.) + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for \'sboTerm\'. Please consult the SBML + Level 2 Version 4 specification for more information about + the use of SBO and the \'sboTerm\' attribute. + + @return the value of the \'sboTerm\' attribute as an integer, or @c -1 + if the value is not set. +"; + + +%feature("docstring") SBase::getSBOTermID " + Returns the string representation of the \'sboTerm\' attribute of + this object. + + Beginning with SBML Level 2 Version 3, objects derived from SBase have + an optional attribute named \'sboTerm\' for supporting the use of the + Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a + seven digit integer number; libSBML simplifies the representation by + only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the + \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers + are stored simply as integers. This method returns the entire SBO + identifier as a text string in the form \'SBO:NNNNNNN\'. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for \'sboTerm\'. Please consult the SBML + Level 2 Version 4 specification for more information about + the use of SBO and the \'sboTerm\' attribute. + + @return the value of the \'sboTerm\' attribute as a string (its value + will be of the form \'SBO:NNNNNNN\'), or an empty string if + the value is not set. +"; + + +%feature("docstring") SBase::getSBOTermAsURL " + Returns the identifiers.org URL representation of the \'sboTerm\' attribute of + this object. + + This method returns the entire SBO + identifier as a text string in the form + \'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN\'. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for \'sboTerm\'. Please consult the SBML + Level 2 Version 4 specification for more information about + the use of SBO and the \'sboTerm\' attribute. + + @return the value of the \'sboTerm\' attribute as an identifiers.org URL + (its value will be of the form + \'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN\'), or an empty string if + the value is not set. +"; + + +%feature("docstring") SBase::getLine " + Returns the line number on which this object first appears in the XML + representation of the SBML document. + + @return the line number of this SBML object. + + @note The line number for each construct in an SBML model is set upon + reading the model. The accuracy of the line number depends on the + correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real line number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100% accurate in all situations. (At this + time, libSBML supports the use of <a target=\'_blank\' + href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' + href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' + href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) + + @see getColumn() +"; + + +%feature("docstring") SBase::getColumn " + Returns the column number on which this object first appears in the XML + representation of the SBML document. + + @return the column number of this SBML object. + + @note The column number for each construct in an SBML model is set + upon reading the model. The accuracy of the column number depends on + the correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real column number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100% accurate in all situations. (At this + time, libSBML supports the use of <a target=\'_blank\' + href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' + href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' + href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) + + @see getLine() +"; + + +%feature("docstring") SBase::getModelHistory " + Returns the ModelHistory object, if any, attached to this object. + + @return the ModelHistory object attached to this object, or @c None if + none exist. + + @note In SBML Level 2, model history annotations were only + permitted on the Model element. In SBML Level 3, they are + permitted on all SBML components derived from SBase. +"; + + +%feature("docstring") SBase::isSetMetaId " + Predicate returning @c True if this object\'s \'metaid\' attribute is set. + + @htmlinclude what-is-metaid.html + + @return @c True if the \'metaid\' attribute of this SBML object is + set, @c False otherwise. + + @see getMetaId() + @see setMetaId() +"; + + +%feature("docstring") SBase::isSetId " + @internal + Predicate returning @c True if this object\'s \'metaid\' attribute is set. + + @htmlinclude what-is-metaid.html + + @return @c True if the \'metaid\' attribute of this SBML object is + set, @c False otherwise. + + @see getMetaId() + @see setMetaId() +"; + + +%feature("docstring") SBase::isSetName " + @internal + Predicate returning @c True if this object\'s \'metaid\' attribute is set. + + @htmlinclude what-is-metaid.html + + @return @c True if the \'metaid\' attribute of this SBML object is + set, @c False otherwise. + + @see getMetaId() + @see setMetaId() +"; + + +%feature("docstring") SBase::isSetNotes " + Predicate returning @c True if this + object\'s \'notes\' subelement exists and has content. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + @return @c True if a \'notes\' subelement exists, @c False otherwise. + + @see getNotes() + @see getNotesString() + @see setNotes() + @see setNotes() + @see appendNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() +"; + + +%feature("docstring") SBase::isSetAnnotation " + Predicate returning @c True if this + object\'s \'annotation\' subelement exists and has content. + + Whereas the SBase \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary well-formed XML data + content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + @return @c True if a \'annotation\' subelement exists, @c False + otherwise. + + @see getAnnotation() + @see getAnnotationString() + @see setAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see appendAnnotation() + @see unsetAnnotation() +"; + + +%feature("docstring") SBase::isSetSBOTerm " + Predicate returning @c True if this + object\'s \'sboTerm\' attribute is set. + + @return @c True if the \'sboTerm\' attribute of this SBML object is + set, @c False otherwise. +"; + + +%feature("docstring") SBase::setMetaId " + Sets the value of the meta-identifier attribute of this object. + + @htmlinclude what-is-metaid.html + + The string @p metaid is copied. + + @param metaid the identifier string to use as the value of the + \'metaid\' attribute + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @see getMetaId() + @see isSetMetaId() +"; + + +%feature("docstring") SBase::isSetModelHistory " + Predicate returning @c True if this + object has a ModelHistory object attached to it. + + @return @c True if the ModelHistory of this object is set, @c + false otherwise. + + @note In SBML Level 2, model history annotations were only + permitted on the Model element. In SBML Level 3, they are + permitted on all SBML components derived from SBase. +"; + + +%feature("docstring") SBase::setId " + @internal + Predicate returning @c True if this + object has a ModelHistory object attached to it. + + @return @c True if the ModelHistory of this object is set, @c + false otherwise. + + @note In SBML Level 2, model history annotations were only + permitted on the Model element. In SBML Level 3, they are + permitted on all SBML components derived from SBase. +"; + + +%feature("docstring") SBase::setName " + @internal + Predicate returning @c True if this + object has a ModelHistory object attached to it. + + @return @c True if the ModelHistory of this object is set, @c + false otherwise. + + @note In SBML Level 2, model history annotations were only + permitted on the Model element. In SBML Level 3, they are + permitted on all SBML components derived from SBase. +"; + + +%feature("docstring") SBase::setAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setAnnotation(XMLNode annotation)</pre> + + Sets the value of the \'annotation\' subelement of this SBML object. + + The content of @p annotation is copied, and any previous content of + this object\'s \'annotation\' subelement is deleted. + + Whereas the SBase \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary well-formed XML data + content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + Call this method will result in any existing content of the + \'annotation\' subelement to be discarded. Unless you have taken steps + to first copy and reconstitute any existing annotations into the @p + annotation that is about to be assigned, it is likely that performing + such wholesale replacement is unfriendly towards other software + applications whose annotations are discarded. An alternative may be + to use SBase.appendAnnotation() or + SBase.appendAnnotation(). + + @param annotation an XML structure that is to be used as the new content + of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see getAnnotationString() + @see isSetAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see appendAnnotation() + @see unsetAnnotation() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setAnnotation(string annotation)</pre> + + Sets the value of the \'annotation\' subelement of this SBML object. + + The content of @p annotation is copied, and any previous content of + this object\'s \'annotation\' subelement is deleted. + + Whereas the SBase \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary well-formed XML data + content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + Call this method will result in any existing content of the + \'annotation\' subelement to be discarded. Unless you have taken steps + to first copy and reconstitute any existing annotations into the @p + annotation that is about to be assigned, it is likely that performing + such wholesale replacement is unfriendly towards other software + applications whose annotations are discarded. An alternative may be + to use SBase.appendAnnotation() or + SBase.appendAnnotation(). + + @param annotation an XML string that is to be used as the content + of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getAnnotationString() + @see isSetAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see appendAnnotation() + @see unsetAnnotation() +"; + + +%feature("docstring") SBase::appendAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>appendAnnotation(XMLNode annotation)</pre> + + Appends the given @p annotation to the \'annotation\' subelement of this + object. + + Whereas the SBase \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a + target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type \'any\'</a>, + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + Unlike SBase.setAnnotation() or + SBase.setAnnotation(), this method + allows other annotations to be preserved when an application adds its + own data. + + @param annotation an XML structure that is to be copied and appended + to the content of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getAnnotationString() + @see isSetAnnotation() + @see setAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see unsetAnnotation() + + + <hr> + Method variant with the following signature: + <pre class='signature'>appendAnnotation(string annotation)</pre> + + Appends the given @p annotation to the \'annotation\' subelement of this + object. + + Whereas the SBase \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a + target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type \'any\'</a>, + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + Unlike SBase.setAnnotation() or + SBase.setAnnotation(), this method + allows other annotations to be preserved when an application adds its + own data. + + @param annotation an XML string that is to be copied and appended + to the content of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getAnnotationString() + @see isSetAnnotation() + @see setAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see unsetAnnotation() +"; + + +%feature("docstring") SBase::removeTopLevelAnnotationElement " + Removes the top-level element within the \'annotation\' subelement of this + SBML object with the given name and optional URI. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + Calling this method allows a particular annotation element to be removed + whilst the remaining annotations remain intact. + + @param elementName a string representing the name of the top level + annotation element that is to be removed + @param elementURI an optional string that is used to check both the name + and URI of the top level element to be removed + @param removeEmpty if after removing of the element, the annotation is + empty, and the removeEmpty argument is true, the annotation node will be + deleted (default). + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND @endlink + @li @link libsbml.LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND @endlink + + @see replaceTopLevelAnnotationElement() + @see replaceTopLevelAnnotationElement() +"; + + +%feature("docstring") SBase::replaceTopLevelAnnotationElement " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>replaceTopLevelAnnotationElement(XMLNode annotation)</pre> + + Replaces the given top-level element within the \'annotation\' + subelement of this SBML object and with the annotation element supplied. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + This method determines the name of the element to be replaced from the + annotation argument. Functionally it is equivalent to calling + <code> removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name); + </code> with the exception that the placement of the annotation element remains + the same. + + @param annotation XMLNode representing the replacement top level annotation + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @see removeTopLevelAnnotationElement() + @see replaceTopLevelAnnotationElement() + + + <hr> + Method variant with the following signature: + <pre class='signature'>replaceTopLevelAnnotationElement(string annotation)</pre> + + Replaces the given top-level element within the \'annotation\' + subelement of this SBML object and with the annotation element supplied. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + This method determines the name of the element to be replaced from the + annotation argument. Functionally it is equivalent to calling + <code> removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name); + </code> with the exception that the placement of the annotation element remains + the same. + + @param annotation string representing the replacement top level annotation + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @see removeTopLevelAnnotationElement() + @see replaceTopLevelAnnotationElement() +"; + + +%feature("docstring") SBase::setNotes " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setNotes(string notes, bool addXHTMLMarkup = false)</pre> + + Sets the value of the \'notes\' subelement of this SBML object to a copy + of the string @p notes. + + The content of @p notes is copied, and any existing content of this + object\'s \'notes\' subelement is deleted. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + The following code illustrates a very simple way of setting the notes + using this method. Here, the object being annotated is the whole SBML + document, but that is for illustration purposes only; you could of + course use this same approach to annotate any other SBML component. + @if clike + @verbatim + SBMLDocument s = new SBMLDocument(3, 1); + s->setNotes(\'<body xmlns=\'http://www.w3.org/1999/xhtml\'><p>here is my note</p></body>\'); + @endverbatim + @endif@if java + @verbatim + SBMLDocument s = new SBMLDocument(3, 1); + s.setNotes(\'<body xmlns=\'http://www.w3.org/1999/xhtml\'><p>here is my note</p></body>\'); + @endverbatim + @endif@if csharp + @verbatim + SBMLDocument s = new SBMLDocument(3, 1); + s.setNotes(\'<body xmlns=\'http://www.w3.org/1999/xhtml\'><p>here is my note</p></body>\'); + @endverbatim + @endif@~ + + @param notes an XML string that is to be used as the content of the + \'notes\' subelement of this object + + @param addXHTMLMarkup a boolean indicating whether to wrap the contents + of the @p notes argument with XHTML paragraph (<code><p></code>) + tags. This is appropriate when the string in @p notes does not already + containg the appropriate XHTML markup. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getNotesString() + @see isSetNotes() + @see setNotes() + @see appendNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setNotes(XMLNode notes)</pre> + + Sets the value of the \'notes\' subelement of this SBML object. + + The content of @p notes is copied, and any existing content of this + object\'s \'notes\' subelement is deleted. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + @param notes an XML structure that is to be used as the content of the + \'notes\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @see getNotesString() + @see isSetNotes() + @see setNotes() + @see appendNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() +"; + + +%feature("docstring") SBase::appendNotes " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>appendNotes(string notes)</pre> + + Appends the given @p notes to the \'notes\' subelement of this object. + + The content of the parameter @p notes is copied. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + @param notes an XML string that is to appended to the content of + the \'notes\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getNotesString() + @see isSetNotes() + @see setNotes() + @see setNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() + + + <hr> + Method variant with the following signature: + <pre class='signature'>appendNotes(XMLNode notes)</pre> + + Appends the given @p notes to the \'notes\' subelement of this object. + + The content of @p notes is copied. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + @param notes an XML node structure that is to appended to the content + of the \'notes\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getNotesString() + @see isSetNotes() + @see setNotes() + @see setNotes() + @see appendNotes() + @see unsetNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() +"; + + +%feature("docstring") SBase::setModelHistory " + Sets the ModelHistory of this object. + + The content of @p history is copied, and this object\'s existing model + history content is deleted. + + @param history ModelHistory of this object. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note In SBML Level 2, model history annotations were only + permitted on the Model element. In SBML Level 3, they are + permitted on all SBML components derived from SBase. +"; + + +%feature("docstring") SBase::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. + + @param d the SBMLDocument object to use + + @see connectToChild() + @if clike + @see enablePackageInternal() + @endif@~ +"; + + +%feature("docstring") SBase::connectToParent " + @internal + Sets the parent SBML object of this SBML object. + (Creates a child-parent relationship by the child) + This function is called when a child element is + set/added/created by its parent element (e.g. by setXXX, + addXXX, createXXX, and connectToChild functions of the + parent element). + + @param parent the SBML object to use +"; + + +%feature("docstring") SBase::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor, assignment operator. + + @if clike + @see setSBMLDocument() + @see enablePackageInternal() + @endif@~ +"; + + +%feature("docstring") SBase::setSBOTerm " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setSBOTerm(int value)</pre> + + Sets the value of the \'sboTerm\' attribute. + + Beginning with SBML Level 2 Version 3, objects derived from SBase have + an optional attribute named \'sboTerm\' for supporting the use of the + Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a + seven digit integer number; libSBML simplifies the representation by + only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the + \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers + are stored simply as integers. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for \'sboTerm\'. Please consult the SBML + Level 2 Version 4 specification for more information about + the use of SBO and the \'sboTerm\' attribute. + + @param value the NNNNNNN integer portion of the SBO identifier + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @see setSBOTerm() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setSBOTerm(string &sboid)</pre> + + Sets the value of the \'sboTerm\' attribute by string. + + Beginning with SBML Level 2 Version 3, objects derived from SBase have + an optional attribute named \'sboTerm\' for supporting the use of the + Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form \'SBO:NNNNNNN\', where \'NNNNNNN\' is a + seven digit integer number; libSBML simplifies the representation by + only storing the \'NNNNNNN\' integer portion. Thus, in libSBML, the + \'sboTerm\' attribute on SBase has data type @c int, and SBO identifiers + are stored simply as integers. This method lets you set the value of + \'sboTerm\' as a complete string of the form \'SBO:NNNNNNN\', whereas + setSBOTerm(int value) allows you to set it using the integer form. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for \'sboTerm\'. Please consult the SBML + Level 2 Version 4 specification for more information about + the use of SBO and the \'sboTerm\' attribute. + + @param sboid the SBO identifier string of the form \'SBO:NNNNNNN\' + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @see setSBOTerm() +"; + + +%feature("docstring") SBase::setNamespaces " + Sets the namespaces relevant of this SBML object. + + The content of @p xmlns is copied, and this object\'s existing + namespace content is deleted. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + + @param xmlns the namespaces to set + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") SBase::unsetMetaId " + Unsets the value of the \'metaid\' attribute of this SBML object. + + @htmlinclude what-is-metaid.html + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBase::unsetId " + Unsets the value of the \'id\' attribute of this SBML object. + + Most (but not all) objects in SBML include two common attributes: \'id\' + and \'name\'. The identifier given by an object\'s \'id\' attribute value + is used to identify the object within the SBML model definition. + Other objects can refer to the component using this identifier. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBase::unsetName " + Unsets the value of the \'name\' attribute of this SBML object. + + Most (but not all) objects in SBML include two common attributes: \'id\' + and \'name\'. In contrast to the \'id\' attribute, the \'name\' attribute is + optional and is not intended to be used for cross-referencing purposes + within a model. Its purpose instead is to provide a human-readable + label for the component. The data type of \'name\' is the type + <code>string</code> defined in XML Schema. SBML imposes no + restrictions as to the content of \'name\' attributes beyond those + restrictions defined by the <code>string</code> type in XML Schema. + + The recommended practice for handling \'name\' is as follows. If a + software tool has the capability for displaying the content of \'name\' + attributes, it should display this content to the user as a + component\'s label instead of the component\'s \'id\'. If the user + interface does not have this capability (e.g., because it cannot + display or use special characters in symbol names), or if the \'name\' + attribute is missing on a given component, then the user interface + should display the value of the \'id\' attribute instead. (Script + language interpreters are especially likely to display \'id\' instead of + \'name\'.) + + As a consequence of the above, authors of systems that automatically + generate the values of \'id\' attributes should be aware some systems + may display the \'id\'\'s to the user. Authors therefore may wish to + take some care to have their software create \'id\' values that are: (a) + reasonably easy for humans to type and read; and (b) likely to be + meaningful, for example by making the \'id\' attribute be an abbreviated + form of the name attribute value. + + An additional point worth mentioning is although there are + restrictions on the uniqueness of \'id\' values, there are no + restrictions on the uniqueness of \'name\' values in a model. This + allows software applications leeway in assigning component identifiers. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBase::unsetNotes " + Unsets the value of the \'notes\' subelement of this SBML object. + + The optional SBML element named \'notes\', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + \'notes\' element would be to contain formatted user comments about the + model element in which the \'notes\' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for \'notes\', allowing users considerable freedom when adding + comments to their models. + + The format of \'notes\' elements must be <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a>. To help + verify the formatting of \'notes\' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML specification + document</a> for the Level and Version of their model for more + in-depth explanations. The SBML Level 2 and  3 + specifications have considerable detail about how \'notes\' element + content must be structured. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see getNotesString() + @see isSetNotes() + @see setNotes() + @see setNotes() + @see appendNotes() + @see appendNotes() + @see SyntaxChecker.hasExpectedXHTMLSyntax() +"; + + +%feature("docstring") SBase::unsetAnnotation " + Unsets the value of the \'annotation\' subelement of this SBML object. + + Whereas the SBase \'notes\' subelement is a container for content to be + shown directly to humans, the \'annotation\' element is a container for + optional software-generated content @em not meant to be shown to + humans. Every object derived from SBase can have its own value for + \'annotation\'. The element\'s content type is <a target=\'_blank\' + href=\'http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls\'>XML type + \'any\'</a>, allowing essentially arbitrary well-formed XML data + content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added by + different tools. Please see the SBML specifications for more details. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see getAnnotation() + @see getAnnotationString() + @see isSetAnnotation() + @see setAnnotation() + @see setAnnotation() + @see appendAnnotation() + @see appendAnnotation() +"; + + +%feature("docstring") SBase::unsetSBOTerm " + Unsets the value of the \'sboTerm\' attribute of this SBML object. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") SBase::addCVTerm " + Adds a copy of the given CVTerm object to this SBML object. + + @param term the CVTerm to assign. + + @param newBag if @c True, creates a new RDF bag with the same identifier + as a previous bag, and if @c False, adds the term to an existing + RDF bag with the same type of qualifier as the term being added. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink, if + this object lacks a \'metaid\' attribute + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note Since the CV Term uses the \'metaid\' attribute of the object as a + reference, if the object has no \'metaid\' attribute value set, then the + CVTerm will not be added. + + @warning The fact that this method @em copies the object passed to it + means that the caller will be left holding a physically different + object instance than the one contained in @em this object. Changes + made to the original object instance (such as resetting attribute + values) will <em>not affect the instance added here</em>. In + addition, the caller should make sure to free the original object if + it is no longer being used, or else a memory leak will result. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SBase::getCVTerms " + Returns a list of CVTerm objects in the annotations of this SBML + object. + + @return the list of CVTerms for this SBML object. +"; + + +%feature("docstring") SBase::getNumCVTerms " + Returns the number of CVTerm objects in the annotations of this SBML + object. + + @return the number of CVTerms for this SBML object. +"; + + +%feature("docstring") SBase::getCVTerm " + Returns the nth CVTerm in the list of CVTerms of this SBML + object. + + @param n long the index of the CVTerm to retrieve + + @return the nth CVTerm in the list of CVTerms for this SBML object. +"; + + +%feature("docstring") SBase::unsetCVTerms " + Clears the list of CVTerm objects attached to this SBML object. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBase::unsetModelHistory " + Unsets the ModelHistory object attached to this object. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note In SBML Level 2, model history annotations were only + permitted on the Model element. In SBML Level 3, they are + permitted on all SBML components derived from SBase. +"; + + +%feature("docstring") SBase::getResourceBiologicalQualifier " + Returns the MIRIAM <em>biological qualifier</em> associated with the + given resource. + + In <a target=\'_blank\' href=\'http://biomodels.net/miriam\'>MIRIAM</a>, + qualifiers are an optional means of indicating the relationship + between a model component and its annotations. There are two broad + kinds of annotations: <em>model</em> and <em>biological</em>. The + latter kind is used to qualify the relationship between a model + component and a biological entity which it represents. Examples of + relationships include \'is\' and \'has part\', but many others are + possible. MIRIAM defines <a target=\'_blank\' + href=\'http://www.ebi.ac.uk/miriam/main/qualifiers/\'>numerous + relationship qualifiers</a> to enable different software tools to + qualify biological annotations in the same standardized way. In + libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model + element are represented using lists of CVTerm objects, and the + the MIRIAM biological qualifiers are represented using + values @if clike from the enumeration + type #BiolQualifierType_t.@endif@if python whose + names begin with <code>BQB_</code> in the interface class + @link libsbml libsbml@endlink.@endif@if java whose + names begin with <code>BQB_</code> in the interface class + {@link libsbmlConstants}.@endif@if csharp whose + names begin with <code>BQB_</code> in the interface class + @link libsbmlcs.libsbml libsbml@endlink.@endif@~ + + This method searches the controlled-vocabulary annotations + (i.e., the list of CVTerm objects) on the present object, then out of + those that have biological qualifiers, looks for an annotation to the + given @p resource. If such an annotation is found, it returns the + type of biological qualifier associated with that resource as a + value @if clike from the enumeration type + #BiolQualifierType_t.@endif@if python whose name begins with + <code>BQB_</code> from the interface + class @link libsbml libsbml@endlink.@endif@if java whose name + begins with <code>BQB_</code> from the interface + class {@link libsbmlConstants}.@endif@if csharp whose + names begin with <code>BQB_</code> in the interface class + @link libsbmlcs.libsbml libsbml@endlink.@endif@~ + + @param resource string representing the resource; e.g., + <code>\'http://www.geneontology.org/#GO:0005892\'</code>. + + @return the qualifier associated with the resource, + or @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink if the + resource does not exist. + + @if clike + @note The set of MIRIAM biological qualifiers grows over + time, although relatively slowly. The values in the enumeration + #BiolQualifierType_t are up to date with MIRIAM at the time of a given + libSBML release. The set of values may be expanded in later libSBML + releases, to match the values defined by MIRIAM at that later time. + @endif@if python + @note The set of MIRIAM biological qualifiers grows over + time, although relatively slowly. The values are up to date with + MIRIAM at the time of a given libSBML release. The set of values in + list of <code>BQB_</code> constants defined in @link libsbml + libsbml@endlink may be expanded in later libSBML releases, to match + the values defined by MIRIAM at that later time. + @endif@if java + @note The set of MIRIAM biological qualifiers grows over + time, although relatively slowly. The values are up to date with + MIRIAM at the time of a given libSBML release. The set of values in + list of <code>BQB_</code> constants defined in {@link libsbmlConstants} + may be expanded in later libSBML releases, to match + the values defined by MIRIAM at that later time. + @endif@if csharp + @note The set of MIRIAM biological qualifiers grows over + time, although relatively slowly. The values are up to date with + MIRIAM at the time of a given libSBML release. The set of values in + list of <code>BQB_</code> constants defined in @link libsbmlcs.libsbml libsbml@endlink + may be expanded in later libSBML releases, to match + the values defined by MIRIAM at that later time. + @endif@~ +"; + + +%feature("docstring") SBase::getResourceModelQualifier " + Returns the MIRIAM <em>model qualifier</em> associated with the + given resource. + + In <a target=\'_blank\' href=\'http://biomodels.net/miriam\'>MIRIAM</a>, + qualifiers are an optional means of indicating the relationship + between a model component and its annotations. There are two broad + kinds of annotations: <em>model</em> and <em>biological</em>. The + former kind is used to qualify the relationship between a model + component and another modeling object. An example qualifier is + \'isDerivedFrom\', to indicate that a given component of the model is + derived from the modeling object represented by the referenced + resource. MIRIAM defines <a target=\'_blank\' + href=\'http://www.ebi.ac.uk/miriam/main/qualifiers/\'>numerous + relationship qualifiers</a> to enable different software tools to + qualify model annotations in the same standardized way. In libSBML, + the MIRIAM controlled-vocabulary annotations on an SBML model element + are represented using lists of CVTerm objects, and the + the MIRIAM model qualifiers are represented using + values @if clike from the enumeration + type #ModelQualifierType_t.@endif@if python whose + names begin with <code>BQM_</code> in the interface class + @link libsbml libsbml@endlink.@endif@if java whose + names begin with <code>BQM_</code> in the interface class + {@link libsbmlConstants}.@endif@if csharp whose + names begin with <code>BQB_</code> in the interface class + @link libsbmlcs.libsbml libsbml@endlink.@endif@~ + + This method method searches the controlled-vocabulary annotations + (i.e., the list of CVTerm objects) on the present object, then out of + those that have model qualifiers, looks for an annotation to the given + @p resource. If such an annotation is found, it returns the type of + type of model qualifier associated with that resource as a + value @if clike from the enumeration type + #ModelQualifierType_t.@endif@if python whose name begins with + <code>BQM_</code> from the interface + class @link libsbml libsbml@endlink.@endif@if java whose name + begins with <code>BQM_</code> from the interface + class {@link libsbmlConstants}.@endif@if csharp whose + names begin with <code>BQB_</code> in the interface class + @link libsbmlcs.libsbml libsbml@endlink.@endif@~ + + @param resource string representing the resource; e.g., + <code>\'http://www.geneontology.org/#GO:0005892\'</code>. + + @return the @if clike #ModelQualifierType_t value@else model qualifier + type@endif@~ associated with the resource, or @link + libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink if the resource + does not exist. + + @if clike + @note The set of MIRIAM biological qualifiers grows over + time, although relatively slowly. The values in the enumeration + #ModelQualifierType_t are up to date with MIRIAM at the time of a given + libSBML release. The set of values may be expanded in later libSBML + releases, to match the values defined by MIRIAM at that later time. + @endif@if python + @note The set of MIRIAM model qualifiers grows over + time, although relatively slowly. The values are up to date with + MIRIAM at the time of a given libSBML release. The set of values in + list of <code>BQM_</code> constants defined in @link libsbml + libsbml@endlink may be expanded in later libSBML releases, to match + the values defined by MIRIAM at that later time. + @endif@if java + @note The set of MIRIAM model qualifiers grows over + time, although relatively slowly. The values are up to date with + MIRIAM at the time of a given libSBML release. The set of values in + list of <code>BQM_</code> constants defined in {@link libsbmlConstants} + may be expanded in later libSBML releases, to match + the values defined by MIRIAM at that later time. + @endif@if csharp + @note The set of MIRIAM model qualifiers grows over + time, although relatively slowly. The values are up to date with + MIRIAM at the time of a given libSBML release. The set of values in + list of <code>BQM_</code> constants defined in @link libsbmlcs.libsbml libsbml@endlink + may be expanded in later libSBML releases, to match + the values defined by MIRIAM at that later time. + @endif@~ +"; + + +%feature("docstring") SBase::getModel " + Returns the Model object in which the current object is located. + + @return the parent Model of this SBML object. + + @see getParentSBMLObject() + @see getSBMLDocument() +"; + + +%feature("docstring") SBase::getLevel " + Returns the SBML Level of the SBMLDocument object containing this + object. + + @return the SBML level of this SBML object. + + @see getVersion() + @see getNamespaces() + @see getPackageVersion() +"; + + +%feature("docstring") SBase::getVersion " + Returns the Version within the SBML Level of the SBMLDocument object + containing this object. + + @return the SBML version of this SBML object. + + @see getLevel() + @see getNamespaces() +"; + + +%feature("docstring") SBase::getPackageVersion " + Returns the Version of the SBML Level 3 package to which this + element belongs to. + + @return the version of the SBML Level 3 package to which this + element belongs. The value @c 0 will be returned if this element + belongs to the SBML Level 3 Core package. + + @see getLevel() + @see getVersion() +"; + + +%feature("docstring") SBase::getPackageName " + Returns the name of the SBML Level 3 package in which this + element is defined. + + @return the name of the SBML package in which this element is defined. + The string <code>"core"</code> will be returned if this + element is defined in SBML Level 3 Core. The string + <code>"unknown"</code> will be returned if this element is + not defined in any SBML package. +"; + + +%feature("docstring") SBase::getTypeCode " + Returns the libSBML type code for this object. + + This method may return the type code of this SBML object, or it may + return @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink. This + is because subclasses of SBase are not required to implement this + method to return a type code. This method is meant primarily for the + LibSBML C interface, in which class and subclass information is not + readily available. + + @return the @if clike #SBMLTypeCode_t value@else SBML object type code@endif@~ + of this SBML object or + @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (the default). + + @see getElementName() + @see getPackageName() +"; + + +%feature("docstring") SBase::getElementName " + Returns the XML element name of this object. + + This is overridden by subclasses to return a string appropriate to the + SBML component. For example, Model defines it as returning @c + \'model\', CompartmentType defines it as returning @c \'compartmentType\', + and so on. +"; + + +%feature("docstring") SBase::toSBML " + Returns a string consisting of a partial SBML corresponding to just + this object. + + @return the partial SBML that describes this SBML object. + + @warning This is primarily provided for testing and debugging + purposes. It may be removed in a future version of libSBML. +"; + + +%feature("docstring") SBase::toXMLNode " + Returns this element as an XMLNode. + + @return this element as an XMLNode. + + @warning This operation is computationally expensive, because the + element has to be fully serialized to a string and then parsed into the + XMLNode structure. Attempting to convert a large tree structure (e.g., + a large Model) may consume significant computer memory and time. +"; + + +%feature("docstring") SBase::getPlugin " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getPlugin(long n)</pre> + + Returns the nth plug-in object (extension interface) for an SBML Level 3 + package extension. + + @htmlinclude what-are-plugins.html + + @param n the index of the plug-in to return + + @return the plug-in object (the libSBML extension interface) of a + package extension with the given package name or URI. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getPlugin(string package)</pre> + + Returns a plug-in object (extension interface) for an SBML Level 3 + package extension with the given package name or URI. + + @htmlinclude what-are-plugins.html + + @param package the name or URI of the package + + @return the plug-in object (the libSBML extension interface) of a + package extension with the given package name or URI. +"; + + +%feature("docstring") SBase::getNumPlugins " + Returns the number of plug-in objects (extenstion interfaces) for SBML + Level 3 package extensions known. + + @htmlinclude what-are-plugins.html + + @return the number of plug-in objects (extension interfaces) of + package extensions known by this instance of libSBML. +"; + + +%feature("docstring") SBase::enablePackage " + Enables or disables the given SBML Level 3 package + + This method enables or disables the specified package on this object + and other objects connected by child-parent links in the same + SBMLDocument object. + + @param pkgURI the URI of the package + + @param pkgPrefix the XML prefix of the package + + @param flag whether to enable (@c True) or disable (@c False) the package + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN @endlink + @li @link libsbml.LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION @endlink +"; + + +%feature("docstring") SBase::disablePackage " + Disables the given SBML Level 3 package + + This method enables or disables the specified package on this object + and other objects connected by child-parent links in the same + SBMLDocument object. + + @param pkgURI the URI of the package + + @param pkgPrefix the XML prefix of the package + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN @endlink + @li @link libsbml.LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION @endlink +"; + + +%feature("docstring") SBase::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses in which one or more child elements are defined + must override this function. + + @if clike + @see setSBMLDocument() + @endif@~ + @see connectToChild() +"; + + +%feature("docstring") SBase::isPackageURIEnabled " + Predicate returning @c True if an SBML Level 3 package with the + given URI is enabled with this object. + + @param pkgURI the URI of the package + + @return @c True if the given package is enabled within this object, @c + false otherwise. + + @see isPackageEnabled() +"; + + +%feature("docstring") SBase::isPackageEnabled " + Predicate returning @c True if the given SBML Level 3 package is + enabled with this object. + + The search ignores the package version. + + @param pkgName the name of the package + + @return @c True if the given package is enabled within this object, @c + false otherwise. + + @see isPackageURIEnabled() +"; + + +%feature("docstring") SBase::isPkgURIEnabled " + Predicate returning @c True if an SBML Level 3 package with the + given URI is enabled with this object. + + @param pkgURI the URI of the package + + @return @c True if the given package is enabled within this object, @c + false otherwise. + + @see isPkgEnabled() + + @deprecated Replaced in libSBML 5.2.0 by + isPackageURIEnabled(@if java String pkgURI@endif) +"; + + +%feature("docstring") SBase::isPkgEnabled " + Predicate returning @c True if the given SBML Level 3 package is + enabled with this object. + + The search ignores the package version. + + @param pkgName the name of the package + + @return @c True if the given package is enabled within this object, @c + false otherwise. + + @see isPkgURIEnabled() + + @deprecated Replaced in libSBML 5.2.0 by + isPackageEnabled(@if java String pkgName@endif) +"; + + +%feature("docstring") SBase::writeExtensionElements " + @internal + Writes out contained SBML objects of package extensions (if any) + as XML elements. +"; + + +%feature("docstring") SBase::write " + @internal + Writes (serializes) this SBML object by writing it to XMLOutputStream. +"; + + +%feature("docstring") SBase::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::hasRequiredAttributes " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::hasRequiredElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::checkCompatibility " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::setSBMLNamespaces " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::setSBMLNamespacesAndOwn " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::getSBMLNamespaces " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::removeDuplicateAnnotations " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::checkMathMLNamespace " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. For example:@if clike + <pre> + SBase.writeElements(); + mReactants.write(stream); + mProducts.write(stream); + ... + </pre>@endif@~ +"; + + +%feature("docstring") SBase::removeFromParentAndDelete " + Removes this object from its parent. + + If the parent was storing this object as a pointer, it is deleted. If + not, it is simply cleared (as in ListOf objects). This is a pure + virtual method, as every SBase element has different parents, and + therefore different methods of removing itself. Will fail (and not + delete itself) if it has no parent object. This function is designed to + be overridden, but for all objects whose parent is of the class ListOf, + the default implementation will work. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBase::matchesSBMLNamespaces " + Returns @c True if this object\'s set of XML namespaces are the same + as the given object\'s XML namespaces. + + @param sb an object to compare with respect to namespaces + + @return boolean, @c True if this object\'s collection of namespaces is + the same as @p sb\'s, @c False otherwise. +"; + + +%feature("docstring") SBase::matchesRequiredSBMLNamespacesForAddition " + Returns @c True if this object\'s set of XML namespaces are a subset + of the given object\'s XML namespaces. + + @param sb an object to compare with respect to namespaces + + @return boolean, @c True if this object\'s collection of namespaces is + a subset of @p sb\'s, @c False otherwise. +"; + + +%feature("docstring") SBase::setUserData " + Sets the user data of this element. + + @htmlinclude what-is-user-data.html + + @param userData specifies the new user data. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBase::*getUserData " + Returns the user data that has been previously set via setUserData(). + + @htmlinclude what-is-user-data.html + + @return the user data of this node, or @c None if no user data has been set. + + @if clike + @see ASTNode.setUserData() + @endif@~ +"; + + +%feature("docstring") SBase::getURI " + Gets the namespace URI to which this element belongs to. + + For example, all elements that belong to SBML Level 3 Version 1 Core + must would have the URI \'http://www.sbml.org/sbml/level3/version1/core\'; + all elements that belong to Layout Extension Version 1 for SBML Level 3 + Version 1 Core must would have the URI + \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' + + Unlike getElementNamespace(), this function first returns the URI for + this element by looking into the SBMLNamespaces object of the document + with the its package name. if not found it will return the result of + getElementNamespace(). + + @return the URI of this element + + @see getPackageName() + @see getElementNamespace() + @see getSBMLDocument() +"; + + +%feature("docstring") SBase::getPrefix " + Returns the namespace prefix of this element. +"; + + +%feature("docstring") SBase::setElementText " + When overridden allows SBase elements to use the text included in between + the elements tags. The default implementation does nothing. + + @param text the text string found between the element tags. +"; + + +%feature("docstring") SBase::matchesCoreSBMLNamespace " + @internal + When overridden allows SBase elements to use the text included in between + the elements tags. The default implementation does nothing. + + @param text the text string found between the element tags. +"; + + +%feature("docstring") SBase::createObject " + @internal + Subclasses should override this method to create, store, and then + return an SBML object corresponding to the next XMLToken in the + XMLInputStream. + + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") SBase::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") SBase::getElementPosition " + @internal + The SBML XML Schema is written such that the order of child elements + is significant. LibSBML can read elements out of order. If you + override this method to indicate the ordinal position of element with + respect to its siblings, libSBML will log an error if the element is + read out of order. + + @return the ordinal position of the element with respect to its + siblings or @c -1 (the default) to indicate the position is not + significant. +"; + + +%feature("docstring") SBase::getErrorLog " + @internal + @return the SBMLErrorLog used to log errors during while reading and + validating SBML. +"; + + +%feature("docstring") SBase::logError " + @internal + Convenience method for easily logging problems from within method + implementations. + + This is essentially a short form of getErrorLog()->logError(...) + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SBase::logUnknownAttribute " + @internal + Helper to log a common type of error. +"; + + +%feature("docstring") SBase::logUnknownElement " + @internal + Helper to log a common type of error. +"; + + +%feature("docstring") SBase::logEmptyString " + @internal + Helper to log a common type of error. +"; + + +%feature("docstring") SBase::addExpectedAttributes " + @internal + Subclasses should override this method to add the list of + expected attributes. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SBase::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SBase::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. For example: + + SBase.writeAttributes(); + stream.writeAttribute( \'id\' , mId ); + stream.writeAttribute( \'name\', mName ); + ... + + (NOTICE) this function doesn\'t write xmlns attributes. + Be sure to implement wirteXMLNS() function to write xmlns attributes. +"; + + +%feature("docstring") SBase::writeXMLNS " + @internal + + Subclasses should override this method to write their xmlns attriubutes + (if any) to the XMLOutputStream. +"; + + +%feature("docstring") SBase::syncAnnotation " + @internal + Synchronizes the annotation of this SBML object. + + Annotation element (XMLNode mAnnotation) is synchronized with the + current CVTerm objects (List mCVTerm). + Currently, this method is called in getAnnotation, isSetAnnotation, + and writeElements methods. +"; + + +%feature("docstring") SBase::reconstructRDFAnnotation " + @internal + Synchronizes the annotation of this SBML object. + + Annotation element (XMLNode mAnnotation) is synchronized with the + current CVTerm objects (List mCVTerm). + Currently, this method is called in getAnnotation, isSetAnnotation, + and writeElements methods. +"; + + +%feature("docstring") SBase::checkOrderAndLogError " + @internal + Checks that the SBML element appears in the expected order. + + If @p object is not in the expected position, an error is logged. +"; + + +%feature("docstring") SBase::checkListOfPopulated " + @internal + Checks that an SBML ListOf element is populated. + If a listOf element has been declared with no elements, + an error is logged. +"; + + +%feature("docstring") SBase::checkUnitSyntax " + @internal + Checks the syntax of the unit attribute. + The syntax of an unit is of type UnitSId which is defined as: + + - letter ::= \'a\'..\'z\',\'A\'..\'Z\' + - digit ::= \'0\'..\'9\' + - idChar ::= letter | digit | \'_\' + - UnitSId ::= ( letter | \'_\' ) idChar* + + If the syntax of the unit attribute of this object is incorrect, + an error is logged + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SBase::checkDefaultNamespace " + @internal + Checks that the given default namespace in the given element is valid. + If the given default namespace is not valid, an error is logged. +"; + + +%feature("docstring") SBase::checkAnnotation " + @internal + Checks the annotation does not declare an sbml namespace. + If the annotation declares an sbml namespace an error is logged. +"; + + +%feature("docstring") SBase::checkXHTML " + @internal + Checks that the XHTML is valid. + If the xhtml does not conform to the specification of valid xhtml within + an sbml document, an error is logged. +"; + + +%feature("docstring") SBase::loadPlugins " + @internal + Checks that the XHTML is valid. + If the xhtml does not conform to the specification of valid xhtml within + an sbml document, an error is logged. +"; + + +%feature("docstring") SBase::createExtensionObject " + @internal + Create, store, and then return an SBML object of package extensions + corresponding to the next XMLToken in the XMLInputStream. + + @return the SBML object of package extensions corresponding to next + XMLToken in the XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") SBase::setElementNamespace " + @internal + Sets the XML namespace to which this element belongs to. + For example, all elements that belong to SBML Level 3 Version 1 Core + must set the namespace to \'http://www.sbml.org/sbml/level3/version1/core\'; + all elements that belong to Layout Extension Version 1 for SBML Level 3 + Version 1 Core must set the namespace to + \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SBase::getElementNamespace " + @internal + Gets the XML namespace (URI) to which this element belongs to. +"; + + +%feature("docstring") SBase::readExtensionAttributes " + @internal + Read attributes of package extensions from the given XMLAttributes + set into their specific fields. + + Be sure to call your parents implementation of this function as well. + For example: + @if clike + @verbatim + SBase.readExtensionAttributes(); + @endverbatim + @endif@if java + @verbatim + SBase.readExtensionAttributes(attributes, expectedAttributes); + @endverbatim + @endif@if java + @verbatim + SBase.readExtensionAttributes(attributes, expectedAttributes); + @endverbatim + @endif@if python + @verbatim + SBase.readExtensionAttributes(attributes, expectedAttributes); + @endverbatim + @endif@~ +"; + + +%feature("docstring") SBase::writeExtensionAttributes " + @internal + Write attributes of package extensions to the XMLOutputStream. + + Be sure to call your parents implementation of this function as well. + For example: + + SBase.writeExtensionAttributes(); +"; + + +%feature("docstring") SBase::storeUnknownExtAttribute " + @internal + Stores the given attribute to the list of ignored attributes if + the given attribute belongs to some unknown package extension. + Unknown attribute error will be logged if the \'required\' attribute + of the package is \'true\' in SBMLDocument element. + + The stored attributes will be written out as-is when writing the + SBMLDocument to a string or a file (i.e. Attributes and elements of + unknown package extensions will not be lost when reading/writing + a file/sting containing them.) + + @param element the string of element which contains the given attribute + @param xattr the XMLAttributes object which is contained in the given + element + @param index the index of the target attribute in the given XMLAttributes + object. + + @return true will be returned if the given attribute belongs + to some unknown package extension, otherwise false will be returned. +"; + + +%feature("docstring") SBase::storeUnknownExtElement " + @internal + Stores the element of next token if the element belongs to some + unknown package extension. Unknown element error will be logged if + the \'required\' attribute of the package is \'true\' in SBMLDocument + element. + + The stored elements will be written out as-is when writing the + SBMLDocument to a string or a file (i.e. Attributes and elements of + unknown package extensions will not be lost when reading/writing + a file/sting containing them.) + + @return true will be returned if the element of next token belongs + to some unknown package extension, otherwise false will be returned. +"; + + +%feature("docstring") SBase::getSBMLPrefix " + @internal + Return the SBML prefix of this element. This will be the same as getPrefix() + unless the element in question is an element of an SBML extension class. +"; + + +%feature("docstring") SBase::getRootElement " + @internal + Returns the root element of the node tree to which this element is connected. + + @note The root element may not be an SBMLDocument element. For example, + this element is the root element if this element doesn\'t have a parent + SBML object (i.e. mParentSBMLObject is None) + + @see enablePackageInternal +"; + + +%feature("docstring") SBase::getHasBeenDeleted " + @internal + Returns the root element of the node tree to which this element is connected. + + @note The root element may not be an SBMLDocument element. For example, + this element is the root element if this element doesn\'t have a parent + SBML object (i.e. mParentSBMLObject is None) + + @see enablePackageInternal +"; + + +%feature("docstring") SBase::setSBaseFields " + @internal + Stores the location (line and column) and any XML namespaces (for + roundtripping) declared on this SBML (XML) element. +"; + + +%feature("docstring") SBase::readAnnotation " + @internal + @return true if read an <annotation> element from the stream +"; + + +%feature("docstring") SBase::removeDuplicatedResources " + @internal + removes resources from the term object that alread exist on this object +"; + + +%feature("docstring") SBase::addTermToExistingBag " + @internal + adds the given term to an existing bag. Returns 1 if added, 0 otherwise. +"; + + +%feature("docstring") SBase::readNotes " + @internal + @return true if read a <notes> element from the stream +"; + + +%feature("docstring") ListOf " + @ingroup Core + Parent class for the various SBML \'ListOfXYZ\' classes. + + @htmlinclude not-sbml-warning.html + + SBML defines various ListOf___ classes that are containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the attributes and subelements of + SBase, such as \'metaid\' as and \'annotation\'. The ListOf___ classes do + not add any attributes of their own. + + The ListOf class in libSBML is a utility class that serves as the parent + class for implementing the ListOf__ classes. It provides methods for + working generically with the various SBML lists of objects in a program. + LibSBML uses this separate list class rather than ordinary + @if clike C++ @endif@if java Java@endif@if python Python@endif@~ lists, + so that it can provide the methods and features associated with SBase. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") ListOf::ListOf " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOf(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOf with SBMLNamespaces object. + + @param sbmlns the set of namespaces that this ListOf should contain. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOf(long level = SBML_DEFAULT_LEVEL, long version = SBML_DEFAULT_VERSION)</pre> + + Creates a new ListOf object. + + @param level the SBML Level; if not assigned, defaults to the + value of SBML_DEFAULT_LEVEL. + + @param version the Version within the SBML Level; if not assigned, + defaults to the value of SBML_DEFAULT_VERSION. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOf(ListOf orig)</pre> + + Copy constructor; creates a copy of this ListOf. + + @param orig the ListOf instance to copy. +"; + + +%feature("docstring") ListOf::accept " + Accepts the given SBMLVisitor. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next item in the + list. +"; + + +%feature("docstring") ListOf::clone " + Creates and returns a deep copy of this ListOf. + + @return a (deep) copy of this ListOf. +"; + + +%feature("docstring") ListOf::append " + Adds item to the end of this ListOf. + + This variant of the method makes a clone of the @p item handed to it. + This means that when the ListOf is destroyed, the original items will + not be destroyed. + + @param item the item to be added to the list. + + @see appendAndOwn() +"; + + +%feature("docstring") ListOf::appendAndOwn " + Adds item to the end of this ListOf. + + This variant of the method does not clone the @p item handed to it; + instead, it assumes ownership of it. This means that when the ListOf + is destroyed, the item will be destroyed along with it. + + @param item the item to be added to the list. + + @see append() +"; + + +%feature("docstring") ListOf::appendFrom " + Adds a clone of all items in the provided ListOf to this object. This means that when this ListOf is destroyed, the original items will not be destroyed. + + @param list A list of items to be added. + + @see append() +"; + + +%feature("docstring") ListOf::insert " + Inserts the item at the given position of this ListOf + + This variant of the method makes a clone of the @p item handet to it. + This means that when the ListOf is destroyed, the original items will + not be destroyed. + + @param location the location where to insert the item + @param item the item to be inserted to the list + + @see insertAndOwn() +"; + + +%feature("docstring") ListOf::insertAndOwn " + Inserts the item at the given position of this ListOf + + This variant of the method makes a clone of the @p item handet to it. + This means that when the ListOf is destroyed, the original items will + not be destroyed. + + @param location the location where to insert the item + @param item the item to be inserted to the list + + @see insert() +"; + + +%feature("docstring") ListOf::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get an item from the list. + + @param n the index number of the item to get. + + @return the nth item in this ListOf items. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get an item from the list based on its identifier. + + @param sid a string representing the the identifier of the item to get. + + @return item in this ListOf items with the given @p sid or @c None if no such + item exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOf::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") ListOf::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") ListOf::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") ListOf::clear " + Removes all items in this ListOf object. + + If parameter @p doDelete is @c True (default), all items in this ListOf + object are deleted and cleared, and thus the caller doesn\'t have to + delete those items. Otherwise, all items are just cleared from this + ListOf object and the caller is responsible for deleting all items. (In + that case, pointers to all items should be stored elsewhere before + calling this function.) + + @param doDelete if @c True (default), all items are deleted and cleared. + Otherwise, all items are just cleared and not deleted. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") ListOf::removeFromParentAndDelete " + Because ListOf objects typically live as object children of their parent object and not as pointer children, this function clears itself, but does not attempt to do anything else. If a particular ListOf subclass does indeed exist as a pointer only, this function will need to be overridden. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ListOf::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the <em>n</em>th item from this ListOf items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOf items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOf::size " + Get the size of this ListOf. + + @return the number of items in this ListOf items. +"; + + +%feature("docstring") ListOf::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. + + @param d the SBMLDocument that should become the parent of this + ListOf. +"; + + +%feature("docstring") ListOf::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") ListOf::getTypeCode " + Returns the libSBML type code for this object, namely, @c + SBML_LIST_OF. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOf::getItemTypeCode " + Get the type code of the objects contained in this ListOf. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). +"; + + +%feature("docstring") ListOf::getElementName " + Returns the XML element name of this object, which for ListOf, is + always @c \'listOf\'. + + @return the XML name of this element. +"; + + +%feature("docstring") ListOf::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") ListOf::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") ListOf::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") ListOf::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") ListOf::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. For example: + + SBase.writeAttributes(); + stream.writeAttribute( \'id\' , mId ); + stream.writeAttribute( \'name\', mName ); + ... +"; + + +%feature("docstring") ListOf::isValidTypeForList " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. For example: + + SBase.writeAttributes(); + stream.writeAttribute( \'id\' , mId ); + stream.writeAttribute( \'name\', mName ); + ... +"; + + +%feature("docstring") Model " + @ingroup Core + Implementation of %SBML\'s %Model construct. + + In an SBML model definition, a single object of class Model serves as + the overall container for the lists of the various model components. + All of the lists are optional, but if a given list container is present + within the model, the list must not be empty; that is, it must have + length one or more. The following are the components and lists + permitted in different Levels and Versions of SBML in + version @htmlinclude libsbml-version.html + of libSBML: + <ul> + <li> In SBML Level 1, the components are: UnitDefinition, Compartment, + Species, Parameter, Rule, and Reaction. Instances of the classes are + placed inside instances of classes ListOfUnitDefinitions, + ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and + ListOfReactions. + + <li> In SBML Level 2 Version 1, the components are: FunctionDefinition, + UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and + Event. Instances of the classes are placed inside instances of classes + ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and + ListOfEvents. + + <li> In SBML Level 2 Versions 2, 3 and 4, the components are: + FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType, + Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, + Reaction and Event. Instances of the classes are placed inside + instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules, + ListOfConstraints, ListOfReactions, and ListOfEvents. + + <li> In SBML Level 3 Version 1, the components are: FunctionDefinition, + UnitDefinition, Compartment, Species, Parameter, InitialAssignment, + Rule, Constraint, Reaction and Event. Instances of the classes are + placed inside instances of classes ListOfFunctionDefinitions, + ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, + ListOfParameters, ListOfInitialAssignments, ListOfRules, + ListOfConstraints, ListOfReactions, and ListOfEvents. + </ul> + + Although all the lists are optional, there are dependencies between SBML + components such that defining some components requires defining others. + An example is that defining a species requires defining a compartment, + and defining a reaction requires defining a species. The dependencies + are explained in more detail in the SBML specifications. + + In addition to the above lists and attributes, the Model class in both + SBML Level 2 and Level 3 has the usual two attributes of \'id\' + and \'name\', and both are optional. As is the case for other SBML + components with \'id\' and \'name\' attributes, they must be used according + to the guidelines described in the SBML specifications. (Within the + frameworks of SBML Level 2 and Level 3 Version 1 Core, a + Model object identifier has no assigned meaning, but extension packages + planned for SBML Level 3 are likely to make use of this + identifier.) + + Finally, SBML Level 3 has introduced a number of additional Model + attributes. They are discussed in a separate section below. + + + @section approaches Approaches to creating objects using the libSBML API + + LibSBML provides two main mechanisms for creating objects: class + constructors + (e.g., @if java <a href=\'org/sbml/libsbml/Species.html\'>Species()</a> @else Species.Species() @endif), + and <code>create<span class=\'placeholder\'><em>Object</em></span>()</code> + methods (such as Model.createSpecies()) provided by certain <span + class=\'placeholder\'><em>Object</em></span> classes such as Model. These + multiple mechanisms are provided by libSBML for flexibility and to + support different use-cases, but they also have different implications + for the overall model structure. + + In general, the recommended approach is to use the <code>create<span + class=\'placeholder\'><em>Object</em></span>()</code> methods. These + methods both create an object @em and link it to the parent in one step. + Here is an example:@if clike + @verbatim + // Create an SBMLDocument object in Level 3 Version 1 format: + + SBMLDocument sbmlDoc = new SBMLDocument(3, 1); + + // Create a Model object inside the SBMLDocument object and set + // its identifier. The call returns a pointer to the Model object + // created, and methods called on that object affect the attributes + // of the object attached to the model (as expected). + + Model model = sbmlDoc->createModel(); + model->setId(\'BestModelEver\'); + + // Create a Species object inside the Model and set its identifier. + // Similar to the lines above, this call returns a pointer to the Species + // object created, and methods called on that object affect the attributes + // of the object attached to the model (as expected). + + Speciessp = model->createSpecies(); + sp->setId(\'MySpecies\'); + @endverbatim + @endif@if java + @verbatim + // Create an SBMLDocument object in Level 3 Version 1 format: + + SBMLDocument sbmlDoc = new SBMLDocument(3, 1); + + // Create a Model object inside the SBMLDocument object and set + // its identifier. The call returns a pointer to the Model object + // created, and methods called on that object affect the attributes + // of the object attached to the model (as expected). Note that + // the call to setId() returns a status code, and a real program + // should check this status code to make sure everything went okay. + + Model model = sbmlDoc.createModel(); + model.setId("BestModelEver"); + + // Create a Species object inside the Model and set its identifier. + // Similar to the lines above, this call returns a pointer to the Species + // object created, and methods called on that object affect the attributes + // of the object attached to the model (as expected). Note that, like + // with Model, the call to setId() returns a status code, and a real program + // should check this status code to make sure everything went okay. + + Species sp = model.createSpecies(); + sp.setId("BestSpeciesEver"); + @endverbatim + @endif@if python + @verbatim + # Create an SBMLDocument object in Level 3 Version 1 format: + + sbmlDoc = SBMLDocument(3, 1) + + # Create a Model object inside the SBMLDocument object and set + # its identifier. The call to setId() returns a status code + # to indicate whether the assignment was successful. Code 0 + # means success; see the documentation for Model\'s setId() for + # more information. + + model = sbmlDoc.createModel() + model.setId("BestModelEver") + + # Create a Species object inside the Model and set its identifier. + # Again, the setId() returns a status code to indicate whether the + # assignment was successful. Code 0 means success; see the + # documentation for Specie\'s setId() for more information. + + sp = model.createSpecies() + sp.setId("BestSpeciesEver") + @endverbatim + @endif@if csharp + @verbatim + // Create an SBMLDocument object in Level 3 Version 1 format: + + SBMLDocument sbmlDoc = new SBMLDocument(3, 1); + + // Create a Model object inside the SBMLDocument object and set + // its identifier. The call returns a pointer to the Model object + // created, and methods called on that object affect the attributes + // of the object attached to the model (as expected). + + Model model = sbmlDoc.createModel(); + model.setId(\'BestModelEver\'); + + // Create a Species object inside the Model and set its identifier. + // Similar to the lines above, this call returns a pointer to the Species + // object created, and methods called on that object affect the attributes + // of the object attached to the model (as expected). + + Species sp = model.createSpecies(); + sp.setId(\'MySpecies\'); + @endverbatim + @endif@~ + + The <code>create<span + class=\'placeholder\'><em>Object</em></span>()</code> methods return a + pointer to the object created, but they also add the object to the + relevant list of object instances contained in the parent. (These lists + become the <code><listOf<span + class=\'placeholder\'><em>Object</em></span>s></code> elements in the + finished XML rendition of SBML.) In the example above, + Model.createSpecies() adds the created species directly to the + <code><listOfSpecies<i></i>></code> list in the model. Subsequently, + methods called on the species change the species in the model (which is + what is expected in most situations). + + @section checking Consistency and adherence to SBML specifications + + To make it easier for applications to do whatever they need, + libSBML version @htmlinclude libsbml-version.html + is relatively lax when it comes to enforcing correctness and + completeness of models @em during model construction and editing. + Essentially, libSBML @em will @em not in most cases check automatically + that a model\'s components have valid attribute values, or that the + overall model is consistent and free of errors—even obvious errors + such as duplication of identifiers. This allows applications great + leeway in how they build their models, but it means that software + authors must take deliberate steps to ensure that the model will be, in + the end, valid SBML. These steps include such things as keeping track + of the identifiers used in a model, manually performing updates in + certain situations where an entity is referenced in more than one place + (e.g., a species that is referenced by multiple SpeciesReference + objects), and so on. + + That said, libSBML does provide powerful features for deliberately + performing validation of SBML when an application decides it is time to + do so. The interfaces to these facilities are on the SBMLDocument + class, in the form of SBMLDocument.checkInternalConsistency() and + SBMLDocument.checkConsistency(). Please refer to the documentation for + SBMLDocument for more information about this. + + While applications may play fast and loose and live like free spirits + during the construction and editing of SBML models, they should always + make sure to call SBMLDocument.checkInternalConsistency() and/or + SBMLDocument.checkConsistency() before writing out the final version of + an SBML model. + + + @section model-l3-attrib Model attributes introduced in SBML Level 3 + + As mentioned above, the Model class has a number of optional attributes + in SBML Level 3 Version 1 Core. These are \'substanceUnits\', + \'timeUnits\', \'volumeUnits\', \'areaUnits\', \'lengthUnits\', \'extentUnits\', + and \'conversionFactor. The following provide more information about + them. + + @subsection model-l3-substanceunits The \'substanceUnits\' attribute + + The \'substanceUnits\' attribute is used to specify the unit of + measurement associated with substance quantities of Species objects that + do not specify units explicitly. If a given Species object definition + does not specify its unit of substance quantity via the \'substanceUnits\' + attribute on the Species object instance, then that species inherits the + value of the Model \'substanceUnits\' attribute. If the Model does not + define a value for this attribute, then there is no unit to inherit, and + all species that do not specify individual \'substanceUnits\' attribute + values then have <em>no</em> declared units for their quantities. The + SBML Level 3 Version 1 Core specification provides more + details. + + Note that when the identifier of a species appears in a model\'s + mathematical expressions, the unit of measurement associated with that + identifier is <em>not solely determined</em> by setting \'substanceUnits\' + on Model or Species. Please see the discussion about units given in + the documentation for the Species class. + + + @subsection model-l3-timeunits The \'timeUnits\' attribute + + The \'timeUnits\' attribute on SBML Level 3\'s Model object is used to + specify the unit in which time is measured in the model. This attribute + on Model is the <em>only</em> way to specify a unit for time in a model. + It is a global attribute; time is measured in the model everywhere in + the same way. This is particularly relevant to Reaction and RateRule + objects in a model: all Reaction and RateRule objects in SBML define + per-time values, and the unit of time is given by the \'timeUnits\' + attribute on the Model object instance. If the Model \'timeUnits\' + attribute has no value, it means that the unit of time is not defined + for the model\'s reactions and rate rules. Leaving it unspecified in an + SBML model does not result in an invalid model in SBML Level 3; + however, as a matter of best practice, we strongly recommend that all + models specify units of measurement for time. + + + @subsection model-l3-voletc The \'volumeUnits\', \'areaUnits\', and \'lengthUnits\' attributes + + The attributes \'volumeUnits\', \'areaUnits\' and \'lengthUnits\' together are + used to set the units of measurements for the sizes of Compartment + objects in an SBML Level 3 model when those objects do not + otherwise specify units. The three attributes correspond to the most + common cases of compartment dimensions: \'volumeUnits\' for compartments + having a \'spatialDimensions\' attribute value of @c \'3\', \'areaUnits\' for + compartments having a \'spatialDimensions\' attribute value of @c \'2\', and + \'lengthUnits\' for compartments having a \'spatialDimensions\' attribute + value of @c \'1\'. The attributes are not applicable to compartments + whose \'spatialDimensions\' attribute values are @em not one of @c \'1\', @c + \'2\' or @c \'3\'. + + If a given Compartment object instance does not provide a value for its + \'units\' attribute, then the unit of measurement of that compartment\'s + size is inherited from the value specified by the Model \'volumeUnits\', + \'areaUnits\' or \'lengthUnits\' attribute, as appropriate based on the + Compartment object\'s \'spatialDimensions\' attribute value. If the Model + object does not define the relevant attribute, then there are no units + to inherit, and all Compartment objects that do not set a value for + their \'units\' attribute then have <em>no</em> units associated with + their compartment sizes. + + The use of three separate attributes is a carry-over from SBML + Level 2. Note that it is entirely possible for a model to define a + value for two or more of the attributes \'volumeUnits\', \'areaUnits\' and + \'lengthUnits\' simultaneously, because SBML models may contain + compartments with different numbers of dimensions. + + + @subsection model-l3-extentunits The \'extentUnits\' attribute + + Reactions are processes that occur over time. These processes involve + events of some sort, where a single ``reaction event\'\' is one in which + some set of entities (known as reactants, products and modifiers in + SBML) interact, once. The <em>extent</em> of a reaction is a measure of + how many times the reaction has occurred, while the time derivative of + the extent gives the instantaneous rate at which the reaction is + occurring. Thus, what is colloquially referred to as the \'rate of the + reaction\' is in fact equal to the rate of change of reaction extent. + + In SBML Level 3, the combination of \'extentUnits\' and \'timeUnits\' + defines the units of kinetic laws in SBML and establishes how the + numerical value of each KineticLaw object\'s mathematical formula is + meant to be interpreted in a model. The units of the kinetic laws are + taken to be \'extentUnits\' divided by \'timeUnits\'. + + Note that this embodies an important principle in SBML Level 3 + models: <em>all reactions in an SBML model must have the same units</em> + for the rate of change of extent. In other words, the units of all + reaction rates in the model <em>must be the same</em>. There is only + one global value for \'extentUnits\' and one global value for \'timeUnits\'. + + + @subsection model-l3-convfactor The \'conversionFactor\' attribute + + The attribute \'conversionFactor\' in SBML Level 3\'s Model object + defines a global value inherited by all Species object instances that do + not define separate values for their \'conversionFactor\' attributes. The + value of this attribute must refer to a Parameter object instance + defined in the model. The Parameter object in question must be a + constant; ie it must have its \'constant\' attribute value set to @c + \'true\'. + + If a given Species object definition does not specify a conversion + factor via the \'conversionFactor\' attribute on Species, then the species + inherits the conversion factor specified by the Model \'conversionFactor\' + attribute. If the Model does not define a value for this attribute, + then there is no conversion factor to inherit. More information about + conversion factors is provided in the SBML Level 3 Version 1 + specification. +"; + + +%feature("docstring") Model::Model " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Model(SBMLNamespaces sbmlns)</pre> + + Creates a new Model using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Model object to an SBMLDocument (e.g., + using SBMLDocument.setModel()), the SBML XML namespace of the document @em + overrides the value used when creating the Model object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Model is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Model(long level, long version)</pre> + + Creates a new Model using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Model + + @param version a long integer, the SBML Version to assign to this + Model + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Model object to an SBMLDocument + (e.g., using SBMLDocument.setModel()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the Model object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a Model is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Model(Model orig)</pre> + + Copy constructor; creates a (deep) copy of the given Model object. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Model::accept " + Accepts the given SBMLVisitor for this instance of Constraint. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") Model::clone " + Creates and returns a deep copy of this Model object. + + @return a (deep) copy of this Model. +"; + + +%feature("docstring") Model::getElementBySId " + Returns the first child element found that has the given @p id in the + model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find. + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") Model::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or + None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") Model::getAllElements " + Returns a List of all child SBase objects, including those nested to an + arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") Model::getId " + Returns the value of the \'id\' attribute of this Model. + + @return the id of this Model. +"; + + +%feature("docstring") Model::getName " + Returns the value of the \'name\' attribute of this Model. + + @return the name of this Model. +"; + + +%feature("docstring") Model::getSubstanceUnits " + Returns the value of the \'substanceUnits\' attribute of this Model. + + @return the substanceUnits of this Model. + + @note The \'substanceUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getTimeUnits " + Returns the value of the \'timeUnits\' attribute of this Model. + + @return the timeUnits of this Model. + + @note The \'timeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getVolumeUnits " + Returns the value of the \'volumeUnits\' attribute of this Model. + + @return the volumeUnits of this Model. + + @note The \'volumeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getAreaUnits " + Returns the value of the \'areaUnits\' attribute of this Model. + + @return the areaUnits of this Model. + + @note The \'areaUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getLengthUnits " + Returns the value of the \'lengthUnits\' attribute of this Model. + + @return the lengthUnits of this Model. + + @note The \'lengthUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getExtentUnits " + Returns the value of the \'extentUnits\' attribute of this Model. + + @return the extentUnits of this Model. + + @note The \'extentUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getConversionFactor " + Returns the value of the \'conversionFactor\' attribute of this Model. + + @return the conversionFactor of this Model. + + @note The \'conversionFactor\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetId " + Predicate returning @c True if this + Model\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this Model is + set, @c False otherwise. +"; + + +%feature("docstring") Model::isSetName " + Predicate returning @c True if this + Model\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this Model is + set, @c False otherwise. +"; + + +%feature("docstring") Model::isSetSubstanceUnits " + Predicate returning @c True if this + Model\'s \'substanceUnits\' attribute is set. + + @return @c True if the \'substanceUnits\' attribute of this Model is + set, @c False otherwise. + + @note The \'substanceUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetTimeUnits " + Predicate returning @c True if this + Model\'s \'timeUnits\' attribute is set. + + @return @c True if the \'timeUnits\' attribute of this Model is + set, @c False otherwise. + + @note The \'substanceUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetVolumeUnits " + Predicate returning @c True if this + Model\'s \'volumeUnits\' attribute is set. + + @return @c True if the \'volumeUnits\' attribute of this Model is + set, @c False otherwise. + + @note The \'volumeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetAreaUnits " + Predicate returning @c True if this + Model\'s \'areaUnits\' attribute is set. + + @return @c True if the \'areaUnits\' attribute of this Model is + set, @c False otherwise. + + @note The \'areaUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetLengthUnits " + Predicate returning @c True if this + Model\'s \'lengthUnits\' attribute is set. + + @return @c True if the \'lengthUnits\' attribute of this Model is + set, @c False otherwise. + + @note The \'lengthUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetExtentUnits " + Predicate returning @c True if this + Model\'s \'extentUnits\' attribute is set. + + @return @c True if the \'extentUnits\' attribute of this Model is + set, @c False otherwise. + + @note The \'extentUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetConversionFactor " + Predicate returning @c True if this + Model\'s \'conversionFactor\' attribute is set. + + @return @c True if the \'conversionFactor\' attribute of this Model is + set, @c False otherwise. + + @note The \'conversionFactor\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setId " + Sets the value of the \'id\' attribute of this Model. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Model::setName " + Sets the value of the \'name\' attribute of this Model. + + The string in @p name is copied. + + @param name the new name for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Model::setSubstanceUnits " + Sets the value of the \'substanceUnits\' attribute of this Model. + + The string in @p units is copied. + + @param units the new substanceUnits for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'substanceUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setTimeUnits " + Sets the value of the \'timeUnits\' attribute of this Model. + + The string in @p units is copied. + + @param units the new timeUnits for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'timeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setVolumeUnits " + Sets the value of the \'volumeUnits\' attribute of this Model. + + The string in @p units is copied. + + @param units the new volumeUnits for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'volumeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setAreaUnits " + Sets the value of the \'areaUnits\' attribute of this Model. + + The string in @p units is copied. + + @param units the new areaUnits for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'areaUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setLengthUnits " + Sets the value of the \'lengthUnits\' attribute of this Model. + + The string in @p units is copied. + + @param units the new lengthUnits for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'lengthUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setExtentUnits " + Sets the value of the \'extentUnits\' attribute of this Model. + + The string in @p units is copied. + + @param units the new extentUnits for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'extentUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setConversionFactor " + Sets the value of the \'conversionFactor\' attribute of this Model. + + The string in @p units is copied. + + @param units the new conversionFactor for the Model + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'conversionFactor\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetId " + Unsets the value of the \'id\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Model::unsetName " + Unsets the value of the \'name\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Model::unsetSubstanceUnits " + Unsets the value of the \'substanceUnits\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'substanceUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetTimeUnits " + Unsets the value of the \'timeUnits\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'timeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetVolumeUnits " + Unsets the value of the \'volumeUnits\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'volumeUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetAreaUnits " + Unsets the value of the \'areaUnits\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'areaUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetLengthUnits " + Unsets the value of the \'lengthUnits\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'lengthUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetExtentUnits " + Unsets the value of the \'extentUnits\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'extentUnits\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetConversionFactor " + Unsets the value of the \'conversionFactor\' attribute of this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'conversionFactor\' attribute is available in + SBML Level 3 but is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::addFunctionDefinition " + Adds a copy of the given FunctionDefinition object to this Model. + + @param fd the FunctionDefinition to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createFunctionDefinition() + for a method that does not lead to these issues. + + @see createFunctionDefinition() +"; + + +%feature("docstring") Model::addUnitDefinition " + Adds a copy of the given UnitDefinition object to this Model. + + @param ud the UnitDefinition object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createUnitDefinition() for + a method that does not lead to these issues. + + @see createUnitDefinition() +"; + + +%feature("docstring") Model::addCompartmentType " + Adds a copy of the given CompartmentType object to this Model. + + @param ct the CompartmentType object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createCompartmentType() + for a method that does not lead to these issues. + + @note The CompartmentType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. + + @see createCompartmentType() +"; + + +%feature("docstring") Model::addSpeciesType " + Adds a copy of the given SpeciesType object to this Model. + + @param st the SpeciesType object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createSpeciesType() for a + method that does not lead to these issues. + + @note The SpeciesType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. + + @see createSpeciesType() +"; + + +%feature("docstring") Model::addCompartment " + Adds a copy of the given Compartment object to this Model. + + @param c the Compartment object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createCompartment() for a + method that does not lead to these issues. + + @see createCompartment() +"; + + +%feature("docstring") Model::addSpecies " + Adds a copy of the given Species object to this Model. + + @param s the Species object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createSpecies() for a + method that does not lead to these issues. + + @see createSpecies() +"; + + +%feature("docstring") Model::addParameter " + Adds a copy of the given Parameter object to this Model. + + @param p the Parameter object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createParameter() for a + method that does not lead to these issues. + + @see createParameter() +"; + + +%feature("docstring") Model::addInitialAssignment " + Adds a copy of the given InitialAssignment object to this Model. + + @param ia the InitialAssignment object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createInitialAssignment() + for a method that does not lead to these issues. + + @see createInitialAssignment() +"; + + +%feature("docstring") Model::addRule " + Adds a copy of the given Rule object to this Model. + + @param r the Rule object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see the methods + Model.createAlgebraicRule(), Model.createAssignmentRule() and + Model.createRateRule() for methods that do not lead to these issues. + + @see createAlgebraicRule() + @see createAssignmentRule() + @see createRateRule() +"; + + +%feature("docstring") Model::addConstraint " + Adds a copy of the given Constraint object to this Model. + + @param c the Constraint object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createConstraint() for a + method that does not lead to these issues. + + @see createConstraint() +"; + + +%feature("docstring") Model::addReaction " + Adds a copy of the given Reaction object to this Model. + + @param r the Reaction object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createReaction() for a + method that does not lead to these issues. + + @see createReaction() +"; + + +%feature("docstring") Model::addEvent " + Adds a copy of the given Event object to this Model. + + @param e the Event object to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Model</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createEvent() for a method + that does not lead to these issues. + + @see createEvent() +"; + + +%feature("docstring") Model::createFunctionDefinition " + Creates a new FunctionDefinition inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the FunctionDefinition object created + + @see addFunctionDefinition() +"; + + +%feature("docstring") Model::createUnitDefinition " + Creates a new UnitDefinition inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the UnitDefinition object created + + @see addUnitDefinition() +"; + + +%feature("docstring") Model::createUnit " + Creates a new Unit object within the last UnitDefinition object + created in this model and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the UnitDefinition was created is not + significant. If a UnitDefinition object does not exist in this model, + a new Unit is @em not created and @c None is returned instead. + + @return the Unit object created + + @see addUnitDefinition() +"; + + +%feature("docstring") Model::createCompartmentType " + Creates a new CompartmentType inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the CompartmentType object created + + @note The CompartmentType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. + + @see addCompartmentType() +"; + + +%feature("docstring") Model::createSpeciesType " + Creates a new SpeciesType inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the SpeciesType object created + + @note The SpeciesType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. + + @see addSpeciesType() +"; + + +%feature("docstring") Model::createCompartment " + Creates a new Compartment inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the Compartment object created + + @see addCompartment() +"; + + +%feature("docstring") Model::createSpecies " + Creates a new Species inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the Species object created + + @see addSpecies() +"; + + +%feature("docstring") Model::createParameter " + Creates a new Parameter inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the Parameter object created + + @see addParameter() +"; + + +%feature("docstring") Model::createInitialAssignment " + Creates a new InitialAssignment inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the InitialAssignment object created + + @see addInitialAssignment() +"; + + +%feature("docstring") Model::createAlgebraicRule " + Creates a new AlgebraicRule inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the AlgebraicRule object created + + @see addRule() +"; + + +%feature("docstring") Model::createAssignmentRule " + Creates a new AssignmentRule inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the AssignmentRule object created + + @see addRule() +"; + + +%feature("docstring") Model::createRateRule " + Creates a new RateRule inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the RateRule object created + + @see addRule() +"; + + +%feature("docstring") Model::createConstraint " + Creates a new Constraint inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the Constraint object created + + @see addConstraint() +"; + + +%feature("docstring") Model::createReaction " + Creates a new Reaction inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the Reaction object created + + @see addReaction() +"; + + +%feature("docstring") Model::createReactant " + Creates a new SpeciesReference object for a reactant inside the last + Reaction object in this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, a new SpeciesReference is @em not + created and @c None is returned instead. + + @return the SpeciesReference object created +"; + + +%feature("docstring") Model::createProduct " + Creates a new SpeciesReference object for a product inside the last + Reaction object in this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, a new SpeciesReference is @em not + created and @c None is returned instead. + + @return the SpeciesReference object created +"; + + +%feature("docstring") Model::createModifier " + Creates a new ModifierSpeciesReference object for a modifier species + inside the last Reaction object in this Model, and returns a pointer + to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, a new ModifierSpeciesReference is @em + not created and @c None is returned instead. + + @return the SpeciesReference object created +"; + + +%feature("docstring") Model::createKineticLaw " + Creates a new KineticLaw inside the last Reaction object created in + this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, or a Reaction exists but already has a + KineticLaw, a new KineticLaw is @em not created and @c None is returned + instead. + + @return the KineticLaw object created +"; + + +%feature("docstring") Model::createKineticLawParameter " + Creates a new local Parameter inside the KineticLaw object of the last + Reaction created inside this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The last KineticLaw object in this Model could have been created in a + variety of ways. For example, it could have been added using + createKineticLaw(), or it could be the result of using + Reaction.createKineticLaw() on the Reaction object created by a + createReaction(). If a Reaction does not exist for this model, or the + last Reaction does not contain a KineticLaw object, a new Parameter is + @em not created and @c None is returned instead. + + @return the Parameter object created +"; + + +%feature("docstring") Model::createKineticLawLocalParameter " + Creates a new LocalParameter inside the KineticLaw object of the last + Reaction created inside this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The last KineticLaw object in this Model could have been created in a + variety of ways. For example, it could have been added using + createKineticLaw(), or it could be the result of using + Reaction.createKineticLaw() on the Reaction object created by a + createReaction(). If a Reaction does not exist for this model, or the + last Reaction does not contain a KineticLaw object, a new Parameter is + @em not created and @c None is returned instead. + + @return the Parameter object created +"; + + +%feature("docstring") Model::createEvent " + Creates a new Event inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + @return the Event object created +"; + + +%feature("docstring") Model::createEventAssignment " + Creates a new EventAssignment inside the last Event object created in + this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Event object in this model was created + is not significant. It could have been created in a variety of ways, + for example by using createEvent(). If no Event object exists in this + Model object, a new EventAssignment is @em not created and @c None is + returned instead. + + @return the EventAssignment object created +"; + + +%feature("docstring") Model::createTrigger " + Creates a new Trigger inside the last Event object created in + this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Event object in this model was created + is not significant. It could have been created in a variety of ways, + for example by using createEvent(). If no Event object exists in this + Model object, a new Trigger is @em not created and @c None is + returned instead. + + @return the Trigger object created +"; + + +%feature("docstring") Model::createDelay " + Creates a new Delay inside the last Event object created in + this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this + object\'s corresponding attributes. + + The mechanism by which the last Event object in this model was created + is not significant. It could have been created in a variety of ways, + for example by using createEvent(). If no Event object exists in this + Model object, a new Delay is @em not created and @c None is + returned instead. + + @return the Delay object created +"; + + +%feature("docstring") Model::setAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setAnnotation(XMLNode annotation)</pre> + + Sets the value of the \'annotation\' subelement of this SBML object to a + copy of @p annotation. + + Any existing content of the \'annotation\' subelement is discarded. + Unless you have taken steps to first copy and reconstitute any + existing annotations into the @p annotation that is about to be + assigned, it is likely that performing such wholesale replacement is + unfriendly towards other software applications whose annotations are + discarded. An alternative may be to use appendAnnotation(). + + @param annotation an XML structure that is to be used as the content + of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see appendAnnotation() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setAnnotation(string annotation)</pre> + + Sets the value of the \'annotation\' subelement of this SBML object to a + copy of @p annotation. + + Any existing content of the \'annotation\' subelement is discarded. + Unless you have taken steps to first copy and reconstitute any + existing annotations into the @p annotation that is about to be + assigned, it is likely that performing such wholesale replacement is + unfriendly towards other software applications whose annotations are + discarded. An alternative may be to use appendAnnotation(). + + @param annotation an XML string that is to be used as the content + of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see appendAnnotation() +"; + + +%feature("docstring") Model::appendAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>appendAnnotation(XMLNode annotation)</pre> + + Appends annotation content to any existing content in the \'annotation\' + subelement of this object. + + The content in @p annotation is copied. Unlike setAnnotation(), this + method allows other annotations to be preserved when an application + adds its own data. + + @param annotation an XML structure that is to be copied and appended + to the content of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see setAnnotation() + + + <hr> + Method variant with the following signature: + <pre class='signature'>appendAnnotation(string annotation)</pre> + + Appends annotation content to any existing content in the \'annotation\' + subelement of this object. + + The content in @p annotation is copied. Unlike setAnnotation(), this + method allows other annotations to be preserved when an application + adds its own data. + + @param annotation an XML string that is to be copied and appended + to the content of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see setAnnotation() +"; + + +%feature("docstring") Model::getListOfFunctionDefinitions " + Get the ListOfFunctionDefinitions object in this Model. + + @return the list of FunctionDefinitions for this Model. +"; + + +%feature("docstring") Model::getListOfUnitDefinitions " + Get the ListOfUnitDefinitions object in this Model. + + @return the list of UnitDefinitions for this Model. +"; + + +%feature("docstring") Model::getListOfCompartmentTypes " + Get the ListOfCompartmentTypes object in this Model. + + @return the list of CompartmentTypes for this Model. + + @note The CompartmentType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getListOfSpeciesTypes " + Get the ListOfSpeciesTypes object in this Model. + + @return the list of SpeciesTypes for this Model. + + @note The SpeciesType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getListOfCompartments " + Get the ListOfCompartments object in this Model. + + @return the list of Compartments for this Model. +"; + + +%feature("docstring") Model::getListOfSpecies " + Get the ListOfSpecies object in this Model. + + @return the list of Species for this Model. +"; + + +%feature("docstring") Model::getListOfParameters " + Get the ListOfParameters object in this Model. + + @return the list of Parameters for this Model. +"; + + +%feature("docstring") Model::getListOfInitialAssignments " + Get the ListOfInitialAssignments object in this Model. + + @return the list of InitialAssignments for this Model. +"; + + +%feature("docstring") Model::getListOfRules " + Get the ListOfRules object in this Model. + + @return the list of Rules for this Model. +"; + + +%feature("docstring") Model::getListOfConstraints " + Get the ListOfConstraints object in this Model. + + @return the list of Constraints for this Model. +"; + + +%feature("docstring") Model::getListOfReactions " + Get the ListOfReactions object in this Model. + + @return the list of Reactions for this Model. +"; + + +%feature("docstring") Model::getListOfEvents " + Get the ListOfEvents object in this Model. + + @return the list of Events for this Model. +"; + + +%feature("docstring") Model::getFunctionDefinition " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getFunctionDefinition(long n)</pre> + + Get the nth FunctionDefinitions object in this Model. + + @return the nth FunctionDefinition of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getFunctionDefinition(string sid)</pre> + + Get a FunctionDefinition object based on its identifier. + + @return the FunctionDefinition in this Model with the identifier + @p sid or @c None if no such FunctionDefinition exists. +"; + + +%feature("docstring") Model::getUnitDefinition " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getUnitDefinition(long n)</pre> + + Get the nth UnitDefinition object in this Model. + + @return the nth UnitDefinition of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getUnitDefinition(string sid)</pre> + + Get a UnitDefinition based on its identifier. + + @return the UnitDefinition in this Model with the identifier @p sid or + @c None if no such UnitDefinition exists. +"; + + +%feature("docstring") Model::getCompartmentType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getCompartmentType(long n)</pre> + + Get the nth CompartmentType object in this Model. + + @return the nth CompartmentType of this Model. + + @note The CompartmentType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getCompartmentType(string sid)</pre> + + Get a CompartmentType object based on its identifier. + + @return the CompartmentType in this Model with the identifier @p sid + or @c None if no such CompartmentType exists. + + @note The CompartmentType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getSpeciesType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getSpeciesType(long n)</pre> + + Get the nth SpeciesType object in this Model. + + @return the nth SpeciesType of this Model. + + @note The SpeciesType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getSpeciesType(string sid)</pre> + + Get a SpeciesType object based on its identifier. + + @return the SpeciesType in this Model with the identifier @p sid or + @c None if no such SpeciesType exists. + + @note The SpeciesType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getCompartment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getCompartment(long n)</pre> + + Get the nth Compartment object in this Model. + + @return the nth Compartment of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getCompartment(string sid)</pre> + + Get a Compartment object based on its identifier. + + @return the Compartment in this Model with the identifier @p sid or + @c None if no such Compartment exists. +"; + + +%feature("docstring") Model::getSpecies " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getSpecies(long n)</pre> + + Get the nth Species object in this Model. + + @return the nth Species of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getSpecies(string sid)</pre> + + Get a Species object based on its identifier. + + @return the Species in this Model with the identifier @p sid or @c None + if no such Species exists. +"; + + +%feature("docstring") Model::getParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getParameter(long n)</pre> + + Get the nth Parameter object in this Model. + + @return the nth Parameter of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getParameter(string sid)</pre> + + Get a Parameter object based on its identifier. + + @return the Parameter in this Model with the identifier @p sid or @c None + if no such Parameter exists. +"; + + +%feature("docstring") Model::getInitialAssignment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getInitialAssignment(string symbol)</pre> + + Get an InitialAssignment object based on the symbol to which it + assigns a value. + + @return the InitialAssignment in this Model with the given \'symbol\' + attribute value or @c None if no such InitialAssignment exists. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getInitialAssignment(long n)</pre> + + Get the nth InitialAssignment object in this Model. + + @return the nth InitialAssignment of this Model. +"; + + +%feature("docstring") Model::getRule " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getRule(string variable)</pre> + + Get a Rule object based on the variable to which it assigns a value. + + @return the Rule in this Model with the given \'variable\' attribute + value or @c None if no such Rule exists. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getRule(long n)</pre> + + Get the nth Rule object in this Model. + + @return the nth Rule of this Model. +"; + + +%feature("docstring") Model::getConstraint " + Get the nth Constraint object in this Model. + + @return the nth Constraint of this Model. +"; + + +%feature("docstring") Model::getReaction " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getReaction(long n)</pre> + + Get the nth Reaction object in this Model. + + @return the nth Reaction of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getReaction(string sid)</pre> + + Get a Reaction object based on its identifier. + + @return the Reaction in this Model with the identifier @p sid or @c None + if no such Reaction exists. +"; + + +%feature("docstring") Model::getSpeciesReference " + Get a SpeciesReference object based on its identifier. + + @return the SpeciesReference in this Model with the identifier @p sid or @c None + if no such SpeciesReference exists. +"; + + +%feature("docstring") Model::getModifierSpeciesReference " + Get a ModifierSpeciesReference object based on its identifier. + + @return the ModifierSpeciesReference in this Model with the + identifier @p sid or @c None + if no such ModifierSpeciesReference exists. +"; + + +%feature("docstring") Model::getEvent " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getEvent(long n)</pre> + + Get the nth Event object in this Model. + + @return the nth Event of this Model. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getEvent(string sid)</pre> + + Get an Event object based on its identifier. + + @return the Event in this Model with the identifier @p sid or @c None if + no such Event exists. +"; + + +%feature("docstring") Model::getNumFunctionDefinitions " + Get the number of FunctionDefinition objects in this Model. + + @return the number of FunctionDefinitions in this Model. +"; + + +%feature("docstring") Model::getNumUnitDefinitions " + Get the number of UnitDefinition objects in this Model. + + @return the number of UnitDefinitions in this Model. +"; + + +%feature("docstring") Model::getNumCompartmentTypes " + Get the number of CompartmentType objects in this Model. + + @return the number of CompartmentTypes in this Model. + + @note The CompartmentType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getNumSpeciesTypes " + Get the number of SpeciesType objects in this Model. + + @return the number of SpeciesTypes in this Model. + + @note The SpeciesType object class is only available in SBML + Level 2 Versions 2–4. It is not available in + Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getNumCompartments " + Get the number of Compartment objects in this Model. + + @return the number of Compartments in this Model. +"; + + +%feature("docstring") Model::getNumSpecies " + Get the number of Specie objects in this Model. + + @return the number of Species in this Model. +"; + + +%feature("docstring") Model::getNumSpeciesWithBoundaryCondition " + Get the number of Species in this Model having their + \'boundaryCondition\' attribute value set to @c True. + + @return the number of Species in this Model with boundaryCondition set + to true. +"; + + +%feature("docstring") Model::getNumParameters " + Get the number of Parameter objects in this Model. + + @return the number of Parameters in this Model. Parameters defined in + KineticLaws are not included. +"; + + +%feature("docstring") Model::getNumInitialAssignments " + Get the number of InitialAssignment objects in this Model. + + @return the number of InitialAssignments in this Model. +"; + + +%feature("docstring") Model::getNumRules " + Get the number of Rule objects in this Model. + + @return the number of Rules in this Model. +"; + + +%feature("docstring") Model::getNumConstraints " + Get the number of Constraint objects in this Model. + + @return the number of Constraints in this Model. +"; + + +%feature("docstring") Model::getNumReactions " + Get the number of Reaction objects in this Model. + + @return the number of Reactions in this Model. +"; + + +%feature("docstring") Model::getNumEvents " + Get the number of Event objects in this Model. + + @return the number of Events in this Model. +"; + + +%feature("docstring") Model::removeFromParentAndDelete " + Finds this Model\'s parent SBMLDocument and calls setModel(None) on it, + indirectly deleting itself. Overridden from the SBase function since + the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Model::renameAllIds " + Finds this Model\'s parent SBMLDocument and calls setModel(None) on it, + indirectly deleting itself. Overridden from the SBase function since + the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Model::renameIDs " + Finds this Model\'s parent SBMLDocument and calls setModel(None) on it, + indirectly deleting itself. Overridden from the SBase function since + the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Model::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Model::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Model::isBoolean " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertL1ToL2 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertL1ToL3 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertL2ToL3 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertL2ToL1 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertL3ToL1 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertL3ToL2 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::addModifiers " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::addConstantAttribute " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::setSpatialDimensions " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::addDefinitionsForDefaultUnits " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertParametersToLocals " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::setSpeciesReferenceConstantValueAndStoichiometry " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::removeMetaId " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::removeSBOTerms " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::removeHasOnlySubstanceUnits " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::removeSBOTermsNotInL2V2 " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::removeDuplicateTopLevelAnnotations " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::removeParameterRuleUnits " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertStoichiometryMath " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::assignRequiredValues " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::dealWithModelUnits " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::dealWithStoichiometry " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::dealWithEvents " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::convertToL2Strict " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::setSBMLDocument " + @internal + Predicate returning @c True if the + given ASTNode is a boolean. + + Often times, this question can be answered with the ASTNode\'s own + isBoolean() method, but if the AST is an expression that calls a + function defined in the Model\'s ListOfFunctionDefinitions, the model + is needed for lookup context. + + @return true if the given ASTNode is a boolean. +"; + + +%feature("docstring") Model::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") Model::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or + @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Model::getElementName " + Returns the XML element name of this object, which for Model, is + always @c \'model\'. + + @return the name of this element, i.e., @c \'model\'. +"; + + +%feature("docstring") Model::getElementPosition " + @internal + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") Model::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Model::populateListFormulaUnitsData " + Populates the list of FormulaDataUnits with the units derived + for the model. The list contains elements of class + FormulaUnitsData. + + The first element of the list refers to the default units + of \'substance per time\' derived from the model and has the + unitReferenceId \'subs_per_time\'. This facilitates the comparison of units + derived from mathematical formula with the expected units. + + The next elements of the list record the units of the + compartments and species established from either explicitly + declared or default units. + + The next elements record the units of any parameters. + + Subsequent elements of the list record the units derived for + each mathematical expression encountered within the model. + + @note This function is utilised by the Unit Consistency Validator. + The list is populated prior to running the validation and thus + the consistency of units can be checked by accessing the members + of the list and comparing the appropriate data. +"; + + +%feature("docstring") Model::isPopulatedListFormulaUnitsData " + Predicate returning @c True if + the list of FormulaUnitsData is populated. + + @return @c True if the list of FormulaUnitsData is populated, + @c False otherwise. +"; + + +%feature("docstring") Model::addFormulaUnitsData " + @internal + Adds a copy of the given FormulaUnitsData object to this Model. + + @param fud the FormulaUnitsData to add +"; + + +%feature("docstring") Model::createFormulaUnitsData " + @internal + Creates a new FormulaUnitsData inside this Model and returns it. + + @return the FormulaUnitsData object created +"; + + +%feature("docstring") Model::getNumFormulaUnitsData " + @internal + Get the number of FormulaUnitsData objects in this Model. + + @return the number of FormulaUnitsData in this Model. +"; + + +%feature("docstring") Model::getListFormulaUnitsData " + @internal + Get the list of FormulaUnitsData object in this Model. + + @return the list of FormulaUnitsData for this Model. +"; + + +%feature("docstring") Model::hasRequiredElements " + Predicate returning @c True if + all the required elements for this Model object + have been set. + + @note The required elements for a Model object are: + listOfCompartments (L1 only); listOfSpecies (L1V1 only); + listOfReactions(L1V1 only) + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Model::removeFunctionDefinition " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeFunctionDefinition(long n)</pre> + + Removes the nth FunctionDefinition object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the FunctionDefinition object to remove + + @return the FunctionDefinition object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeFunctionDefinition(string sid)</pre> + + Removes the FunctionDefinition object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the FunctionDefinition objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the FunctionDefinition object to remove + + @return the FunctionDefinition object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no FunctionDefinition + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeUnitDefinition " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeUnitDefinition(long n)</pre> + + Removes the nth UnitDefinition object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the UnitDefinition object to remove + + @return the UnitDefinition object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeUnitDefinition(string sid)</pre> + + Removes the UnitDefinition object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the UnitDefinition objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the UnitDefinition object to remove + + @return the UnitDefinition object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no UnitDefinition + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeCompartmentType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeCompartmentType(long n)</pre> + + Removes the nth CompartmentType object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the CompartmentType object to remove + + @return the ComapartmentType object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeCompartmentType(string sid)</pre> + + Removes the CompartmentType object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the CompartmentType objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the object to remove + + @return the CompartmentType object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no CompartmentType + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeSpeciesType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeSpeciesType(long n)</pre> + + Removes the nth SpeciesType object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the SpeciesType object to remove + + @return the SpeciesType object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeSpeciesType(string sid)</pre> + + Removes the SpeciesType object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the SpeciesType objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the SpeciesType object to remove + + @return the SpeciesType object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no SpeciesType + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeCompartment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeCompartment(long n)</pre> + + Removes the nth Compartment object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Compartment object to remove + + @return the Compartment object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeCompartment(string sid)</pre> + + Removes the Compartment object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the Compartment objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the Compartment object to remove + + @return the Compartment object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Compartment + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeSpecies " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeSpecies(long n)</pre> + + Removes the nth Species object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Species object to remove + + @return the Species object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeSpecies(string sid)</pre> + + Removes the Species object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the Species objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the Species object to remove + + @return the Species object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Species + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeParameter(long n)</pre> + + Removes the nth Parameter object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Parameter object to remove + + @return the Parameter object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeParameter(string sid)</pre> + + Removes the Parameter object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the Parameter objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the Parameter object to remove + + @return the Parameter object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Parameter + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeInitialAssignment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeInitialAssignment(string symbol)</pre> + + Removes the InitialAssignment object with the given \'symbol\' attribute + from this Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the InitialAssignment objects in this Model object have the + \'symbol\' attribute @p symbol, then @c None is returned. + + @param symbol the \'symbol\' attribute of the InitialAssignment object to remove + + @return the InitialAssignment object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no InitialAssignment + object with the \'symbol\' attribute exists in this Model object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeInitialAssignment(long n)</pre> + + Removes the nth InitialAssignment object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the InitialAssignment object to remove + + @return the InitialAssignment object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. +"; + + +%feature("docstring") Model::removeRule " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeRule(string variable)</pre> + + Removes the Rule object with the given \'variable\' attribute from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the Rule objects in this Model object have the \'variable\' attribute + @p variable, then @c None is returned. + + @param variable the \'variable\' attribute of the Rule object to remove + + @return the Rule object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Rule + object with the \'variable\' attribute exists in this Model object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeRule(long n)</pre> + + Removes the nth Rule object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Rule object to remove + + @return the Rule object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. +"; + + +%feature("docstring") Model::removeConstraint " + Removes the nth Constraint object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Constraint object to remove + + @return the Constraint object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. +"; + + +%feature("docstring") Model::removeReaction " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeReaction(long n)</pre> + + Removes the nth Reaction object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Reaction object to remove + + @return the Reaction object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeReaction(string sid)</pre> + + Removes the Reaction object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the Reaction objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the Reaction object to remove + + @return the Reaction object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Reaction + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeEvent " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeEvent(long n)</pre> + + Removes the nth Event object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Event object to remove + + @return the Event object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeEvent(string sid)</pre> + + Removes the Event object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the Event objects in this Model object have the identifier + @p sid, then @c None is returned. + + @param sid the identifier of the Event object to remove + + @return the Event object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Event + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::appendFrom " + Takes the contents of the passed-in Model, makes copies of everything, + and appends those copies to the appropriate places in this Model. + + This method also calls the <code>appendFrom</code> method on all libSBML + plug-in objects.  @htmlinclude what-are-plugins.html + + @param model the Model to merge with this one. +"; + + +%feature("docstring") Model::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child elements + (if any). (This is an internal implementation for enablePackage + function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") Model::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") Model::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Model::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Model::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Model::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Model::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Model::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Model::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Model::syncAnnotation " + @internal + Synchronizes the annotation of this SBML object. + + Annotation element (XMLNode mAnnotation) is synchronized with the + current CVTerm objects (List mCVTerm), ModelHistory object + (ModelHistory mHistory) and ListOfLayouts object (ListOfLayouts mLayouts). + Currently, this method is called in getAnnotation, isSetAnnotation, + and writeElements methods. +"; + + +%feature("docstring") Model::checkUnitDefinition " + @internal + Internal function used in populateListFormulaUnitsData +"; + + +%feature("docstring") Model::checkSpeciesReference " + @internal + Internal function used in populateListFormulaUnitsData +"; + + +%feature("docstring") SBMLDocument " + @ingroup Core + Container for an SBML document and interface for global operations + on SBML documents. + + @if clike LibSBML uses the class SBMLDocument as a + top-level container for storing SBML content and data associated with it + (such as warnings and error messages). The two primary means of reading + an SBML model, SBMLReader.readSBML() and + SBMLReader.readSBMLFromString(), both return a pointer to an + SBMLDocument object. From there, callers can inquire about any errors + encountered (e.g., using SBMLDocument.getNumErrors()), access the Model + object, and perform other actions such as consistency-checking and model + translation. + @endif@if python LibSBML uses the class SBMLDocument as a + top-level container for storing SBML content and data associated with it + (such as warnings and error messages). The two primary means of reading + an SBML model, SBMLReader.readSBML() and + SBMLReader.readSBMLFromString(), both return a pointer to an + SBMLDocument object. From there, callers can inquire about any errors + encountered (e.g., using SBMLDocument.getNumErrors()), access the Model + object, and perform other actions such as consistency-checking and model + translation. + @endif@if java LibSBML uses the class SBMLDocument as a top-level + container for storing SBML content and data associated with it (such as + warnings and error messages). The two primary means of reading an SBML + model, SBMLReader.readSBML() and + SBMLReader.readSBMLFromString(), both return an SBMLDocument + object. From there, callers can inquire about any errors encountered + (e.g., using SBMLDocument.getNumErrors()), access the Model object, and + perform other actions such as consistency-checking and model + translation. + @endif@~ + + When creating fresh models programmatically, the starting point is + typically the creation of an SBMLDocument object instance. The + SBMLDocument constructor accepts arguments for the SBML Level and + Version of the model to be created. After creating the SBMLDocument + object, calling programs then typically call SBMLDocument.createModel() + almost immediately, and then proceed to call the methods on the Model + object to fill out the model\'s contents. + + SBMLDocument corresponds roughly to the class <i>Sbml</i> defined in the + SBML Level 2 specification and <i>SBML</i> in the Level 3 + specification. It does not have a direct correspondence in SBML + Level 1. (However, to make matters simpler for applications, + libSBML creates an SBMLDocument no matter whether the model is + Level 1, Level 2 or Level 3.) In its barest form, when written out in + XML format for (e.g.) SBML Level 2 Version 4, the corresponding + structure is the following: + @verbatim + <sbml xmlns=\'http://www.sbml.org/sbml/level2/version4\' level=\'2\' version=\'4\'> + ... + </sbml>@endverbatim + + SBMLDocument is derived from SBase, and therefore contains the usual SBase + attributes (in SBML Level 2 and Level 3) of \'metaid\' and \'sboTerm\', as + well as the subelements \'notes\' and \'annotation\'. It also contains the + attributes \'level\' and \'version\' indicating the Level and Version of the + SBML data structure. These can be accessed using the methods defined by + the SBase class for that purpose. + + @section checking Checking consistency and adherence to SBML specifications + + One of the most important features of libSBML is its ability to perform + SBML validation to ensure that a model adheres to the SBML specification + for whatever Level+Version combination the model uses. SBMLDocument + provides the methods for running consistency-checking and validation + rules on the SBML content. + + First, a brief explanation of the rationale is in order. In libSBML + versions up to and including the version 3.3.x series, the + individual methods for creating and setting attributes and other + components were quite lenient, and allowed a caller to compose SBML + entities that might not, in the end, represent valid SBML. This allowed + applications the freedom to do things such as save incomplete models + (which is useful when models are being developed over long periods of + time). In the version 4.x series, libSBML is somewhat stricter, + but still permits structures to be created independently and the results + to be combined in a separate step. In all these cases, it means that a + separate validation step is necessary when a calling program finally + wants to finish a complete SBML document. + + The primary interface to this validation facility is SBMLDocument\'s + SBMLDocument.checkInternalConsistency() and + SBMLDocument.checkConsistency(). The former verifies the basic + internal consistency and syntax of an SBML document, and the latter + implements more elaborate validation rules (both those defined by the + SBML specifications, as well as additional rules offered by libSBML). + + @if clike The checks performed by SBMLDocument.checkInternalConsistency() are + hardwired and cannot be changed by calling programs, but the validation + performed by SBMLDocument.checkConsistency() is under program control + using the method SBMLDocument.setConsistencyChecks(). Applications can + selectively disable specific kinds of checks that they may not be + interested in, by calling SBMLDocument.setConsistencyChecks() with + appropriate parameters. + @endif@if python The checks performed by SBMLDocument.checkInternalConsistency() are + hardwired and cannot be changed by calling programs, but the validation + performed by SBMLDocument.checkConsistency() is under program control + using the method SBMLDocument.setConsistencyChecks(). Applications can + selectively disable specific kinds of checks that they may not be + interested in, by calling SBMLDocument.setConsistencyChecks() with + appropriate parameters. + @endif@if java The checks performed by SBMLDocument.checkInternalConsistency() are + hardwired and cannot be changed by calling programs, but the validation + performed by SBMLDocument.checkConsistency() is under program control + using the method SBMLDocument.setConsistencyChecks(). Applications can selectively disable specific kinds of checks + that they may not be interested by calling + SBMLDocument.setConsistencyChecks() with + appropriate parameters. + @endif@~ + + These methods have slightly different relevance depending on whether a + model is created programmaticaly from scratch, or whether it is read in + from a file or data stream. The following list summarizes the possible + scenarios. + + <em>Scenario 1: Creating a model from scratch</em>. Before writing out + the model, + + @li Call SBMLDocument.checkInternalConsistency(), then inquire about + the results by calling SBMLDocument.getNumErrors() + + @li Call @if java SBMLDocument.setConsistencyChecks() @else SBMLDocument.setConsistencyChecks() @endif@~ to configure + which checks will be performed by SBMLDocument.checkConsistency() + + @li Call SBMLDocument.checkConsistency(), then inquire about the results by + calling SBMLDocument.getNumErrors() + + <em>Scenario 2: Reading a model from a file or data stream.</em> After + reading the model, + + @li Basic consistency checks will have been performed automatically by + libSBML upon reading the content, so you only need to inquire about the + results by using SBMLDocument.getNumErrors() + + @li Call @if java SBMLDocument.setConsistencyChecks() @else SBMLDocument.setConsistencyChecks() @endif@~ to configure + which checks are performed by SBMLDocument.checkConsistency() + + @li Call SBMLDocument.checkConsistency(), then inquire about the results + by calling SBMLDocument.getNumErrors() + + @if clike An example of using the consistency-checking + and validation facilities is provided in this manual in the + section @ref libsbml-example. @endif@~ + + @section converting Converting documents between Levels and Versions of SBML + + LibSBML provides facilities for limited translation of SBML between + Levels and Versions of the SBML specifications. The method for doing is + is @if java SBMLDocument.setLevelAndVersion() @else setLevelAndVersion() @endif. In + general, models can be converted upward without difficulty (e.g., from + SBML Level 1 to Level 2, or from an earlier Version of + Level 2 to the latest Version of Level 2). Sometimes models + can be translated downward as well, if they do not use constructs + specific to more advanced Levels of SBML. + + Calling @if java SBMLDocument.setLevelAndVersion() @else SBMLDocument.setLevelAndVersion() @endif@~ will not @em necessarily lead + to a successful conversion. The method will return a boolean value + to indicate success or failure. Callers must check the error log (see + next section) attached to the SBMLDocument object after calling + @if java SBMLDocument.setLevelAndVersion() @else SBMLDocument.setLevelAndVersion() @endif@~ in order to assess whether any + problems arose. + + If an application is interested in translating to a lower Level and/or + Version of SBML within a Level, the following methods allow for prior + assessment of whether there is sufficient compatibility to make a + translation possible: + <ul> + <li> SBMLDocument.checkL1Compatibility(), + <li> SBMLDocument.checkL2v1Compatibility(), + <li> SBMLDocument.checkL2v2Compatibility(), + <li> SBMLDocument.checkL2v3Compatibility(), + <li> SBMLDocument.checkL2v4Compatibility(), and + <li> SBMLDocument.checkL3v1Compatibility(). + </ul> + + Some changes between Versions of SBML Level 2 may lead to + unexpected behaviors when attempting conversions in either direction. + For example, SBML Level 2 Version 4 relaxed the requirement + for consistency in units of measurement between expressions annd + quantities in a model. As a result, a model written in Version 4, + if converted to Version 3 with no other changes, may fail + validation as a Version 3 model because Version 3 imposed + stricter requirements on unit consistency. + + Other changes between SBML Level 2 and Level 3 make downward conversions + challenging. In some cases, it means that a model converted to + Level 2 from Level 3 will contain attributes that were not + explicitly given in the Level 3 model, because in Level 2 + these attributes may have been optional or have default values. + + @section errors Error handling + + Upon reading a model, SBMLDocument logs any problems encountered while + reading the model from the file or data stream. The log contains + objects that record diagnostic information about any notable issues that + arose. Whether the problems are warnings or errors, they are both + reported through a single common interface involving the object class + SBMLError. + + The methods SBMLDocument.getNumErrors(), @if java SBMLDocument.getError() @else SBMLDocument.getError() @endif@~ and + SBMLDocument.printErrors() allow callers to interact with the warnings + or errors logged. Alternatively, callers may retrieve the entire log as + an SBMLErrorLog object using the method SBMLDocument.getErrorLog(). + The SBMLErrorLog object provides some alternative methods for + interacting with the set of errors and warnings. In either case, + applications typically should first call SBMLDocument.getNumErrors() to + find out if any issues have been logged after specific libSBML + operations such as the ones discussed in the sections above. If they + have, then an application will should proceed to inspect the individual + reports using either the direct interfaces on SBMLDocument or using the + methods on the SBMLErrorLog object. + + @if clike An example of using the error facility is + provided in this manual in the + section @ref libsbml-example. @endif@~ +"; + + +%feature("docstring") SBMLDocument::getDefaultLevel " + The default SBML Level of new SBMLDocument objects. + + This \'default Level\' corresponds to the most recent SBML specification + Level available at the time libSBML version @htmlinclude libsbml-version.html + was released. For this copy of libSBML, the value is <code>3</code>. + The default Level is used by SBMLDocument if no Level is explicitly + specified at the time of the construction of an SBMLDocument instance. + + @return an integer indicating the most recent SBML specification Level + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLDocument), and the + other will be a standalone top-level function with the name + SBMLDocument_getDefaultLevel(). They are functionally + identical. @endif@~ + + @see @if clike getDefaultVersion() @else SBMLDocument.getDefaultVersion() @endif@~ +"; + + +%feature("docstring") SBMLDocument::getDefaultVersion " + The default Version of new SBMLDocument objects. + + This \'default Version\' corresponds to the most recent Version + within the most recent Level of SBML available at the time libSBML + version @htmlinclude libsbml-version.html + was released. For this copy of libSBML, the value is <code>1</code> + (where the default Level of SBML is <code>3</code>). The default + Version is used by SBMLDocument if no Version is explicitly specified + at the time of the construction of an SBMLDocument instance. + + @return an integer indicating the most recent SBML specification + Version + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLDocument), and the + other will be a standalone top-level function with the name + SBMLDocument_getDefaultVersion(). They are functionally + identical. @endif@~ + + @see @if clike getDefaultLevel() @else SBMLDocument.getDefaultLevel() @endif@~ +"; + + +%feature("docstring") SBMLDocument::SBMLDocument " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLDocument(SBMLNamespaces sbmlns)</pre> + + Creates a new SBMLDocument using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLDocument(long level = 0, long version = 0)</pre> + + Creates a new SBMLDocument, optionally with given values for the SBML + Level and Version. + + If <em>both</em> the SBML Level and Version attributes are not + specified, the SBML document is treated as having the latest Level and + Version of SBML as determined by SBMLDocument.getDefaultLevel() and + SBMLDocument.getDefaultVersion(); <em>however</em>, the SBMLDocument + object is otherwise left blank. In particular, the blank SBMLDocument + object has no associated XML attributes, including (but not limited + to) an XML namespace declaration. The XML namespace declaration is + not added until the model is written out, <em>or</em> the method + SBMLDocument.setLevelAndVersion() + is called. This may be important to keep in mind + if an application needs to add additional XML namespace declarations + on the <code><sbml></code> element. Application writers should + either provide values for @p level and @p version on the call to this + constructor, or else call + SBMLDocument.setLevelAndVersion() + shortly after creating the SBMLDocument object. + + @param level an integer for the SBML Level + + @param version an integer for the Version within the SBML Level + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + @see SBMLDocument.setLevelAndVersion() + @see getDefaultLevel() + @see getDefaultVersion() + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLDocument(SBMLDocument orig)</pre> + + Copy constructor; creates a copy of this SBMLDocument. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") SBMLDocument::accept " + Accepts the given SBMLVisitor for this instance of SBMLDocument. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") SBMLDocument::clone " + Creates and returns a deep copy of this SBMLDocument. + + @return a (deep) copy of this SBMLDocument. +"; + + +%feature("docstring") SBMLDocument::getModel " + Returns the Model object stored in this SBMLDocument. + + It is important to note that this method <em>does not create</em> a + Model instance. The model in the SBMLDocument must have been created + at some prior time, for example using SBMLDocument.createModel() + or SBMLDocument.setModel(). + This method returns @c None if a model does not yet exist. + + @return the Model contained in this SBMLDocument. + + @see createModel() +"; + + +%feature("docstring") SBMLDocument::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") SBMLDocument::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or itself if it has the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") SBMLDocument::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") SBMLDocument::expandFunctionDefinitions " + Removes FunctionDefinition constructs from the document and expands + any instances of their use within <code><math></code> elements. + + For example, suppose a Model contains a FunctionDefinition with + identifier @c \'f\' representing the math expression: <em>f(x, y) = x * + y</em>. Suppose further that there is a reaction in which the + <code><math></code> element of the KineticLaw object contains + <code>f(s, p)</code>, where @c s and @c p are other identifiers + defined in the model. The outcome of invoking this method is that the + <code><math></code> of the KineticLaw now represents the + expression <em>s * p</em> and the model no longer contains any + FunctionDefinition objects. + + @return bool @c True if the transformation was successful, + @c False, otherwise. + + @note This function will check the consistency of a model before + attemptimg the transformation. If the model is not valid SBML, the + transformation will not be performed and the function will return @c + false. +"; + + +%feature("docstring") SBMLDocument::expandInitialAssignments " + Removes InitialAssignment constructs from the document and + replaces them with appropriate values. + + For example, suppose a Model contains a InitialAssignment to a symbol + @c \'k\' where @c \'k\' is the identifier of a Parameter. The outcome of + invoking this method is that the \'value\' attribute of the Parameter + definition is set to the result calculated using the InitialAssignment + object\'s <code><math></code> formula, and the corresponding + InitialAssignment is then removed from the Model. + + @return bool @c True if the transformation was successful, + @c False, otherwise. + + @note This function will check the consistency of a model before + attemptimg the transformation. If the model is not valid SBML, the + transformation will not be performed and the function will return @c + false. As part of that process, this method will check that it has + values for any components referred to by the <code><math></code> + elements of InitialAssignment objects. In cases where not all of the + values have been declared (e.g., if the mathematical expression refers + to model entities that have no declared values), the InitialAssignment + in question will @em not be removed and this method will return @c + false. +"; + + +%feature("docstring") SBMLDocument::setLevelAndVersion " + Sets the SBML Level and Version of this SBMLDocument instance, + attempting to convert the model as needed. + + This method is the principal way in libSBML to convert models between + Levels and Versions of SBML. Generally, models can be converted + upward without difficulty (e.g., from SBML Level 1 to + Level 2, or from an earlier Version of Level 2 to the latest + Version of Level 2). Sometimes models can be translated downward + as well, if they do not use constructs specific to more advanced + Levels of SBML. + + Before calling this method, callers may check compatibility directly + using the methods SBMLDocument.checkL1Compatibility(), + SBMLDocument.checkL2v1Compatibility(), + SBMLDocument.checkL2v2Compatibility(), + SBMLDocument.checkL2v3Compatibility(), + SBMLDocument.checkL2v4Compatibility(), and + SBMLDocument.checkL3v1Compatibility(). + + The valid combinations of SBML Level and Version as of this release + of libSBML are the following: + <ul> + <li> Level 1 Version 2 + <li> Level 2 Version 1 + <li> Level 2 Version 2 + <li> Level 2 Version 3 + <li> Level 2 Version 4 + <li> Level 3 Version 1 + </ul> + + Strict conversion applies the additional criteria that both the + source and the target model must be consistent SBML. Users can + control the consistency checks that are applied using the + SBMLDocument.setConsistencyChecksForConversion() method. If either + the source or the potential target model have validation errors, the + conversion is not performed. When a strict conversion is successful, + the underlying SBML object model is altered to reflect the new level + and version. Thus, information that cannot be converted + (e.g. sboTerms) will be lost. + + @param level the desired SBML Level + + @param version the desired Version within the SBML Level + + @param strict boolean indicating whether to check consistency + of both the source and target model when performing + conversion (defaults to <code> true </code>) + + @return @c True if the level and version of the document were + successfully set to the requested values (which may have required + conversion of the model), @c False otherwise. + + @note Calling this method will not @em necessarily lead to a successful + conversion. If the conversion fails, it will be logged in the error + list associated with this SBMLDocument. Callers should consult + getNumErrors() to find out if the conversion succeeded without + problems. For conversions from Level 2 to Level 1, callers + can also check the Level of the model after calling this method to + find out whether it is Level 1. (If the conversion to + Level 1 failed, the Level of this model will be left unchanged.) + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + @see checkL1Compatibility() + @see checkL2v1Compatibility() + @see checkL2v2Compatibility() + @see checkL2v3Compatibility() + @see checkL2v4Compatibility() + @see checkL3v1Compatibility() + @see checkL3v1Compatibility() +"; + + +%feature("docstring") SBMLDocument::updateSBMLNamespace " + @internal + @param package + @param level + @param version +"; + + +%feature("docstring") SBMLDocument::setModel " + Sets the Model for this SBMLDocument to a copy of the given Model. + + @param m the new Model to use. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + + @see createModel() + @see getModel() +"; + + +%feature("docstring") SBMLDocument::createModel " + Creates a new Model inside this SBMLDocument, and returns a pointer to + it. + + In SBML Level 2, the use of an identifier on a Model object is + optional. This method takes an optional argument, @p sid, for setting + the identifier. If not supplied, the identifier attribute on the + Model instance is not set. + + @param sid the identifier of the new Model to create. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + @see getModel() + @see SBMLDocument.setModel() +"; + + +%feature("docstring") SBMLDocument::setLocationURI " + Sets the location of this SBMLDocument. Called automatically when + readSBMLFromFile is used, but may be set manually as well. +"; + + +%feature("docstring") SBMLDocument::getLocationURI " + Get the location of this SBMLDocument. If this document was + read from a file or had its location set manually, that filename + or set location will be returned, otherwise, an empty string is returned. +"; + + +%feature("docstring") SBMLDocument::setConsistencyChecks " + Controls the consistency checks that are performed when + SBMLDocument.checkConsistency() is called. + + This method works by adding or subtracting consistency checks from the + set of all possible checks that SBMLDocument.checkConsistency() knows + how to perform. This method may need to be called multiple times in + order to achieve the desired combination of checks. The first + argument (@p category) in a call to this method indicates the category + of consistency/error checks that are to be turned on or off, and the + second argument (@p apply, a boolean) indicates whether to turn it on + (value of @c True) or off (value of @c False). + + @if clike + The possible categories (values to the argument @p category) are the + set of values from the enumeration #SBMLErrorCategory_t. + The following are the possible choices: + @endif@if java + The possible categories (values to the argument @p category) are the + set of constants whose names begin with the characters <code>LIBSBML_CAT_</code> + in the interface class {@link libsbmlConstants}. + The following are the possible choices: + @endif@if python + The possible categories (values to the argument @p category) are the + set of constants whose names begin with the characters <code>LIBSBML_CAT_</code> + in the interface class @link libsbml libsbml@endlink. + The following are the possible choices: + @endif@~ + <ul> + <li> @link libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY + LIBSBML_CAT_GENERAL_CONSISTENCY@endlink: Correctness and consistency + of specific SBML language constructs. Performing this set of checks + is highly recommended. With respect to the SBML specification, these + concern failures in applying the validation rules numbered 2xxxx in + the Level 2 Versions 2–4 and Level 3 Version 1 + specifications. + + <li> @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY + LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink: Correctness and + consistency of identifiers used for model entities. An example of + inconsistency would be using a species identifier in a reaction rate + formula without first having declared the species. With respect to + the SBML specification, these concern failures in applying the + validation rules numbered 103xx in the Level 2 Versions 2–4 + and Level 3 Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_UNITS_CONSISTENCY + LIBSBML_CAT_UNITS_CONSISTENCY@endlink: Consistency of measurement + units associated with quantities in a model. With respect to the SBML + specification, these concern failures in applying the validation rules + numbered 105xx in the Level 2 Versions 2–4 and Level 3 + Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY + LIBSBML_CAT_MATHML_CONSISTENCY@endlink: Syntax of MathML constructs. + With respect to the SBML specification, these concern failures in + applying the validation rules numbered 102xx in the Level 2 + Versions 2–4 and Level 3 Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_SBO_CONSISTENCY + LIBSBML_CAT_SBO_CONSISTENCY@endlink: Consistency and validity of %SBO + identifiers (if any) used in the model. With respect to the SBML + specification, these concern failures in applying the validation rules + numbered 107xx in the Level 2 Versions 2–4 and Level 3 + Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL + LIBSBML_CAT_OVERDETERMINED_MODEL@endlink: Static analysis of whether + the system of equations implied by a model is mathematically + overdetermined. With respect to the SBML specification, this is + validation rule #10601 in the Level 2 Versions 2–4 and + Level 3 Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_MODELING_PRACTICE + LIBSBML_CAT_MODELING_PRACTICE@endlink: Additional checks for + recommended good modeling practice. (These are tests performed by + libSBML and do not have equivalent SBML validation rules.) + </ul> + + <em>By default, all validation checks are applied</em> to the model in + an SBMLDocument object @em unless + SBMLDocument.setConsistencyChecks() + is called to indicate that only a subset should be applied. Further, + this default (i.e., performing all checks) applies separately to + <em>each new SBMLDocument object</em> created. In other words, each + time a model is read using SBMLReader.readSBML(), + SBMLReader.readSBMLFromString(), + or the global functions readSBML() and readSBMLFromString(), a new + SBMLDocument is created and for that document, a call to + SBMLDocument.checkConsistency() will default to applying all possible checks. + Calling programs must invoke + SBMLDocument.setConsistencyChecks() + for each such new model if they wish to change the consistency checks + applied. + + @param category a value drawn from @if clike #SBMLErrorCategory_t@else + the set of SBML error categories@endif@~ indicating the + consistency checking/validation to be turned on or off. + + @param apply a boolean indicating whether the checks indicated by + @p category should be applied or not. + + @see SBMLDocument.checkConsistency() +"; + + +%feature("docstring") SBMLDocument::setConsistencyChecksForConversion " + Controls the consistency checks that are performed when + SBMLDocument.setLevelAndVersion() is called. + + This method works by adding or subtracting consistency checks from the + set of all possible checks that may be performed to avoid conversion + to or from an invalid document. This method may need to be called + multiple times in + order to achieve the desired combination of checks. The first + argument (@p category) in a call to this method indicates the category + of consistency/error checks that are to be turned on or off, and the + second argument (@p apply, a boolean) indicates whether to turn it on + (value of @c True) or off (value of @c False). + + @if clike + The possible categories (values to the argument @p category) are the + set of values from the enumeration #SBMLErrorCategory_t. + The following are the possible choices: + @endif@if java + The possible categories (values to the argument @p category) are the + set of constants whose names begin with the characters <code>LIBSBML_CAT_</code> + in the interface class {@link libsbmlConstants}. + The following are the possible choices: + @endif@if python + The possible categories (values to the argument @p category) are the + set of constants whose names begin with the characters <code>LIBSBML_CAT_</code> + in the interface class @link libsbml libsbml@endlink. + The following are the possible choices: + @endif@~ + <ul> + <li> @link libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY + LIBSBML_CAT_GENERAL_CONSISTENCY@endlink: Correctness and consistency + of specific SBML language constructs. Performing this set of checks + is highly recommended. With respect to the SBML specification, these + concern failures in applying the validation rules numbered 2xxxx in + the Level 2 Versions 2–4 and Level 3 Version 1 + specifications. + + <li> @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY + LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink: Correctness and + consistency of identifiers used for model entities. An example of + inconsistency would be using a species identifier in a reaction rate + formula without first having declared the species. With respect to + the SBML specification, these concern failures in applying the + validation rules numbered 103xx in the Level 2 Versions 2–4 + and Level 3 Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_UNITS_CONSISTENCY + LIBSBML_CAT_UNITS_CONSISTENCY@endlink: Consistency of measurement + units associated with quantities in a model. With respect to the SBML + specification, these concern failures in applying the validation rules + numbered 105xx in the Level 2 Versions 2–4 and Level 3 + Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY + LIBSBML_CAT_MATHML_CONSISTENCY@endlink: Syntax of MathML constructs. + With respect to the SBML specification, these concern failures in + applying the validation rules numbered 102xx in the Level 2 + Versions 2–4 and Level 3 Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_SBO_CONSISTENCY + LIBSBML_CAT_SBO_CONSISTENCY@endlink: Consistency and validity of %SBO + identifiers (if any) used in the model. With respect to the SBML + specification, these concern failures in applying the validation rules + numbered 107xx in the Level 2 Versions 2–4 and Level 3 + Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL + LIBSBML_CAT_OVERDETERMINED_MODEL@endlink: Static analysis of whether + the system of equations implied by a model is mathematically + overdetermined. With respect to the SBML specification, this is + validation rule #10601 in the Level 2 Versions 2–4 and + Level 3 Version 1 specifications. + + <li> @link libsbml.LIBSBML_CAT_MODELING_PRACTICE + LIBSBML_CAT_MODELING_PRACTICE@endlink: Additional checks for + recommended good modeling practice. (These are tests performed by + libSBML and do not have equivalent SBML validation rules.) + </ul> + + <em>By default, all validation checks are applied</em> to the model in + an SBMLDocument object @em unless + SBMLDocument.setConsistencyChecks() + is called to indicate that only a subset should be applied. Further, + this default (i.e., performing all checks) applies separately to + <em>each new SBMLDocument object</em> created. In other words, each + time a model is read using SBMLReader.readSBML(), + SBMLReader.readSBMLFromString(), + or the global functions readSBML() and readSBMLFromString(), a new + SBMLDocument is created and for that document, a call to + SBMLDocument.checkConsistency() will default to applying all possible checks. + Calling programs must invoke + SBMLDocument.setConsistencyChecks() + for each such new model if they wish to change the consistency checks + applied. + + @param category a value drawn from @if clike #SBMLErrorCategory_t@else + the set of SBML error categories@endif@~ indicating the consistency + checking/validation to be turned on or off. + + @param apply a boolean indicating whether the checks indicated by + @p category should be applied or not. + + @see SBMLDocument.setLevelAndVersion() +"; + + +%feature("docstring") SBMLDocument::checkConsistency " + Performs consistency checking and validation on this SBML document. + + If this method returns a nonzero value (meaning, one or more + consistency checks have failed for SBML document), the failures may be + due to warnings @em or errors. Callers should inspect the severity + flag in the individual SBMLError objects returned by + SBMLDocument.getError() to determine the nature of the failures. + + @return the number of failed checks (errors) encountered. + + @see SBMLDocument.checkInternalConsistency() +"; + + +%feature("docstring") SBMLDocument::validateSBML " + Performs consistency checking and validation on this SBML document. + + If this method returns a nonzero value (meaning, one or more + consistency checks have failed for SBML document), the failures may be + due to warnings @em or errors. Callers should inspect the severity + flag in the individual SBMLError objects returned by + SBMLDocument.getError() to determine the nature of the failures. + + @note unlike checkConsistency this method will write the document + in order to determine all errors for the document. This will + also clear the error log. + + @return the number of failed checks (errors) encountered. + + @see SBMLDocument.checkConsistency() +"; + + +%feature("docstring") SBMLDocument::checkInternalConsistency " + Performs consistency checking on libSBML\'s internal representation of + an SBML Model. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. + + The distinction between this method and + SBMLDocument.checkConsistency() is that this method reports on + fundamental syntactic and structural errors that violate the XML + Schema for SBML; by contrast, SBMLDocument.checkConsistency() + performs more elaborate model verifications and also validation + according to the validation rules written in the appendices of the + SBML Level 2 Versions 2–4 specification documents. + + @see SBMLDocument.checkConsistency() +"; + + +%feature("docstring") SBMLDocument::checkL1Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 1 and can be converted + to Level 1. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v1Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 1 and can + be converted to Level 2 Version 1. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v2Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 2 and can + be converted to Level 2 Version 2. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v3Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 3 and can + be converted to Level 2 Version 3. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v4Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 4 and can + be converted to Level 2 Version 4. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL3v1Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 3 Version 1 and can + be converted to Level 3 Version 1. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + @return the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::getError " + Returns the nth error or warning encountered during parsing, + consistency checking, or attempted translation of this model. + + Callers can use method XMLError.getSeverity() on the result to assess + the severity of the problem. The possible severity levels range from + informational messages to fatal errors. + + @return the error or warning indexed by integer @p n, or return @c + None if <code>n > (getNumErrors() - 1)</code>. + + @param n the integer index of the error sought. + + @see SBMLDocument.getNumErrors() +"; + + +%feature("docstring") SBMLDocument::getNumErrors " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getNumErrors(long severity)</pre> + + Returns the number of errors or warnings encountered with the given + severity during parsing, + consistency checking, or attempted translation of this model. + + @param severity the severity of the error sought. + + @return the number of errors or warnings encountered + + @see SBMLDocument.getError() + + + <hr> + Method variant with the following signature: + <pre class='signature'>getNumErrors()</pre> + + Returns the number of errors or warnings encountered during parsing, + consistency checking, or attempted translation of this model. + + @return the number of errors or warnings encountered + + @see SBMLDocument.getError() +"; + + +%feature("docstring") SBMLDocument::printErrors " + Prints all the errors or warnings encountered trying to parse, + check, or translate this SBML document. + + It prints the text to the stream given by the optional parameter @p + stream. If no parameter is given, it prints the output to the + standard error stream. + + If no errors have occurred, i.e., <code>getNumErrors() == 0</code>, no + output will be sent to the stream. + + The format of the output is: + @verbatim + N error(s): + line NNN: (id) message + @endverbatim + + @param stream the ostream or ostringstream object indicating where + the output should be printed. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + @see getNumErrors() + @see getErrorLog() + @see SBMLDocument.getError() +"; + + +%feature("docstring") SBMLDocument::setSBMLDocument " + @internal + No-op; it is provided for consistency with the method available on + other libSBML object classes but has no effect on SBMLDocument. +"; + + +%feature("docstring") SBMLDocument::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") SBMLDocument::convert " + @internal + Converts this document using the converter that best matches + the given conversion properties. + + @param props the conversion properties to use + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_CONV_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_CONVERSION_NOT_AVAILABLE @endlink +"; + + +%feature("docstring") SBMLDocument::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") SBMLDocument::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see SBMLDocument.getElementName() +"; + + +%feature("docstring") SBMLDocument::getElementName " + Returns the XML element name of this object, which for SBMLDocument, + is always @c \'sbml\'. + + @return the name of this element, i.e., @c \'sbml\'. +"; + + +%feature("docstring") SBMLDocument::getErrorLog " + Returns the list of errors or warnings logged during parsing, + consistency checking, or attempted translation of this model. + + @return the SBMLErrorLog used for this SBMLDocument + + @see SBMLDocument.getNumErrors() +"; + + +%feature("docstring") SBMLDocument::getNamespaces " + Returns a list of XML Namespaces associated with the XML content + of this SBML document. + + @return the XML Namespaces associated with this SBML object +"; + + +%feature("docstring") SBMLDocument::enableDefaultNS " + Set/unset default namespace to each top-level element defined in the + given package extension. + + This works by adding a <code>xmlns="..."</code> attribute. No + prefix will be written when writing elements defined in the given + package extension if @c True is given as second argument. + + @param package the name or URI of the package extension. + @param flag boolean value to indicate whether to write a namespace + prefix. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION @endlink +"; + + +%feature("docstring") SBMLDocument::isEnabledDefaultNS " + Returns @c True if a default namespace is added to each top-level + element defined in the given package extension, otherwise returns + @c False. + + This basically checks if the attribute + <code>xmlns="..."</code> is present. + + @param package the name or URI of the package extension. + + @return a boolean +"; + + +%feature("docstring") SBMLDocument::setPackageRequired " + Sets the <code>required</code> attribute value of the given package + extension. + + @note The name of package must not be given if the package is not + enabled. + + @param package the name or URI of the package extension. + @param flag Boolean value indicating whether the package is required. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION @endlink +"; + + +%feature("docstring") SBMLDocument::getPackageRequired " + Returns the <code>required</code> attribute of the given package + extension. + + @note The name of package must not be given if the package is not + enabled. + + @param package the name or URI of the package extension. + + @return Boolean flag indicating whether the package is flagged as + being required. +"; + + +%feature("docstring") SBMLDocument::isSetPackageRequired " + Returns @c True if the required attribute of the given package extension + is defined, otherwise returns @c False. + + @note The name of package must not be given if the package is not + enabled. + + @param package the name or URI of the package extension. + + @return a Boolean +"; + + +%feature("docstring") SBMLDocument::isIgnoredPackage " + Returns @c True if the given package extension is one of an ignored + packages, otherwise returns @c False. + + An ignored package is one that is defined to be used in this SBML + document, but the package is not enabled in this copy of libSBML. + + @param pkgURI the URI of the package extension. + + @return a Boolean, @c True if the package is being ignored and + @c False otherwise. +"; + + +%feature("docstring") SBMLDocument::setPkgRequired " + Sets the value of the <code>required</code> attribute for the given + package. + + @note The name of package must not be given if the package is not + enabled. + + @param package the name or URI of the package extension. + @param flag a Boolean value. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION @endlink + + @deprecated Replaced in libSBML 5.2.0 by + setPackageRequired(@if java String package, boolean flag@endif) +"; + + +%feature("docstring") SBMLDocument::getPkgRequired " + Returns the <code>required</code> attribute of the given package + extension. + + @note The name of package must not be given if the package is not + enabled. + + @param package the name or URI of the package extension. + + @return a Boolean value indicating whether the package is flagged as + being required in this SBML document. + + @deprecated Replaced in libSBML 5.2.0 by + getPackageRequired(@if java String package flag@endif) +"; + + +%feature("docstring") SBMLDocument::isSetPkgRequired " + Returns @c True if the required attribute of the given package extension + is defined, otherwise returns @c False. + + @note The name of package must not be given if the package is not + enabled. + + @param package the name or URI of the package extension. + + @return a Boolean value. + + @deprecated Replaced in libSBML 5.2.0 by + isSetPackageRequired(@if java String package flag@endif) +"; + + +%feature("docstring") SBMLDocument::isIgnoredPkg " + Returns @c True if the given package extension is one of ignored + packages, otherwise returns @c False. + + An ignored package is one that is defined to be used in this SBML + document, but the package is not enabled in this copy of libSBML. + + @param pkgURI the URI of the package extension. + + @return a boolean + + @deprecated Replaced in libSBML 5.2.0 by + isIgnoredPackage(@if java String pkgURI flag@endif) +"; + + +%feature("docstring") SBMLDocument::getElementPosition " + @internal + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") SBMLDocument::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") SBMLDocument::getApplicableValidators " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::getConversionValidators " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::setApplicableValidators " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::setConversionValidators " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::getNumValidators " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::clearValidators " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::addValidator " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::getValidator " + @internal + Validation system. +"; + + +%feature("docstring") SBMLDocument::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") SBMLDocument::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") SBMLDocument::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SBMLDocument::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SBMLDocument::writeXMLNS " + @internal + + Subclasses should override this method to write their xmlns attriubutes + (if any) to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") FunctionDefinition " + @ingroup Core + Implementation of %SBML\'s %FunctionDefinition construct. + + The FunctionDefinition structure associates an identifier with a + function definition. This identifier can then be used as the function + called in subsequent MathML content elsewhere in an SBML model. + + FunctionDefinition has one required attribute, \'id\', to give the + function a unique identifier by which other parts of an SBML model + definition can refer to it. A FunctionDefinition instance can also have + an optional \'name\' attribute of type @c string. Identifiers and names + must be used according to the guidelines described in the %SBML + specification (e.g., Section 3.3 in the Level 2 Version 4 + specification). + + FunctionDefinition has a required \'math\' subelement containing a MathML + expression defining the function body. The content of this element can + only be a MathML \'lambda\' element. The \'lambda\' element must begin with + zero or more \'bvar\' elements, followed by any other of the elements in + the MathML subset allowed in SBML Level 2 @em except \'lambda\' (i.e., a + \'lambda\' element cannot contain another \'lambda\' element). This is the + only place in SBML where a \'lambda\' element can be used. The function + defined by a FunctionDefinition is only available for use in other + MathML elements that @em follow the FunctionDefinition definition in the + model. (These restrictions prevent recursive and mutually-recursive + functions from being expressed.) + + A further restriction on the content of \'math\' is that it cannot contain + references to variables other than the variables declared to the + \'lambda\' itself. That is, the contents of MathML \'ci\' elements inside + the body of the \'lambda\' can only be the variables declared by its + \'bvar\' elements, or the identifiers of other FunctionDefinition + instances in the model. This means must be written so that all + variables or parameters used in the MathML content are passed to them + via their function parameters. In SBML Level 2, this restriction + applies also to the MathML @c csymbol elements for @em time and @em + delay; in SBML Level 3, it additionally applies to the @c csymbol + element for @em avogadro. + + @note Function definitions (also informally known as user-defined + functions) were introduced in SBML Level 2. They have purposefully + limited capabilities. A function cannot reference parameters or other + model quantities outside of itself; values must be passed as parameters + to the function. Moreover, recursive and mutually-recursive functions + are not permitted. The purpose of these limitations is to balance power + against complexity of implementation. With the restrictions as they + are, function definitions could be implemented as textual + substitutions—they are simply macros. Software implementations + therefore do not need the full function-definition machinery typically + associated with programming languages. + <br><br> + Another important point to note is FunctionDefinition does not + have a separate attribute for defining the units of the value returned + by the function. The units associated with the function\'s return value, + when the function is called from within MathML expressions elsewhere in + SBML, are simply the overall units of the expression in + FunctionDefinition\'s \'math\' subelement when applied to the arguments + supplied in the call to the function. Ascertaining these units requires + performing dimensional analysis on the expression. (Readers may wonder + why there is no attribute. The reason is that having a separate + attribute for declaring the units would not only be redundant, but also + lead to the potential for having conflicting information. In the case + of a conflict between the declared units and those of the value actually + returned by the function, the only logical resolution rule would be to + assume that the correct units are those of the expression anyway.) + + <!---------------------------------------------------------------------- --> +"; + + +%feature("docstring") ListOfFunctionDefinitions " + @ingroup Core + Implementation of SBML\'s %ListOfFunctionDefinitions construct. + + The various ListOf___ classes in %SBML are merely containers used for + organizing the main components of an %SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an %SBML model is + illustrated by the following (for %SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") FunctionDefinition::FunctionDefinition " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>FunctionDefinition(SBMLNamespaces sbmlns)</pre> + + Creates a new FunctionDefinition using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a FunctionDefinition object to an + SBMLDocument (e.g., using Model.addFunctionDefinition()), the SBML + XML namespace of the document @em overrides the value used when + creating the FunctionDefinition object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a FunctionDefinition is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>FunctionDefinition(long level, long version)</pre> + + Creates a new FunctionDefinition using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this FunctionDefinition + + @param version a long integer, the SBML Version to assign to this + FunctionDefinition + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a FunctionDefinition object to an + SBMLDocument (e.g., using Model.addFunctionDefinition()), the SBML + Level, SBML Version and XML namespace of the document @em + override the values used when creating the FunctionDefinition object + via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a FunctionDefinition is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>FunctionDefinition(FunctionDefinition orig)</pre> + + Copy constructor; creates a copy of this FunctionDefinition. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") FunctionDefinition::accept " + Accepts the given SBMLVisitor for this instance of FunctionDefinition. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next FunctionDefinition in + the list of function definitions. +"; + + +%feature("docstring") FunctionDefinition::clone " + Creates and returns a deep copy of this FunctionDefinition. + + @return a (deep) copy of this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getId " + Returns the value of the \'id\' attribute of this FunctionDefinition. + + @return the id of this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getName " + Returns the value of the \'name\' attribute of this FunctionDefinition. + + @return the name of this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getMath " + Get the mathematical formula of this FunctionDefinition. + + @return an ASTNode, the value of the \'math\' subelement of this + FunctionDefinition +"; + + +%feature("docstring") FunctionDefinition::isSetId " + Predicate returning @c True if this + FunctionDefinition\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this FunctionDefinition is + set, @c False otherwise. +"; + + +%feature("docstring") FunctionDefinition::isSetName " + Predicate returning @c True if this + FunctionDefinition\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this FunctionDefinition is + set, @c False otherwise. +"; + + +%feature("docstring") FunctionDefinition::isSetMath " + Predicate returning @c True if this + FunctionDefinition\'s \'math\' subelement contains a value. + + @return @c True if the \'math\' for this FunctionDefinition is set, + @c False otherwise. +"; + + +%feature("docstring") FunctionDefinition::setId " + Sets the value of the \'id\' attribute of this FunctionDefinition. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this FunctionDefinition + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") FunctionDefinition::setName " + Sets the value of the \'name\' attribute of this FunctionDefinition. + + The string in @p name is copied. + + @param name the new name for the FunctionDefinition + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") FunctionDefinition::setMath " + Sets the \'math\' subelement of this FunctionDefinition to the Abstract + Syntax Tree given in @p math. + + @param math an AST containing the mathematical expression to + be used as the formula for this FunctionDefinition. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") FunctionDefinition::unsetName " + Unsets the value of the \'name\' attribute of this FunctionDefinition. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") FunctionDefinition::getArgument " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getArgument(long n)</pre> + + Get the <code>n</code>th argument to this function. + + Callers should first find out the number of arguments to the function + by calling getNumArguments(). + + @param n an integer index for the argument sought. + + @return the nth argument (bound variable) passed to this + FunctionDefinition. + + @see getNumArguments() + + + <hr> + Method variant with the following signature: + <pre class='signature'>getArgument(string name)</pre> + + Get the argument named @p name to this FunctionDefinition. + + @param name the exact name (case-sensitive) of the sought-after + argument + + @return the argument (bound variable) having the given name, or @c None if + no such argument exists. +"; + + +%feature("docstring") FunctionDefinition::getBody " + Get the mathematical expression that is the body of this + FunctionDefinition object. + + @return the body of this FunctionDefinition as an Abstract Syntax + Tree, or @c None if no body is defined. +"; + + +%feature("docstring") FunctionDefinition::isSetBody " + Predicate returning @c True if the body of this + FunctionDefinition has set. + + @return @c True if the body of this FunctionDefinition is + set, @c False otherwise. +"; + + +%feature("docstring") FunctionDefinition::getNumArguments " + Get the number of arguments (bound variables) taken by this + FunctionDefinition. + + @return the number of arguments (bound variables) that must be passed + to this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") FunctionDefinition::getElementName " + Returns the XML element name of this object, which for + FunctionDefinition, is always @c \'functionDefinition\'. + + @return the name of this element, i.e., @c \'functionDefinition\'. +"; + + +%feature("docstring") FunctionDefinition::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") FunctionDefinition::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this FunctionDefinition object + have been set. + + @note The required attributes for a FunctionDefinition object are: + @li \'id\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") FunctionDefinition::hasRequiredElements " + Predicate returning @c True if + all the required elements for this FunctionDefinition object + have been set. + + @note The required elements for a FunctionDefinition object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") FunctionDefinition::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") FunctionDefinition::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") FunctionDefinition::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") FunctionDefinition::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") FunctionDefinition::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") FunctionDefinition::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") FunctionDefinition::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfFunctionDefinitions::ListOfFunctionDefinitions " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfFunctionDefinitions(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfFunctionDefinitions object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfFunctionDefinitions object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfFunctionDefinitions(long level, long version)</pre> + + Creates a new ListOfFunctionDefinitions object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfFunctionDefinitions::clone " + Creates and returns a deep copy of this ListOfFunctionDefinitions instance. + + @return a (deep) copy of this ListOfFunctionDefinitions. +"; + + +%feature("docstring") ListOfFunctionDefinitions::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfFunctionDefinitions::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., FunctionDefinition objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfFunctionDefinitions::getElementName " + Returns the XML element name of this object. + + For ListOfFunctionDefinitions, the XML element name is @c + \'listOfFunctionDefinitions\'. + + @return the name of this element, i.e., @c \'listOfFunctionDefinitions\'. +"; + + +%feature("docstring") ListOfFunctionDefinitions::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a FunctionDefinition from the ListOfFunctionDefinitions. + + @param n the index number of the FunctionDefinition to get. + + @return the nth FunctionDefinition in this ListOfFunctionDefinitions. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a FunctionDefinition from the ListOfFunctionDefinitions + based on its identifier. + + @param sid a string representing the identifier + of the FunctionDefinition to get. + + @return FunctionDefinition in this ListOfFunctionDefinitions + with the given @p sid or @c None if no such + FunctionDefinition exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfFunctionDefinitions::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfFunctionDefinitions items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfFunctionDefinitions items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfFunctionDefinitions::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of %SBML is generally fixed + for most components in %SBML. So, for example, the + ListOfFunctionDefinitions in a model is (in %SBML Level 2 Version 4) + the first ListOf___. (However, it differs for different Levels and + Versions of SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfFunctionDefinitions::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") UnitKind_equals " + Tests for logical equality between two given <code>UNIT_KIND_</code> + code values. + + This function behaves exactly like C\'s <code>==</code> operator, except + for the following two cases: + <ul> + <li>@link libsbml.UNIT_KIND_LITER UNIT_KIND_LITER@endlink <code>==</code> @link libsbml.UNIT_KIND_LITRE UNIT_KIND_LITRE@endlink + <li>@link libsbml.UNIT_KIND_METER UNIT_KIND_METER@endlink <code>==</code> @link libsbml.UNIT_KIND_METRE UNIT_KIND_METRE@endlink + </ul> + + In the two cases above, C equality comparison would yield @c False + (because each of the above is a distinct enumeration value), but + this function returns @c True. + + @param uk1 a <code>UNIT_KIND_</code> value + @param uk2 a second <code>UNIT_KIND_</code> value to compare to @p uk1 + + @return nonzero (for @c True) if @p uk1 is logically equivalent to @p + uk2, zero (for @c False) otherwise. + + @note For more information about the libSBML unit codes, please refer to + the class documentation for Unit. +"; + + +%feature("docstring") UnitKind_forName " + Converts a text string naming a kind of unit to its corresponding + libSBML <code>UNIT_KIND_</code> constant/enumeration value. + + @param name a string, the name of a predefined base unit in SBML + + @return @if clike a value from UnitKind_t corresponding to the given + string @p name (determined in a case-insensitive manner). + @endif@if python a value the set of <code>UNIT_KIND_</code> codes + defined in class @link libsbml libsbml@endlink, corresponding to the + string @p name (determined in a case-insensitive + manner).@endif@if java a value the set of <code>UNIT_KIND_</code> codes + defined in class {@link libsbmlConstants}, corresponding to the string + @p name (determined in a case-insensitive manner).@endif@~ + + @note For more information about the libSBML unit codes, please refer to + the class documentation for Unit. +"; + + +%feature("docstring") UnitKind_toString " + Converts a unit code to a text string equivalent. + + @param uk @if clike a value from the UnitKind_t enumeration + @endif@if python a value from the set of <code>UNIT_KIND_</code> codes + defined in the class @link libsbml libsbml@endlink + @endif@if java a value from the set of <code>UNIT_KIND_</code> codes + defined in the class {@link libsbmlConstants} + @endif@~ + + @return the name corresponding to the given unit code. + + @note For more information about the libSBML unit codes, please refer to + the class documentation for Unit. + + @warning The string returned is a static data value. The caller does not + own the returned string and is therefore not allowed to modify it. +"; + + +%feature("docstring") UnitKind_isValidUnitKindString " + Predicate for testing whether a given string corresponds to a + predefined libSBML unit code. + + @param str a text string naming a base unit defined by SBML + @param level the Level of SBML + @param version the Version within the Level of SBML + + @return nonzero (for @c True) if string is the name of a valid + <code>UNIT_KIND_</code> value, zero (for @c False) otherwise. + + @note For more information about the libSBML unit codes, please refer to + the class documentation for Unit. +"; + + +%feature("docstring") Unit " + @ingroup Core + Implementation of SBML\'s %Unit construct. + + The SBML unit definition facility uses two classes of objects, + UnitDefinition and Unit. The approach to defining units in %SBML is + compositional; for example, <em>meter second<sup> –2</sup></em> is + constructed by combining a Unit object representing <em>meter</em> with + another Unit object representing <em>second<sup> –2</sup></em>. + The combination is wrapped inside a UnitDefinition, which provides for + assigning an identifier and optional name to the combination. The + identifier can then be referenced from elsewhere in a model. Thus, the + UnitDefinition class is the container, and Unit instances are placed + inside UnitDefinition instances. + + A Unit structure has four attributes named \'kind\', \'exponent\', \'scale\' + and \'multiplier\'. It represents a (possibly transformed) reference to a + base unit. The attribute \'kind\' on Unit indicates the chosen base unit. + Its value must be one of the text strings listed below; this list + corresponds to SBML Level 3 Version 1 Core: + + @htmlinclude base-units.html + + A few small differences exist between the Level 3 list of base + units and the list defined in other Level/Version combinations of SBML. + Specifically, Levels of SBML before Level 3 do not define @c + avogadro; conversely, Level 2 Version 1 defines @c Celsius, + and Level 1 defines @c celsius, @c meter, and @c liter, none of + which are available in Level 3. In libSBML, each of the predefined + base unit names is represented by an enumeration value @if clike in + #UnitKind_t@else whose name begins with the characters + <code>UNIT_KIND_</code>@endif, discussed in a separate section below. + + The attribute named \'exponent\' on Unit represents an exponent on the + unit. In SBML Level 2, the attribute is optional and has a default + value of @c 1 (one); in SBML Level 3, the attribute is mandatory + and there is no default value. A Unit structure also has an attribute + called \'scale\'; its value must be an integer exponent for a power-of-ten + multiplier used to set the scale of the unit. For example, a unit + having a \'kind\' value of @c gram and a \'scale\' value of @c -3 signifies + 10<sup> –3</sup> * gram, or milligrams. In SBML + Level 2, the attribute is optional and has a default value of @c 0 + (zero), because 10<sup> 0</sup> = 1; in SBML Level 3, the attribute + is mandatory and has no default value. Lastly, the attribute named + \'multiplier\' can be used to multiply the unit by a real-numbered factor; + this enables the definition of units that are not power-of-ten multiples + of SI units. For instance, a multiplier of 0.3048 could be used to + define @c foot as a measure of length in terms of a @c metre. The + \'multiplier\' attribute is optional in SBML Level 2, where it has a + default value of @c 1 (one); in SBML Level 3, the attribute is + mandatory and has not default value. + + @if clike + <h3><a class=\'anchor\' name=\'UnitKind_t\'>UnitKind_t</a></h3> + @else + <h3><a class=\'anchor\' name=\'UnitKind_t\'>%Unit identification codes</a></h3> + @endif@~ + + As discussed above, SBML defines a set of base units which serves as the + starting point for new unit definitions. This set of base units + consists of the SI units and a small number of additional convenience + units. + + @if clike Until SBML Level 2 Version 3, there + existed a data type in the SBML specifications called @c UnitKind, + enumerating the possible SBML base units. Although SBML Level 2 + Version 3 removed this type from the language specification, + libSBML maintains the corresponding enumeration type #UnitKind_t as a + convenience and as a way to provide backward compatibility to previous + SBML Level/Version specifications. (The removal in SBML Level 2 + Version 3 of the enumeration @c UnitKind was also accompanied by + the redefinition of the data type @c UnitSId to include the previous @c + UnitKind values as reserved symbols in the @c UnitSId space. This + change has no net effect on permissible models, their representation or + their syntax. The purpose of the change in the SBML specification was + simply to clean up an inconsistency about the contexts in which these + values were usable.) + @endif@if java In SBML Level 2 Versions before + Version 3, there existed an enumeration of units called @c + UnitKind. In Version 3, this enumeration was removed and the + identifier class @c UnitSId redefined to include the previous @c + UnitKind values as reserved symbols. This change has no net effect on + permissible models, their representation or their syntax. The purpose + of the change in the SBML specification was simply to clean up an + inconsistency about the contexts in which these values were usable. + However, libSBML maintains UnitKind in the form of of a set of static + integer constants whose names begin with the characters + <code>UNIT_KIND_</code>. These constants are defined in the class + <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. + @endif@if python In SBML Level 2 Versions before + Version 3, there existed an enumeration of units called @c + UnitKind. In Version 3, this enumeration was removed and the + identifier class @c UnitSId redefined to include the previous @c + UnitKind values as reserved symbols. This change has no net effect on + permissible models, their representation or their syntax. The purpose + of the change in the SBML specification was simply to clean up an + inconsistency about the contexts in which these values were usable. + However, libSBML maintains UnitKind in the form of of a set of static + integer constants whose names begin with the characters + <code>UNIT_KIND_</code>. These constants are defined in the class + @link libsbml libsbml@endlink. + @endif@~ + + As a consequence of the fact that libSBML supports models in all Levels + and Versions of SBML, libSBML\'s set of @c UNIT_KIND_ values is a union + of all the possible base unit names defined in the different SBML + specifications. However, not every base unit is allowed in every + Level+Version combination of SBML. Note in particular the following + exceptions: + <ul> + <li> The alternate spelling @c \'meter\' is included in + addition to the official SI spelling @c \'metre\'. This spelling is only + permitted in SBML Level 1 models. + + <li> The alternate spelling @c \'liter\' is included in addition to the + official SI spelling @c \'litre\'. This spelling is only permitted in + SBML Level 1 models. + + <li> The unit @c \'Celsius\' is included because of its presence in + specifications of SBML prior to SBML Level 2 Version 3. + + <li> The unit @c avogadro was introduced in SBML Level 3, and + is only permitted for use in SBML Level 3 models. + </ul> + + @if clike The table below lists the symbols defined in the + @c UnitKind_t enumeration, and their + meanings. @else The table below lists the unit + constants defined in libSBML, and their meanings. @endif@~ + + @htmlinclude unitkind-table.html + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfUnits " + @ingroup Core + Implementation of SBML\'s %ListOfUnits construct. + + The various ListOf___ classes in %SBML are merely containers used for + organizing the main components of an %SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + ListOfUnits is entirely contained within UnitDefinition. +"; + + +%feature("docstring") Unit::Unit " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Unit(SBMLNamespaces sbmlns)</pre> + + Creates a new Unit using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Unit object to an SBMLDocument, the SBML + XML namespace of the document @em overrides the value used when + creating the Unit object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a Unit is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Unit(long level, long version)</pre> + + Creates a new Unit using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Unit + + @param version a long integer, the SBML Version to assign to this + Unit + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Unit object to an SBMLDocument, the SBML + Level, SBML Version and XML namespace of the document @em + override the values used when creating the Unit object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Unit is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Unit(Unit orig)</pre> + + Copy constructor; creates a copy of this Unit. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Unit::accept " + Accepts the given SBMLVisitor for this instance of Unit. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next Unit in the list + of units within which this Unit is embedded (i.e., in the ListOfUnits + located in the enclosing UnitDefinition instance). +"; + + +%feature("docstring") Unit::clone " + Creates and returns a deep copy of this Unit. + + @return a (deep) copy of this Unit. +"; + + +%feature("docstring") Unit::initDefaults " + Initializes the fields of this Unit object to \'typical\' default + values. + + The SBML Unit component has slightly different aspects and default + attribute values in different SBML Levels and Versions. This method + sets the values to certain common defaults, based mostly on what they + are in SBML Level 2. Specifically: + <ul> + <li> Sets attribute \'exponent\' to @c 1 + <li> Sets attribute \'scale\' to @c 0 + <li> Sets attribute \'multiplier\' to @c 1.0 + </ul> + + The \'kind\' attribute is left unchanged. +"; + + +%feature("docstring") Unit::getKind " + Returns the \'kind\' of Unit this is. + + @if clike + @return the value of the \'kind\' attribute of this Unit as a + value from the <a class=\'el\' href=\'#UnitKind_t\'>UnitKind_t</a> enumeration. + @endif@if java + @return the value of the \'kind\' attribute of this Unit as a + value from the set of constants whose names begin + with <code>UNIT_KIND_</code> defined in the class + <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. + @endif@if python + @return the value of the \'kind\' attribute of this Unit as a + value from the set of constants whose names begin + with <code>UNIT_KIND_</code> defined in the class + @link libsbml libsbml@endlink. + @endif@~ +"; + + +%feature("docstring") Unit::getExponent " + Returns the value of the \'exponent\' attribute of this unit. + + @return the \'exponent\' value of this Unit, as an integer. +"; + + +%feature("docstring") Unit::getExponentAsDouble " + Returns the value of the \'exponent\' attribute of this unit. + + @return the \'exponent\' value of this Unit, as a double. +"; + + +%feature("docstring") Unit::getScale " + Returns the value of the \'scale\' attribute of this unit. + + @return the \'scale\' value of this Unit, as an integer. +"; + + +%feature("docstring") Unit::getMultiplier " + Returns the value of the \'multiplier\' attribute of this Unit. + + @return the \'multiplier\' value of this Unit, as a double. +"; + + +%feature("docstring") Unit::getOffset " + Returns the value of the \'offset\' attribute of this Unit. + + @warning The \'offset\' attribute is only available in SBML Level 2 + Version 1. This attribute is not present in SBML Level 2 + Version 2 or above. When producing SBML models using these later + specifications, modelers and software tools need to account for units + with offsets explicitly. The %SBML specification document offers a + number of suggestions for how to achieve this. LibSBML methods such + as this one related to \'offset\' are retained for compatibility with + earlier versions of SBML Level 2, but their use is strongly + discouraged. + + @return the \'offset\' value of this Unit, as a double. +"; + + +%feature("docstring") Unit::isAmpere " + Predicate for testing whether this Unit is of the kind @c ampere. + + @return @c True if the kind of this Unit is @c ampere, @c False + otherwise. +"; + + +%feature("docstring") Unit::isAvogadro " + Predicate for testing whether this Unit is of the kind @c avogadro. + + @return @c True if the kind of this Unit is @c avogadro, @c False + otherwise. + + @note The unit @c avogadro was introduced in SBML Level 3, and + is only permitted for use in SBML Level 3 models. +"; + + +%feature("docstring") Unit::isBecquerel " + Predicate for testing whether this Unit is of the kind @c becquerel + + @return @c True if the kind of this Unit is @c becquerel, @c False + otherwise. +"; + + +%feature("docstring") Unit::isCandela " + Predicate for testing whether this Unit is of the kind @c candela + + @return @c True if the kind of this Unit is @c candela, @c False + otherwise. +"; + + +%feature("docstring") Unit::isCelsius " + Predicate for testing whether this Unit is of the kind @c Celsius + + @return @c True if the kind of this Unit is @c Celsius, @c False + otherwise. + + @warning The predefined unit @c Celsius was removed from the list of + predefined units in SBML Level 2 Version 2 at the same time + that the \'offset\' attribute was removed from Unit definitions. + LibSBML methods such as this one related to @c Celsius are retained in + order to support SBML Level 2 Version 1, but their use is + strongly discouraged. +"; + + +%feature("docstring") Unit::isCoulomb " + Predicate for testing whether this Unit is of the kind @c coulomb + + @return @c True if the kind of this Unit is @c coulomb, @c False + otherwise. +"; + + +%feature("docstring") Unit::isDimensionless " + Predicate for testing whether this Unit is of the kind @c + dimensionless. + + @return @c True if the kind of this Unit is @c dimensionless, @c False + + otherwise. +"; + + +%feature("docstring") Unit::isFarad " + Predicate for testing whether this Unit is of the kind @c farad + + @return @c True if the kind of this Unit is @c farad, @c False + otherwise. +"; + + +%feature("docstring") Unit::isGram " + Predicate for testing whether this Unit is of the kind @c gram + + @return @c True if the kind of this Unit is @c gram, @c False + otherwise. +"; + + +%feature("docstring") Unit::isGray " + Predicate for testing whether this Unit is of the kind @c gray + + @return @c True if the kind of this Unit is @c gray, @c False + otherwise. +"; + + +%feature("docstring") Unit::isHenry " + Predicate for testing whether this Unit is of the kind @c henry + + @return @c True if the kind of this Unit is @c henry, @c False + otherwise. +"; + + +%feature("docstring") Unit::isHertz " + Predicate for testing whether this Unit is of the kind @c hertz + + @return @c True if the kind of this Unit is @c hertz, @c False + otherwise. +"; + + +%feature("docstring") Unit::isItem " + Predicate for testing whether this Unit is of the kind @c item + + @return @c True if the kind of this Unit is @c item, @c False + otherwise. +"; + + +%feature("docstring") Unit::isJoule " + Predicate for testing whether this Unit is of the kind @c joule + + @return @c True if the kind of this Unit is @c joule, @c False + otherwise. +"; + + +%feature("docstring") Unit::isKatal " + Predicate for testing whether this Unit is of the kind @c katal + + @return @c True if the kind of this Unit is @c katal, @c False + otherwise. +"; + + +%feature("docstring") Unit::isKelvin " + Predicate for testing whether this Unit is of the kind @c kelvin + + @return @c True if the kind of this Unit is @c kelvin, @c False + otherwise. +"; + + +%feature("docstring") Unit::isKilogram " + Predicate for testing whether this Unit is of the kind @c kilogram + + @return @c True if the kind of this Unit is @c kilogram, @c False + otherwise. +"; + + +%feature("docstring") Unit::isLitre " + Predicate for testing whether this Unit is of the kind @c litre + + @return @c True if the kind of this Unit is @c litre or \'liter\', @c + false + otherwise. +"; + + +%feature("docstring") Unit::isLumen " + Predicate for testing whether this Unit is of the kind @c lumen + + @return @c True if the kind of this Unit is @c lumen, @c False + otherwise. +"; + + +%feature("docstring") Unit::isLux " + Predicate for testing whether this Unit is of the kind @c lux + + @return @c True if the kind of this Unit is @c lux, @c False + otherwise. +"; + + +%feature("docstring") Unit::isMetre " + Predicate for testing whether this Unit is of the kind @c metre + + @return @c True if the kind of this Unit is @c metre or \'meter\', @c + false + otherwise. +"; + + +%feature("docstring") Unit::isMole " + Predicate for testing whether this Unit is of the kind @c mole + + @return @c True if the kind of this Unit is @c mole, @c False + otherwise. +"; + + +%feature("docstring") Unit::isNewton " + Predicate for testing whether this Unit is of the kind @c newton + + @return @c True if the kind of this Unit is @c newton, @c False + otherwise. +"; + + +%feature("docstring") Unit::isOhm " + Predicate for testing whether this Unit is of the kind @c ohm + + @return @c True if the kind of this Unit is @c ohm, @c False + otherwise. +"; + + +%feature("docstring") Unit::isPascal " + Predicate for testing whether this Unit is of the kind @c pascal + + @return @c True if the kind of this Unit is @c pascal, @c False + otherwise. +"; + + +%feature("docstring") Unit::isRadian " + Predicate for testing whether this Unit is of the kind @c radian + + @return @c True if the kind of this Unit is @c radian, @c False + otherwise. +"; + + +%feature("docstring") Unit::isSecond " + Predicate for testing whether this Unit is of the kind @c second + + @return @c True if the kind of this Unit is @c second, @c False + otherwise. +"; + + +%feature("docstring") Unit::isSiemens " + Predicate for testing whether this Unit is of the kind @c siemens + + @return @c True if the kind of this Unit is @c siemens, @c False + otherwise. +"; + + +%feature("docstring") Unit::isSievert " + Predicate for testing whether this Unit is of the kind @c sievert + + @return @c True if the kind of this Unit is @c sievert, @c False + otherwise. +"; + + +%feature("docstring") Unit::isSteradian " + Predicate for testing whether this Unit is of the kind @c steradian + + @return @c True if the kind of this Unit is @c steradian, @c False + otherwise. +"; + + +%feature("docstring") Unit::isTesla " + Predicate for testing whether this Unit is of the kind @c tesla + + @return @c True if the kind of this Unit is @c tesla, @c False + otherwise. +"; + + +%feature("docstring") Unit::isVolt " + Predicate for testing whether this Unit is of the kind @c volt + + @return @c True if the kind of this Unit is @c volt, @c False + otherwise. +"; + + +%feature("docstring") Unit::isWatt " + Predicate for testing whether this Unit is of the kind @c watt + + @return @c True if the kind of this Unit is @c watt, @c False + otherwise. +"; + + +%feature("docstring") Unit::isWeber " + Predicate for testing whether this Unit is of the kind @c weber + + @return @c True if the kind of this Unit is @c weber, @c False + otherwise. +"; + + +%feature("docstring") Unit::isSetKind " + Predicate to test whether the \'kind\' attribute of this Unit is set. + + @return @c True if the \'kind\' attribute of this Unit is set, @c + false otherwise. +"; + + +%feature("docstring") Unit::isSetExponent " + Predicate to test whether the \'exponent\' attribute of this Unit + is set. + + @return @c True if the \'exponent\' attribute of this Unit is set, + @c False otherwise. +"; + + +%feature("docstring") Unit::isSetScale " + Predicate to test whether the \'scale\' attribute of this Unit + is set. + + @return @c True if the \'scale\' attribute of this Unit is set, + @c False otherwise. +"; + + +%feature("docstring") Unit::isSetMultiplier " + Predicate to test whether the \'multiplier\' attribute of this Unit + is set. + + @return @c True if the \'multiplier\' attribute of this Unit is set, + @c False otherwise. +"; + + +%feature("docstring") Unit::setKind " + Sets the \'kind\' attribute value of this Unit. + + @if clike + @param kind a value from the <a class=\'el\' + href=\'#UnitKind_t\'>UnitKind_t</a> enumeration. + @endif@if java + @param kind a unit identifier chosen from the set of constants whose + names begin with <code>UNIT_KIND_</code> in <code><a + href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. + @endif@if python + @param kind a unit identifier chosen from the set of constants whose + names begin with <code>UNIT_KIND_</code> in @link libsbml libsbml@endlink. + @endif@~ + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Unit::setExponent " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setExponent(int value)</pre> + + Sets the \'exponent\' attribute value of this Unit. + + @param value the integer to which the attribute \'exponent\' should be set + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>setExponent(double value)</pre> + + Sets the \'exponent\' attribute value of this Unit. + + @param value the double to which the attribute \'exponent\' should be set + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") Unit::setScale " + Sets the \'scale\' attribute value of this Unit. + + @param value the integer to which the attribute \'scale\' should be set + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") Unit::setMultiplier " + Sets the \'multipler\' attribute value of this Unit. + + @param value the floating-point value to which the attribute + \'multiplier\' should be set + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Unit::setOffset " + Sets the \'offset\' attribute value of this Unit. + + @param value the float-point value to which the attribute \'offset\' + should set + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @warning The \'offset\' attribute is only available in SBML Level 2 + Version 1. This attribute is not present in SBML Level 2 + Version 2 or above. When producing SBML models using these later + specifications, modelers and software tools need to account for units + with offsets explicitly. The %SBML specification document offers a + number of suggestions for how to achieve this. LibSBML methods such + as this one related to \'offset\' are retained for compatibility with + earlier versions of SBML Level 2, but their use is strongly + discouraged. +"; + + +%feature("docstring") Unit::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Unit::getElementName " + Returns the XML element name of this object, which for Unit, is + always @c \'unit\'. + + @return the name of this element, i.e., @c \'unit\'. +"; + + +%feature("docstring") Unit::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Unit::isBuiltIn " + Predicate to test whether a given string is the name of a + predefined SBML unit. + + @param name a string to be tested against the predefined unit names + + @param level the Level of SBML for which the determination should be + made. This is necessary because there are a few small differences + in allowed units between SBML Level 1 and Level 2. + + @return @c True if @p name is one of the five SBML predefined unit + identifiers (@c \'substance\', @c \'volume\', @c \'area\', @c \'length\' or @c + \'time\'), @c False otherwise. + + @note The predefined unit identifiers @c \'length\' and @c \'area\' were + added in Level 2 Version 1. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_isBuiltIn(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") Unit::isUnitKind " + Predicate to test whether a given string is the name of a valid + base unit in SBML (such as @c \'gram\' or @c \'mole\'). + + This method exists because prior to SBML Level 2 Version 3, + an enumeration called @c UnitKind was defined by SBML. This enumeration + was removed in SBML Level 2 Version 3 and its values were + folded into the space of values of a type called @c UnitSId. This method + therefore has less significance in SBML Level 2 Version 3 + and Level 2 Version 4, but remains for backward + compatibility and support for reading models in older Versions of + Level 2. + + @param name a string to be tested + + @param level a long integer representing the SBML specification + Level + + @param version a long integer representing the SBML specification + Version + + @return @c True if name is a valid SBML UnitKind, @c False otherwise + + @note The allowed unit names differ between SBML Levels 1 + and 2 and again slightly between Level 2 Versions 1 + and 2. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_isUnitKind(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") Unit::areIdentical " + Predicate returning @c True if two + Unit objects are identical. + + Two Unit objects are considered to be @em identical if they match in + all attributes. (Contrast this to the method areEquivalent(@if java + Unit u1, %Unit u2@endif), which compares Unit objects only with respect + to certain attributes.) + + @param unit1 the first Unit object to compare + @param unit2 the second Unit object to compare + + @return @c True if all the attributes of unit1 are identical + to the attributes of unit2, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_areIdentical(). They are functionally + identical. @endif@~ + + @see @if clike areEquivalent() @else Unit.areEquivalent() @endif@~ +"; + + +%feature("docstring") Unit::areEquivalent " + Predicate returning @c True if + Unit objects are equivalent. + + Two Unit objects are considered to be @em equivalent either if (1) both + have a \'kind\' attribute value of @c dimensionless, or (2) their \'kind\', + \'exponent\' and (for SBML Level 2 Version 1) \'offset\' + attribute values are equal. (Contrast this to the method + areIdentical(@if java Unit u1, %Unit u2@endif), which compares Unit objects with respect to all + attributes, not just the \'kind\' and \'exponent\'.) + + @param unit1 the first Unit object to compare + @param unit2 the second Unit object to compare + + @return @c True if the \'kind\' and \'exponent\' attributes of unit1 are + identical to the kind and exponent attributes of unit2, @c False + otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_areEquivalent(). They are functionally + identical. @endif@~ + + @see @if clike areIdentical() @else Unit.areIdentical() @endif@~ +"; + + +%feature("docstring") Unit::removeScale " + Manipulates the attributes of the Unit to express the unit with the + value of the scale attribute reduced to zero. + + For example, 1 millimetre can be expressed as a Unit with kind=@c + \'metre\' multiplier=@c \'1\' scale=@c \'-3\' exponent=@c \'1\'. It can also be + expressed as a Unit with kind=@c \'metre\' + multiplier=<code>\'0.001\'</code> scale=@c \'0\' exponent=@c \'1\'. + + @param unit the Unit object to manipulate. + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_removeScale(). They are functionally + identical. @endif@~ + + @see @if clike convertToSI() @else Unit.convertToSI() @endif@~ + @see @if clike merge() @else Unit.merge() @endif@~ +"; + + +%feature("docstring") Unit::merge " + Merges two Unit objects with the same \'kind\' attribute value into a + single Unit. + + For example, the following, + @verbatim + <unit kind=\'metre\' exponent=\'2\'/> + <unit kind=\'metre\' exponent=\'1\'/> + @endverbatim + would be merged to become + @verbatim + <unit kind=\'metre\' exponent=\'3\'/> + @endverbatim + + @param unit1 the first Unit object; the result of the operation is + left as a new version of this unit, modified in-place. + + @param unit2 the second Unit object to merge with the first + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_merge(). They are functionally + identical. @endif@~ + + @see @if clike convertToSI() @else Unit.convertToSI() @endif@~ + @see @if clike removeScale() @else Unit.removeScale() @endif@~ +"; + + +%feature("docstring") Unit::convertToSI " + Returns a UnitDefinition object containing the given @p unit converted + to the appropriate SI unit. + + This method exists because some units can be expressed in terms of + others when the same physical dimension is involved. For example, one + hertz is identical to 1 sec<sup>-1</sup>, one litre is equivalent + to 1 cubic decametre, and so on. + + @param unit the Unit object to convert to SI + + @return a UnitDefinition object containing the SI unit. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., Unit), and the + other will be a standalone top-level function with the name + Unit_convertToSI(). They are functionally + identical. @endif@~ + + @see @if clike merge() @else Unit.merge() @endif@~ +"; + + +%feature("docstring") Unit::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this Unit object + have been set. + + @note The required attributes for a Unit object are: + @li \'kind\' + @li \'exponent\' (required in SBML Level 3; optional in Level 2) + @li \'multiplier\' (required in SBML Level 3; optional in Level 2) + @li \'scale\' (required in SBML Level 3; optional in Level 2) + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Unit::setExponentUnitChecking " + @internal + Predicate returning @c True if + all the required attributes for this Unit object + have been set. + + @note The required attributes for a Unit object are: + @li \'kind\' + @li \'exponent\' (required in SBML Level 3; optional in Level 2) + @li \'multiplier\' (required in SBML Level 3; optional in Level 2) + @li \'scale\' (required in SBML Level 3; optional in Level 2) + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Unit::getExponentUnitChecking " + @internal + Predicate returning @c True if + all the required attributes for this Unit object + have been set. + + @note The required attributes for a Unit object are: + @li \'kind\' + @li \'exponent\' (required in SBML Level 3; optional in Level 2) + @li \'multiplier\' (required in SBML Level 3; optional in Level 2) + @li \'scale\' (required in SBML Level 3; optional in Level 2) + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Unit::isUnitChecking " + @internal + Predicate returning @c True if + all the required attributes for this Unit object + have been set. + + @note The required attributes for a Unit object are: + @li \'kind\' + @li \'exponent\' (required in SBML Level 3; optional in Level 2) + @li \'multiplier\' (required in SBML Level 3; optional in Level 2) + @li \'scale\' (required in SBML Level 3; optional in Level 2) + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Unit::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Unit::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Unit::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Unit::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Unit::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Unit::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Unit::isL1UnitKind " + @internal + Predicate to test whether a given string is the name of a valid + base unit in SBML Level 1 (such as @c \'gram\' or @c \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isL2V1UnitKind " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 2 Version 1 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isL2UnitKind " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 2 Version 2, 3 or 4 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isL3UnitKind " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isExplicitlySetExponent " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isExplicitlySetMultiplier " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isExplicitlySetScale " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") Unit::isExplicitlySetOffset " + @internal + Predicate to test whether a given string is the name of a valid base + unit in SBML Level 3 Version 1 (such as @c \'gram\' or @c + \'mole\') + + @param name a string to be tested + + @return @c True if name is a valid SBML UnitKind, @c False otherwise +"; + + +%feature("docstring") ListOfUnits::ListOfUnits " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfUnits(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfUnits object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfUnits object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfUnits(long level, long version)</pre> + + Creates a new ListOfUnits object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfUnits::clone " + Creates and returns a deep copy of this ListOfUnits. + + @return a (deep) copy of this ListOfUnits. +"; + + +%feature("docstring") ListOfUnits::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfUnits::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Unit objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfUnits::getElementName " + Returns the XML element name of this object. + + For ListOfUnits, the XML element name is @c \'listOfUnits\'. + + @return the name of this element, i.e., @c \'listOfUnits\'. +"; + + +%feature("docstring") ListOfUnits::get " + Get a Unit from the ListOfUnits. + + @param n the index number of the Unit to get. + + @return the nth Unit in this ListOfUnits. + + @see size() +"; + + +%feature("docstring") ListOfUnits::remove " + Removes the nth item from this ListOfUnits items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() +"; + + +%feature("docstring") ListOfUnits::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfUnits::createObject " + @internal + Create a ListOfUnits object corresponding to the next token + in the XML input stream. + + @return the %SBML object corresponding to next XMLToken in the + XMLInputStream, or @c None if the token was not recognized. +"; + + +%feature("docstring") UnitDefinition " + @ingroup Core + Implementation of SBML\'s %UnitDefinition construct. + + Units of measurement may be supplied in a number of contexts in an SBML + model. The SBML unit definition facility uses two classes of objects, + UnitDefinition and Unit. The approach to defining units in SBML is + compositional; for example, <em>meter second<sup> –2</sup></em> is + constructed by combining a Unit object representing <em>meter</em> with + another Unit object representing <em>second<sup> –2</sup></em>. + The combination is wrapped inside a UnitDefinition, which provides for + assigning an identifier and optional name to the combination. The + identifier can then be referenced from elsewhere in a model. Thus, the + UnitDefinition class is the container, and Unit instances are placed + inside UnitDefinition instances. + + Two points are worth discussing in the context of SBML units. First, + unit declarations in SBML models are @em optional. The consequence of + this is that a model must be numerically self-consistent independently + of unit declarations, for the benefit of software tools that cannot + interpret or manipulate units. Unit declarations in SBML are thus more + akin to a type of annotation; they can indicate intentions, and can be + used by model readers for checking the consistency of the model, + labeling simulation output, etc., but any transformations of values + implied by different units must be incorporated @em explicitly into a + model. + + Second, the vast majority of situations that require new SBML unit + definitions involve simple multiplicative combinations of base units and + factors. An example is <em>moles per litre per second</em>. What + distinguishes these sorts of unit definitions from more complex ones is + that they may be expressed without the use of an additive offset from a + zero point. The use of offsets complicates all unit definition systems, + yet in the domain of SBML, the real-life cases requiring offsets are few + (and in fact, to the best of our knowledge, only involve temperature). + Consequently, the SBML unit system has been consciously designed to + simplify implementation of unit support for the most common cases in + systems biology. The cost of this simplification is to require units + with offsets to be handled explicitly by the modeler. + + @section unitdef-summary Summary of the UnitDefinition construct + + UnitDefinition has two attributes and one subelement. The two + attributes are \'id\' and \'name\', and the subelement is ListOfUnits. + + The required attribute \'id\' and optional attribute \'name\' are both + strings. The \'id\' attribute is used to give the defined unit a unique + identifier by which other parts of an SBML model definition can refer to + it. The \'name\' attribute is intended to be used for giving the unit + definition an optional human-readable name. Please see the <a + href=\'#unitdef-id\'>next section</a> for information about the values + permitted for \'id\'. + + A UnitDefinition must contain exactly one ListOfUnits, and this list + must contain one or more Unit definitions; see the definitions of these + other object classes for more information about them. The following + example illustrates a complete unit definition (when written in XML) + when they all the pieces are combined together. This defines \'mmls\' + to be millimoles per litre per second. + @verbatim + <listOfUnitDefinitions> + <unitDefinition id=\'mmls\'> + <listOfUnits> + <unit kind=\'mole\' scale=\'-3\'/> + <unit kind=\'litre\' exponent=\'-1\'/> + <unit kind=\'second\' exponent=\'-1\'/> + </listOfUnits> + </unitDefinition> + </listOfUnitDefinitions> + @endverbatim + + @section unitdef-id Special considerations for Unit object identifiers + + The attribute \'id\' in UnitDefinition cannot be given simply any value, + and the precise details of the values permitted differ slightly between + Levels of SBML: + <ul> + + <li> The \'id\' of a UnitDefinition must @em not contain a value from the + list of SBML\'s predefined base unit names (i.e., the strings @c gram, @c + litre, etc.). In SBML Level 3, this list consists of the + following: + + @htmlinclude base-units.html + + This list of predefined base units is nearly identical in SBML + Level 2 Version 4, the exception being that Level 2 does + not define @c avogadro. SBML Level 2 Version 1 (and @em only + this Level+Version combination) provides an additional predefined unit + name, @c Celsius, not available in Level 3. Finally, SBML + Level 1 Versions 2–3 provide two more additional + predefined unit names, @c meter and @c liter. This is explained in + somewhat greater detail in the description of the Unit class. + + <li> In SBML Level 2 (all Versions), there is an additional set of + reserved identifiers: @c substance, @c volume, @c area, @c length, and + @c time. Using one of these values for the attribute \'id\' of a + UnitDefinition has the effect of redefining the model-wide default units + for the corresponding quantities. The list of special unit names in + SBML Level 2 is given in the table below: + + @htmlinclude predefined-units.html + + Also, SBML Level 2 imposes two limitations on redefining the + predefined unit @c substance, @c volume, @c area, @c length, and @c + time: (1) The UnitDefinition of a predefined SBML unit can only contain + a single Unit object within it. (2) The value of the \'kind\' attribute + in a Unit instance must be drawn from one of the values in the second + column of the table above. + + The special unit names @c substance, @c volume, @c area, @c length, and + @c time are not defined by SBML Level 3, which uses a different + approach to setting model-wide inherited units. + + </ul> + + + @section sbml-units-limits Further comments about SBML\'s unit definition system + + The vast majority of modeling situations requiring new SBML unit + definitions involve simple multiplicative combinations of base units and + factors. An example of this might be <em>moles per litre per + second</em>. What distinguishes these sorts of simpler unit definitions + from more complex ones is that they may be expressed without the use of + an additive offset from a zero point. The use of offsets complicates + all unit definition systems, yet in the domain of SBML the real-life + cases requiring offsets are few (and in fact, to the best of our + knowledge, only involve temperature). Consequently, the SBML unit + system has been consciously designed in a way that attempts to simplify + implementation of unit support for the most common cases in systems + biology. + + As of SBML Level 2 Version 2, Unit no longer has the + attribute called \'offset\' introduced in SBML Level 2 + Version 1. It turned out that the general case involving units + with offsets was incorrectly defined, and few (if any) developers even + attempted to support offset-based units in their software. In the + development of Level 2 Version 2, a consensus among SBML + developers emerged that a fully generalized unit scheme is @em so + confusing and complicated that it actually @em impedes interoperability. + SBML Level 2 Version 2, Version 3 and Version 4 acknowledge this + reality by reducing and simplifying the unit system, specifically by + removing the \'offset\' attribute on Unit and @c Celsius as a pre-defined + unit. + + The following guidelines suggest methods for handling units that do + require the use of zero offsets for their definitions: + <ul> + <li> <em>Handling Celsius</em>. A model in which certain quantities are + temperatures measured in degrees Celsius can be converted + straightforwardly to a model in which those temperatures are in + kelvin. A software tool could do this by performing a straightforward + substitution using the following relationship: <em>T<sub> kelvin</sub> = + T<sub>Celsius</sub> + 273.15</em>. In every mathematical formula of the + model where a quantity (call it @em x) in degrees Celsius appears, + replace @em x with <em>x<sub>k</sub>+ 273.15</em>, where + <em>x<sub>k</sub></em> is now in kelvin. An alternative approach would + be to use a FunctionDefinition object to define a function encapsulating this + relationship above and then using that in the rest of the model as + needed. Since Celsius is a commonly-used unit, software tools could + help users by providing users with the ability to express temperatures + in Celsius in the tools\' interfaces, and making substitutions + automatically when writing out the SBML. + + <li> <em>Other units requiring offsets</em>. One approach to handling + other kinds of units is to use a FunctionDefinition to define a function + encapsulating the necessary mathematical relationship, then + substituting a call to this function wherever the original quantity + appeared in the model. For example, here is a possible definition for + converting Fahrenheit to Celsius degrees: + @verbatim + <functionDefinition id=\'Fahrenheit_to_kelvin\'> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <lambda> + <bvar><ci> temp_in_fahrenheit </ci></bvar> + <apply> + <divide/> + <apply> + <plus/> + <ci> temp_in_fahrenheit </ci> + <cn> 459.67 </cn> + </apply> + <cn> 1.8 </cn> + </apply> + </lambda> + </math> + </functionDefinition> + @endverbatim + + <li> An alternative approach not requiring the use of function definitions + is to use an AssignmentRule for each variable in Fahrenheit units. + The AssignmentRule could compute the conversion from Fahrenheit to + (say) kelvin, assign its value to a variable (in Kelvin units), and + then that variable could be used elsewhere in the model. + + <li> Still another approach is to rewrite the mathematical formulas of a + model to directly incorporate the conversion formula wherever the + original quantity appeared. + </ul> + + Please consult the SBML specifications for more information about this + and other issues involving units. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfUnitDefinitions " + @ingroup Core + Implementation of SBML\'s %ListOfUnitDefinitions construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") UnitDefinition::UnitDefinition " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>UnitDefinition(SBMLNamespaces sbmlns)</pre> + + Creates a new UnitDefinition using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a UnitDefinition object to an SBMLDocument + (e.g., using Model.addUnitDefinition()), the SBML XML namespace of + the document @em overrides the value used when creating the + UnitDefinition object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a + UnitDefinition is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>UnitDefinition(long level, long version)</pre> + + Creates a new UnitDefinition using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this UnitDefinition + + @param version a long integer, the SBML Version to assign to this + UnitDefinition + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a UnitDefinition object to an SBMLDocument + (e.g., using Model.addUnitDefinition()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the UnitDefinition object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a UnitDefinition is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>UnitDefinition(UnitDefinition orig)</pre> + + Copy constructor; creates a copy of this UnitDefinition. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") UnitDefinition::accept " + Accepts the given SBMLVisitor for this instance of UnitDefinition. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next UnitDefinition in the + list of units within which this UnitDefinition is embedded (i.e., in + the ListOfUnitDefinitions located in the enclosing Model instance). +"; + + +%feature("docstring") UnitDefinition::clone " + Creates and returns a deep copy of this UnitDefinition. + + @return a (deep) copy of this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find. + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") UnitDefinition::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") UnitDefinition::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") UnitDefinition::getId " + Returns the value of the \'id\' attribute of this UnitDefinition. + + @return the id of this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::getName " + Returns the value of the \'name\' attribute of this UnitDefinition. + + @return the name of this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::isSetId " + Predicate returning @c True if this + UnitDefinition\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this UnitDefinition is + set, @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isSetName " + Predicate returning @c True if this + UnitDefinition\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this UnitDefinition is + set, @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::setId " + Sets the value of the \'id\' attribute of this UnitDefinition. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this UnitDefinition + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") UnitDefinition::setName " + Sets the value of the \'name\' attribute of this UnitDefinition. + + The string in @p name is copied. + + @param name the new name for the UnitDefinition + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") UnitDefinition::unsetName " + Unsets the value of the \'name\' attribute of this UnitDefinition. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") UnitDefinition::isVariantOfArea " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier @c \'area\'. + + @return @c True if this UnitDefinition is a variant of the predefined + unit @c area, meaning square metres with only abritrary variations + in scale or multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfLength " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier @c \'length\'. + + @return @c True if this UnitDefinition is a variant of the predefined + unit @c length, meaning metres with only abritrary variations in scale + or multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfSubstance " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier @c \'substance\'. + + @return @c True if this UnitDefinition is a variant of the predefined + unit @c substance, meaning moles or items (and grams or kilograms from + SBML Level 2 Version 2 onwards) with only abritrary variations + in scale or multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfTime " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier @c \'time\'. + + @return @c True if this UnitDefinition is a variant of the predefined + unit @c time, meaning seconds with only abritrary variations in scale or + multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfVolume " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier @c \'volume\'. + + @return @c True if this UnitDefinition is a variant of the predefined + unit @c volume, meaning litre or cubic metre with only abritrary + variations in scale or multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfDimensionless " + Convenience function for testing if a given unit definition is a + variant of the unit @c \'dimensionless\'. + + @return @c True if this UnitDefinition is a variant of @c + dimensionless, meaning dimensionless with only abritrary variations in + scale or multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfMass " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier @c \'mass\'. + + @return @c True if this UnitDefinition is a variant of mass units, + meaning gram or kilogram with only abritrary variations in scale or + multiplier values; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfSubstancePerTime " + Convenience function for testing if a given unit definition is a + variant of the predefined unit @c \'substance\' divided by the predefined + unit @c \'time\'. + + @return @c True if this UnitDefinition is a variant of the predefined + unit @c substance per predefined unit @c time, meaning it contains two + units one of which is a variant of substance and the other is a + variant of time which an exponent of -1; @c False otherwise. +"; + + +%feature("docstring") UnitDefinition::addUnit " + Adds a copy of the given Unit to this UnitDefinition. + + @param u the Unit instance to add to this UnitDefinition. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this UnitDefinition. Changes made to the original + object instance (such as resetting attribute values) will <em>not + affect the instance in the UnitDefinition</em>. In addition, the + caller should make sure to free the original object if it is no longer + being used, or else a memory leak will result. Please see + UnitDefinition.createUnit() for a method that does not lead to these + issues. + + @see createUnit() +"; + + +%feature("docstring") UnitDefinition::createUnit " + Creates a new and empty Unit, adds it to this UnitDefinition\'s list of + units, and returns it. + + @return a newly constructed (and empty) Unit instance. + + @note It is worth emphasizing that the attribute \'kind\' value of a + Unit is a required attribute for a valid Unit definition. The + createUnit() method does not assign a valid kind to the constructed + unit (instead, it sets the \'kind\' to @link libsbml.UNIT_KIND_INVALID UNIT_KIND_INVALID@endlink). + Callers are cautioned to set the newly-constructed Unit\'s kind using + Unit.setKind() soon after calling this method. + + @see addUnit() +"; + + +%feature("docstring") UnitDefinition::getListOfUnits " + Returns the list of Units for this UnitDefinition instance. + @return the ListOfUnits value for this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::getUnit " + Returns a specific Unit instance belonging to this UnitDefinition. + + @param n an integer, the index of the Unit to be returned. + + @return the nth Unit of this UnitDefinition. + + @see getNumUnits() +"; + + +%feature("docstring") UnitDefinition::getNumUnits " + Returns the number of Unit objects contained within this + UnitDefinition. + + @return an integer representing the number of Units in this + UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::removeUnit " + Removes the nth Unit object from this UnitDefinition object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Unit object to remove + + @return the Unit object removed, or @c None if the given index + is out of range. +"; + + +%feature("docstring") UnitDefinition::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. + + @param d the SBMLDocument to use +"; + + +%feature("docstring") UnitDefinition::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") UnitDefinition::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") UnitDefinition::getTypeCode " + Returns the libSBML type code for this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") UnitDefinition::getElementName " + Returns the XML element name of this object, which for UnitDefinition, + is always @c \'unitDefinition\'. + + @return the name of this element, i.e., @c \'unitDefinition\'. +"; + + +%feature("docstring") UnitDefinition::simplify " + Simplifies the UnitDefinition such that any given kind of Unit object + occurs only once in the ListOfUnits. + + For example, the following definition, + @verbatim + <unitDefinition> + <listOfUnits> + <unit kind=\'metre\' exponent=\'1\'/> + <unit kind=\'metre\' exponent=\'2\'/> + </listOfUnits> + <unitDefinition> + @endverbatim + will be simplified to + @verbatim + <unitDefinition> + <listOfUnits> + <unit kind=\'metre\' exponent=\'3\'/> + </listOfUnits> + <unitDefinition> + @endverbatim + + @param ud the UnitDefinition object to be simplified. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_simplify(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") UnitDefinition::reorder " + Alphabetically orders the Unit objects within the ListOfUnits of a + UnitDefinition. + + @param ud the UnitDefinition object whose units are to be reordered. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_reorder(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") UnitDefinition::convertToSI " + Convert a given UnitDefinition into a new UnitDefinition object + that uses SI units. + + @param ud the UnitDefinition object to convert to SI + + @return a new UnitDefinition object representing the results of the + conversion. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_convertToSI(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") UnitDefinition::areIdentical " + Predicate returning @c True if two + UnitDefinition objects are identical. + + For the purposes of performing this comparison, two UnitDefinition + objects are considered identical when they contain identical lists of + Unit objects. Pairs of Unit objects in the lists are in turn + considered identical if they satisfy the predicate + Unit.areIdentical(). + The predicate compares every attribute of the + Unit objects. + + @param ud1 the first UnitDefinition object to compare + @param ud2 the second UnitDefinition object to compare + + @return @c True if all the Unit objects in ud1 are identical to the + Unit objects of ud2, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_areIdentical(). They are functionally identical. @endif@~ + + @see UnitDefinition.areEquivalent() + @see Unit.areIdentical() +"; + + +%feature("docstring") UnitDefinition::areEquivalent " + Predicate returning @c True if two + UnitDefinition objects are equivalent. + + For the purposes of performing this comparison, two UnitDefinition + objects are considered equivalent when they contain @em equivalent + list of Unit objects. Unit objects are in turn considered equivalent + if they satisfy the predicate + Unit.areEquivalent(). + The predicate tests a subset of the objects\'s attributes. + + @param ud1 the first UnitDefinition object to compare + + @param ud2 the second UnitDefinition object to compare + + @return @c True if all the Unit objects in ud1 are equivalent + to the Unit objects in ud2, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_areEquivalent(). They are functionally identical. @endif@~ + + @see UnitDefinition.areIdentical() + @see Unit.areEquivalent() +"; + + +%feature("docstring") UnitDefinition::areIdenticalSIUnits " + @internal + Predicate returning @c True if two + UnitDefinition objects are equivalent. + + For the purposes of performing this comparison, two UnitDefinition + objects are considered equivalent when they contain @em equivalent + list of Unit objects. Unit objects are in turn considered equivalent + if they satisfy the predicate + Unit.areEquivalent(). + The predicate tests a subset of the objects\'s attributes. + + @param ud1 the first UnitDefinition object to compare + + @param ud2 the second UnitDefinition object to compare + + @return @c True if all the Unit objects in ud1 are equivalent + to the Unit objects in ud2, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_areEquivalent(). They are functionally identical. @endif@~ + + @see UnitDefinition.areIdentical() + @see Unit.areEquivalent() +"; + + +%feature("docstring") UnitDefinition::combine " + Combines two UnitDefinition objects into a single UnitDefinition. + + This takes UnitDefinition objects @p ud1 and @p ud2, and creates a + UnitDefinition object that expresses the product of the units of @p + ud1 and @p ud2. + + @param ud1 the first UnitDefinition object + @param ud2 the second UnitDefinition object + + @return a UnitDefinition which represents the product of the + units of the two argument UnitDefinitions. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_combine(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") UnitDefinition::printUnits " + Expresses the given definition in a plain-text form. + + For example, + UnitDefinition.printUnits() + applied to + @verbatim + <unitDefinition> + <listOfUnits> + <unit kind=\'metre\' exponent=\'1\'/> + <unit kind=\'second\' exponent=\'-2\'/> + </listOfUnits> + <unitDefinition> + @endverbatim + will return the string <code>\'metre (exponent = 1, multiplier = 1, + scale = 0) second (exponent = -2, multiplier = 1, scale = 0)\'</code> + or, if the optional parameter @p compact is given the value @c True, + the string <code>\'(1 metre)^1 (1 second)^-2\'</code>. This method may + be useful for printing unit information to human users, or in + debugging software, or other situations. + + @param ud the UnitDefinition object + @param compact boolean indicating whether the compact form + should be used (defaults to false) + + @return a string expressing the unit definition defined by the given + UnitDefinition object @p ud. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., UnitDefinition), and the + other will be a standalone top-level function with the name + UnitDefinition_printUnits(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") UnitDefinition::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") UnitDefinition::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this UnitDefinition object + have been set. + + @note The required attributes for a UnitDefinition object are: + @li \'id\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") UnitDefinition::hasRequiredElements " + Predicate returning @c True if + all the required elements for this UnitDefinition object + have been set. + + @note The required elements for a Constraint object are: + @li \'listOfUnits\' (required in SBML Level 2 only, optional in Level 3) + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") UnitDefinition::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") UnitDefinition::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") UnitDefinition::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") UnitDefinition::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") UnitDefinition::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") UnitDefinition::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") UnitDefinition::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfUnitDefinitions::ListOfUnitDefinitions " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfUnitDefinitions(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfUnitDefinitions object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfUnitDefinitions object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfUnitDefinitions(long level, long version)</pre> + + Creates a new ListOfUnitDefinitions object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfUnitDefinitions::clone " + Creates and returns a deep copy of this ListOfUnitDefinitions instance. + + @return a (deep) copy of this ListOfUnitDefinitions. +"; + + +%feature("docstring") ListOfUnitDefinitions::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfUnitDefinitions::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., UnitDefinition objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfUnitDefinitions::getElementName " + Returns the XML element name of this object. + + For ListOfUnitDefinitions, the XML element name is @c + \'listOfUnitDefinitions\'. + + @return the name of this element, i.e., @c \'listOfUnitDefinitions\'. +"; + + +%feature("docstring") ListOfUnitDefinitions::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a UnitDefinition from the ListOfUnitDefinitions. + + @param n the index number of the UnitDefinition to get. + + @return the nth UnitDefinition in this ListOfUnitDefinitions. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a UnitDefinition from the ListOfUnitDefinitions + based on its identifier. + + @param sid a string representing the identifier + of the UnitDefinition to get. + + @return UnitDefinition in this ListOfUnitDefinitions + with the given @p sid or @c None if no such + UnitDefinition exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfUnitDefinitions::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that UnitDefinitions themselves are in the UnitId namespace, not the SId namespace, so no UnitDefinition object will be returned from this function (and is the reason we override the base ListOf::getElementBySId function here). + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") ListOfUnitDefinitions::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfUnitDefinitions items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfUnitDefinitions items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfUnitDefinitions::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the + ListOfUnitDefinitions in a model is (in SBML Level 2 + Version 4) the second ListOf___. (However, it differs for + different Levels and Versions of SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfUnitDefinitions::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or None if the token was not recognized. +"; + + +%feature("docstring") CompartmentType " + @ingroup Core + Implementation of SBML\'s Level 2\'s %CompartmentType construct. + + SBML Level 2 Versions 2–4 provide the <em>compartment + type</em> as a grouping construct that can be used to establish a + relationship between multiple Compartment objects. A CompartmentType + object only has an identity, and this identity can only be used to + indicate that particular Compartment objects in the model belong to this + type. This may be useful for conveying a modeling intention, such as + when a model contains many similar compartments, either by their + biological function or the reactions they carry. Without a compartment + type construct, it would be impossible within SBML itself to indicate + that all of the compartments share an underlying conceptual relationship + because each SBML compartment must be given a unique and separate + identity. Compartment types have no mathematical meaning in + SBML—they have no effect on a model\'s mathematical interpretation. + Simulators and other numerical analysis software may ignore + CompartmentType definitions and references to them in a model. + + There is no mechanism in SBML Level 2 for representing hierarchies of + compartment types. One CompartmentType instance cannot be the subtype + of another CompartmentType instance; SBML provides no means of defining + such relationships. + + As with other major structures in SBML, CompartmentType has a mandatory + attribute, \'id\', used to give the compartment type an identifier. The + identifier must be a text %string conforming to the identifer syntax + permitted in SBML. CompartmentType also has an optional \'name\' + attribute, of type @c string. The \'id\' and \'name\' must be used + according to the guidelines described in the SBML specification (e.g., + Section 3.3 in the Level 2 Version 4 specification). + + CompartmentType was introduced in SBML Level 2 Version 2. It is not + available in SBML Level 1 nor in Level 3. + + @see Compartment + @see ListOfCompartmentTypes + @see SpeciesType + @see ListOfSpeciesTypes +"; + + +%feature("docstring") ListOfCompartmentTypes " + @ingroup Core + Implementation of SBML\'s %ListOfCompartmentTypes construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") CompartmentType::CompartmentType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>CompartmentType(SBMLNamespaces sbmlns)</pre> + + Creates a new CompartmentType using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the \'id\' + (identifier) attribute of a CompartmentType is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor. Setting the identifier can be accomplished using the + method setId(@if java String id@endif). + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a CompartmentType object to an SBMLDocument + (e.g., using Model.addCompartmentType()), the SBML XML namespace of + the document @em overrides the value used when creating the + CompartmentType object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a + CompartmentType is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>CompartmentType(long level, long version)</pre> + + Creates a new CompartmentType using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this CompartmentType + + @param version a long integer, the SBML Version to assign to this + CompartmentType + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a CompartmentType object to an SBMLDocument + (e.g., using Model.addCompartmentType()), the SBML Level, SBML + Version and XML namespace of the document @em override the + values used when creating the CompartmentType object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a CompartmentType is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>CompartmentType(CompartmentType orig)</pre> + + Copy constructor; creates a copy of this CompartmentType. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") CompartmentType::accept " + Accepts the given SBMLVisitor for this instance of CompartmentType. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next CompartmentType in + the list of compartment types. +"; + + +%feature("docstring") CompartmentType::clone " + Creates and returns a deep copy of this CompartmentType. + + @return a (deep) copy of this CompartmentType. +"; + + +%feature("docstring") CompartmentType::getId " + Returns the value of the \'id\' attribute of this CompartmentType. + + @return the id of this CompartmentType. +"; + + +%feature("docstring") CompartmentType::getName " + Returns the value of the \'name\' attribute of this CompartmentType. + + @return the name of this CompartmentType. +"; + + +%feature("docstring") CompartmentType::isSetId " + Predicate returning @c True if this + CompartmentType\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this CompartmentType is + set, @c False otherwise. +"; + + +%feature("docstring") CompartmentType::isSetName " + Predicate returning @c True if this + CompartmentType\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this CompartmentTypeType is + set, @c False otherwise. +"; + + +%feature("docstring") CompartmentType::setId " + Sets the value of the \'id\' attribute of this CompartmentType. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this CompartmentType + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") CompartmentType::setName " + Sets the value of the \'name\' attribute of this CompartmentType. + + The string in @p name is copied. + + @param name the new name for the CompartmentType + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") CompartmentType::unsetName " + Unsets the value of the \'name\' attribute of this CompartmentType. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") CompartmentType::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") CompartmentType::getElementName " + Returns the XML element name of this object, which for + CompartmentType, is always @c \'compartmentType\'. + + @return the name of this element, i.e., @c \'compartmentType\'. +"; + + +%feature("docstring") CompartmentType::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") CompartmentType::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this CompartmentType object + have been set. + + @note The required attributes for a CompartmentType object are: + @li \'id\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") CompartmentType::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") CompartmentType::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. + + @param attributes the XMLAttributes to use. +"; + + +%feature("docstring") CompartmentType::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. + + @param attributes the XMLAttributes to use. +"; + + +%feature("docstring") CompartmentType::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. + + @param stream the XMLOutputStream to use. +"; + + +%feature("docstring") ListOfCompartmentTypes::ListOfCompartmentTypes " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfCompartmentTypes(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfCompartmentTypes object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfCompartmentTypes object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfCompartmentTypes(long level, long version)</pre> + + Creates a new ListOfCompartmentTypes object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfCompartmentTypes::clone " + Creates and returns a deep copy of this ListOfCompartmentTypes instance. + + @return a (deep) copy of this ListOfCompartmentTypes. +"; + + +%feature("docstring") ListOfCompartmentTypes::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfCompartmentTypes::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., CompartmentType objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfCompartmentTypes::getElementName " + Returns the XML element name of this object. + + For ListOfCompartmentTypes, the XML element name is @c + \'listOfCompartmentTypes\'. + + @return the name of this element, i.e., @c \'listOfCompartmentTypes\'. +"; + + +%feature("docstring") ListOfCompartmentTypes::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a CompartmentType from the ListOfCompartmentTypes. + + @param n the index number of the CompartmentType to get. + + @return the nth CompartmentType in this ListOfCompartmentTypes. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a CompartmentType from the ListOfCompartmentTypes + based on its identifier. + + @param sid a string representing the identifier + of the CompartmentType to get. + + @return CompartmentType in this ListOfCompartmentTypes + with the given @p sid or @c None if no such + CompartmentType exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfCompartmentTypes::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfCompartmentTypes items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfCompartmentTypes items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfCompartmentTypes::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. For example, the + ListOfCompartmentTypes in a model (in SBML Level 2 Version 4) is the + third ListOf___. (However, it differs for different Levels and + Versions of SBML, so calling code should not hardwire this number.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfCompartmentTypes::createObject " + @internal + Create a ListOfCompartmentTypes object corresponding to the next token + in the XML input stream. + + @return the SBML object corresponding to next XMLToken in the + XMLInputStream, or @c None if the token was not recognized. +"; + + +%feature("docstring") SpeciesType " + @ingroup Core + Implementation of SBML Level 2\'s %SpeciesType construct. + + The term @em species @em type refers to reacting entities independent of + location. These include simple ions (e.g., protons, calcium), simple + molecules (e.g., glucose, ATP), large molecules (e.g., RNA, + polysaccharides, and proteins), and others. + + SBML Level 2 Versions 2–4 provide an explicit + SpeciesType class of object to enable Species objects of the same type + to be related together. SpeciesType is a conceptual construct; the + existence of SpeciesType objects in a model has no effect on the model\'s + numerical interpretation. Except for the requirement for uniqueness of + species/species type combinations located in compartments, simulators + and other numerical analysis software may ignore SpeciesType definitions + and references to them in a model. + + There is no mechanism in SBML Level 2 for representing hierarchies of + species types. One SpeciesType object cannot be the subtype of another + SpeciesType object; SBML provides no means of defining such + relationships. + + As with other major structures in SBML, SpeciesType has a mandatory + attribute, \'id\', used to give the species type an identifier. The + identifier must be a text string conforming to the identifer syntax + permitted in SBML. SpeciesType also has an optional \'name\' attribute, + of type @c string. The \'id\' and \'name\' must be used according to the + guidelines described in the SBML specification (e.g., Section 3.3 in + the Level 2 Version 4 specification). + + SpeciesType was introduced in SBML Level 2 Version 2. It is not + available in SBML Level 1 nor in Level 3. + + @see Species + @see ListOfSpeciesTypes + @see CompartmentType + @see ListOfCompartmentTypes + + <!---------------------------------------------------------------------- --> +"; + + +%feature("docstring") ListOfSpeciesTypes " + @ingroup Core + Implementation of SBML\'s %ListOfSpeciesTypes construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") SpeciesType::SpeciesType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SpeciesType(SBMLNamespaces sbmlns)</pre> + + Creates a new SpeciesType using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the \'id\' + (identifier) attribute of a SpeciesType object is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor. Setting the identifier can be accomplished using the + method SBase.setId(). + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a SpeciesType object to an SBMLDocument + (e.g., using Model.addSpeciesType()), + the SBML XML namespace of the document @em overrides the value used + when creating the SpeciesType object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a SpeciesType is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SpeciesType(long level, long version)</pre> + + Creates a new SpeciesType using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this SpeciesType + + @param version a long integer, the SBML Version to assign to this + SpeciesType + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a SpeciesType object to an SBMLDocument + (e.g., using Model.addSpeciesType()), + the SBML Level, SBML Version and XML namespace of the document @em + override the values used when creating the SpeciesType object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a SpeciesType is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SpeciesType(SpeciesType orig)</pre> + + Copy constructor; creates a copy of this SpeciesType. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") SpeciesType::accept " + Accepts the given SBMLVisitor for this instance of SpeciesType. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next SpeciesType in + the list of compartment types. +"; + + +%feature("docstring") SpeciesType::clone " + Creates and returns a deep copy of this SpeciesType. + + @return a (deep) copy of this SpeciesType. +"; + + +%feature("docstring") SpeciesType::getId " + Returns the value of the \'id\' attribute of this SpeciesType. + + @return the id of this SpeciesType. +"; + + +%feature("docstring") SpeciesType::getName " + Returns the value of the \'name\' attribute of this SpeciesType. + + @return the name of this SpeciesType. +"; + + +%feature("docstring") SpeciesType::isSetId " + Predicate returning @c True if this + SpeciesType\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this SpeciesType is + set, @c False otherwise. +"; + + +%feature("docstring") SpeciesType::isSetName " + Predicate returning @c True if this + SpeciesType\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this SpeciesType is + set, @c False otherwise. +"; + + +%feature("docstring") SpeciesType::setId " + Sets the value of the \'id\' attribute of this SpeciesType. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this SpeciesType + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SpeciesType::setName " + Sets the value of the \'name\' attribute of this SpeciesType. + + The string in @p name is copied. + + @param name the new name for the SpeciesType + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SpeciesType::unsetName " + Unsets the value of the \'name\' attribute of this SpeciesType. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SpeciesType::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") SpeciesType::getElementName " + Returns the XML element name of this object, which for + SpeciesType, is always @c \'compartmentType\'. + + @return the name of this element, i.e., @c \'compartmentType\'. +"; + + +%feature("docstring") SpeciesType::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") SpeciesType::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this SpeciesType object + have been set. + + @note The required attributes for a SpeciesType object are: + @li \'id\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") SpeciesType::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") SpeciesType::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. + + @param attributes the XMLAttributes to use. +"; + + +%feature("docstring") SpeciesType::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. + + @param attributes the XMLAttributes to use. +"; + + +%feature("docstring") SpeciesType::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. + + @param stream the XMLOutputStream to use. +"; + + +%feature("docstring") ListOfSpeciesTypes::ListOfSpeciesTypes " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfSpeciesTypes(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfSpeciesTypes object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfSpeciesTypes object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfSpeciesTypes(long level, long version)</pre> + + Creates a new ListOfSpeciesTypes object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfSpeciesTypes::clone " + Creates and returns a deep copy of this ListOfSpeciesTypes instance. + + @return a (deep) copy of this ListOfSpeciesTypes. +"; + + +%feature("docstring") ListOfSpeciesTypes::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfSpeciesTypes::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., SpeciesType objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfSpeciesTypes::getElementName " + Returns the XML element name of this object. + + For ListOfSpeciesTypes, the XML element name is @c + \'listOfSpeciesTypes\'. + + @return the name of this element, i.e., @c \'listOfSpeciesTypes\'. +"; + + +%feature("docstring") ListOfSpeciesTypes::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a SpeciesType from the ListOfSpeciesTypes. + + @param n the index number of the SpeciesType to get. + + @return the nth SpeciesType in this ListOfSpeciesTypes. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a SpeciesType from the ListOfSpeciesTypes + based on its identifier. + + @param sid a string representing the identifier + of the SpeciesType to get. + + @return SpeciesType in this ListOfSpeciesTypes + with the given @p sid or @c None if no such + SpeciesType exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfSpeciesTypes::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfSpeciesTypes items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfSpeciesTypes items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfSpeciesTypes::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. For example, the + ListOfSpeciesTypes in a model (in SBML Level 2 Version 4) is the + third ListOf___. (However, it differs for different Levels and + Versions of SBML, so calling code should not hardwire this number.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfSpeciesTypes::createObject " + @internal + Create a ListOfSpeciesTypes object corresponding to the next token + in the XML input stream. + + @return the SBML object corresponding to next XMLToken in the + XMLInputStream, or @c None if the token was not recognized. +"; + + +%feature("docstring") Compartment " + @ingroup Core + Implementation of SBML\'s %Compartment construct. + + A compartment in SBML represents a bounded space in which species are + located. Compartments do not necessarily have to correspond to actual + structures inside or outside of a biological cell. + + It is important to note that although compartments are optional in the + overall definition of Model, every species in an SBML model must be + located in a compartment. This in turn means that if a model defines + any species, the model must also define at least one compartment. The + reason is simply that species represent physical things, and therefore + must exist @em somewhere. Compartments represent the @em somewhere. + + Compartment has one required attribute, \'id\', to give the compartment a + unique identifier by which other parts of an SBML model definition can + refer to it. A compartment can also have an optional \'name\' attribute + of type @c string. Identifiers and names must be used according to the + guidelines described in the SBML specifications. + + Compartment also has an optional attribute \'spatialDimensions\' that is + used to indicate the number of spatial dimensions possessed by the + compartment. Most modeling scenarios involve compartments with integer + values of \'spatialDimensions\' of @c 3 (i.e., a three-dimensional + compartment, which is to say, a volume), or 2 (a two-dimensional + compartment, a surface), or @c 1 (a one-dimensional compartment, a + line). In SBML Level 3, the type of this attribute is @c double, + there are no restrictions on the permitted values of the + \'spatialDimensions\' attribute, and there are no default values. In SBML + Level 2, the value must be a positive @c integer, and the default + value is @c 3; the permissible values in SBML Level 2 are @c 3, @c + 2, @c 1, and @c 0 (for a point). + + Another optional attribute on Compartment is \'size\', representing the + @em initial total size of that compartment in the model. The \'size\' + attribute must be a floating-point value and may represent a volume (if + the compartment is a three-dimensional one), or an area (if the + compartment is two-dimensional), or a length (if the compartment is + one-dimensional). There is no default value of compartment size in SBML + Level 2 or Level 3. In particular, a missing \'size\' value + <em>does not imply that the compartment size is 1</em>. (This is unlike + the definition of compartment \'volume\' in SBML Level 1.) When the + compartment\'s \'spatialDimensions\' attribute does not have a value of @c + 0, a missing value of \'size\' for a given compartment signifies that the + value either is unknown, or to be obtained from an external source, or + determined by an InitialAssignment, AssignmentRule, AlgebraicRule or + RateRule elsewhere in the model. In SBML Level 2, there are + additional special requirements on the values of \'size\'; we discuss them + in a <a href=\'#comp-l2\'>separate section below</a>. + + The units associated with a compartment\'s \'size\' attribute value may be + set using the optional attribute \'units\'. The rules for setting and + using compartment size units differ between SBML Level 2 and + Level 3, and are discussed separately below. + + Finally, the optional Compartment attribute named \'constant\' is used to + indicate whether the compartment\'s size stays constant after simulation + begins. A value of @c True indicates the compartment\'s \'size\' cannot be + changed by any other construct except InitialAssignment; a value of @c + false indicates the compartment\'s \'size\' can be changed by other + constructs in SBML. In SBML Level 2, there is an additional + explicit restriction that if \'spatialDimensions\'=@c \'0\', the value + cannot be changed by InitialAssignment either. Further, in + Level 2, \'constant\' has a default value of @c True. In SBML + Level 3, there is no default value for the \'constant\' attribute. + + + @section comp-l2 Additional considerations in SBML Level 2 + + In SBML Level 2, the default units of compartment size, and the + kinds of units allowed as values of the attribute \'units\', interact with + the number of spatial dimensions of the compartment. The value of the + \'units\' attribute of a Compartment object must be one of the base units + (see Unit), or the predefined unit identifiers @c volume, @c area, @c + length or @c dimensionless, or a new unit defined by a UnitDefinition + object in the enclosing Model, subject to the restrictions detailed in + the following table: + + @htmlinclude compartment-size-restrictions.html + + In SBML Level 2, the units of the compartment size, as defined by the + \'units\' attribute or (if \'units\' is not set) the default value listed in + the table above, are used in the following ways when the compartment has + a \'spatialDimensions\' value greater than @c 0: + <ul> + <li> The value of the \'units\' attribute is used as the units of the + compartment identifier when the identifier appears as a numerical + quantity in a mathematical formula expressed in MathML. + + <li> The @c math element of an AssignmentRule or InitialAssignment + referring to this compartment must have identical units. + + <li> In RateRule objects that set the rate of change of the compartment\'s + size, the units of the rule\'s @c math element must be identical to the + compartment\'s \'units\' attribute divided by the default @em time units. + (In other words, the units for the rate of change of compartment size + are <em>compartment size</em>/<em>time</em> units. + + <li> When a Species is to be treated in terms of concentrations or + density, the units of the spatial size portion of the concentration + value (i.e., the denominator in the units formula @em substance/@em + size) are those indicated by the value of the \'units\' attribute on the + compartment in which the species is located. + </ul> + + Compartments with \'spatialDimensions\'=@c 0 require special treatment in + this framework. As implied above, the \'size\' attribute must not have a + value on an SBML Level 2 Compartment object if the + \'spatialDimensions\' attribute has a value of @c 0. An additional + related restriction is that the \'constant\' attribute must default to or + be set to @c True if the value of the \'spatialDimensions\' attribute is + @c 0, because a zero-dimensional compartment cannot ever have a size. + + If a compartment has no size or dimensional units, how should such a + compartment\'s identifier be interpreted when it appears in mathematical + formulas? The answer is that such a compartment\'s identifier should not + appear in mathematical formulas in the first place—it has no + value, and its value cannot change. Note also that a zero-dimensional + compartment is a point, and species located at points can only be + described in terms of amounts, not spatially-dependent measures such as + concentration. Since SBML KineticLaw formulas are already in terms of + @em substance/@em time and not (say) @em concentration/@em time, volume + or other factors in principle are not needed for species located in + zero-dimensional compartments. + + Finally, in SBML Level 2 Versions 2–4, each compartment in a + model may optionally be designated as belonging to a particular + compartment @em type. The optional attribute \'compartmentType\' is used + identify the compartment type represented by the Compartment structure. + The \'compartmentType\' attribute\'s value must be the identifier of a + CompartmentType instance defined in the model. If the \'compartmentType\' + attribute is not present on a particular compartment definition, a + unique virtual compartment type is assumed for that compartment, and no + other compartment can belong to that compartment type. The values of + \'compartmentType\' attributes on compartments have no effect on the + numerical interpretation of a model. Simulators and other numerical + analysis software may ignore \'compartmentType\' attributes. The + \'compartmentType\' attribute and the CompartmentType class of objects are + not present in SBML Level 3 Core nor in SBML Level 1. + + + @section comp-l3 Additional considerations in SBML Level 3 + + One difference between SBML Level 3 and lower Levels of SBML is + that there are no restrictions on the permissible values of the + \'spatialDimensions\' attribute, and there is no default value defined for + the attribute. The value of \'spatialDimensions\' does not have to be an + integer, either; this is to allow for the possibility of representing + structures with fractal dimensions. + + The number of spatial dimensions possessed by a compartment cannot enter + into mathematical formulas, and therefore cannot directly alter the + numerical interpretation of a model. However, the value of + \'spatialDimensions\' @em does affect the interpretation of the units + associated with a compartment\'s size. Specifically, the value of + \'spatialDimensions\' is used to select among the Model attributes + \'volumeUnits\', \'areaUnits\' and \'lengthUnits\' when a Compartment object + does not define a value for its \'units\' attribute. + + The \'units\' attribute may be left unspecified for a given compartment in + a model; in that case, the compartment inherits the unit of measurement + specified by one of the attributes on the enclosing Model object + instance. The applicable attribute on Model depends on the value of the + compartment\'s \'spatialDimensions\' attribute; the relationship is shown + in the table below. If the Model object does not define the relevant + attribute (\'volumeUnits\', \'areaUnits\' or \'lengthUnits\') for a given + \'spatialDimensions\' value, the unit associated with that Compartment + object\'s size is undefined. If @em both \'spatialDimensions\' and \'units\' + are left unset on a given Compartment object instance, then no unit can + be chosen from among the Model\'s \'volumeUnits\', \'areaUnits\' or + \'lengthUnits\' attributes (even if the Model instance provides values for + those attributes), because there is no basis to select between them and + there is no default value of \'spatialDimensions\'. Leaving the units of + compartments\' sizes undefined in an SBML model does not render the model + invalid; however, as a matter of best practice, we strongly recommend + that all models specify the units of measurement for all compartment + sizes. + + @htmlinclude compartment-size-recommendations.html + + The unit of measurement associated with a compartment\'s size, as defined + by the \'units\' attribute or (if \'units\' is not set) the inherited value + from Model according to the table above, is used in the following ways: + + <ul> + + <li> When the identifier of the compartment appears as a numerical + quantity in a mathematical formula expressed in MathML, it represents + the size of the compartment, and the unit associated with the size is + the value of the \'units\' attribute. + + <li> When a Species is to be treated in terms of concentrations or + density, the unit associated with the spatial size portion of the + concentration value (i.e., the denominator in the formula + <em>amount</em>/<em>size</em>) is specified by the value of the \'units\' + attribute on the compartment in which the species is located. + + <li> The \'math\' elements of AssignmentRule, InitialAssignment and + EventAssignment objects setting the value of the compartment size + should all have the same units as the unit associated with the + compartment\'s size. + + <li> In a RateRule object that defines a rate of change for a + compartment\'s size, the unit of the rule\'s \'math\' element should be + identical to the compartment\'s \'units\' attribute divided by the + model-wide unit of <em>time</em>. (In other words, {<em>unit of + compartment size</em>}/{<em>unit of time</em>}.) + + </ul> + + + @section comp-other Other aspects of Compartment + + In SBML Level 1 and Level 2, Compartment has an optional + attribute named \'outside\', whose value can be the identifier of another + Compartment object defined in the enclosing Model object. Doing so + means that the other compartment contains it or is outside of it. This + enables the representation of simple topological relationships between + compartments, for those simulation systems that can make use of the + information (e.g., for drawing simple diagrams of compartments). It is + worth noting that in SBML, there is no relationship between compartment + sizes when compartment positioning is expressed using the \'outside\' + attribute. The size of a given compartment does not in any sense + include the sizes of other compartments having it as the value of their + \'outside\' attributes. In other words, if a compartment @em B has the + identifier of compartment @em A as its \'outside\' attribute value, the + size of @em A does not include the size of @em B. The compartment sizes + are separate. + + In Level 2, there are two restrictions on the \'outside\' attribute. + First, because a compartment with \'spatialDimensions\' of @c 0 has no + size, such a compartment cannot act as the container of any other + compartment @em except compartments that @em also have + \'spatialDimensions\' values of @c 0. Second, the directed graph formed + by representing Compartment structures as vertexes and the \'outside\' + attribute values as edges must be acyclic. The latter condition is + imposed to prevent a compartment from being contained inside itself. In + the absence of a value for \'outside\', compartment definitions in SBML + Level 2 do not have any implied spatial relationships between each + other. + + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfCompartments " + @ingroup Core + Implementation of SBML Level 2\'s %ListOfCompartments construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Compartment::Compartment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Compartment(SBMLNamespaces sbmlns)</pre> + + Creates a new Compartment using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the \'id\' + (identifier) attribute of a Compartment is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor. Setting the identifier can be accomplished using the + method @if java Compartment.setId()@else setId()@endif. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Compartment object to an SBMLDocument + (e.g., using Model.addCompartment()), the SBML XML namespace of the + document @em overrides the value used when creating the Compartment + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a Compartment is an + important aid to producing valid SBML. Knowledge of the intented SBML + Level and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Compartment(long level, long version)</pre> + + Creates a new Compartment using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Compartment + + @param version a long integer, the SBML Version to assign to this + Compartment + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Compartment object to an SBMLDocument + (e.g., using Model.addCompartment()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the Compartment object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a Compartment is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Compartment(Compartment orig)</pre> + + Copy constructor; creates a copy of a Compartment. + + @param orig the Compartment instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Compartment::accept " + Accepts the given SBMLVisitor for this instance of Compartment. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next Compartment in the + list of compartments within which this Compartment is embedded (i.e., + the ListOfCompartments in the parent Model). +"; + + +%feature("docstring") Compartment::clone " + Creates and returns a deep copy of this Compartment object. + + @return a (deep) copy of this Compartment. +"; + + +%feature("docstring") Compartment::initDefaults " + Initializes the fields of this Compartment object to \'typical\' default + values. + + The SBML Compartment component has slightly different aspects and + default attribute values in different SBML Levels and Versions. + This method sets the values to certain common defaults, based + mostly on what they are in SBML Level 2. Specifically: + <ul> + <li> Sets attribute \'spatialDimensions\' to @c 3 + <li> Sets attribute \'constant\' to @c True + <li> (Applies to Level 1 models only) Sets attribute \'volume\' to @c 1.0 + <li> (Applies to Level 3 models only) Sets attribute \'units\' to @c litre + </ul> +"; + + +%feature("docstring") Compartment::getId " + Returns the value of the \'id\' attribute of this Compartment object. + + @return the id of this Compartment. +"; + + +%feature("docstring") Compartment::getName " + Returns the value of the \'name\' attribute of this Compartment object. + + @return the name of this Compartment. +"; + + +%feature("docstring") Compartment::getCompartmentType " + Get the value of the \'compartmentType\' attribute of this Compartment + object. + + @return the value of the \'compartmentType\' attribute of this + Compartment as a string. + + @note The \'compartmentType\' attribute is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Compartment::getSpatialDimensions " + Get the number of spatial dimensions of this Compartment object. + + @note In SBML Level 3, the data type of the \'spatialDimensions\' + attribute is @c double, whereas in Level 2, it is @c integer. + LibSBML provides a separate method for obtaining the value as a double, + for models where it is relevant. + + @return the value of the \'spatialDimensions\' attribute of this + Compartment as a long integereger + + @see getSpatialDimensionsAsDouble() +"; + + +%feature("docstring") Compartment::getSpatialDimensionsAsDouble " + Get the number of spatial dimensions of this Compartment object + as a double. + + @note In SBML Level 3, the data type of the \'spatialDimensions\' + attribute is @c double, whereas in Level 2, it is @c integer. To + avoid backward compatibility issues, libSBML provides a separate + method for obtaining the value as a double, for models where it is + relevant. + + @return the value of the \'spatialDimensions\' attribute of this + Compartment as a double, or @c NaN if this model is not in SBML + Level 3 format. + + @see getSpatialDimensions() +"; + + +%feature("docstring") Compartment::getSize " + Get the size of this Compartment. + + This method is identical to + @if java Compartment.getVolume()@else getVolume()@endif. + In SBML Level 1, compartments are always three-dimensional + constructs and only have volumes, whereas in SBML Level 2, + compartments may be other than three-dimensional and therefore the + \'volume\' attribute is named \'size\' in Level 2. LibSBML provides + both + @if java Compartment.getSize()@else getSize()@endif@~ and + @if java Compartment.getVolume()@else getVolume()@endif@~ for + easier compatibility between SBML Levels. + + @return the value of the \'size\' attribute (\'volume\' in Level 1) of + this Compartment as a float-point number. + + @see isSetSize() + @see getVolume() +"; + + +%feature("docstring") Compartment::getVolume " + Get the volume of this Compartment. + + This method is identical to + @if java Compartment.getSize()@else getSize()@endif. In + SBML Level 1, compartments are always three-dimensional + constructs and only have volumes, whereas in SBML Level 2, + compartments may be other than three-dimensional and therefore the + \'volume\' attribute is named \'size\' in Level 2. LibSBML provides + both + @if java Compartment.getSize()@else getSize()@endif@~ and + @if java Compartment.getVolume()@else getVolume()@endif@~ + for easier compatibility between SBML Levels. + + @return the value of the \'volume\' attribute (\'size\' in Level 2) of + this Compartment, as a floating-point number. + + @note The attribute \'volume\' only exists by that name in SBML + Level 1. In Level 2 and above, the equivalent attribute is + named \'size\'. + + @see isSetVolume() + @see getSize() +"; + + +%feature("docstring") Compartment::getUnits " + Get the units of this compartment\'s size. + + The value of an SBML compartment\'s \'units\' attribute establishes the + unit of measurement associated with the compartment\'s size. + + @return the value of the \'units\' attribute of this Compartment, as a + string. An empty string indicates that no units have been assigned to + the value of the size. + + @note @htmlinclude unassigned-units-are-not-a-default.html + + @see isSetUnits() + @see @if java Compartment.setUnits()@else setUnits()@endif@~ + @see getSize() +"; + + +%feature("docstring") Compartment::getOutside " + Get the identifier, if any, of the compartment that is designated + as being outside of this one. + + @return the value of the \'outside\' attribute of this Compartment. + + @note The \'outside\' attribute is defined in SBML Level 1 and + Level 2, but does not exist in SBML Level 3 Version 1 + Core. +"; + + +%feature("docstring") Compartment::getConstant " + Get the value of the \'constant\' attribute of this Compartment. + + @return @c True if this Compartment\'s size is flagged as being + constant, @c False otherwise. +"; + + +%feature("docstring") Compartment::isSetId " + Predicate returning @c True if this + Compartment\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this Compartment is + set, @c False otherwise. +"; + + +%feature("docstring") Compartment::isSetName " + Predicate returning @c True if this + Compartment\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this Compartment is + set, @c False otherwise. +"; + + +%feature("docstring") Compartment::isSetCompartmentType " + Predicate returning @c True if this + Compartment\'s \'compartmentType\' attribute is set. + + @return @c True if the \'compartmentType\' attribute of this Compartment + is set, @c False otherwise. + + @note The \'compartmentType\' attribute is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Compartment::isSetSize " + Predicate returning @c True if this + Compartment\'s \'size\' attribute is set. + + This method is similar but not identical to + @if java Compartment.isSetVolume()@else isSetVolume()@endif. The latter + should be used in the context of SBML Level 1 models instead of + @if java Compartment.isSetSize()@else isSetSize()@endif@~ + because @if java Compartment.isSetVolume()@else isSetVolume()@endif@~ + performs extra processing to take into account the difference in + default values between SBML Levels 1 and 2. + + @return @c True if the \'size\' attribute (\'volume\' in Level 2) of + this Compartment is set, @c False otherwise. + + @see isSetVolume() + @see setSize() +"; + + +%feature("docstring") Compartment::isSetVolume " + Predicate returning @c True if this Compartment\'s + \'volume\' attribute is set. + + This method is similar but not identical to + @if java Compartment.isSetSize()@else isSetSize()@endif. The latter + should not be used in the context of SBML Level 1 models because this + method performs extra processing to take into account + the difference in default values between SBML Levels 1 and 2. + + @return @c True if the \'volume\' attribute (\'size\' in Level 2 and + above) of this Compartment is set, @c False otherwise. + + @note The attribute \'volume\' only exists by that name in SBML + Level 1. In Level 2 and above, the equivalent attribute is + named \'size\'. In SBML Level 1, a compartment\'s volume has a + default value (@c 1.0) and therefore this method will always return @c + true. In Level 2, a compartment\'s size (the equivalent of SBML + Level 1\'s \'volume\') is optional and has no default value, and + therefore may or may not be set. + + @see isSetSize() + @see @if java Compartment.setVolume()@else setVolume()@endif@~ +"; + + +%feature("docstring") Compartment::isSetUnits " + Predicate returning @c True if this + Compartment\'s \'units\' attribute is set. + + @return @c True if the \'units\' attribute of this Compartment is + set, @c False otherwise. + + @note @htmlinclude unassigned-units-are-not-a-default.html +"; + + +%feature("docstring") Compartment::isSetOutside " + Predicate returning @c True if this + Compartment\'s \'outside\' attribute is set. + + @return @c True if the \'outside\' attribute of this Compartment is + set, @c False otherwise. + + @note The \'outside\' attribute is defined in SBML Level 1 and + Level 2, but does not exist in SBML Level 3 Version 1 + Core. +"; + + +%feature("docstring") Compartment::isSetSpatialDimensions " + Predicate returning @c True if this + Compartment\'s \'spatialDimensions\' attribute is set. + + @return @c True if the \'spatialDimensions\' attribute of this + Compartment is set, @c False otherwise. +"; + + +%feature("docstring") Compartment::isSetConstant " + Predicate returning @c True if this + Compartment\'s \'constant\' attribute is set. + + @return @c True if the \'constant\' attribute of this Compartment is + set, @c False otherwise. +"; + + +%feature("docstring") Compartment::setId " + Sets the value of the \'id\' attribute of this Compartment. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this Compartment + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Compartment::setName " + Sets the value of the \'name\' attribute of this Compartment. + + The string in @p name is copied. + + @param name the new name for the Compartment + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Compartment::setCompartmentType " + Sets the \'compartmentType\' attribute of this Compartment. + + @param sid the identifier of a CompartmentType object defined + elsewhere in this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The \'compartmentType\' attribute is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Compartment::setSpatialDimensions " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setSpatialDimensions(double value)</pre> + + Sets the \'spatialDimensions\' attribute of this Compartment as a double. + + @param value a double indicating the number of dimensions + of this compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>setSpatialDimensions(long value)</pre> + + Sets the \'spatialDimensions\' attribute of this Compartment. + + If @p value is not one of @c 0, @c 1, @c 2, or @c 3, this method will + have no effect (i.e., the \'spatialDimensions\' attribute will not be + set). + + @param value a long integereger indicating the number of dimensions + of this compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Compartment::setSize " + Sets the \'size\' attribute (or \'volume\' in SBML Level 1) of this + Compartment. + + This method is identical to + @if java Compartment.setVolume()@else setVolume()@endif@~ + and is provided for compatibility between + SBML Level 1 and Level 2. + + @param value a @c double representing the size of this compartment + instance in whatever units are in effect for the compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @note The attribute \'volume\' only exists by that name in SBML + Level 1. In Level 2 and above, the equivalent attribute is + named \'size\'. +"; + + +%feature("docstring") Compartment::setVolume " + Sets the \'volume\' attribute (or \'size\' in SBML Level 2) of this + Compartment. + + This method is identical to + @if java Compartment.setVolume()@else setVolume()@endif@~ + and is provided for compatibility between SBML Level 1 and + Level 2. + + @param value a @c double representing the volume of this compartment + instance in whatever units are in effect for the compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @note The attribute \'volume\' only exists by that name in SBML + Level 1. In Level 2 and above, the equivalent attribute is + named \'size\'. +"; + + +%feature("docstring") Compartment::setUnits " + Sets the \'units\' attribute of this Compartment. + + @param sid the identifier of the defined units to use. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Compartment::setOutside " + Sets the \'outside\' attribute of this Compartment. + + @param sid the identifier of a compartment that encloses this one. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'outside\' attribute is defined in SBML Level 1 and + Level 2, but does not exist in SBML Level 3 Version 1 + Core. +"; + + +%feature("docstring") Compartment::setConstant " + Sets the value of the \'constant\' attribute of this Compartment. + + @param value a boolean indicating whether the size/volume of this + compartment should be considered constant (@c True) or variable + (@c False) + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Compartment::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Compartment::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Compartment::unsetName " + Unsets the value of the \'name\' attribute of this Compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Compartment::unsetCompartmentType " + Unsets the value of the \'compartmentType\' + attribute of this Compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The \'compartmentType\' attribute is only available in SBML + Level 2 Versions 2–4. + + @see setCompartmentType() + @see isSetCompartmentType() +"; + + +%feature("docstring") Compartment::unsetSize " + Unsets the value of the \'size\' attribute of this Compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The attribute \'volume\' only exists by that name in SBML + Level 1. In Level 2 and above, the equivalent attribute is + named \'size\'. +"; + + +%feature("docstring") Compartment::unsetVolume " + Unsets the value of the \'volume\' attribute of this + Compartment. + + In SBML Level 1, a Compartment volume has a default value (@c 1.0) and + therefore <em>should always be set</em>. In Level 2, \'size\' is + optional with no default value and as such may or may not be set. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The attribute \'volume\' only exists by that name in SBML + Level 1. In Level 2 and above, the equivalent attribute is + named \'size\'. +"; + + +%feature("docstring") Compartment::unsetUnits " + Unsets the value of the \'units\' attribute of this Compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Compartment::unsetOutside " + Unsets the value of the \'outside\' attribute of this Compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'outside\' attribute is defined in SBML Level 1 and + Level 2, but does not exist in SBML Level 3 Version 1 + Core. +"; + + +%feature("docstring") Compartment::unsetSpatialDimensions " + Unsets the value of the \'spatialDimensions\' attribute of this Compartment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note This function is only valid for SBML Level 3. +"; + + +%feature("docstring") Compartment::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this Compartment\'s designated size. + + Compartments in SBML have an attribute (\'units\') for declaring the + units of measurement intended for the value of the compartment\'s size. + In the absence of a value given for this attribute, the units are + inherited from values either defined on the enclosing Model (in SBML + Level 3) or in defaults (in SBML Level 2). This method + returns a UnitDefinition object based on how this compartment\'s units + are interpreted according to the relevant SBML guidelines, or it + returns @c None if no units have been declared and no defaults are + defined by the relevant SBML specification. + + Note that unit declarations for Compartment objects are specified in + terms of the @em identifier of a unit (e.g., using + @if java Compartment.setUnits()@else setUnits()@endif), but + @em this method returns a UnitDefinition object, not a unit + identifier. It does this by constructing an appropriate + UnitDefinition. For SBML Level 2 models, it will do this even + when the value of the \'units\' attribute is one of the special SBML + Level 2 unit identifiers @c \'substance\', @c \'volume\', @c \'area\', + @c \'length\' or @c \'time\'. Callers may find this useful in conjunction + with the helper methods provided by the UnitDefinition class for + comparing different UnitDefinition objects. + + @return a UnitDefinition that expresses the units of this + Compartment, or @c None if one cannot be constructed. + + @note The libSBML system for unit analysis depends on the model as a + whole. In cases where the Compartment object has not yet been added + to a model, or the model itself is incomplete, unit analysis is not + possible, and consequently this method will return @c None. + + @see isSetUnits() + @see getUnits() +"; + + +%feature("docstring") Compartment::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or + @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Compartment::getElementName " + Returns the XML element name of this object, which for Compartment, is + always @c \'compartment\'. + + @return the name of this element, i.e., @c \'compartment\'. +"; + + +%feature("docstring") Compartment::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Compartment::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this Compartment object + have been set. + + @note The required attributes for a Compartment object are: + @li \'id\' (or \'name\' in SBML Level 1) + @li \'constant\' (in SBML Level 3 only) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Compartment::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Compartment::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Compartment::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Compartment::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Compartment::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Compartment::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Compartment::isExplicitlySetSpatialDimensions " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Compartment::isExplicitlySetConstant " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfCompartments::ListOfCompartments " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfCompartments(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfCompartments object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfCompartments object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfCompartments(long level, long version)</pre> + + Creates a new ListOfCompartments object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfCompartments::clone " + Creates and returns a deep copy of this ListOfCompartments instance. + + @return a (deep) copy of this ListOfCompartments. +"; + + +%feature("docstring") ListOfCompartments::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfCompartments::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Compartment objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfCompartments::getElementName " + Returns the XML element name of this object. + + For ListOfCompartments, the XML element name is @c \'listOfCompartments\'. + + @return the name of this element, i.e., @c \'listOfCompartments\'. +"; + + +%feature("docstring") ListOfCompartments::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a Compartment from the ListOfCompartments. + + @param n the index number of the Compartment to get. + + @return the nth Compartment in this ListOfCompartments. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a Compartment from the ListOfCompartments + based on its identifier. + + @param sid a string representing the identifier + of the Compartment to get. + + @return Compartment in this ListOfCompartments + with the given @p sid or @c None if no such + Compartment exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfCompartments::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfCompartments items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfCompartments items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then + @c None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfCompartments::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the ListOfCompartments + in a model is (in SBML Level 2 Version 4) the fifth + ListOf___. (However, it differs for different Levels and Versions of + SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfCompartments::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Species " + @ingroup Core + Implementation of SBML\'s %Species construct. + + A @em species in SBML refers to a pool of entities that (a) are + considered indistinguishable from each other for the purposes of the + model, (b) participate in reactions, and (c) are located in a specific + @em compartment. The SBML Species object class is intended to represent + these pools. + + As with other major constructs in SBML, Species has a mandatory + attribute, \'id\', used to give the species type an identifier in the + model. The identifier must be a text string conforming to the identifer + syntax permitted in SBML. Species also has an optional \'name\' + attribute, of type @c string. The \'id\' and \'name\' must be used + according to the guidelines described in the SBML specifications. + + The required attribute \'compartment\' is used to identify the compartment + in which the species is located. The attribute\'s value must be the + identifier of an existing Compartment object. It is important to note + that there is no default value for the \'compartment\' attribute on + Species; every species in an SBML model must be assigned a compartment + @em explicitly. (This also implies that every model with one or more + Species objects must define at least one Compartment object.) + + + @section species-amounts The initial amount and concentration of a species + + The optional attributes \'initialAmount\' and \'initialConcentration\', both + having a data type of @c double, can be used to set the @em initial + quantity of the species in the compartment where the species is located. + These attributes are mutually exclusive; i.e., <em>only one</em> can + have a value on any given instance of a Species object. Missing + \'initialAmount\' and \'initialConcentration\' values implies that their + values either are unknown, or to be obtained from an external source, or + determined by an InitialAssignment or other SBML construct elsewhere in + the model. + + A species\' initial quantity in SBML is set by the \'initialAmount\' or + \'initialConcentration\' attribute exactly once. If the \'constant\' + attribute is @c True, then the value of the species\' quantity is fixed + and cannot be changed except by an InitialAssignment. These methods + differ in that the \'initialAmount\' and \'initialConcentration\' attributes + can only be used to set the species quantity to a literal floating-point + number, whereas the use of an InitialAssignment object allows the value + to be set using an arbitrary mathematical expression (which, thanks to + MathML\'s expressiveness, may evaluate to a rational number). If the + species\' \'constant\' attribute is @c False, the species\' quantity value + may be overridden by an InitialAssignment or changed by AssignmentRule + or AlgebraicRule, and in addition, for <em>t > 0</em>, it may also be + changed by a RateRule, Event objects, and as a result of being a + reactant or product in one or more Reaction objects. (However, some + constructs are mutually exclusive; see the SBML specifications for the + precise details.) It is not an error to define \'initialAmount\' or + \'initialConcentration\' on a species and also redefine the value using an + InitialAssignment, but the \'initialAmount\' or \'initialConcentration\' + setting in that case is ignored. The SBML specifications provide + additional information about the semantics of assignments, rules and + values for simulation time <em>t</em> <= <em>0</em>. + + SBML Level 2 additionally stipulates that in cases where a species\' + compartment has a \'spatialDimensions\' value of @c 0 (zero), the species + cannot have a value for \'initialConcentration\' because the concepts of + concentration and density break down when a container has zero + dimensions. + + @section species-units The units of a species\' amount or concentration + + When the attribute \'initialAmount\' is set, the unit of measurement + associated with the value of \'initialAmount\' is specified by the Species + attribute \'substanceUnits\'. When the \'initialConcentration\' attribute + is set, the unit of measurement associated with this concentration value + is {<em>unit of amount</em>} divided by {<em>unit of size</em>}, where + the {<em>unit of amount</em>} is specified by the Species + \'substanceUnits\' attribute, and the {<em>unit of size</em>} is specified + by the \'units\' attribute of the Compartment object in which the species + is located. Note that in either case, a unit of <em>amount</em> is + involved and determined by the \'substanceUnits\' attribute. Note + <strong>these two attributes alone do not determine the units of the + species when the species identifier appears in a mathematical + expression</strong>; <em>that</em> aspect is determined by the attribute + \'hasOnlySubstanceUnits\' discussed below. + + In SBML Level 3, if the \'substanceUnits\' attribute is not set on a + given Species object instance, then the unit of <em>amount</em> for that + species is inherited from the \'substanceUnits\' attribute on the + enclosing Model object instance. If that attribute on Model is not set + either, then the unit associated with the species\' quantity is + undefined. + + In SBML Level 2, if the \'substanceUnits\' attribute is not set on a + given Species object instance, then the unit of <em>amount</em> for that + species is taken from the predefined SBML unit identifier @c + \'substance\'. The value assigned to \'substanceUnits\' must be chosen from + one of the following possibilities: one of the base unit identifiers + defined in SBML, the built-in unit identifier @c \'substance\', or the + identifier of a new unit defined in the list of unit definitions in the + enclosing Model object. The chosen units for \'substanceUnits\' must be + be @c \'dimensionless\', @c \'mole\', @c \'item\', @c \'kilogram\', @c \'gram\', + or units derived from these. + + As noted at the beginning of this section, simply setting + \'initialAmount\' or \'initialConcentration\' alone does @em not determine + whether a species identifier represents an amount or a concentration + when it appears elsewhere in an SBML model. The role of the attribute + \'hasOnlySubstanceUnits\' is to indicate whether the units of the species, + when the species identifier appears in mathematical formulas, are + intended to be concentration or amount. The attribute takes on a + boolean value. In SBML Level 3, the attribute has no default value + and must always be set in a model; in SBML Level 2, it has a + default value of @c False. + + The <em>units of the species</em> are used in the following ways: + <ul> + <li> When the species\' identifier appears in a MathML formula, it + represents the species\' quantity, and the unit of measurement associated + with the quantity is as described above. + + <li> The \'math\' elements of AssignmentRule, InitialAssignment and + EventAssignment objects referring to this species should all have the + same units as the unit of measurement associated with the species + quantity. + + <li> In a RateRule object that defines the rate of change of the + species\' quantity, the unit associated with the rule\'s \'math\' element + should be equal to the unit of the species\' quantity divided by the + model-wide unit of <em>time</em>; in other words, {<em>unit of species + quantity</em>}/{<em>unit of time</em>}. + + </ul> + + + @section species-constant The \'constant\' and \'boundaryCondition\' attributes + + The Species object class has two boolean attributes named \'constant\' and + \'boundaryCondition\', used to indicate whether and how the quantity of + that species can vary during a simulation. In SBML Level 2 they + are optional; in SBML Level 3 they are mandatory. The following + table shows how to interpret the combined values of these attributes. + + @htmlinclude species-boundarycondition.html + + By default, when a species is a product or reactant of one or more + reactions, its quantity is determined by those reactions. In SBML, it + is possible to indicate that a given species\' quantity is <em>not</em> + determined by the set of reactions even when that species occurs as a + product or reactant; i.e., the species is on the <em>boundary</em> of + the reaction system, and its quantity is not determined by the + reactions. The boolean attribute \'boundaryCondition\' can be used to + indicate this. A value of @c False indicates that the species @em is + part of the reaction system. In SBML Level 2, the attribute has a + default value of @c False, while in SBML Level 3, it has no + default. + + The \'constant\' attribute indicates whether the species\' quantity can be + changed at all, regardless of whether by reactions, rules, or constructs + other than InitialAssignment. A value of @c False indicates that the + species\' quantity can be changed. (This is also a common value because + the purpose of most simulations is precisely to calculate changes in + species quantities.) In SBML Level 2, the attribute has a default + value of @c False, while in SBML Level 3, it has no default. Note + that the initial quantity of a species can be set by an + InitialAssignment irrespective of the value of the \'constant\' attribute. + + In practice, a \'boundaryCondition\' value of @c True means a differential + equation derived from the reaction definitions should not be generated + for the species. However, the species\' quantity may still be changed by + AssignmentRule, RateRule, AlgebraicRule, Event, and InitialAssignment + constructs if its \'constant\' attribute is @c False. Conversely, if the + species\' \'constant\' attribute is @c True, then its value cannot be + changed by anything except InitialAssignment. + + A species having \'boundaryCondition\'=@c False and \'constant\'=@c False + can appear as a product and/or reactant of one or more reactions in the + model. If the species is a reactant or product of a reaction, it must + @em not also appear as the target of any AssignmentRule or RateRule + object in the model. If instead the species has \'boundaryCondition\'=@c + false and \'constant\'=@c True, then it cannot appear as a reactant or + product, or as the target of any AssignmentRule, RateRule or + EventAssignment object in the model. + + + @section species-l2-convfactor The conversionFactor attribute in SBML Level 3 + + In SBML Level 3, Species has an additional optional attribute, + \'conversionFactor\', that defines a conversion factor that applies to a + particular species. The value must be the identifier of a Parameter + object instance defined in the model. That Parameter object must be a + constant, meaning its \'constant\' attribute must be set to @c True. + If a given Species object definition defines a value for its + \'conversionFactor\' attribute, it takes precedence over any factor + defined by the Model object\'s \'conversionFactor\' attribute. + + The unit of measurement associated with a species\' quantity can be + different from the unit of extent of reactions in the model. SBML + Level 3 avoids implicit unit conversions by providing an explicit + way to indicate any unit conversion that might be required. The use of + a conversion factor in computing the effects of reactions on a species\' + quantity is explained in detail in the SBML Level 3 specification + document. Because the value of the \'conversionFactor\' attribute is the + identifier of a Parameter object, and because parameters can have units + attached to them, the transformation from reaction extent units to + species units can be completely specified using this approach. + + Note that the unit conversion factor is <strong>only applied when + calculating the effect of a reaction on a species</strong>. It is not + used in any rules or other SBML constructs that affect the species, and + it is also not used when the value of the species is referenced in a + mathematical expression. + + + @section species-l2-type The speciesType attribute in SBML Level 2 Versions 2–4 + + In SBML Level 2 Versions 2–4, each species in a model + may optionally be designated as belonging to a particular species type. + The optional attribute \'speciesType\' is used to identify the species + type of the chemical entities that make up the pool represented by the + Species objects. The attribute\'s value must be the identifier of an + existing SpeciesType object in the model. If the \'speciesType\' + attribute is not present on a particular species definition, it means + the pool contains chemical entities of a type unique to that pool; in + effect, a virtual species type is assumed for that species, and no other + species can belong to that species type. The value of \'speciesType\' + attributes on species have no effect on the numerical interpretation of + a model; simulators and other numerical analysis software may ignore + \'speciesType\' attributes. + + There can be only one species of a given species type in any given + compartment of a model. More specifically, for all Species objects + having a value for the \'speciesType\' attribute, the pair + <center> + (\'speciesType\' attribute value, \'compartment\' attribute value) + </center> + + must be unique across the set of all Species object in a model. + + + @section species-other The spatialSizeUnits attribute in SBML Level 2 Versions 1–2 + + In versions of SBML Level 2 before Version 3, the class + Species included an attribute called \'spatialSizeUnits\', which allowed + explicitly setting the units of size for initial concentration. LibSBML + retains this attribute for compatibility with older definitions of + Level 2, but its use is strongly discouraged because many software + tools do no properly interpret this unit declaration and it is + incompatible with all SBML specifications after Level 2 + Version 3. + + + @section species-math Additional considerations for interpreting the numerical value of a species + + Species are unique in SBML in that they have a kind of duality: a + species identifier may stand for either substance amount (meaning, a + count of the number of individual entities) or a concentration or + density (meaning, amount divided by a compartment size). The previous + sections explain the meaning of a species identifier when it is + referenced in a mathematical formula or in rules or other SBML + constructs; however, it remains to specify what happens to a species + when the compartment in which it is located changes in size. + + When a species definition has a \'hasOnlySubstanceUnits\' attribute value + of @c False and the size of the compartment in which the species is + located changes, the default in SBML is to assume that it is the + concentration that must be updated to account for the size change. This + follows from the principle that, all other things held constant, if a + compartment simply changes in size, the size change does not in itself + cause an increase or decrease in the number of entities of any species + in that compartment. In a sense, the default is that the @em amount of + a species is preserved across compartment size changes. Upon such size + changes, the value of the concentration or density must be recalculated + from the simple relationship <em>concentration = amount / size</em> if + the value of the concentration is needed (for example, if the species + identifier appears in a mathematical formula or is otherwise referenced + in an SBML construct). There is one exception: if the species\' quantity + is determined by an AssignmentRule, RateRule, AlgebraicRule, or an + EventAssignment and the species has a \'hasOnlySubstanceUnits\' attribute + value of @c False, it means that the <em>concentration</em> is assigned + by the rule or event; in that case, the <em>amount</em> must be + calculated when the compartment size changes. (Events also require + additional care in this situation, because an event with multiple + assignments could conceivably reassign both a species quantity and a + compartment size simultaneously. Please refer to the SBML + specifications for the details.) + + Note that the above only matters if a species has a + \'hasOnlySubstanceUnits\' attribute value of @c False, meaning that the + species identifier refers to a concentration wherever the identifier + appears in a mathematical formula. If instead the attribute\'s value is + @c True, then the identifier of the species <em>always</em> stands for + an amount wherever it appears in a mathematical formula or is referenced + by an SBML construct. In that case, there is never a question about + whether an assignment or event is meant to affect the amount or + concentration: it is always the amount. + + A particularly confusing situation can occur when the species has + \'constant\' attribute value of @c True in combination with a + \'hasOnlySubstanceUnits\' attribute value of @c False. Suppose this + species is given a value for \'initialConcentration\'. Does a \'constant\' + value of @c True mean that the concentration is held constant if the + compartment size changes? No; it is still the amount that is kept + constant across a compartment size change. The fact that the species + was initialized using a concentration value is irrelevant. + + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfSpecies " + @ingroup Core + Implementation of SBML Level 2\'s %ListOfSpecies construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Species::Species " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Species(SBMLNamespaces sbmlns)</pre> + + Creates a new Species using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the \'id\' + (identifier) attribute of a Species is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor. Setting the identifier can be accomplished using the + method Species.setId(). + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Species object to an SBMLDocument (e.g., + using Model.addSpecies()), the SBML XML namespace of the document @em + overrides the value used when creating the Species object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Species is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Species(long level, long version)</pre> + + Creates a new Species using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Species + + @param version a long integer, the SBML Version to assign to this + Species + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Species object to an SBMLDocument (e.g., + using Model.addSpecies()), the SBML Level, SBML Version and XML + namespace of the document @em override the values used when creating + the Species object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Species is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Species(Species orig)</pre> + + Copy constructor; creates a copy of this Species object. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Species::accept " + Accepts the given SBMLVisitor for this instance of Species. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") Species::clone " + Creates and returns a deep copy of this Species object. + + @return a (deep) copy of this Species object. +"; + + +%feature("docstring") Species::initDefaults " + Initializes the fields of this Species object to \'typical\' defaults + values. + + The SBML Species component has slightly different aspects and + default attribute values in different SBML Levels and Versions. + This method sets the values to certain common defaults, based + mostly on what they are in SBML Level 2. Specifically: + <ul> + <li> Sets \'boundaryCondition\' to @c False + <li> Sets \'constant\' to @c False + <li> sets \'hasOnlySubstanceUnits\' to @c False + <li> (Applies to Level 3 models only) Sets attribute \'substanceUnits\' to @c mole + </ul> +"; + + +%feature("docstring") Species::getId " + Returns the value of the \'id\' attribute of this Species object. + + @return the id of this Species object. +"; + + +%feature("docstring") Species::getName " + Returns the value of the \'name\' attribute of this Species object. + + @return the name of this Species object. +"; + + +%feature("docstring") Species::getSpeciesType " + Get the type of this Species object object. + + @return the value of the \'speciesType\' attribute of this + Species as a string. + + @note The \'speciesType\' attribute is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Species::getCompartment " + Get the compartment in which this species is located. + + The compartment is designated by its identifier. + + @return the value of the \'compartment\' attribute of this Species + object, as a string. +"; + + +%feature("docstring") Species::getInitialAmount " + Get the value of the \'initialAmount\' attribute. + + @return the initialAmount of this Species, as a float-point number. +"; + + +%feature("docstring") Species::getInitialConcentration " + Get the value of the \'initialConcentration\' attribute. + + @return the initialConcentration of this Species,, as a float-point + number. + + @note The attribute \'initialConcentration\' is only available in SBML + Level 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::getSubstanceUnits " + Get the value of the \'substanceUnits\' attribute. + + @return the value of the \'substanceUnits\' attribute of this Species, + as a string. An empty string indicates that no units have been + assigned. + + @note @htmlinclude unassigned-units-are-not-a-default.html + + @see isSetSubstanceUnits() + @see setSubstanceUnits() +"; + + +%feature("docstring") Species::getSpatialSizeUnits " + Get the value of the \'spatialSizeUnits\' attribute. + + @return the value of the \'spatialSizeUnits\' attribute of this Species + object, as a string. + + @warning In versions of SBML Level 2 before Version 3, the + class Species included an attribute called \'spatialSizeUnits\', which + allowed explicitly setting the units of size for initial + concentration. This attribute was removed in SBML Level 2 + Version 3. LibSBML retains this attribute for compatibility with + older definitions of Level 2, but its use is strongly discouraged + because it is incompatible with Level 2 Version 3 and + Level 2 Version 4. +"; + + +%feature("docstring") Species::getUnits " + Get the value of the \'units\' attribute. + + @return the units of this Species (L1 only). + + @note The \'units\' attribute is defined only in SBML Level 1. In + SBML Level 2 and Level 3, it has been replaced by a + combination of \'substanceUnits\' and the units of the Compartment + object in which a species is located. In SBML Level 2 + Versions 1–2, an additional attribute \'spatialSizeUnits\' + helps determine the units of the species quantity, but this attribute + was removed in later versions of SBML Level 2. +"; + + +%feature("docstring") Species::getHasOnlySubstanceUnits " + Get the value of the \'hasOnlySubstanceUnits\' attribute. + + @return @c True if this Species\' \'hasOnlySubstanceUnits\' attribute + value is nonzero, @c False otherwise. + + @note The \'hasOnlySubstanceUnits\' attribute does not exist in SBML + Level 1. +"; + + +%feature("docstring") Species::getBoundaryCondition " + Get the value of the \'boundaryCondition\' attribute. + + @return @c True if this Species\' \'boundaryCondition\' attribute value + is nonzero, @c False otherwise. +"; + + +%feature("docstring") Species::getCharge " + Get the value of the \'charge\' attribute. + + @return the charge of this Species object. + + @note Beginning in SBML Level 2 Version 2, the \'charge\' + attribute on Species is deprecated and in SBML Level 3 it does + not exist at all. Its use strongly discouraged. Its presence is + considered a misfeature in earlier definitions of SBML because its + implications for the mathematics of a model were never defined, and in + any case, no known modeling system ever used it. Instead, models take + account of charge values directly in their definitions of species by + (for example) having separate species identities for the charged and + uncharged versions of the same species. This allows the condition to + affect model mathematics directly. LibSBML retains this method for + easier compatibility with SBML Level 1. +"; + + +%feature("docstring") Species::getConstant " + Get the value of the \'constant\' attribute. + + @return @c True if this Species\'s \'constant\' attribute value is + nonzero, @c False otherwise. + + @note The attribute \'constant\' is only available in SBML Levels 2 + and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::getConversionFactor " + Get the value of the \'conversionFactor\' attribute. + + @return the conversionFactor of this Species, as a string. + + @note The \'conversionFactor\' attribute was introduced in SBML + Level 3. It does not exist on Species in SBML Levels 1 + and 2. +"; + + +%feature("docstring") Species::isSetId " + Predicate returning @c True if this + Species object\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this Species is + set, @c False otherwise. +"; + + +%feature("docstring") Species::isSetName " + Predicate returning @c True if this + Species object\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this Species is + set, @c False otherwise. +"; + + +%feature("docstring") Species::isSetSpeciesType " + Predicate returning @c True if this Species object\'s + \'speciesType\' attribute is set. + + @return @c True if the \'speciesType\' attribute of this Species is + set, @c False otherwise. + + @note The \'speciesType\' attribute is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Species::isSetCompartment " + Predicate returning @c True if this + Species object\'s \'compartment\' attribute is set. + + @return @c True if the \'compartment\' attribute of this Species is + set, @c False otherwise. +"; + + +%feature("docstring") Species::isSetInitialAmount " + Predicate returning @c True if this + Species object\'s \'initialAmount\' attribute is set. + + @return @c True if the \'initialAmount\' attribute of this Species is + set, @c False otherwise. + + @note In SBML Level 1, Species\' \'initialAmount\' is required and + therefore <em>should always be set</em>. (However, in Level 1, the + attribute has no default value either, so this method will not return + @c True until a value has been assigned.) In SBML Level 2, + \'initialAmount\' is optional and as such may or may not be set. +"; + + +%feature("docstring") Species::isSetInitialConcentration " + Predicate returning @c True if this + Species object\'s \'initialConcentration\' attribute is set. + + @return @c True if the \'initialConcentration\' attribute of this Species is + set, @c False otherwise. + + @note The attribute \'initialConcentration\' is only available in SBML + Level 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::isSetSubstanceUnits " + Predicate returning @c True if this + Species object\'s \'substanceUnits\' attribute is set. + + @return @c True if the \'substanceUnits\' attribute of this Species is + set, @c False otherwise. +"; + + +%feature("docstring") Species::isSetSpatialSizeUnits " + Predicate returning @c True if this + Species object\'s \'spatialSizeUnits\' attribute is set. + + @return @c True if the \'spatialSizeUnits\' attribute of this Species is + set, @c False otherwise. + + @warning In versions of SBML Level~2 before Version 3, the class + Species included an attribute called \'spatialSizeUnits\', which allowed + explicitly setting the units of size for initial concentration. This + attribute was removed in SBML Level 2 Version 3. LibSBML + retains this attribute for compatibility with older definitions of + Level 2, but its use is strongly discouraged because it is + incompatible with Level 2 Version 3 and Level 2 Version 4. +"; + + +%feature("docstring") Species::isSetUnits " + Predicate returning @c True if + this Species object\'s \'units\' attribute is set. + + @return @c True if the \'units\' attribute of this Species is + set, @c False otherwise. +"; + + +%feature("docstring") Species::isSetCharge " + Predicate returning @c True if this + Species object\'s \'charge\' attribute is set. + + @return @c True if the \'charge\' attribute of this Species is + set, @c False otherwise. + + @note Beginning in SBML Level 2 Version 2, the \'charge\' + attribute on Species in SBML is deprecated and in SBML Level 3 it + does not exist at all. Its use strongly discouraged. Its presence is + considered a misfeature in earlier definitions of SBML because its + implications for the mathematics of a model were never defined, and in + any case, no known modeling system ever used it. Instead, models take + account of charge values directly in their definitions of species by + (for example) having separate species identities for the charged and + uncharged versions of the same species. This allows the condition to + affect model mathematics directly. LibSBML retains this method for + easier compatibility with SBML Level 1. +"; + + +%feature("docstring") Species::isSetConversionFactor " + Predicate returning @c True if this + Species object\'s \'conversionFactor\' attribute is set. + + @return @c True if the \'conversionFactor\' attribute of this Species is + set, @c False otherwise. + + @note The \'conversionFactor\' attribute was introduced in SBML + Level 3. It does not exist on Species in SBML Levels 1 + and 2. +"; + + +%feature("docstring") Species::isSetBoundaryCondition " + Predicate returning @c True if this + Species object\'s \'boundaryCondition\' attribute is set. + + @return @c True if the \'boundaryCondition\' attribute of this Species is + set, @c False otherwise. +"; + + +%feature("docstring") Species::isSetHasOnlySubstanceUnits " + Predicate returning @c True if this + Species object\'s \'hasOnlySubstanceUnits\' attribute is set. + + @return @c True if the \'hasOnlySubstanceUnits\' attribute of this Species is + set, @c False otherwise. + + @note The \'hasOnlySubstanceUnits\' attribute does not exist in SBML + Level 1. +"; + + +%feature("docstring") Species::isSetConstant " + Predicate returning @c True if this + Species object\'s \'constant\' attribute is set. + + @return @c True if the \'constant\' attribute of this Species is + set, @c False otherwise. + + @note The attribute \'constant\' is only available in SBML Levels 2 + and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::setId " + Sets the value of the \'id\' attribute of this Species object. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this Species + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Species::setName " + Sets the value of the \'name\' attribute of this Species object. + + The string in @p name is copied. + + @param name the new name for the Species + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Species::setSpeciesType " + Sets the \'speciesType\' attribute of this Species object. + + @param sid the identifier of a SpeciesType object defined elsewhere + in this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The \'speciesType\' attribute is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Species::setCompartment " + Sets the \'compartment\' attribute of this Species object. + + @param sid the identifier of a Compartment object defined elsewhere + in this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Species::setInitialAmount " + Sets the \'initialAmount\' attribute of this Species and marks the field + as set. + + This method also unsets the \'initialConcentration\' attribute. + + @param value the value to which the \'initialAmount\' attribute should + be set. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") Species::setInitialConcentration " + Sets the \'initialConcentration\' attribute of this Species and marks + the field as set. + + This method also unsets the \'initialAmount\' attribute. + + @param value the value to which the \'initialConcentration\' attribute + should be set. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attribute \'initialConcentration\' is only available in SBML + Level 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::setSubstanceUnits " + Sets the \'substanceUnits\' attribute of this Species object. + + @param sid the identifier of the unit to use. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Species::setSpatialSizeUnits " + (SBML Level 2 Versions 1–2) Sets the \'spatialSizeUnits\' attribute of this Species object. + + @param sid the identifier of the unit to use. + + @warning In versions of SBML Level~2 before Version 3, the class + Species included an attribute called \'spatialSizeUnits\', which allowed + explicitly setting the units of size for initial concentration. This + attribute was removed in SBML Level 2 Version 3. LibSBML + retains this attribute for compatibility with older definitions of + Level 2, but its use is strongly discouraged because it is + incompatible with Level 2 Version 3 and Level 2 Version 4. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Species::setUnits " + (SBML Level 1 only) Sets the units of this Species object. + + @param sname the identifier of the unit to use. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Species::setHasOnlySubstanceUnits " + Sets the \'hasOnlySubstanceUnits\' attribute of this Species object. + + @param value boolean value for the \'hasOnlySubstanceUnits\' attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The \'hasOnlySubstanceUnits\' attribute does not exist in SBML + Level 1. +"; + + +%feature("docstring") Species::setBoundaryCondition " + Sets the \'boundaryCondition\' attribute of this Species object. + + @param value boolean value for the \'boundaryCondition\' attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") Species::setCharge " + Sets the \'charge\' attribute of this Species object. + + @param value an integer to which to set the \'charge\' to. + + @note Beginning in SBML Level 2 Version 2, the \'charge\' + attribute on Species in SBML is deprecated and its use strongly + discouraged, and it does not exist in SBML Level 3 at all. Its + presence is considered a misfeature in earlier definitions of SBML + because its implications for the mathematics of a model were never + defined, and in any case, no known modeling system ever used it. + Instead, models take account of charge values directly in their + definitions of species by (for example) having separate species + identities for the charged and uncharged versions of the same species. + This allows the condition to affect model mathematics directly. + LibSBML retains this method for easier compatibility with SBML + Level 1. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Species::setConstant " + Sets the \'constant\' attribute of this Species object. + + @param value a boolean value for the \'constant\' attribute + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attribute \'constant\' is only available in SBML Levels 2 + and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::setConversionFactor " + Sets the value of the \'conversionFactor\' attribute of this Species object. + + The string in @p sid is copied. + + @param sid the new conversionFactor for the Species + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'conversionFactor\' attribute was introduced in SBML + Level 3. It does not exist on Species in SBML Levels 1 + and 2. +"; + + +%feature("docstring") Species::unsetName " + Unsets the value of the \'name\' attribute of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Species::unsetSpeciesType " + Unsets the \'speciesType\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The attribute \'speciesType\' is only available in SBML + Level 2 Versions 2–4. +"; + + +%feature("docstring") Species::unsetInitialAmount " + Unsets the \'initialAmount\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Species::unsetInitialConcentration " + Unsets the \'initialConcentration\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The attribute \'initialConcentration\' is only available in SBML + Level 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::unsetSubstanceUnits " + Unsets the \'substanceUnits\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Species::unsetSpatialSizeUnits " + Unsets the \'spatialSizeUnits\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @warning In versions of SBML Level~2 before Version 3, the class + Species included an attribute called \'spatialSizeUnits\', which allowed + explicitly setting the units of size for initial concentration. This + attribute was removed in SBML Level 2 Version 3. LibSBML + retains this attribute for compatibility with older definitions of + Level 2, but its use is strongly discouraged because it is + incompatible with Level 2 Version 3 and Level 2 Version 4. +"; + + +%feature("docstring") Species::unsetUnits " + Unsets the \'units\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Species::unsetCharge " + Unsets the \'charge\' attribute + value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note Beginning in SBML Level 2 Version 2, the \'charge\' + attribute on Species in SBML is deprecated and its use strongly + discouraged, and it does not exist in SBML Level 3 at all. Its + presence is considered a misfeature in earlier definitions of SBML + because its implications for the mathematics of a model were never + defined, and in any case, no known modeling system ever used it. + Instead, models take account of charge values directly in their + definitions of species by (for example) having separate species + identities for the charged and uncharged versions of the same species. + This allows the condition to affect model mathematics directly. + LibSBML retains this method for easier compatibility with SBML + Level 1. +"; + + +%feature("docstring") Species::unsetConversionFactor " + Unsets the \'conversionFactor\' attribute value of this Species object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'conversionFactor\' attribute was introduced in SBML + Level 3. It does not exist on Species in SBML Levels 1 + and 2. +"; + + +%feature("docstring") Species::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this Species\' amount or concentration. + + Species in SBML have an attribute (\'substanceUnits\') for declaring the + units of measurement intended for the species\' amount or concentration + (depending on which one applies). In the absence of a value given for + \'substanceUnits\', the units are taken from the enclosing Model\'s + definition of @c \'substance\' or @c \'substance\'/<em>(size of the + compartment)</em> in which the species is located, or finally, if + these are not redefined by the Model, the relevant SBML default units + for those quantities. Following that procedure, the method + @if java Species.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + returns a UnitDefinition based on the + interpreted units of this species\'s amount or concentration. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + Note also that unit declarations for Species are in terms of the @em + identifier of a unit, but this method returns a UnitDefinition object, + not a unit identifier. It does this by constructing an appropriate + UnitDefinition. Callers may find this particularly useful when used + in conjunction with the helper methods on UnitDefinition for comparing + different UnitDefinition objects. + + In SBML Level 2 specifications prior to Version 3, Species + includes an additional attribute named \'spatialSizeUnits\', which + allows explicitly setting the units of size for initial concentration. + The @if java Species.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + takes this into account for models + expressed in SBML Level 2 Versions 1 and 2. + + @return a UnitDefinition that expresses the units of this + Species, or @c None if one cannot be constructed. + + @see getSubstanceUnits() +"; + + +%feature("docstring") Species::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Species::getElementName " + Returns the XML element name of this object, which for Species, is + always @c \'species\'. + + @return the name of this element, i.e., @c \'species\'. +"; + + +%feature("docstring") Species::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Species::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this Species object + have been set. + + @note The required attributes for a Species object are: + @li \'id\' (or \'name\' in SBML Level 1) + @li \'compartment\' + @li \'initialAmount\' (required in SBML Level 1 only; optional otherwise) + @li \'hasOnlySubstanceUnits\' (required in SBML Level 3; optional in SBML Level 2) + @li \'boundaryCondition\' (required in SBML Level 3; optional in Levels 1 and 2) + @li \'constant\' (required in SBML Level 3; optional in SBML Level 2) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Species::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Species::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Species::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Species::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Species::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Species::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Species::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Species::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Species::isExplicitlySetBoundaryCondition " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Species::isExplicitlySetConstant " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Species::isExplicitlySetHasOnlySubsUnits " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfSpecies::ListOfSpecies " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfSpecies(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfSpecies object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfSpecies object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfSpecies(long level, long version)</pre> + + Creates a new ListOfSpecies object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfSpecies::clone " + Creates and returns a deep copy of this ListOfSpeciess instance. + + @return a (deep) copy of this ListOfSpeciess. +"; + + +%feature("docstring") ListOfSpecies::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfSpecies::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Species objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfSpecies::getElementName " + Returns the XML element name of this object. + + For ListOfSpeciess, the XML element name is @c \'listOfSpeciess\'. + + @return the name of this element, i.e., @c \'listOfSpeciess\'. +"; + + +%feature("docstring") ListOfSpecies::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a Species from the ListOfSpecies. + + @param n the index number of the Species to get. + + @return the nth Species in this ListOfSpecies. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a Species from the ListOfSpecies + based on its identifier. + + @param sid a string representing the identifier + of the Species to get. + + @return Species in this ListOfSpecies + with the given @p sid or @c None if no such + Species exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfSpecies::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfSpeciess items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfSpeciess items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfSpecies::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the ListOfSpeciess in + a model is (in SBML Level 2 Version 4) the sixth + ListOf___. (However, it differs for different Levels and Versions of + SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfSpecies::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Parameter " + @ingroup Core + Implementation of SBML\'s %Parameter construct. + + A Parameter is used in SBML to define a symbol associated with a value; + this symbol can then be used in mathematical formulas in a model. By + default, parameters have constant value for the duration of a + simulation, and for this reason are called @em parameters instead of @em + variables in SBML, although it is crucial to understand that <em>SBML + parameters represent both concepts</em>. Whether a given SBML + parameter is intended to be constant or variable is indicated by the + value of its \'constant\' attribute. + + SBML\'s Parameter has a required attribute, \'id\', that gives the + parameter a unique identifier by which other parts of an SBML model + definition can refer to it. A parameter can also have an optional + \'name\' attribute of type @c string. Identifiers and names must be used + according to the guidelines described in the SBML specifications. + + The optional attribute \'value\' determines the value (of type @c double) + assigned to the parameter. A missing value for \'value\' implies that + the value either is unknown, or to be obtained from an external source, + or determined by an initial assignment. The unit of measurement + associated with the value of the parameter can be specified using the + optional attribute \'units\'. Here we only mention briefly some notable + points about the possible unit choices, but readers are urged to consult + the SBML specification documents for more information: + <ul> + + <li> In SBML Level 3, there are no constraints on the units that + can be assigned to parameters in a model; there are also no units to + inherit from the enclosing Model object (unlike the case for, e.g., + Species and Compartment). + + <li> In SBML Level 2, the value assigned to the parameter\'s \'units\' + attribute must be chosen from one of the following possibilities: one of + the base unit identifiers defined in SBML; one of the built-in unit + identifiers @c \'substance\', @c \'time\', @c \'volume\', @c \'area\' or @c + \'length\'; or the identifier of a new unit defined in the list of unit + definitions in the enclosing Model structure. There are no constraints + on the units that can be chosen from these sets. There are no default + units for parameters. + </ul> + + The Parameter structure has another boolean attribute named \'constant\' + that is used to indicate whether the parameter\'s value can vary during a + simulation. (In SBML Level 3, the attribute is mandatory and must + be given a value; in SBML Levels below Level 3, the attribute is + optional.) A value of @c True indicates the parameter\'s value cannot be + changed by any construct except InitialAssignment. Conversely, if the + value of \'constant\' is @c False, other constructs in SBML, such as rules + and events, can change the value of the parameter. + + SBML Level 3 uses a separate object class, LocalParameter, for + parameters that are local to a Reaction\'s KineticLaw. In Levels prior + to SBML Level 3, the Parameter class is used both for definitions + of global parameters, as well as reaction-local parameters stored in a + list within KineticLaw objects. Parameter objects that are local to a + reaction (that is, those defined within the KineticLaw structure of a + Reaction) cannot be changed by rules and therefore are <em>implicitly + always constant</em>; consequently, in SBML Level 2, parameter + definitions within Reaction structures should @em not have their + \'constant\' attribute set to @c False. + + What if a global parameter has its \'constant\' attribute set to @c False, + but the model does not contain any rules, events or other constructs + that ever change its value over time? Although the model may be + suspect, this situation is not strictly an error. A value of @c False + for \'constant\' only indicates that a parameter @em can change value, not + that it @em must. + + As with all other major SBML components, Parameter is derived from + SBase, and the methods defined on SBase are available on Parameter. + + @note The use of the term @em parameter in SBML sometimes leads to + confusion among readers who have a particular notion of what something + called \'parameter\' should be. It has been the source of heated debate, + but despite this, no one has yet found an adequate replacement term that + does not have different connotations to different people and hence leads + to confusion among @em some subset of users. Perhaps it would have been + better to have two constructs, one called @em constants and the other + called @em variables. The current approach in SBML is simply more + parsimonious, using a single Parameter construct with the boolean flag + \'constant\' indicating which flavor it is. In any case, readers are + implored to look past their particular definition of a @em parameter and + simply view SBML\'s Parameter as a single mechanism for defining both + constants and (additional) variables in a model. (We write @em + additional because the species in a model are usually considered to be + the central variables.) After all, software tools are not required to + expose to users the actual names of particular SBML constructs, and + thus tools can present to their users whatever terms their designers + feel best matches their target audience. + + @see ListOfParameters + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfParameters " + @ingroup Core + Implementation of SBML\'s %ListOfParameters construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Parameter::Parameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Parameter(SBMLNamespaces sbmlns)</pre> + + Creates a new Parameter using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the \'id\' + (identifier) attribute of a Parameter is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor if no identifier is provided as an argument. Setting the + identifier can be accomplished using the method + @if java setId(String id)@else setId()@endif. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Parameter object to an SBMLDocument + (e.g., using Model.addParameter()), the SBML XML namespace of the + document @em overrides the value used when creating the Parameter + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a Parameter is an + important aid to producing valid SBML. Knowledge of the intented SBML + Level and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Parameter(long level, long version)</pre> + + Creates a new Parameter using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Parameter + + @param version a long integer, the SBML Version to assign to this + Parameter + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Parameter object to an SBMLDocument + (e.g., using Model.addParameter()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the Parameter object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a Parameter is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Parameter(Parameter orig)</pre> + + Copy constructor; creates a copy of a Parameter. + + @param orig the Parameter instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Parameter::accept " + Accepts the given SBMLVisitor for this instance of Parameter. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, indicating + whether the Visitor would like to visit the next Parameter object in + the list of parameters within which @em the present object is + embedded. +"; + + +%feature("docstring") Parameter::clone " + Creates and returns a deep copy of this Parameter. + + @return a (deep) copy of this Parameter. +"; + + +%feature("docstring") Parameter::initDefaults " + Initializes the fields of this Parameter object to \'typical\' defaults + values. + + The SBML Parameter component has slightly different aspects and + default attribute values in different SBML Levels and Versions. Many + SBML object classes defined by libSBML have an initDefaults() method + to set the values to certain common defaults, based mostly on what + they are in SBML Level 2. In the case of Parameter, this method + only sets the value of the \'constant\' attribute to @c True. + + @see getConstant() + @see isSetConstant() + @see setConstant() +"; + + +%feature("docstring") Parameter::getId " + Returns the value of the \'id\' attribute of this Parameter. + + @return the id of this Parameter. +"; + + +%feature("docstring") Parameter::getName " + Returns the value of the \'name\' attribute of this Parameter. + + @return the name of this Parameter. +"; + + +%feature("docstring") Parameter::getValue " + Gets the numerical value of this Parameter. + + @return the value of the \'value\' attribute of this Parameter, as a + number of type @c double. + + @note <b>It is crucial</b> that callers not blindly call + Parameter.getValue() without first using Parameter.isSetValue() to + determine whether a value has ever been set. Otherwise, the value + return by Parameter.getValue() may not actually represent a value + assigned to the parameter. The reason is simply that the data type + @c double in a program always has @em some value. A separate test is + needed to determine whether the value is a true model value, or + uninitialized data in a computer\'s memory location. + + @see isSetValue() + @see setValue() + @see getUnits() +"; + + +%feature("docstring") Parameter::getUnits " + Gets the units defined for this Parameter. + + The value of an SBML parameter\'s \'units\' attribute establishes the + unit of measurement associated with the parameter\'s value. + + @return the value of the \'units\' attribute of this Parameter, as a + string. An empty string indicates that no units have been assigned. + + @note @htmlinclude unassigned-units-are-not-a-default.html + + @see isSetUnits() + @see setUnits() + @see getValue() +"; + + +%feature("docstring") Parameter::getConstant " + Gets the value of the \'constant\' attribute of this Parameter instance. + + @return @c True if this Parameter is declared as being constant, + @c False otherwise. + + @note Readers who view the documentation for LocalParameter may be + confused about the presence of this method. LibSBML derives + LocalParameter from Parameter; however, this does not precisely match + the object hierarchy defined by SBML Level 3, where + LocalParameter is derived directly from SBase and not Parameter. We + believe this arrangement makes it easier for libSBML users to program + applications that work with both SBML Level 2 and SBML + Level 3, but programmers should also keep in mind this difference + exists. A side-effect of libSBML\'s scheme is that certain methods on + LocalParameter that are inherited from Parameter do not actually have + relevance to LocalParameter objects. An example of this is the + methods pertaining to Parameter\'s attribute \'constant\' (i.e., + isSetConstant(), setConstant(), and getConstant()). + + @see isSetConstant() + @see setConstant() +"; + + +%feature("docstring") Parameter::isSetId " + Predicate returning @c True if this + Parameter\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this Parameter is + set, @c False otherwise. +"; + + +%feature("docstring") Parameter::isSetName " + Predicate returning @c True if this + Parameter\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this Parameter is + set, @c False otherwise. +"; + + +%feature("docstring") Parameter::isSetValue " + Predicate returning @c True if the + \'value\' attribute of this Parameter is set. + + In SBML definitions after SBML Level 1 Version 1, + parameter values are optional and have no defaults. If a model read + from a file does not contain a setting for the \'value\' attribute of a + parameter, its value is considered unset; it does not default to any + particular value. Similarly, when a Parameter object is created in + libSBML, it has no value until given a value. The + Parameter.isSetValue() method allows calling applications to + determine whether a given parameter\'s value has ever been set. + + In SBML Level 1 Version 1, parameters are required to have + values and therefore, the value of a Parameter <b>should always be + set</b>. In Level 1 Version 2 and beyond, the value is + optional and as such, the \'value\' attribute may or may not be set. + + @return @c True if the value of this Parameter is set, + @c False otherwise. + + @see getValue() + @see setValue() +"; + + +%feature("docstring") Parameter::isSetUnits " + Predicate returning @c True if the + \'units\' attribute of this Parameter is set. + + @return @c True if the \'units\' attribute of this Parameter is + set, @c False otherwise. + + @note @htmlinclude unassigned-units-are-not-a-default.html +"; + + +%feature("docstring") Parameter::isSetConstant " + Predicate returning @c True if the + \'constant\' attribute of this Parameter is set. + + @return @c True if the \'constant\' attribute of this Parameter is + set, @c False otherwise. + + @note Readers who view the documentation for LocalParameter may be + confused about the presence of this method. LibSBML derives + LocalParameter from Parameter; however, this does not precisely match + the object hierarchy defined by SBML Level 3, where + LocalParameter is derived directly from SBase and not Parameter. We + believe this arrangement makes it easier for libSBML users to program + applications that work with both SBML Level 2 and SBML + Level 3, but programmers should also keep in mind this difference + exists. A side-effect of libSBML\'s scheme is that certain methods on + LocalParameter that are inherited from Parameter do not actually have + relevance to LocalParameter objects. An example of this is the + methods pertaining to Parameter\'s attribute \'constant\' (i.e., + isSetConstant(), setConstant(), and getConstant()). + + @see getConstant() + @see setConstant() +"; + + +%feature("docstring") Parameter::setId " + Sets the value of the \'id\' attribute of this Parameter. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this Parameter + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Parameter::setName " + Sets the value of the \'name\' attribute of this Parameter. + + The string in @p name is copied. + + @param name the new name for the Parameter + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Parameter::setValue " + Sets the \'value\' attribute of this Parameter to the given @c double + value and marks the attribute as set. + + @param value a @c double, the value to assign + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") Parameter::setUnits " + Sets the \'units\' attribute of this Parameter to a copy of the given + units identifier @p units. + + @param units a string, the identifier of the units to assign to this + Parameter instance + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Parameter::setConstant " + Sets the \'constant\' attribute of this Parameter to the given boolean + @p flag. + + @param flag a boolean, the value for the \'constant\' attribute of this + Parameter instance + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note Readers who view the documentation for LocalParameter may be + confused about the presence of this method. LibSBML derives + LocalParameter from Parameter; however, this does not precisely match + the object hierarchy defined by SBML Level 3, where + LocalParameter is derived directly from SBase and not Parameter. We + believe this arrangement makes it easier for libSBML users to program + applications that work with both SBML Level 2 and SBML + Level 3, but programmers should also keep in mind this difference + exists. A side-effect of libSBML\'s scheme is that certain methods on + LocalParameter that are inherited from Parameter do not actually have + relevance to LocalParameter objects. An example of this is the + methods pertaining to Parameter\'s attribute \'constant\' (i.e., + isSetConstant(), setConstant(), and getConstant()). + + @see getConstant() + @see isSetConstant() +"; + + +%feature("docstring") Parameter::unsetName " + Unsets the value of the \'name\' attribute of this Parameter. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Parameter::unsetValue " + Unsets the \'value\' attribute of this Parameter instance. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + In SBML Level 1 Version 1, parameters are required to have + values and therefore, the value of a Parameter <b>should always be + set</b>. In SBML Level 1 Version 2 and beyond, the value + is optional and as such, the \'value\' attribute may or may not be set. +"; + + +%feature("docstring") Parameter::unsetUnits " + Unsets the \'units\' attribute of this Parameter instance. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Parameter::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this Parameter\'s value. + + Parameters in SBML have an attribute (\'units\') for declaring the units + of measurement intended for the parameter\'s value. <b>No defaults are + defined</b> by SBML in the absence of a definition for \'units\'. This + method returns a UnitDefinition object based on the units declared for + this Parameter using its \'units\' attribute, or it returns @c None if + no units have been declared. + + Note that unit declarations for Parameter objects are specified in + terms of the @em identifier of a unit (e.g., using setUnits()), but + @em this method returns a UnitDefinition object, not a unit + identifier. It does this by constructing an appropriate + UnitDefinition.For SBML Level 2 models, it will do this even when + the value of the \'units\' attribute is one of the special SBML + Level 2 unit identifiers @c \'substance\', @c \'volume\', @c \'area\', + @c \'length\' or @c \'time\'. Callers may find this useful in conjunction + with the helper methods provided by the UnitDefinition class for + comparing different UnitDefinition objects. + + @return a UnitDefinition that expresses the units of this + Parameter, or @c None if one cannot be constructed. + + @note The libSBML system for unit analysis depends on the model as a + whole. In cases where the Parameter object has not yet been added to + a model, or the model itself is incomplete, unit analysis is not + possible, and consequently this method will return @c None. + + @see isSetUnits() +"; + + +%feature("docstring") Parameter::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or + @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Parameter::getElementName " + Returns the XML element name of this object, which for Parameter, is + always @c \'parameter\'. + + @return the name of this element, i.e., @c \'parameter\'. +"; + + +%feature("docstring") Parameter::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Parameter::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this Parameter object + have been set. + + @note The required attributes for a Parameter object are: + @li \'id\' (or \'name\' in SBML Level 1) + @li \'value\' (required in Level 1, optional otherwise) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Parameter::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Parameter::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Parameter::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Parameter::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Parameter::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Parameter::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Parameter::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Parameter::isExplicitlySetConstant " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfParameters::ListOfParameters " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfParameters(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfParameters object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfParameters object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfParameters(long level, long version)</pre> + + Creates a new ListOfParameters object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfParameters::clone " + Creates and returns a deep copy of this ListOfParameters instance. + + @return a (deep) copy of this ListOfParameters. +"; + + +%feature("docstring") ListOfParameters::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfParameters::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Parameter objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink + (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfParameters::getElementName " + Returns the XML element name of this object. + + For ListOfParameters, the XML element name is @c \'listOfParameters\'. + + @return the name of this element, i.e., @c \'listOfParameters\'. +"; + + +%feature("docstring") ListOfParameters::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Returns the Parameter object located at position @p n within this + ListOfParameters instance. + + @param n the index number of the Parameter to get. + + @return the nth Parameter in this ListOfParameters. If the index @p n + is out of bounds for the length of the list, then @c None is returned. + + @see size() + @see get() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Returns the first Parameter object matching the given identifier. + + @param sid a string representing the identifier of the Parameter to + get. + + @return the Parameter object found. The caller owns the returned + object and is responsible for deleting it. If none of the items have + an identifier matching @p sid, then @c None is returned. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfParameters::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfParameters, and returns a pointer + to it. + + @param n the index of the item to remove + + @return the item removed. The caller owns the returned object and is + responsible for deleting it. If the index number @p n is out of + bounds for the length of the list, then @c None is returned. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes the first Parameter object in this ListOfParameters + matching the given identifier, and returns a pointer to it. + + @param sid the identifier of the item to remove. + + @return the item removed. The caller owns the returned object and is + responsible for deleting it. If none of the items have an identifier + matching @p sid, then @c None is returned. +"; + + +%feature("docstring") ListOfParameters::getElementPosition " + @internal + Gets the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the ListOfParameters + in a model is (in SBML Level 2 Version 4) the seventh + ListOf___. (However, it differs for different Levels and Versions of + SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfParameters::createObject " + @internal + Create a ListOfParameters object corresponding to the next token in + the XML input stream. + + @return the SBML object corresponding to next XMLToken in the + XMLInputStream, or @c None if the token was not recognized. +"; + + +%feature("docstring") LocalParameter " + @ingroup Core + Implementation of SBML Level 3\'s %LocalParameter construct. + + LocalParameter has been introduced in SBML Level 3 to serve as the + object class for parameter definitions that are intended to be local to + a Reaction. Objects of class LocalParameter never appear at the Model + level; they are always contained within ListOfLocalParameters lists + which are in turn contained within KineticLaw objects. + + Like its global Parameter counterpart, the LocalParameter object class + is used to define a symbol associated with a value; this symbol can then + be used in a model\'s mathematical formulas (and specifically, for + LocalParameter, reaction rate formulas). Unlike Parameter, the + LocalParameter class does not have a \'constant\' attribute: local + parameters within reactions are @em always constant. + + LocalParameter has one required attribute, \'id\', to give the + parameter a unique identifier by which other parts of an SBML model + definition can refer to it. A parameter can also have an optional + \'name\' attribute of type @c string. Identifiers and names must be used + according to the guidelines described in the SBML specifications. + + The optional attribute \'value\' determines the value (of type @c double) + assigned to the parameter. A missing value for \'value\' implies that + the value either is unknown, or to be obtained from an external source, + or determined by an initial assignment. The unit of measurement + associated with the value of the parameter can be specified using the + optional attribute \'units\'. Here we only mention briefly some notable + points about the possible unit choices, but readers are urged to consult + the SBML specification documents for more information: + <ul> + + <li> In SBML Level 3, there are no constraints on the units that + can be assigned to parameters in a model; there are also no units to + inherit from the enclosing Model object. + + <li> In SBML Level 2, the value assigned to the parameter\'s \'units\' + attribute must be chosen from one of the following possibilities: one of + the base unit identifiers defined in SBML; one of the built-in unit + identifiers @c \'substance\', @c \'time\', @c \'volume\', @c \'area\' or @c + \'length\'; or the identifier of a new unit defined in the list of unit + definitions in the enclosing Model structure. There are no constraints + on the units that can be chosen from these sets. There are no default + units for local parameters. + </ul> + + As with all other major SBML components, LocalParameter is derived from + SBase, and the methods defined on SBase are available on LocalParameter. + + @warning LibSBML derives LocalParameter from Parameter; however, this + does not precisely match the object hierarchy defined by SBML + Level 3, where LocalParameter is derived directly from SBase and not + Parameter. We believe this arrangement makes it easier for libSBML + users to program applications that work with both SBML Level 2 and + SBML Level 3, but programmers should also keep in mind this + difference exists. A side-effect of libSBML\'s scheme is that certain + methods on LocalParameter that are inherited from Parameter do not + actually have relevance to LocalParameter objects. An example of this + is the methods pertaining to Parameter\'s attribute \'constant\' + (i.e., isSetConstant(), setConstant(), and getConstant()). + + @see ListOfLocalParameters + @see KineticLaw + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfLocalParameters " + @ingroup Core + Implementation of SBML Level 3\'s %ListOfLocalParameters construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + ListOfLocalParameters is a subsidiary object class used only within + KineticLaw in SBML Level 3. It is not defined in SBML Levels + 1–2. In Level 3, a KineticLaw object can have a single + object of class ListOfLocalParameters containing a set of local + parameters used in that kinetic law definition. + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") LocalParameter::LocalParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>LocalParameter(SBMLNamespaces sbmlns)</pre> + + Creates a new LocalParameter object with the given SBMLNamespaces + object @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the \'id\' + (identifier) attribute of a LocalParameter is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor if no identifier is provided as an argument. Setting the + identifier can be accomplished using the method + @if java setId(String id)@else setId()@endif. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a LocalParameter object to an SBMLDocument + (e.g., using KineticLaw.addLocalParameter()), the SBML XML namespace of + the document @em overrides the value used when creating the + LocalParameter object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a + LocalParameter is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>LocalParameter(long level, long version)</pre> + + Creates a new LocalParameter object with the given SBML @p level and + @p version values. + + @param level a long integer, the SBML Level to assign to this + LocalParameter. + + @param version a long integer, the SBML Version to assign to this + LocalParameter. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a LocalParameter object to an SBMLDocument + (e.g., using KineticLaw.addLocalParameter()), the SBML Level, SBML + Version and XML namespace of the document @em override the + values used when creating the LocalParameter object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a LocalParameter is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>LocalParameter(LocalParameter orig)</pre> + + Copy constructor; creates a copy of a given LocalParameter object. + + @param orig the LocalParameter instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>LocalParameter(Parameter orig)</pre> + + Copy constructor; creates a LocalParameter object by copying + the attributes of a given Parameter object. + + @param orig the Parameter instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") LocalParameter::accept " + Accepts the given SBMLVisitor for this instance of LocalParameter. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next LocalParameter in the list + of parameters within which this LocalParameter is embedded (i.e., either + the list of parameters in the parent Model or the list of parameters + in the enclosing KineticLaw). +"; + + +%feature("docstring") LocalParameter::clone " + Creates and returns a deep copy of this LocalParameter. + + @return a (deep) copy of this LocalParameter. +"; + + +%feature("docstring") LocalParameter::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this LocalParameter\'s value. + + LocalParameters in SBML have an attribute (\'units\') for declaring the + units of measurement intended for the parameter\'s value. <b>No + defaults are defined</b> by SBML in the absence of a definition for + \'units\'. This method returns a UnitDefinition object based on the + units declared for this LocalParameter using its \'units\' attribute, or + it returns @c None if no units have been declared. + + Note that unit declarations for LocalParameter objects are specified + in terms of the @em identifier of a unit (e.g., using setUnits()), but + @em this method returns a UnitDefinition object, not a unit + identifier. It does this by constructing an appropriate + UnitDefinition. For SBML Level 2 models, it will do this even + when the value of the \'units\' attribute is one of the predefined SBML + units @c \'substance\', @c \'volume\', @c \'area\', @c \'length\' or @c + \'time\'. Callers may find this useful in conjunction with the helper + methods provided by the UnitDefinition class for comparing different + UnitDefinition objects. + + @return a UnitDefinition that expresses the units of this + LocalParameter, or @c None if one cannot be constructed. + + @note The libSBML system for unit analysis depends on the model as a + whole. In cases where the LocalParameter object has not yet been + added to a model, or the model itself is incomplete, unit analysis is + not possible, and consequently this method will return @c None. + + @see isSetUnits() +"; + + +%feature("docstring") LocalParameter::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") LocalParameter::getElementName " + Returns the XML element name of this object, which for LocalParameter, + is always @c \'localParameter\'. + + @return the name of this element, i.e., @c \'localParameter\'. +"; + + +%feature("docstring") LocalParameter::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this LocalParameter object + have been set. + + @note The required attributes for a LocalParameter object are: + @li \'id\' + @li \'value\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") LocalParameter::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") LocalParameter::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") LocalParameter::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") LocalParameter::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfLocalParameters::ListOfLocalParameters " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfLocalParameters(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfLocalParameters object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfLocalParameters object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfLocalParameters(long level, long version)</pre> + + Creates a new ListOfLocalParameters object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfLocalParameters::clone " + Creates and returns a deep copy of this ListOfLocalParameters object. + + @return a (deep) copy of this ListOfLocalParameters. +"; + + +%feature("docstring") ListOfLocalParameters::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfLocalParameters::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., LocalParameter objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink + (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfLocalParameters::getElementName " + Returns the XML element name of this object. + + For ListOfLocalParameters, the XML element name is @c \'listOfLocalParameters\'. + + @return the name of this element, i.e., @c \'listOfLocalParameters\'. +"; + + +%feature("docstring") ListOfLocalParameters::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Returns the LocalParameter object located at position @p n within this + ListOfLocalParameters instance. + + @param n the index number of the LocalParameter to get. + + @return the item at position @p n. The caller owns the returned + object and is responsible for deleting it. If the index number @p n + is out of bounds for the length of the list, then @c None is returned. + + @see size() + @see get() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Returns the first LocalParameter object matching the given identifier. + + @param sid a string representing the identifier of the LocalParameter + to get. + + @return the LocalParameter object found. The caller owns the returned + object and is responsible for deleting it. If none of the items have + an identifier matching @p sid, then @c None is returned. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfLocalParameters::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that LocalParameters, while they use the SId namespace, are not in the model-wide SId namespace, so no LocalParameter object will be returned from this function (and is the reason we override the base ListOf::getElementBySId function here). + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") ListOfLocalParameters::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfLocalParameters, and returns a + pointer to it. + + @param n the index of the item to remove. + + @return the item removed. The caller owns the returned object and is + responsible for deleting it. If the index number @p n is out of + bounds for the length of the list, then @c None is returned. + + @see size() + @see remove() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes the first LocalParameter object in this ListOfLocalParameters + matching the given identifier, and returns a pointer to it. + + @param sid the identifier of the item to remove. + + @return the item removed. The caller owns the returned object and is + responsible for deleting it. If none of the items have an identifier + matching @p sid, then @c None is returned. +"; + + +%feature("docstring") ListOfLocalParameters::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the ListOfLocalParameters + in a model is (in SBML Level 2 Version 4) the seventh + ListOf___. (However, it differs for different Levels and Versions of + SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfLocalParameters::createObject " + @internal + Create a ListOfLocalParameters object corresponding to the next token in + the XML input stream. + + @return the SBML object corresponding to next XMLToken in the + XMLInputStream, or @c None if the token was not recognized. +"; + + +%feature("docstring") InitialAssignment " + @ingroup Core + Implementation of %SBML\'s %InitialAssignment construct. + + SBML Level 2 Versions 2–4 and SBML Level 3 provide two ways of assigning initial + values to entities in a model. The simplest and most basic is to set + the values of the appropriate attributes in the relevant components; for + example, the initial value of a model parameter (whether it is a + constant or a variable) can be assigned by setting its \'value\' attribute + directly in the model definition. However, this approach is not + suitable when the value must be calculated, because the initial value + attributes on different components such as species, compartments, and + parameters are single values and not mathematical expressions. In those + situations, the InitialAssignment construct can be used; it permits the + calculation of the value of a constant or the initial value of a + variable from the values of @em other quantities in a model. + + As explained below, the provision of InitialAssignment does not mean + that models necessarily must use this construct when defining initial + values of quantities in a model. If a value can be set directly using + the relevant attribute of a component in a model, then that + approach may be more efficient and more portable to other software + tools. InitialAssignment should be used when the other mechanism is + insufficient for the needs of a particular model. + + The InitialAssignment construct has some similarities to AssignmentRule. + The main differences are: (a) an InitialAssignment can set the value of + a constant whereas an AssignmentRule cannot, and (b) unlike + AssignmentRule, an InitialAssignment definition only applies up to and + including the beginning of simulation time, i.e., <em>t <= 0</em>, + while an AssignmentRule applies at all times. + + InitialAssignment has a required attribute, \'symbol\', whose value must + follow the guidelines for identifiers described in the %SBML + specification (e.g., Section 3.3 in the Level 2 Version 4 + specification). The value of this attribute in an InitialAssignment + object can be the identifier of a Compartment, Species or global + Parameter elsewhere in the model. The InitialAssignment defines the + initial value of the constant or variable referred to by the \'symbol\' + attribute. (The attribute\'s name is \'symbol\' rather than \'variable\' + because it may assign values to constants as well as variables in a + model.) Note that an initial assignment cannot be made to reaction + identifiers, that is, the \'symbol\' attribute value of an + InitialAssignment cannot be an identifier that is the \'id\' attribute + value of a Reaction object in the model. This is identical to a + restriction placed on rules. + + InitialAssignment also has a required \'math\' subelement that contains a + MathML expression used to calculate the value of the constant or the + initial value of the variable. The units of the value computed by the + formula in the \'math\' subelement should (in SBML Level 2 + Version 4 and in SBML Level 3) or must (in previous Versions) be identical to be the + units associated with the identifier given in the \'symbol\' attribute. + (That is, the units are the units of the species, compartment, or + parameter, as appropriate for the kind of object identified by the value + of \'symbol\'.) + + InitialAssignment was introduced in SBML Level 2 Version 2. It is not + available in SBML Level 2 Version 1 nor in any version of Level 1. + + @section initassign-semantics Semantics of Initial Assignments + + The value calculated by an InitialAssignment object overrides the value + assigned to the given symbol by the object defining that symbol. For + example, if a compartment\'s \'size\' attribute is set in its definition, + and the model also contains an InitialAssignment having that + compartment\'s identifier as its \'symbol\' attribute value, then the + interpretation is that the \'size\' assigned in the Compartment object + should be ignored and the value assigned based on the computation + defined in the InitialAssignment. Initial assignments can take place + for Compartment, Species and global Parameter objects regardless of the + value of their \'constant\' attribute. + + The actions of all InitialAssignment objects are in general terms + the same, but differ in the precise details depending on the type + of variable being set: + <ul> + <li> <em>In the case of a species</em>, an InitialAssignment sets the + referenced species\' initial quantity (concentration or amount of + substance) to the value determined by the formula in the \'math\' + subelement. The overall units of the formula should (in SBML + Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) be the same + as the units specified for the species. + + <li> <em>In the case of a compartment</em>, an InitialAssignment sets + the referenced compartment\'s initial size to the size determined by the + formula in \'math\'. The overall units of the formula should (in SBML + Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) be the same + as the units specified for the size of the compartment. + + <li> <em>In the case of a parameter</em>, an InitialAssignment sets the + referenced parameter\'s initial value to that determined by the formula + in \'math\'. The overall units of the formula should (in SBML + Level 2 Version 4 and SBML Level 3) or must (in previous Versions) be the same + as the units defined for the parameter. </ul> + + In the context of a simulation, initial assignments establish values + that are in effect prior to and including the start of simulation time, + i.e., <em>t <= 0</em>. Section 3.4.8 in the SBML Level 2 + Version 4 and SBML Level 3 Version 1 Core specifications provides information about the interpretation of + assignments, rules, and entity values for simulation time up to and + including the start time <em>t = 0</em>; this is important for + establishing the initial conditions of a simulation if the model + involves expressions containing the <em>delay</em> \'csymbol\'. + + There cannot be two initial assignments for the same symbol in a model; + that is, a model must not contain two or more InitialAssignment objects + that both have the same identifier as their \'symbol\' attribute value. A + model must also not define initial assignments <em>and</em> assignment + rules for the same entity. That is, there cannot be <em>both</em> an + InitialAssignment and an AssignmentRule for the same symbol in a model, + because both kinds of constructs apply prior to and at the start of + simulated time—allowing both to exist for a given symbol would + result in indeterminism). + + The ordering of InitialAssignment objects is not significant. The + combined set of InitialAssignment, AssignmentRule and KineticLaw + objects form a set of assignment statements that must be considered as a + whole. The combined set of assignment statements should not contain + algebraic loops: a chain of dependency between these statements should + terminate. (More formally, consider the directed graph of assignment + statements where nodes are a model\'s assignment statements and directed + arcs exist for each occurrence of a symbol in an assignment statement + \'math\' attribute. The directed arcs in this graph start from the + statement assigning the symbol and end at the statement that contains + the symbol in their math elements. Such a graph must be acyclic.) + + Finally, it is worth being explicit about the expected behavior in the + following situation. Suppose (1) a given symbol has a value <em>x</em> + assigned to it in its definition, and (2) there is an initial assignment + having the identifier as its \'symbol\' value and reassigning the value to + <em>y</em>, <em>and</em> (3) the identifier is also used in the + mathematical formula of a second initial assignment. What value should + the second initial assignment use? It is <em>y</em>, the value assigned + to the symbol by the first initial assignment, not whatever value was + given in the symbol\'s definition. This follows directly from the + behavior described above: if an InitialAssignment object exists for a + given symbol, then the symbol\'s value is overridden by that initial + assignment. + + <!---------------------------------------------------------------------- --> +"; + + +%feature("docstring") ListOfInitialAssignments " + @ingroup Core + Implementation of SBML\'s %ListOfInitialAssignments construct. + + The various ListOf___ classes in %SBML are merely containers used for + organizing the main components of an %SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an %SBML model is + illustrated by the following (for %SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") InitialAssignment::InitialAssignment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>InitialAssignment(SBMLNamespaces sbmlns)</pre> + + Creates a new InitialAssignment using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a InitialAssignment object to an + SBMLDocument (e.g., using Model.addInitialAssignment()), the SBML XML + namespace of the document @em overrides the value used when creating + the InitialAssignment object via this constructor. This is necessary + to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a InitialAssignment is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>InitialAssignment(long level, long version)</pre> + + Creates a new InitialAssignment using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this InitialAssignment + + @param version a long integer, the SBML Version to assign to this + InitialAssignment + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a InitialAssignment object to an + SBMLDocument (e.g., using Model.addInitialAssignment()), the SBML + Level, SBML Version and XML namespace of the document @em + override the values used when creating the InitialAssignment object + via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a InitialAssignment is an + important aid to producing valid SBML. Knowledge of the intented SBML + Level and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>InitialAssignment(InitialAssignment orig)</pre> + + Copy constructor; creates a copy of this InitialAssignment. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") InitialAssignment::accept " + Accepts the given SBMLVisitor for this instance of InitialAssignment. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next InitialAssignment in + the list of compartment types. +"; + + +%feature("docstring") InitialAssignment::clone " + Creates and returns a deep copy of this InitialAssignment. + + @return a (deep) copy of this InitialAssignment. +"; + + +%feature("docstring") InitialAssignment::getSymbol " + Get the value of the \'symbol\' attribute of this InitialAssignment. + + @return the identifier string stored as the \'symbol\' attribute value + in this InitialAssignment. +"; + + +%feature("docstring") InitialAssignment::getMath " + Get the mathematical formula of this InitialAssignment. + + @return an ASTNode, the value of the \'math\' subelement of this + InitialAssignment +"; + + +%feature("docstring") InitialAssignment::isSetSymbol " + Predicate returning @c True if this + InitialAssignment\'s \'symbol\' attribute is set. + + @return @c True if the \'symbol\' attribute of this InitialAssignment + is set, @c False otherwise. +"; + + +%feature("docstring") InitialAssignment::isSetMath " + Predicate returning @c True if this + InitialAssignment\'s \'math\' subelement contains a value. + + @return @c True if the \'math\' for this InitialAssignment is set, + @c False otherwise. +"; + + +%feature("docstring") InitialAssignment::setSymbol " + Sets the \'symbol\' attribute value of this InitialAssignment. + + @param sid the identifier of a Species, Compartment or Parameter + object defined elsewhere in this Model. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") InitialAssignment::setMath " + Sets the \'math\' subelement of this InitialAssignment. + + The AST passed in @p math is copied. + + @param math an AST containing the mathematical expression to + be used as the formula for this InitialAssignment. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") InitialAssignment::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units + of measurement assumed for the \'math\' expression of this + InitialAssignment. + + The units are calculated based on the mathematical expression in the + InitialAssignment and the model quantities referenced by + <code><ci></code> elements used within that expression. The + @if java InitialAssignment.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + method returns the calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + @warning Note that it is possible the \'math\' expression in the + InitialAssignment contains pure numbers or parameters with undeclared + units. In those cases, it is not possible to calculate the units of + the overall expression without making assumptions. LibSBML does not + make assumptions about the units, and + @if java InitialAssignment.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + only returns the units as far as it is able to determine them. For + example, in an expression <em>X + Y</em>, if <em>X</em> has + unambiguously-defined units and <em>Y</em> does not, it will return + the units of <em>X</em>. <strong>It is important that callers also + invoke the method</strong> + @if java InitialAssignment.containsUndeclaredUnits()@else containsUndeclaredUnits()@endif@~ + <strong>to determine whether this situation holds</strong>. Callers + may wish to take suitable actions in those scenarios. + + @return a UnitDefinition that expresses the units of the math + expression of this InitialAssignment, or @c None if one cannot be constructed. + + @see containsUndeclaredUnits() +"; + + +%feature("docstring") InitialAssignment::containsUndeclaredUnits " + Predicate returning @c True if + the math expression of this InitialAssignment contains + parameters/numbers with undeclared units. + + @return @c True if the math expression of this InitialAssignment + includes parameters/numbers + with undeclared units, @c False otherwise. + + @note A return value of @c True indicates that the UnitDefinition + returned by + @if java InitialAssignment.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + may not accurately represent the units of the expression. + + @see getDerivedUnitDefinition() +"; + + +%feature("docstring") InitialAssignment::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") InitialAssignment::getElementName " + Returns the XML element name of this object, which for + InitialAssignment, is always @c \'initialAssignment\'. + + @return the name of this element, i.e., @c \'initialAssignment\'. +"; + + +%feature("docstring") InitialAssignment::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") InitialAssignment::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this InitialAssignment object + have been set. + + @note The required attributes for an InitialAssignment object are: + @li \'symbol\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") InitialAssignment::hasRequiredElements " + Predicate returning @c True if + all the required elements for this InitialAssignment object + have been set. + + @note The required elements for a InitialAssignment object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") InitialAssignment::getId " + Predicate returning @c True if + all the required elements for this InitialAssignment object + have been set. + + @note The required elements for a InitialAssignment object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") InitialAssignment::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") InitialAssignment::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") InitialAssignment::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") InitialAssignment::divideAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing/function). +"; + + +%feature("docstring") InitialAssignment::multiplyAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). +"; + + +%feature("docstring") InitialAssignment::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") InitialAssignment::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") InitialAssignment::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") InitialAssignment::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") InitialAssignment::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") InitialAssignment::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfInitialAssignments::ListOfInitialAssignments " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfInitialAssignments(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfInitialAssignments object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfInitialAssignments object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfInitialAssignments(long level, long version)</pre> + + Creates a new ListOfInitialAssignments object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfInitialAssignments::clone " + Creates and returns a deep copy of this ListOfInitialAssignments instance. + + @return a (deep) copy of this ListOfInitialAssignments. +"; + + +%feature("docstring") ListOfInitialAssignments::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfInitialAssignments::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., InitialAssignment objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfInitialAssignments::getElementName " + Returns the XML element name of this object. + + For ListOfInitialAssignments, the XML element name is @c + \'listOfInitialAssignments\'. + + @return the name of this element, i.e., @c \'listOfInitialAssignments\'. +"; + + +%feature("docstring") ListOfInitialAssignments::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a InitialAssignment from the ListOfInitialAssignments. + + @param n the index number of the InitialAssignment to get. + + @return the nth InitialAssignment in this ListOfInitialAssignments. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a InitialAssignment from the ListOfInitialAssignments + based on its identifier. + + @param sid a string representing the identifier + of the InitialAssignment to get. + + @return InitialAssignment in this ListOfInitialAssignments + with the given @p sid or @c None if no such + InitialAssignment exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfInitialAssignments::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfInitialAssignments items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfInitialAssignments items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfInitialAssignments::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that InitialAssignments do not actually have IDs, though the libsbml interface pretends that they do: no initial assignment is returned by this function. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") ListOfInitialAssignments::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of %SBML is generally fixed + for most components in %SBML. So, for example, the + ListOfInitialAssignments in a model is (in %SBML Level 2 Version 4) + the eighth ListOf___. (However, it differs for different Levels and + Versions of SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfInitialAssignments::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Rule " + @ingroup Core + Implementation of %SBML\'s %Rule construct. + + In SBML, @em rules provide additional ways to define the values of + variables in a model, their relationships, and the dynamical behaviors + of those variables. They enable encoding relationships that cannot be + expressed using Reaction nor InitialAssignment objects alone. + + The libSBML implementation of rules mirrors the SBML Level 3 + Version 1 Core definition (which is in turn is very similar to the + Level 2 Version 4 definition), with Rule being the parent + class of three subclasses as explained below. The Rule class itself + cannot be instantiated by user programs and has no constructor; only the + subclasses AssignmentRule, AlgebraicRule and RateRule can be + instantiated directly. + + @section general General summary of SBML rules + + @htmlinclude rules-general-summary.html + + @section additional-restrictions Additional restrictions on SBML rules + + @htmlinclude rules-additional-restrictions.html + + @section RuleType_t Rule types for SBML Level 1 + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for + distinguishing rules; specifically, it uses an attribute whose value is + drawn from an enumeration of 3 values. LibSBML supports this using methods + that work @if clike a libSBML enumeration type, RuleType_t, whose values + are @else with the enumeration values @endif@~ listed below. + + @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates + the rule is a \'rate\' rule. + @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: + Indicates the rule is a \'scalar\' rule. + @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: + Indicates the rule type is unknown or not yet set. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfRules " + @ingroup Core + Implementation of SBML\'s %ListOfRules construct. + + The various ListOf___ classes in %SBML are merely containers used for + organizing the main components of an %SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an %SBML model is + illustrated by the following (for SBML Level 3 and later versions + of SBML Level 2 as well): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Rule::accept " + Accepts the given SBMLVisitor for this instance of Rule. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next Rule object in the + list of rules within which @em the present object is embedded. +"; + + +%feature("docstring") Rule::clone " + Creates and returns a deep copy of this Rule. + + @return a (deep) copy of this Rule. +"; + + +%feature("docstring") Rule::getFormula " + Returns the mathematical expression of this Rule in text-string form. + + The text string is produced by + @if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString()</a></code>@else SBML_formulaToString()@endif; please consult + the documentation for that function to find out more about the format + of the text-string formula. + + @return the formula text string for this Rule. + + @note The attribute \'formula\' is specific to SBML Level 1; in + higher Levels of SBML, it has been replaced with a subelement named + \'math\'. However, libSBML provides a unified interface to the + underlying math expression and this method can be used for models + of all Levels of SBML. + + @see getMath() +"; + + +%feature("docstring") Rule::getMath " + Get the mathematical formula of this Rule as an ASTNode tree. + + @return an ASTNode, the value of the \'math\' subelement of this Rule. + + @note The subelement \'math\' is present in SBML Levels 2 + and 3. In SBML Level 1, the equivalent construct is the + attribute named \'formula\'. LibSBML provides a unified interface to + the underlying math expression and this method can be used for models + of all Levels of SBML. + + @see getFormula() +"; + + +%feature("docstring") Rule::getVariable " + Get the value of the \'variable\' attribute of this Rule object. + + In SBML Level 1, the different rule types each have a different + name for the attribute holding the reference to the object + constituting the left-hand side of the rule. (E.g., for + SBML Level 1\'s SpeciesConcentrationRule the attribute is \'species\', for + CompartmentVolumeRule it is \'compartment\', etc.) In SBML + Levels 2 and 3, the only two types of Rule objects with a + left-hand side object reference are AssignmentRule and RateRule, and + both of them use the same name for attribute: \'variable\'. In order to + make it easier for application developers to work with all Levels of + SBML, libSBML uses a uniform name for all of such attributes, and it + is \'variable\', regardless of whether Level 1 rules or + Level 2–3 rules are being used. + + @return the identifier string stored as the \'variable\' attribute value + in this Rule, or @c None if this object is an AlgebraicRule object. +"; + + +%feature("docstring") Rule::getUnits " + Returns the units for the + mathematical formula of this Rule. + + @return the identifier of the units for the expression of this Rule. + + @note The attribute \'units\' exists on SBML Level 1 ParameterRule + objects only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::isSetFormula " + Predicate returning @c True if this + Rule\'s mathematical expression is set. + + This method is equivalent to isSetMath(). This version is present for + easier compatibility with SBML Level 1, in which mathematical + formulas were written in text-string form. + + @return @c True if the mathematical formula for this Rule is + set, @c False otherwise. + + @note The attribute \'formula\' is specific to SBML Level 1; in + higher Levels of SBML, it has been replaced with a subelement named + \'math\'. However, libSBML provides a unified interface to the + underlying math expression and this method can be used for models + of all Levels of SBML. + + @see isSetMath() +"; + + +%feature("docstring") Rule::isSetMath " + Predicate returning @c True if this + Rule\'s mathematical expression is set. + + This method is equivalent to isSetFormula(). + + @return @c True if the formula (or equivalently the math) for this + Rule is set, @c False otherwise. + + @note The subelement \'math\' is present in SBML Levels 2 + and 3. In SBML Level 1, the equivalent construct is the + attribute named \'formula\'. LibSBML provides a unified interface to + the underlying math expression and this method can be used for models + of all Levels of SBML. + + @see isSetFormula() +"; + + +%feature("docstring") Rule::isSetVariable " + Predicate returning @c True if this + Rule\'s \'variable\' attribute is set. + + In SBML Level 1, the different rule types each have a different + name for the attribute holding the reference to the object + constituting the left-hand side of the rule. (E.g., for + SBML Level 1\'s SpeciesConcentrationRule the attribute is \'species\', for + CompartmentVolumeRule it is \'compartment\', etc.) In SBML + Levels 2 and 3, the only two types of Rule objects with a + left-hand side object reference are AssignmentRule and RateRule, and + both of them use the same name for attribute: \'variable\'. In order to + make it easier for application developers to work with all Levels of + SBML, libSBML uses a uniform name for all such attributes, and it is + \'variable\', regardless of whether Level 1 rules or + Level 2–3 rules are being used. + + @return @c True if the \'variable\' attribute value of this Rule is + set, @c False otherwise. +"; + + +%feature("docstring") Rule::isSetUnits " + Predicate returning @c True + if this Rule\'s \'units\' attribute is set. + + @return @c True if the units for this Rule is set, @c False + otherwise + + @note The attribute \'units\' exists on SBML Level 1 ParameterRule + objects only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::setFormula " + Sets the \'math\' subelement of this Rule to an expression in + text-string form. + + This is equivalent to setMath(ASTNode math). The provision of + using text-string formulas is retained for easier SBML Level 1 + compatibility. The formula is converted to an ASTNode internally. + + @param formula a mathematical formula in text-string form. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note The attribute \'formula\' is specific to SBML Level 1; in + higher Levels of SBML, it has been replaced with a subelement named + \'math\'. However, libSBML provides a unified interface to the + underlying math expression and this method can be used for models + of all Levels of SBML. + + @see setMath() +"; + + +%feature("docstring") Rule::setMath " + Sets the \'math\' subelement of this Rule to a copy of the given + ASTNode. + + @param math the ASTNode structure of the mathematical formula. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note The subelement \'math\' is present in SBML Levels 2 + and 3. In SBML Level 1, the equivalent construct is the + attribute named \'formula\'. LibSBML provides a unified interface to + the underlying math expression and this method can be used for models + of all Levels of SBML. + + @see setFormula() +"; + + +%feature("docstring") Rule::setVariable " + Sets the \'variable\' attribute value of this Rule object. + + In SBML Level 1, the different rule types each have a different + name for the attribute holding the reference to the object + constituting the left-hand side of the rule. (E.g., for + SBML Level 1\'s SpeciesConcentrationRule the attribute is \'species\', for + CompartmentVolumeRule it is \'compartment\', etc.) In SBML + Levels 2 and 3, the only two types of Rule objects with a + left-hand side object reference are AssignmentRule and RateRule, and + both of them use the same name for attribute: \'variable\'. In order to + make it easier for application developers to work with all Levels of + SBML, libSBML uses a uniform name for all such attributes, and it is + \'variable\', regardless of whether Level 1 rules or + Level 2–3 rules are being used. + + @param sid the identifier of a Compartment, Species or Parameter + elsewhere in the enclosing Model object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Rule::setUnits " + Sets the units for this Rule. + + @param sname the identifier of the units + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attribute \'units\' exists on SBML Level 1 ParameterRule + objects only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::unsetUnits " + Unsets the \'units\' for this Rule. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attribute \'units\' exists on SBML Level 1 ParameterRule + objects only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units of + measurement assumed for the \'math\' expression of this Rule. + + The units are calculated based on the mathematical expression in the + Rule and the model quantities referenced by <code><ci></code> + elements used within that expression. The getDerivedUnitDefinition() + method returns the calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + @warning Note that it is possible the \'math\' expression in the Rule + contains pure numbers or parameters with undeclared units. In those + cases, it is not possible to calculate the units of the overall + expression without making assumptions. LibSBML does not make + assumptions about the units, and getDerivedUnitDefinition() only + returns the units as far as it is able to determine them. For + example, in an expression <em>X + Y</em>, if <em>X</em> has + unambiguously-defined units and <em>Y</em> does not, it will return + the units of <em>X</em>. <strong>It is important that callers also + invoke the method</strong> + @if java Rule.containsUndeclaredUnits()@else containsUndeclaredUnits()@endif@~ + <strong>to determine whether this situation holds</strong>. Callers may + wish to take suitable actions in those scenarios. + + @return a UnitDefinition that expresses the units of the math + expression of this Rule, or @c None if one cannot be constructed. + + @see containsUndeclaredUnits() +"; + + +%feature("docstring") Rule::containsUndeclaredUnits " + Predicate returning @c True if + the math expression of this Rule contains + parameters/numbers with undeclared units. + + @return @c True if the math expression of this Rule + includes parameters/numbers + with undeclared units, @c False otherwise. + + @note A return value of @c True indicates that the UnitDefinition + returned by getDerivedUnitDefinition() may not accurately represent + the units of the expression. + + @see getDerivedUnitDefinition() +"; + + +%feature("docstring") Rule::getType " + Get the type of rule this is. + + @return the rule type (a value drawn from the enumeration <a + class=\'el\' href=\'#RuleType_t\'>RuleType_t</a>) of this Rule. The value + will be either @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink + or @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink. + + @note The attribute \'type\' on Rule objects is present only in SBML + Level 1. In SBML Level 2 and later, the type has been + replaced by subclassing the Rule object. +"; + + +%feature("docstring") Rule::isAlgebraic " + Predicate returning @c True if this + Rule is an AlgebraicRule. + + @return @c True if this Rule is an AlgebraicRule, @c False otherwise. +"; + + +%feature("docstring") Rule::isAssignment " + Predicate returning @c True if this + Rule is an AssignmentRule. + + @return @c True if this Rule is an AssignmentRule, @c False otherwise. +"; + + +%feature("docstring") Rule::isCompartmentVolume " + Predicate returning @c True if this Rule is an CompartmentVolumeRule + or equivalent. + + This libSBML method works for SBML Level 1 models (where there is + such a thing as an explicit CompartmentVolumeRule), as well as other Levels of + SBML. For Levels above Level 1, this method checks the symbol + being affected by the rule, and returns @c True if the symbol is the + identifier of a Compartment object defined in the model. + + @return @c True if this Rule is a CompartmentVolumeRule, @c False + otherwise. +"; + + +%feature("docstring") Rule::isParameter " + Predicate returning @c True if this Rule is an ParameterRule or + equivalent. + + This libSBML method works for SBML Level 1 models (where there is + such a thing as an explicit ParameterRule), as well as other Levels of + SBML. For Levels above Level 1, this method checks the symbol + being affected by the rule, and returns @c True if the symbol is the + identifier of a Parameter object defined in the model. + + @return @c True if this Rule is a ParameterRule, @c False + otherwise. +"; + + +%feature("docstring") Rule::isRate " + Predicate returning @c True if this Rule + is a RateRule (SBML Levels 2–3) or has a \'type\' attribute + value of @c \'rate\' (SBML Level 1). + + @return @c True if this Rule is a RateRule (Level 2) or has + type \'rate\' (Level 1), @c False otherwise. +"; + + +%feature("docstring") Rule::isScalar " + Predicate returning @c True if this Rule + is an AssignmentRule (SBML Levels 2–3) or has a \'type\' + attribute value of @c \'scalar\' (SBML Level 1). + + @return @c True if this Rule is an AssignmentRule (Level 2) or has + type \'scalar\' (Level 1), @c False otherwise. +"; + + +%feature("docstring") Rule::isSpeciesConcentration " + Predicate returning @c True if this Rule is a + SpeciesConcentrationRule or equivalent. + + This libSBML method works for SBML Level 1 models (where there is + such a thing as an explicit SpeciesConcentrationRule), as well as + other Levels of SBML. For Levels above Level 1, this method + checks the symbol being affected by the rule, and returns @c True if + the symbol is the identifier of a Species object defined in the model. + + @return @c True if this Rule is a SpeciesConcentrationRule, @c False + otherwise. +"; + + +%feature("docstring") Rule::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Rule::getL1TypeCode " + Returns the SBML Level 1 type code for this Rule object. + + This method only applies to SBML Level 1 model objects. If this + is not an SBML Level 1 rule object, this method will return @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink. + + @return the SBML Level 1 type code for this Rule (namely, @link + libsbml.SBML_COMPARTMENT_VOLUME_RULE + SBML_COMPARTMENT_VOLUME_RULE@endlink, @link + libsbml.SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, @link + libsbml.SBML_SPECIES_CONCENTRATION_RULE + SBML_SPECIES_CONCENTRATION_RULE@endlink, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink). +"; + + +%feature("docstring") Rule::getElementName " + Returns the XML element name of this object + + The returned value can be any of a number of different strings, + depending on the SBML Level in use and the kind of Rule object this + is. The rules as of libSBML version @htmlinclude libsbml-version.html + are the following: + <ul> + <li> (Level 2 and 3) RateRule: returns @c \'rateRule\' + <li> (Level 2 and 3) AssignmentRule: returns @c \'assignmentRule\' + <li> (Level 2 and 3) AlgebraicRule: returns @c \'algebraicRule\' + <li> (Level 1 Version 1) SpecieConcentrationRule: returns @c \'specieConcentrationRule\' + <li> (Level 1 Version 2) SpeciesConcentrationRule: returns @c \'speciesConcentrationRule\' + <li> (Level 1) CompartmentVolumeRule: returns @c \'compartmentVolumeRule\' + <li> (Level 1) ParameterRule: returns @c \'parameterRule\' + <li> Unknown rule type: returns @c \'unknownRule\' + </ul> + + Beware that the last (@c \'unknownRule\') is not a valid SBML element + name. + + @return the name of this element +"; + + +%feature("docstring") Rule::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Rule::setL1TypeCode " + Sets the SBML Level 1 type code for this Rule. + + @param type the SBML Level 1 type code for this Rule. The + allowable values are @link libsbml.SBML_COMPARTMENT_VOLUME_RULE + SBML_COMPARTMENT_VOLUME_RULE@endlink, @link + libsbml.SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, and + @link libsbml.SBML_SPECIES_CONCENTRATION_RULE + SBML_SPECIES_CONCENTRATION_RULE@endlink. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + if given @p type value is not one of the above. +"; + + +%feature("docstring") Rule::hasRequiredElements " + Predicate returning @c True if all the + required elements for this Rule object have been set. + + The only required element for a Rule object is the \'math\' subelement. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Rule::hasRequiredAttributes " + Predicate returning @c True if all the + required attributes for this Rule object have been set. + + The required attributes for a Rule object depend on the type of Rule + it is. For AssignmentRule and RateRule objects (and SBML + Level 1\'s SpeciesConcentrationRule, CompartmentVolumeRule, and + ParameterRule objects), the required attribute is \'variable\'; for + AlgebraicRule objects, there is no required attribute. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Rule::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Rule::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Rule::getInternalId " + @internal + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Rule::setInternalId " + @internal + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Rule::getId " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Rule::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Rule::divideAssignmentsToSIdByFunction " + @internal + If this rule assigns a value or a change to the \'id\' element, replace the \'math\' object with the function (existing/function). +"; + + +%feature("docstring") Rule::multiplyAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). +"; + + +%feature("docstring") Rule::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") Rule::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Rule::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Rule::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Rule::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Rule::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Rule::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfRules::ListOfRules " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfRules(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfRules object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfRules object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfRules(long level, long version)</pre> + + Creates a new ListOfRules object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfRules::clone " + Creates and returns a deep copy of this ListOfRules instance. + + @return a (deep) copy of this ListOfRules. +"; + + +%feature("docstring") ListOfRules::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfRules::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Rule objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfRules::getElementName " + Returns the XML element name of this object. + + For ListOfRules, the XML element name is @c \'listOfRules\'. + + @return the name of this element, i.e., @c \'listOfRules\'. +"; + + +%feature("docstring") ListOfRules::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a Rule from the ListOfRules. + + @param n the index number of the Rule to get. + + @return the nth Rule in this ListOfRules. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a Rule from the ListOfRules + based on its identifier. + + @param sid a string representing the identifier + of the Rule to get. + + @return Rule in this ListOfRules + with the given @p sid or @c None if no such + Rule exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfRules::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfRules items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfRules items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfRules::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that AssignmentRules and RateRules do not actually have IDs, but the libsbml interface pretends that they do: no assignment rule or rate rule is returned by this function. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") ListOfRules::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of %SBML is generally fixed + for most components in %SBML. + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfRules::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") ListOfRules::isValidTypeForList " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") AlgebraicRule " + @ingroup Core + Implementation of %SBML\'s %AlgebraicRule construct. + + The rule type AlgebraicRule is derived from the parent class Rule. It + is used to express equations that are neither assignments of model + variables nor rates of change. AlgebraicRule does not add any + attributes to the basic Rule; its role is simply to distinguish this + case from the other cases. + + In the context of a simulation, algebraic rules are in effect at all + times, <em>t</em> >= <em>0</em>. For purposes of evaluating + expressions that involve the delay \'csymbol\' (see the SBML + specification), algebraic rules are considered to apply also at + <em>t</em> <= <em>0</em>. Please consult the relevant SBML + specification for additional information about the semantics of + assignments, rules, and entity values for simulation time <em>t</em> + <= <em>0</em>. + + An SBML model must not be overdetermined. The ability to define + arbitrary algebraic expressions in an SBML model introduces the + possibility that a model is mathematically overdetermined by the overall + system of equations constructed from its rules, reactions and events. + Therefore, if an algebraic rule is introduced in a model, for at least + one of the entities referenced in the rule\'s \'math\' element the value of + that entity must not be completely determined by other constructs in the + model. This means that at least this entity must not have the attribute + \'constant\'=@c True and there must also not be a rate rule or assignment + rule for it. Furthermore, if the entity is a Species object, its value + must not be determined by reactions, which means that it must either + have the attribute \'boundaryCondition\'=@c True or else not be involved + in any reaction at all. These restrictions are explained in more detail + in the SBML specification documents. + + In SBML Levels 2 and 3, Reaction object identifiers can be + referenced in the \'math\' expression of an algebraic rule, but reaction + rates can never be <em>determined</em> by algebraic rules. This is true + even when a reaction does not contain a KineticLaw element. (In such + cases of missing KineticLaw elements, the model is valid but incomplete; + the rates of reactions lacking kinetic laws are simply undefined, and + not determined by the algebraic rule.) + + @section general General summary of SBML rules + + @htmlinclude rules-general-summary.html + + @section additional-restrictions Additional restrictions on SBML rules + + @htmlinclude rules-additional-restrictions.html + + @section RuleType_t Rule types for SBML Level 1 + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for + distinguishing rules; specifically, it uses an attribute whose value is + drawn from an enumeration of 3 values. LibSBML supports this using methods + that work @if clike a libSBML enumeration type, RuleType_t, whose values + are @else with the enumeration values @endif@~ listed below. + + @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates + the rule is a \'rate\' rule. + @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: + Indicates the rule is a \'scalar\' rule. + @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: + Indicates the rule type is unknown or not yet set. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") AlgebraicRule::AlgebraicRule " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>AlgebraicRule(SBMLNamespaces sbmlns)</pre> + + Creates a new AlgebraicRule using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a AlgebraicRule object to an SBMLDocument + (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML XML namespace of the + document @em overrides the value used when creating the AlgebraicRule + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a AlgebraicRule is an + important aid to producing valid SBML. Knowledge of the intented SBML + Level and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>AlgebraicRule(long level, long version)</pre> + + Creates a new AlgebraicRule using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this AlgebraicRule + + @param version a long integer, the SBML Version to assign to this + AlgebraicRule + + @throws @if python ValueError @else SBMLConstructorException @endif + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of an AlgebraicRule object to an SBMLDocument + (e.g., using  @if java Model.addRule()@else Model.addRule()@endif), the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the AlgebraicRule object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a AlgebraicRule is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. +"; + + +%feature("docstring") AlgebraicRule::clone " + Creates and returns a deep copy of this Rule. + + @return a (deep) copy of this Rule. +"; + + +%feature("docstring") AlgebraicRule::accept " + Accepts the given SBMLVisitor for this instance of AlgebraicRule. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next AlgebraicRule object + in the list of rules within which @em the present object is embedded. +"; + + +%feature("docstring") AlgebraicRule::setInternalIdOnly " + @internal + sets the mInternalIdOnly flag +"; + + +%feature("docstring") AlgebraicRule::getInternalIdOnly " + @internal + sets the mInternalIdOnly flag +"; + + +%feature("docstring") AlgebraicRule::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this AlgebraicRule object + have been set. + + @note In SBML Levels 2–3, there is no required attribute + for an AlgebraicRule object. For Level 1, the only required + attribute is \'formula\'. + + @return @c True if the required attributes have been set, @c False + otherwise. +"; + + +%feature("docstring") AssignmentRule " + @ingroup Core + Implementation of %SBML\'s %AssignmentRule construct. + + The rule type AssignmentRule is derived from the parent class Rule. It + is used to express equations that set the values of variables. The + left-hand side (the attribute named \'variable\') of an assignment rule + can refer to the identifier of a Species, SpeciesReference (in SBML + Level 3), Compartment, or Parameter object in the model (but not a + Reaction). The entity identified must have its \'constant\' attribute set + to @c False. The effects of an AssignmentRule are in general terms the + same, but differ in the precise details depending on the type of + variable being set: <ul> + <li> <em>In the case of a species</em>, an AssignmentRule sets the + referenced species\' quantity (whether a \'concentration\' or \'amount\') to + the value determined by the formula in the MathML subelement \'math\'. + The unit associated with the value produced by the \'math\' formula @em + should (in SBML Level 2 Version 4 and in SBML Level 3) or @em must (in + SBML releases prior to Level 2 version 4) be equal to the unit + associated with the species\' quantity. <em>Restrictions</em>: There + must not be both an AssignmentRule \'variable\' attribute and a + SpeciesReference \'species\' attribute having the same value, unless the + referenced Species object has its \'boundaryCondition\' attribute set to + @c True. In other words, an assignment rule cannot be defined for a + species that is created or destroyed in a reaction unless that species + is defined as a boundary condition in the model. + + <li> (For SBML Level 3 only) <em>In the case of a species + reference</em>, an AssignmentRule sets the stoichiometry of the + referenced reactant or product to the value determined by the formula in + \'math\'. The unit associated with the value produced by the \'math\' + formula should be consistent with the unit \'dimensionless\', because + reactant and product stoichiometries in reactions are dimensionless + quantities. + + <li> <em>In the case of a compartment</em>, an AssignmentRule sets the + referenced compartment\'s size to the value determined by the formula in + the \'math\' subelement of the AssignmentRule object. The overall units + of the formula in \'math\' @em should (in SBML Level 2 Version 4 + and in SBML Level 3) or @em must (in SBML releases prior to Level 2 + version 4) be the same as the units of the size of the compartment. + + <li> <em>In the case of a parameter</em>, an AssignmentRule sets the + referenced parameter\'s value to that determined by the formula in the + \'math\' subelement of the AssignmentRule object. The overall units of + the formula in the \'math\' subelement @em should (in SBML Level 2 + Version 4 and in SBML Level 3) or @em must (in SBML releases prior to + Level 2 version 4) be the same as the units defined for the + parameter. </ul> + + In the context of a simulation, assignment rules are in effect at all + times, <em>t</em> >= <em>0</em>. For purposes of evaluating + expressions that involve the <em>delay</em> \'csymbol\' (see the SBML + Level 2 specification), assignment rules are considered to apply + also at <em>t</em> <= <em>0</em>. Please consult the relevant + SBML specification for additional information about the semantics of + assignments, rules, and entity values for simulation time <em>t</em> + <= <em>0</em>. + + A model must not contain more than one AssignmentRule or RateRule + object having the same value of \'variable\'; in other words, in the set + of all assignment rules and rate rules in an SBML model, each variable + appearing in the left-hand sides can only appear once. This simply + follows from the fact that an indeterminate system would result if a + model contained more than one assignment rule for the same variable or + both an assignment rule and a rate rule for the same variable. + + Similarly, a model must also not contain <em>both</em> an AssignmentRule + and an InitialAssignment for the same variable, because both kinds of + constructs apply prior to and at the start of simulation time, i.e., + <em>t</em> <= <em>0</em>. If a model contained both an initial + assignment and an assignment rule for the same variable, an + indeterminate system would result. + + The value calculated by an AssignmentRule object overrides the value + assigned to the given symbol by the object defining that symbol. For + example, if a Compartment object\'s \'size\' attribute value is set in its + definition, and the model also contains an AssignmentRule object having + that compartment\'s \'id\' as its \'variable\' value, then the \'size\' + assigned in the Compartment object definition is ignored and the value + assigned based on the computation defined in the AssignmentRule. This + does <em>not</em> mean that a definition for a given symbol can be + omitted if there is an AssignmentRule object for it. For example, there + must be a Parameter definition for a given parameter if there is an + AssignmentRule for that parameter. It is only a question of which value + definition takes precedence. + + @section general General summary of SBML rules + + @htmlinclude rules-general-summary.html + + @section additional-restrictions Additional restrictions on SBML rules + + @htmlinclude rules-additional-restrictions.html + + @section RuleType_t Rule types for SBML Level 1 + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for + distinguishing rules; specifically, it uses an attribute whose value is + drawn from an enumeration of 3 values. LibSBML supports this using methods + that work @if clike a libSBML enumeration type, RuleType_t, whose values + are @else with the enumeration values @endif@~ listed below. + + @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates + the rule is a \'rate\' rule. + @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: + Indicates the rule is a \'scalar\' rule. + @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: + Indicates the rule type is unknown or not yet set. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") AssignmentRule::AssignmentRule " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>AssignmentRule(SBMLNamespaces sbmlns)</pre> + + Creates a new AssignmentRule using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a AssignmentRule object to an SBMLDocument + (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML XML namespace of + the document @em overrides the value used when creating the + AssignmentRule object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a + AssignmentRule is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>AssignmentRule(long level, long version)</pre> + + Creates a new AssignmentRule using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this AssignmentRule + + @param version a long integer, the SBML Version to assign to this + AssignmentRule + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of an AssignmentRule object to an SBMLDocument + (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the AssignmentRule object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a AssignmentRule is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. +"; + + +%feature("docstring") AssignmentRule::clone " + Creates and returns a deep copy of this Rule. + + @return a (deep) copy of this Rule. +"; + + +%feature("docstring") AssignmentRule::accept " + Accepts the given SBMLVisitor for this instance of AssignmentRule. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next AssignmentRule object + in the list of rules within which @em the present object is embedded. +"; + + +%feature("docstring") AssignmentRule::hasRequiredAttributes " + Predicate returning @c True if all the required attributes for this + AssignmentRule object have been set. + + @note In SBML Levels 2–3, the only required attribute for + an AssignmentRule object is \'variable\'. For Level 1, where the + equivalent attribute is known by different names (\'compartment\', + \'species\', or \'name\', depending on the type of object), there is an + additional required attribute called \'formula\'. + + @return @c True if the required attributes have been set, @c False + otherwise. +"; + + +%feature("docstring") AssignmentRule::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") RateRule " + @ingroup Core + Implementation of %SBML\'s %RateRule construct. + + The rule type RateRule is derived from the parent class Rule. It is + used to express equations that determine the rates of change of + variables. The left-hand side (the \'variable\' attribute) can refer to + the identifier of a species, compartment, or parameter (but not a + reaction). The entity identified must have its \'constant\' attribute set + to @c False. The effects of a RateRule are in general terms the same, + but differ in the precise details depending on which variable is being + set: + + <ul> <li> <em>In the case of a species</em>, a RateRule sets the rate of + change of the species\' quantity (<em>concentration</em> or <em>amount of + substance</em>) to the value determined by the formula in the \'math\' + subelement of the RateRule object. The overall units of the formula in + \'math\' @em should (in SBML Level 2 Version 4 and in SBML Level 3) or @em + must (in SBML releases prior to Level 2 version 4) be equal to + the unit of <em>species quantity</em> divided by the model-wide unit of + <em>time</em>. <em>Restrictions</em>: There must not be both a RateRule + \'variable\' attribute and a SpeciesReference \'species\' attribute having + the same value, unless that species has its \'boundaryCondition\' + attribute is set to @c True. This means a rate rule cannot be defined + for a species that is created or destroyed in a reaction, unless that + species is defined as a boundary condition in the model. + + <li> (For SBML Level 3 only) <em>In the case of a species + reference</em>, a RateRule sets the rate of change of the stoichiometry + of the referenced reactant or product to the value determined by the + formula in \'math\'. The unit associated with the value produced by the + \'math\' formula should be consistent with the unit \'dimensionless\' + divided by the model-wide unit of <em>time</em>. + + <li> <em>In the case of a compartment</em>, a RateRule sets the rate of + change of the compartment\'s size to the value determined by the formula + in the \'math\' subelement of the RateRule object. The overall units of + the formula @em should (in SBML Level 2 Version 4 and in SBML + Level 3) or @em must (in SBML releases prior to Level 2 + version 4) be the units of the compartment\'s <em>size</em> divided + by the model-wide unit of <em>time</em>. + + <li> <em>In the case of a parameter</em>, a RateRule sets the rate of + change of the parameter\'s value to that determined by the formula in the + \'math\' subelement of the RateRule object. The overall units of the + formula @em should (in SBML Level 2 Version 4 and in SBML + Level 3) or @em must (in SBML releases prior to Level 2 + version 4) be the Parameter object\'s \'unit\' attribute value divided + by the model-wide unit of <em>time</em>. </ul> + + In the context of a simulation, rate rules are in effect for simulation + time <em>t</em> < <em>0</em>. Please consult the relevant SBML + specification for additional information about the semantics of + assignments, rules, and entity values for simulation time <em>t</em> + <= <em>0</em>. + + As mentioned in the description of AssignmentRule, a model must not + contain more than one RateRule or AssignmentRule object having the same + value of \'variable\'; in other words, in the set of all assignment rules + and rate rules in an SBML model, each variable appearing in the + left-hand sides can only appear once. This simply follows from the fact + that an indeterminate system would result if a model contained more than + one assignment rule for the same variable or both an assignment rule and + a rate rule for the same variable. + + @section general General summary of SBML rules + + @htmlinclude rules-general-summary.html + + @section additional-restrictions Additional restrictions on SBML rules + + @htmlinclude rules-additional-restrictions.html + + @section RuleType_t Rule types for SBML Level 1 + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for + distinguishing rules; specifically, it uses an attribute whose value is + drawn from an enumeration of 3 values. LibSBML supports this using methods + that work @if clike a libSBML enumeration type, RuleType_t, whose values + are @else with the enumeration values @endif@~ listed below. + + @li @link libsbml.RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates + the rule is a \'rate\' rule. + @li @link libsbml.RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink: + Indicates the rule is a \'scalar\' rule. + @li @link libsbml.RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink: + Indicates the rule type is unknown or not yet set. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") RateRule::RateRule " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>RateRule(SBMLNamespaces sbmlns)</pre> + + Creates a new RateRule using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a RateRule object to an SBMLDocument (e.g., + using @if java Model.addRule()@else Model.addRule()@endif, the SBML XML namespace of the document + @em overrides the value used when creating the RateRule object via + this constructor. This is necessary to ensure that an SBML document + is a consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a RateRule is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>RateRule(long level, long version)</pre> + + Creates a new RateRule using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this RateRule + + @param version a long integer, the SBML Version to assign to this + RateRule + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a RateRule object to an SBMLDocument + (e.g., using  @if java Model.addRule()@else Model.addRule()@endif, the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the RateRule object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a RateRule is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. +"; + + +%feature("docstring") RateRule::clone " + Creates and returns a deep copy of this Rule. + + @return a (deep) copy of this Rule. +"; + + +%feature("docstring") RateRule::accept " + Accepts the given SBMLVisitor. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next RateRule object + in the list of rules within which @em the present object is embedded. +"; + + +%feature("docstring") RateRule::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this RateRule object + have been set. + + @note In SBML Levels 2–3, the only required attribute for a + RateRule object is \'variable\'. For Level 1, where the equivalent + attribute is known by different names (\'compartment\', \'species\', or + \'name\', depending on the type of object), there is an additional + required attribute called \'formula\'. + + @return @c True if the required attributes have been set, @c False + otherwise. +"; + + +%feature("docstring") RateRule::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Constraint " + @ingroup Core + Implementation of SBML\'s %Constraint construct. + + The Constraint object class was introduced in SBML Level 2 + Version 2 as a mechanism for stating the assumptions under which a + model is designed to operate. The <em>constraints</em> are statements + about permissible values of different quantities in a model. + Constraints are not used to compute dynamical values for simulation or + analysis, but rather, they serve an advisory role for + simulation/analysis tools. + + SBML\'s Constraint object class has one required attribute, \'id\', to + give the parameter a unique identifier by which other parts of an SBML + model definition can refer to it. A Constraint object can also have an + optional \'name\' attribute of type @c string. Identifiers and names must + be used according to the guidelines described in the SBML specification + (e.g., Section 3.3 in the Level 2 Version 4 specification). + + Constraint has one required subelement, \'math\', containing a MathML + formula defining the condition of the constraint. This formula must + return a boolean value of @c True when the model is a <em>valid</em> + state. The formula can be an arbitrary expression referencing the + variables and other entities in an SBML model. The evaluation of \'math\' + and behavior of constraints are described in more detail below. + + A Constraint structure also has an optional subelement called \'message\'. + This can contain a message in XHTML format that may be displayed to the + user when the condition of the formula in the \'math\' subelement + evaluates to a value of @c False. Software tools are not required to + display the message, but it is recommended that they do so as a matter + of best practice. The XHTML content within a \'message\' subelement must + follow the same restrictions as for the \'notes\' element on SBase + described in in the SBML Level 2 specification; please consult the + <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications\'>SBML + specification document</a> corresponding to the SBML Level and Version + of your model for more information about the requirements for \'notes\' + content. + + Constraint was introduced in SBML Level 2 Version 2. It is + not available in earlier versions of Level 2 nor in any version of + Level 1. + + @section constraint-semantics Semantics of Constraints + + In the context of a simulation, a Constraint has effect at all times + <em>t >= 0</em>. Each Constraint\'s \'math\' subelement is first + evaluated after any InitialAssignment definitions in a model at <em>t = + 0</em> and can conceivably trigger at that point. (In other words, a + simulation could fail a constraint immediately.) + + Constraint structures <em>cannot and should not</em> be used to compute + the dynamical behavior of a model as part of, for example, simulation. + Constraints may be used as input to non-dynamical analysis, for instance + by expressing flux constraints for flux balance analysis. + + The results of a simulation of a model containing a constraint are + invalid from any simulation time at and after a point when the function + given by the \'math\' subelement returns a value of @c False. Invalid + simulation results do not make a prediction of the behavior of the + biochemical reaction network represented by the model. The precise + behavior of simulation tools is left undefined with respect to + constraints. If invalid results are detected with respect to a given + constraint, the \'message\' subelement may optionally be displayed to the + user. The simulation tool may also halt the simulation or clearly + delimit in output data the simulation time point at which the simulation + results become invalid. + + SBML does not impose restrictions on duplicate Constraint definitions or + the order of evaluation of Constraint objects in a model. It is + possible for a model to define multiple constraints all with the same + mathematical expression. Since the failure of any constraint indicates + that the model simulation has entered an invalid state, a system is not + required to attempt to detect whether other constraints in the model + have failed once any one constraint has failed. + + <!---------------------------------------------------------------------- --> +"; + + +%feature("docstring") ListOfConstraints " + @ingroup Core + Implementation of SBML\'s %ListOfConstraints construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Constraint::Constraint " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Constraint(SBMLNamespaces sbmlns)</pre> + + Creates a new Constraint using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Constraint object to an SBMLDocument + (e.g., using Model.addConstraint()), the + SBML XML namespace of the document @em overrides the value used when + creating the Constraint object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a Constraint is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Constraint(long level, long version)</pre> + + Creates a new Constraint using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Constraint + + @param version a long integer, the SBML Version to assign to this + Constraint + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Constraint object to an SBMLDocument + (e.g., using Model.addConstraint()), the + SBML Level, SBML Version and XML namespace of the document @em + override the values used when creating the Constraint object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Constraint is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Constraint(Constraint orig)</pre> + + Copy constructor; creates a copy of this Constraint. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Constraint::accept " + Accepts the given SBMLVisitor for this instance of Constraint. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next Constraint in the + list of constraints within which this Constraint is embedded (i.e., in + the ListOfConstraints located in the enclosing Model instance). +"; + + +%feature("docstring") Constraint::clone " + Creates and returns a deep copy of this Constraint. + + @return a (deep) copy of this Constraint. +"; + + +%feature("docstring") Constraint::getMessage " + Get the message, if any, associated with this Constraint + + @return the message for this Constraint, as an XMLNode. +"; + + +%feature("docstring") Constraint::getMessageString " + Get the message string, if any, associated with this Constraint + + @return the message for this Constraint, as a string. +"; + + +%feature("docstring") Constraint::getMath " + Get the mathematical expression of this Constraint + + @return the math for this Constraint, as an ASTNode. +"; + + +%feature("docstring") Constraint::isSetMessage " + Predicate returning @c True if a + message is defined for this Constraint. + + @return @c True if the message of this Constraint is set, + @c False otherwise. +"; + + +%feature("docstring") Constraint::isSetMath " + Predicate returning @c True if a + mathematical formula is defined for this Constraint. + + @return @c True if the \'math\' subelement for this Constraint is + set, @c False otherwise. +"; + + +%feature("docstring") Constraint::setMessage " + Sets the message of this Constraint. + + The XMLNode tree passed in @p xhtml is copied. + + @param xhtml an XML tree containing XHTML content. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") Constraint::setMath " + Sets the mathematical expression of this Constraint to a copy of the + AST given as @p math. + + @param math an ASTNode expression to be assigned as the \'math\' + subelement of this Constraint + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") Constraint::unsetMessage " + Unsets the \'message\' subelement of this Constraint. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Constraint::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Constraint::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Constraint::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Constraint::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Constraint::getElementName " + Returns the XML element name of this object, which for Constraint, is + always @c \'constraint\'. + + @return the name of this element, i.e., @c \'constraint\'. +"; + + +%feature("docstring") Constraint::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Constraint::hasRequiredElements " + Predicate returning @c True if + all the required elements for this Constraint object + have been set. + + @note The required elements for a Constraint object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Constraint::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") Constraint::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Constraint::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Constraint::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Constraint::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Constraint::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfConstraints::ListOfConstraints " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfConstraints(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfConstraints object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfConstraints object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfConstraints(long level, long version)</pre> + + Creates a new ListOfConstraints object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfConstraints::clone " + Creates and returns a deep copy of this ListOfConstraints instance. + + @return a (deep) copy of this ListOfConstraints. +"; + + +%feature("docstring") ListOfConstraints::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfConstraints::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Constraint objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfConstraints::getElementName " + Returns the XML element name of this object. + + For ListOfConstraints, the XML element name is @c \'listOfConstraints\'. + + @return the name of this element, i.e., @c \'listOfConstraints\'. +"; + + +%feature("docstring") ListOfConstraints::get " + Get a Constraint from the ListOfConstraints. + + @param n the index number of the Constraint to get. + + @return the nth Constraint in this ListOfConstraints. + + @see size() +"; + + +%feature("docstring") ListOfConstraints::remove " + Removes the nth item from this ListOfConstraints items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() +"; + + +%feature("docstring") ListOfConstraints::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the ListOfConstraints + in a model is (in SBML Level 2 Version 4) the tenth ListOf___. + (However, it differs for different Levels and Versions of SBML.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfConstraints::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Reaction " + @ingroup Core + Implementation of SBML\'s %Reaction construct. + + A @em reaction represents any transformation, transport or binding + process, typically a chemical reaction, that can change the quantity of + one or more species. In SBML, a reaction is defined primarily in terms + of the participating reactants and products (and their corresponding + stoichiometries), along with optional modifier species, an optional rate + at which the reaction takes place, and optional parameters. + + As with other major object in SBML, Reaction has a mandatory attribute, + \'id\', used to give the compartment type an identifier. The identifier + must be a text string conforming to the identifer syntax permitted in + SBML. In SBML Level 2 and Level 3, the reaction \'id\' + identifier can be used in mathematical formulas elsewhere in an SBML + model to represent the rate of that reaction; this usage is explained + below. Reaction also has an optional \'name\' attribute, of type @c + string. The \'id\' and \'name\' must be used according to the guidelines + described in the SBML specification. + + The species participating as reactants, products, and/or modifiers in a + reaction are declared using lists of SpeciesReference and/or + ModifierSpeciesReference instances stored in subelements + \'listOfReactants\', \'listOfProducts\' and \'listOfModifiers\'. Certain + restrictions are placed on the appearance of species in reaction + definitions: + <ul> + <li> The ability of a species to appear as a reactant or product of any + reaction in a model is governed by certain flags in that species\' + definition; see the definition of Species for more information. + + <li> Any species appearing in the mathematical formula of the subelement + \'kineticLaw\' (described below) of a Reaction must be declared in at + least one of that Reaction\'s lists of reactants, products, and/or + modifiers. Put another way, it is an error for a reaction\'s kinetic law + formula to refer to species that have not been declared for that + reaction. + + <li> A reaction definition can contain an empty list of reactants + <em>or</em> an empty list of products, but it must have at least one + reactant or product; in other words, a reaction without any reactant or + product species is not permitted. (This restriction does not apply to + modifier species, which remain optional in all cases.) + </ul> + + A reaction can contain up to one KineticLaw object in a subelement named + \'kineticLaw\'. It defines the speed at which the process defined by the + reaction takes place. The description of KineticLaw provides more + details about its use. Note that although the inclusion of a KineticLaw + object in an instance of a Reaction component is optional, there is no + useful default that can be substituted in place of a missing rate + expression in a reaction. Moreover, a reaction\'s rate cannot be defined + in any other way in SBML—InitialAssignment, AssignmentRule, + RateRule, AlgebraicRule, Event, and other constructs in SBML cannot be + used to set the reaction rate separately. Nevertheless, for some + modeling applications, reactions without any defined rate can be + perfectly acceptable. + + Reaction also has a boolean attribute named \'reversible\' for indicating + whether the reaction is reversible. This attribute is optional in SBML + Level 2, with a default of @c True; it is mandatory in SBML + Level 3 (with no default value). To say that a reaction is @em + reversible is to say it can proceed in either the forward or the reverse + direction. Although the reversibility of a reaction can sometimes be + deduced by inspecting its rate expression, this is not always the case, + especially for complicated expressions. Moreover, the need in SBML to + allow rate expressions (i.e., KineticLaw) to be optional leads to the + need for a separate flag indicating reversibility. Note that labeling a + reaction as irreversible is an assertion that the reaction always + proceeds in the given forward direction. (Why else would it be flagged + as irreversible?) This implies the rate expression in the KineticLaw + always has a non-negative value during simulations. Software tools + could provide a means of optionally testing that this condition holds. + The presence of reversibility information in two places (i.e., the rate + expression and the \'reversible\' attribute on Reaction) leaves open the + possibility that a model could contain contradictory information, but + the creation of such a model would be an error on the part of the + software generating it. + + The Reaction object class has another boolean attribute called \'fast\'. + This attribute is optional in SBML Level 2, with a default of @c + false; it is mandatory in SBML Level 3 (with no default value). It + is used to indicate that a reaction occurs on a vastly faster time scale + than others in a system. Readers are directed to the SBML Level 2 + Version 4 specification, which provides more detail about the + conditions under which a reaction can be considered to be fast in this + sense. The attribute\'s default value is @c False. SBML Level 1 + and Level 2 Version 1 incorrectly claimed that software tools + could ignore this attribute if they did not implement support for the + corresponding concept; however, further research in SBML has revealed + that this is not true, and \'fast\' <em>cannot be ignored</em> if it is + set to @c True. SBML Level 2 Versions 2–4 therefore + stipulate that if a model has any reactions with \'fast\' set to @c True, + a software tool must be able to respect the attribute or else indicate + to the user that it does not have the capacity to do so. Analysis + software cannot ignore the value of the \'fast\' attribute because doing + so may lead to different results as compared to a software system that + <em>does</em> make use of \'fast\'. + + In SBML Level 3 Version 1, the Reaction object has an + additional optional attribute named \'compartment\', whose value must be + the identifier of a compartment defined in the enclosing Model object. + The \'compartment\' attribute can be used to indicate the compartment in + which the reaction is assumed to take place. If the attribute is + present, its value must be the identifier of a Compartment object + defined in the enclosing Model object. Similar to the \'reversible\' + attribute, the value of the \'compartment\' attribute has no direct impact + on the construction of mathematical equations for the SBML model. When + a kinetic law is given for a reaction, the compartment location may + already be implicit in the kinetic law (although this cannot always be + guaranteed). Nevertheless, software tools may find the \'compartment\' + attribute value useful for such purposes as analyzing the structure of + the model, guiding the modeler in constructing correct rate formulas, + and visualization purposes. + + Readers are urged to read the SBML specification for more details about + the proper use of Reaction. +"; + + +%feature("docstring") ListOfReactions " + @ingroup Core + Implementation of SBML\'s %ListOfReactions construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Reaction::Reaction " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Reaction(SBMLNamespaces sbmlns)</pre> + + Creates a new Reaction using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Reaction object to an SBMLDocument (e.g., + using Model.addReaction()), the SBML XML namespace of the document + @em overrides the value used when creating the Reaction object via + this constructor. This is necessary to ensure that an SBML document + is a consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a Reaction is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Reaction(long level, long version)</pre> + + Creates a new Reaction using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Reaction + + @param version a long integer, the SBML Version to assign to this + Reaction + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Reaction object to an SBMLDocument (e.g., + using Model.addReaction()), the SBML Level, SBML Version and + XML namespace of the document @em override the values used when + creating the Reaction object via this constructor. This is necessary + to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a Reaction is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Reaction(Reaction orig)</pre> + + Copy constructor; creates a copy of this Reaction. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Reaction::accept " + Accepts the given SBMLVisitor for this instance of Reaction. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") Reaction::clone " + Creates and returns a deep copy of this Reaction. + + @return a (deep) copy of this Reaction. +"; + + +%feature("docstring") Reaction::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find. + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") Reaction::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") Reaction::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") Reaction::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Reaction::initDefaults " + Initializes the fields of this Reaction object to \'typical\' default + values. + + The SBML Reaction component has slightly different aspects and + default attribute values in different SBML Levels and Versions. + This method sets the values to certain common defaults, based + mostly on what they are in SBML Level 2. Specifically: + <ul> + <li> Sets the \'reversible\' attribute to @c True + <li> Sets the \'fast\' attribute to @c False + <li> Marks the \'fast\' attribute as @em not having been set + </ul> + + @warning The \'fast\' attribute must be used with care. SBML + definitions before SBML Level 2 Version 2 incorrectly + indicated that software tools could ignore this attribute if they did + not implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and \'fast\' + <em>cannot be ignored</em> if it is set to @c True. Beginning with + SBML Level 2 Versions 2, the SBML specifications therefore + stipulate that if a model has any reactions with \'fast\' set to @c + true, a software tool must be able to respect the attribute or else + indicate to the user that it does not have the capacity to do so. + Readers are directed to the SBML specifications, which provides more + detail about the conditions under which a reaction can be considered + to be fast in this sense. +"; + + +%feature("docstring") Reaction::getId " + Returns the value of the \'id\' attribute of this Reaction. + + @return the id of this Reaction. +"; + + +%feature("docstring") Reaction::getName " + Returns the value of the \'name\' attribute of this Reaction. + + @return the name of this Reaction. +"; + + +%feature("docstring") Reaction::getKineticLaw " + Returns the KineticLaw object contained in this Reaction. + + @return the KineticLaw instance. +"; + + +%feature("docstring") Reaction::getReversible " + Returns the value of the \'reversible\' attribute on the Reaction as a + boolean value. + + @return the reversibility status of this Reaction. +"; + + +%feature("docstring") Reaction::getFast " + Returns the value of the \'fast\' attribute of this Reaction. + + @return the \'fast\' status of this Reaction. + + @warning SBML definitions before SBML Level 2 Version 2 incorrectly + indicated that software tools could ignore this attribute if they did + not implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and \'fast\' + <em>cannot be ignored</em> if it is set to @c True. SBML Level 2 + Versions 2, 3 and 4 therefore stipulate that if a model has any reactions + with \'fast\' set to @c True, a software tool must be able to respect + the attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML Level 2 Version + 4 specification, which provides more detail about the conditions under + which a reaction can be considered to be fast in this sense. +"; + + +%feature("docstring") Reaction::getCompartment " + (SBML Level 3 only) Returns the value of the \'compartment\' + attribute on the Reaction. + + @return the compartment of this Reaction. + + @note The \'compartment\' attribute is available in SBML Level 3 + Version 1 Core, but is not present on Reaction in lower Levels of + SBML. +"; + + +%feature("docstring") Reaction::isSetId " + Predicate returning @c True if this + Reaction\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this Reaction is + set, @c False otherwise. +"; + + +%feature("docstring") Reaction::isSetName " + Predicate returning @c True if this + Reaction\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this Reaction is + set, @c False otherwise. +"; + + +%feature("docstring") Reaction::isSetKineticLaw " + Predicate returning @c True if this + Reaction contains a kinetic law object. + + @return @c True if a KineticLaw is present in this Reaction,, @c False + otherwise. +"; + + +%feature("docstring") Reaction::isSetFast " + Predicate returning @c True if the value of + the \'fast\' attribute on this Reaction. + + @return @c True if the \'fast\' attribute is true, @c False otherwise. + + @warning SBML definitions before SBML Level 2 Version 2 incorrectly + indicated that software tools could ignore this attribute if they did + not implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and \'fast\' + <em>cannot be ignored</em> if it is set to @c True. SBML Level 2 + Versions 2, 3 and 4 therefore stipulate that if a model has any reactions + with \'fast\' set to @c True, a software tool must be able to respect + the attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML Level 2 Version + 4 specification, which provides more detail about the conditions under + which a reaction can be considered to be fast in this sense. Note + also that in SBML Level 1, \'fast\' is defined as optional with a + default of @c False, which means it is effectively always set. +"; + + +%feature("docstring") Reaction::isSetCompartment " + Predicate returning @c True if this + Reaction\'s \'compartment\' attribute is set. + + @return @c True if the \'compartment\' attribute of this Reaction is + set, @c False otherwise. + + @note The \'compartment\' attribute is available in SBML + Level 3 Version 1 Core, but is not present on Reaction in + lower Levels of SBML. +"; + + +%feature("docstring") Reaction::isSetReversible " + Predicate returning @c True if this + Reaction\'s \'reversible\' attribute is set. + + @return @c True if the \'reversible\' attribute of this Reaction is + set, @c False otherwise. +"; + + +%feature("docstring") Reaction::setId " + Sets the value of the \'id\' attribute of this Reaction. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this Reaction + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Reaction::setName " + Sets the value of the \'name\' attribute of this Reaction. + + The string in @p name is copied. + + @param name the new name for the Reaction + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Reaction::setKineticLaw " + Sets the \'kineticLaw\' subelement of this Reaction to a copy of the + given KineticLaw object. + + @param kl the KineticLaw object to use. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink +"; + + +%feature("docstring") Reaction::setReversible " + Sets the value of the \'reversible\' attribute of this Reaction. + + @param value the value of the \'reversible\' attribute. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") Reaction::setFast " + Sets the value of the \'fast\' attribute of this Reaction. + + @param value the value of the \'fast\' attribute. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @warning SBML definitions before SBML Level 2 Version 2 incorrectly + indicated that software tools could ignore this attribute if they did + not implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and \'fast\' + <em>cannot be ignored</em> if it is set to @c True. SBML Level 2 + Versions 2, 3 and 4 therefore stipulate that if a model has any reactions + with \'fast\' set to @c True, a software tool must be able to respect + the attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML Level 2 Version + 4 specification, which provides more detail about the conditions under + which a reaction can be considered to be fast in this sense. +"; + + +%feature("docstring") Reaction::setCompartment " + Sets the value of the \'compartment\' attribute of this Reaction. + + The string @p sid is copied. + + @param sid the string to use as the compartment of this Reaction + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The \'compartment\' attribute is available in SBML + Level 3 Version 1 Core, but is not present on Reaction in + lower Levels of SBML. +"; + + +%feature("docstring") Reaction::unsetName " + Unsets the value of the \'name\' attribute of this Reaction. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Reaction::unsetKineticLaw " + Unsets the \'kineticLaw\' subelement of this Reaction. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Reaction::unsetFast " + Unsets the value of the \'fast\' attribute of this Reaction. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @warning In SBML Level 1, \'fast\' is optional with a default of @c + false, which means it is effectively always set (and reset to @c False + if this method is called). Further, SBML definitions before SBML + Level 2 Version 2 incorrectly indicated that software tools could + ignore this attribute if they did not implement support for the + corresponding concept; however, further research in SBML has revealed + that this is not true, and \'fast\' <em>cannot be ignored</em> if it is + set to @c True. SBML Level 2 Versions 2, 3 and 4 therefore stipulate + that if a model has any reactions with \'fast\' set to @c True, a + software tool must be able to respect the attribute or else indicate + to the user that it does not have the capacity to do so. Readers are + directed to the SBML Level 2 Version 4 specification, which provides + more detail about the conditions under which a reaction can be + considered to be fast in this sense. +"; + + +%feature("docstring") Reaction::unsetCompartment " + Unsets the value of the \'compartment\' attribute of this Reaction. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The \'compartment\' attribute is available in SBML + Level 3 Version 1 Core, but is not present on Reaction in + lower Levels of SBML. +"; + + +%feature("docstring") Reaction::addReactant " + Adds a given SpeciesReference object as a reactant in this Reaction. + + The SpeciesReference instance in @p sr is copied. + + @param sr a SpeciesReference object referring to a Species in the + enclosing Model + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Reaction. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Reaction</em>. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see Reaction.createReactant() + for a method that does not lead to these issues. + + @see createReactant() +"; + + +%feature("docstring") Reaction::addProduct " + Adds a given SpeciesReference object as a product in this Reaction. + + The SpeciesReference instance in @p sr is copied. + + @param sr a SpeciesReference object referring to a Species in the + enclosing Model + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Reaction. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Reaction</em>. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see Reaction.createProduct() + for a method that does not lead to these issues. + + @see createProduct() +"; + + +%feature("docstring") Reaction::addModifier " + Adds a given ModifierSpeciesReference object as a product in this + Reaction. + + The ModifierSpeciesReference instance in @p msr is copied. + + @param msr a ModifierSpeciesReference object referring to a Species in + the enclosing Model + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Reaction. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Reaction</em>. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see Reaction.createModifier() + for a method that does not lead to these issues. + + @see createModifier() +"; + + +%feature("docstring") Reaction::createReactant " + Creates a new SpeciesReference, adds it to this Reaction\'s list of + reactants, and returns it. + + @return a new SpeciesReference object. +"; + + +%feature("docstring") Reaction::createProduct " + Creates a new SpeciesReference, adds it to this Reaction\'s list of + products, and returns it. + + @return a new SpeciesReference object. +"; + + +%feature("docstring") Reaction::createModifier " + Creates a new ModifierSpeciesReference, adds it to this Reaction\'s + list of modifiers and returns it. + + @return a new ModifierSpeciesReference object. +"; + + +%feature("docstring") Reaction::createKineticLaw " + Creates a new KineticLaw object, installs it as this Reaction\'s + \'kineticLaw\' subelement, and returns it. + + If this Reaction had a previous KineticLaw, it will be destroyed. + + @return the new KineticLaw object +"; + + +%feature("docstring") Reaction::getListOfReactants " + Returns the list of reactants in this Reaction object. + + @return the ListOfSpeciesReferences containing the references to the + species acting as reactants in this reaction +"; + + +%feature("docstring") Reaction::getListOfProducts " + Returns the list of products in this Reaction object. + + @return the ListOfSpeciesReferences containing the references to the + species acting as products in this reaction +"; + + +%feature("docstring") Reaction::getListOfModifiers " + Returns the list of modifiers in this Reaction object. + + @return the ListOfSpeciesReferences containing the references to the + species acting as modifiers in this reaction +"; + + +%feature("docstring") Reaction::getReactant " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getReactant(string species)</pre> + + Returns the reactant species (as a SpeciesReference object) having + a specific identifier in this Reaction. + + @param species the identifier of the reactant Species (\'species\' + attribute of the reactant SpeciesReference object) + + @return a SpeciesReference object, or @c None if no species with the + given identifier @p species appears as a reactant in this Reaction. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getReactant(long n)</pre> + + Returns the nth reactant species (as a SpeciesReference object) + in the list of reactants in this Reaction. + + Callers should first call getNumReactants() to find out how many + reactants there are, to avoid using an invalid index number. + + @param n the index of the reactant sought. + + @return the nth reactant (as a SpeciesReference object) of this + Reaction. +"; + + +%feature("docstring") Reaction::getProduct " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getProduct(string species)</pre> + + Returns the product species (as a SpeciesReference object) having + a specific identifier in this Reaction. + + @param species the identifier of the product Species (\'species\' + attribute of the product SpeciesReference object) + + @return a SpeciesReference object, or @c None if no species with the + given identifier @p species appears as a product in this Reaction. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getProduct(long n)</pre> + + Returns the nth product species (as a SpeciesReference object) + in the list of products in this Reaction. + + Callers should first call getNumProducts() to find out how many + products there are, to avoid using an invalid index number. + + @param n the index of the product sought. + + @return the nth product (as a SpeciesReference object) of this + Reaction. +"; + + +%feature("docstring") Reaction::getModifier " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getModifier(string species)</pre> + + Returns the modifier species (as a ModifierSpeciesReference object) + having a specific identifier in this Reaction. + + @param species the identifier of the modifier Species (\'species\' + attribute of the ModifierSpeciesReference object) + + @return a ModifierSpeciesReference object, or @c None if no species with + the given identifier @p species appears as a modifier in this + Reaction. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getModifier(long n)</pre> + + Returns the nth modifier species (as a ModifierSpeciesReference object) + in the list of modifiers of this Reaction. + + Callers should first call getNumModifiers() to find out how many + modifiers there are, to avoid using an invalid index number. + + @param n the index of the modifier species sought + + @return the nth modifier (as a ModifierSpeciesReference object) of + this Reaction. +"; + + +%feature("docstring") Reaction::getNumReactants " + Returns the number of reactant species in this Reaction. + + @return the number of reactants in this Reaction. +"; + + +%feature("docstring") Reaction::getNumProducts " + Returns the number of product species in this Reaction. + + @return the number of products in this Reaction. +"; + + +%feature("docstring") Reaction::getNumModifiers " + Returns the number of modifier species in this Reaction. + + @return the number of modifiers in this Reaction. +"; + + +%feature("docstring") Reaction::removeReactant " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeReactant(string species)</pre> + + Removes the reactant species (SpeciesReference object) having the given + \'species\' attribute in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param species the \'species\' attribute of the reactant SpeciesReference + object + + @return the removed reactant SpeciesReference object, or @c None if no + reactant SpeciesReference object with the given \'species\' attribute + @p species exists in this Reaction. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeReactant(long n)</pre> + + Removes the nth reactant species (SpeciesReference object) in the list of + reactants in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + The caller should first call getNumReactants() to find out how many + reactants there are, to avoid using an invalid index number. + + @param n the index of the reactant SpeciesReference object to remove + + @return the removed reactant SpeciesReference object, or @c None if the + given index is out of range. +"; + + +%feature("docstring") Reaction::removeProduct " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeProduct(string species)</pre> + + Removes the product species (SpeciesReference object) having the given + \'species\' attribute in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param species the \'species\' attribute of the product SpeciesReference + object + + @return the removed product SpeciesReference object, or @c None if no + product SpeciesReference object with the given \'species\' attribute + @p species exists in this Reaction. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeProduct(long n)</pre> + + Removes the nth product species (SpeciesReference object) in the list of + products in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + The caller should first call getNumProducts() to find out how many + products there are, to avoid using an invalid index number. + + @param n the index of the product SpeciesReference object to remove + + @return the removed product SpeciesReference object, or @c None if the + given index is out of range. +"; + + +%feature("docstring") Reaction::removeModifier " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeModifier(string species)</pre> + + Removes the modifier species (ModifierSpeciesReference object) having + the given \'species\' attribute in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param species the \'species\' attribute of the ModifierSpeciesReference + object + + @return the removed ModifierSpeciesReference object, or @c None if no + ModifierSpeciesReference object with the given \'species\' attribute @p + species exists in this Reaction. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeModifier(long n)</pre> + + Removes the nth modifier species (ModifierSpeciesReference object) in + the list of modifiers in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + The caller should first call getNumModifiers() to find out how many + modifiers there are, to avoid using an invalid index number. + + @param n the index of the ModifierSpeciesReference object to remove + + @return the removed ModifierSpeciesReference object, or @c None if the + given index is out of range. +"; + + +%feature("docstring") Reaction::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. +"; + + +%feature("docstring") Reaction::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") Reaction::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") Reaction::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Reaction::getElementName " + Returns the XML element name of this object, which for Reaction, is + always @c \'reaction\'. + + @return the name of this element, i.e., @c \'reaction\'. +"; + + +%feature("docstring") Reaction::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Reaction::hasRequiredAttributes " + Predicate returning @c True if all the required attributes for this + Reaction object have been set. + + @note The required attributes for a Reaction object are: + @li \'id\' (or \'name\' in SBML Level 1) + @li \'fast\' (in Level 3 only, where it is defined as a required attribute) + @li \'reversible\' (in Level 3 only, where it is defined as a required attribute) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Reaction::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Reaction::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Reaction::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Reaction::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Reaction::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Reaction::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Reaction::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Reaction::isExplicitlySetReversible " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Reaction::isExplicitlySetFast " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfReactions::ListOfReactions " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfReactions(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfReactions object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfReactions object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfReactions(long level, long version)</pre> + + Creates a new ListOfReactions object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfReactions::clone " + Creates and returns a deep copy of this ListOfReactions instance. + + @return a (deep) copy of this ListOfReactions. +"; + + +%feature("docstring") ListOfReactions::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfReactions::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Reaction objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfReactions::getElementName " + Returns the XML element name of this object + + For ListOfReactions, the XML element name is @c \'listOfReactions\'. + + @return the name of this element, i.e., @c \'listOfReactions\'. +"; + + +%feature("docstring") ListOfReactions::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a Reaction from the ListOfReactions. + + @param n the index number of the Reaction to get. + + @return the nth Reaction in this ListOfReactions. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a Reaction from the ListOfReactions + based on its identifier. + + @param sid a string representing the identifier + of the Reaction to get. + + @return Reaction in this ListOfReactions + with the given @p sid or @c None if no such + Reaction exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfReactions::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfReactions items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfReactions items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfReactions::getElementPosition " + @internal + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfReactions::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") KineticLaw " + @ingroup Core + Implementation of %SBML\'s %KineticLaw construct. + + An object of class KineticLaw is used to describe the rate at which the + process defined by a given Reaction takes place. KineticLaw has + subelements called \'math\' (for MathML content) and \'listOfParameters\' + (of class ListOfParameters), in addition to the attributes and + subelements it inherits from SBase. + + KineticLaw\'s \'math\' subelement for holding a MathML formula defines the + rate of the reaction. The formula may refer to other entities in a + model as well as local parameter definitions within the scope of the + Reaction (see below). It is important to keep in mind, however, that + the only Species identifiers that can be used in this formula are those + declared in the lists of reactants, products and modifiers in the + Reaction structure. (In other words, before a species can be referenced + in the KineticLaw, it must be declared in one of those lists.) + + KineticLaw provides a way to define @em local parameters whose + identifiers can be used in the \'math\' formula of that KineticLaw + instance. Prior to SBML Level 3, these parameter definitions are + stored inside a \'listOfParameters\' subelement containing Parameter + objects; in SBML Level 3, this is achieved using a specialized + object class called LocalParameter and the containing subelement is + called \'listOfLocalParameters\'. In both cases, the parameters so + defined are only visible within the KineticLaw; they cannot be accessed + outside. A local parameter within one reaction is not visible from + within another reaction, nor is it visible to any other construct + outside of the KineticLaw in which it is defined. In addition, another + important feature is that if such a Parameter (or in Level 3, + LocalParameter) object has the same identifier as another object in the + scope of the enclosing Model, the definition inside the KineticLaw takes + precedence. In other words, within the KineticLaw\'s \'math\' formula, + references to local parameter identifiers <strong>shadow any identical + global identifiers</strong>. + + The values of local parameters defined within KineticLaw objects cannot + change. In SBML Level 3, this quality is built into the + LocalParameter construct. In Level 2, where the same kind of + Parameter object class is used as for global parameters, the Parameter + objects\' \'constant\' attribute must always have a value of @c True + (either explicitly or left to its default value). + + + @section shadowing-warning A warning about identifier shadowing + + A common misconception is that different classes of objects (e.g., + species, compartments, parameters) in SBML have different identifier + scopes. They do not. The implication is that if a KineticLaw\'s local + parameter definition uses an identifier identical to @em any other + identifier defined in the model outside the KineticLaw, even if the + other identifier does @em not belong to a parameter type of object, the + local parameter\'s identifier takes precedence within that KineticLaw\'s + \'math\' formula. It is not an error in SBML for identifiers to shadow + each other this way, but can lead to confusing and subtle errors. + + + @section version-diffs SBML Level/Version differences + + In SBML Level 2 Version 1, the SBML specification + included two additional attributes on KineticLaw called \'substanceUnits\' + and \'timeUnits\'. They were removed beginning with SBML Level 2 + Version 2 because further research determined they introduced many + problems. The most significant problem was that their use could easily + lead to the creation of valid models whose reactions nevertheless could + not be integrated into a system of equations without outside knowledge + for converting the quantities used. Examination of real-life models + revealed that a common reason for using \'substanceUnits\' on KineticLaw + was to set the units of all reactions to the same set of substance + units, something that is better achieved by using UnitDefinition to + redefine @c \'substance\' for the whole Model. + + As mentioned above, in SBML Level 2 Versions 2–4, local + parameters are of class Parameter. In SBML Level 3, the class of + object is LocalParameter. +"; + + +%feature("docstring") KineticLaw::KineticLaw " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>KineticLaw(SBMLNamespaces sbmlns)</pre> + + Creates a new KineticLaw using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a KineticLaw object to an SBMLDocument + (e.g., using Reaction.setKineticLaw()), the SBML XML namespace of the + document @em overrides the value used when creating the KineticLaw + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a KineticLaw is an + important aid to producing valid SBML. Knowledge of the intented SBML + Level and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>KineticLaw(long level, long version)</pre> + + Creates a new KineticLaw using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this KineticLaw + + @param version a long integer, the SBML Version to assign to this + KineticLaw + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a KineticLaw object to an SBMLDocument + (e.g., using Reaction.setKineticLaw()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used + when creating the KineticLaw object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of creation + of a KineticLaw is an important aid to producing valid SBML. Knowledge + of the intented SBML Level and Version determine whether it is valid + to assign a particular value to an attribute, or whether it is valid + to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>KineticLaw(KineticLaw orig)</pre> + + Copy constructor; creates a copy of this KineticLaw. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") KineticLaw::accept " + Accepts the given SBMLVisitor for this instance of KineticLaw. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") KineticLaw::clone " + Creates and returns a deep copy of this KineticLaw object. + + @return a (deep) copy of this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find. + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") KineticLaw::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") KineticLaw::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") KineticLaw::getFormula " + Returns the mathematical formula for this KineticLaw object and return + it as as a text string. + + This is fundamentally equivalent to + @if java KineticLaw.getMath()@else getMath()@endif. + This variant is provided principally for compatibility compatibility + with SBML Level 1. + + @return a string representing the formula of this KineticLaw. + + @note @htmlinclude level-1-uses-text-string-math.html + + @see getMath() +"; + + +%feature("docstring") KineticLaw::getMath " + Returns the mathematical formula for this KineticLaw object and return + it as as an AST. + + This is fundamentally equivalent to + @if java KineticLaw.getFormula()@else getFormula()@endif. + The latter is provided principally for compatibility compatibility + with SBML Level 1, which represented mathematical formulas in + text-string form. + + @return the ASTNode representation of the mathematical formula. + + @see getFormula() +"; + + +%feature("docstring") KineticLaw::getTimeUnits " + (SBML Level 2 Version 1 only) Returns the value of the + \'timeUnits\' attribute of this KineticLaw object. + + @return the \'timeUnits\' attribute value. + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::getSubstanceUnits " + (SBML Level 2 Version 1 only) Returns the value of the + \'substanceUnits\' attribute of this KineticLaw object. + + @return the \'substanceUnits\' attribute value. + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::isSetFormula " + Predicate returning @c True if this + KineticLaw\'s \'formula\' attribute is set. + + This is functionally identical to the method + @if java KineticLaw.isSetMath()@else isSetMath()@endif. It is + provided in order to mirror the parallel between + @if java KineticLaw.getFormula()@else getFormula()@endif@~ and + @if java KineticLaw.getMath()@else getMath()@endif. + + @return @c True if the formula (meaning the @c math subelement) of + this KineticLaw is set, @c False otherwise. + + @note @htmlinclude level-1-uses-text-string-math.html + + @see isSetMath() +"; + + +%feature("docstring") KineticLaw::isSetMath " + Predicate returning @c True if this + Kinetic\'s \'math\' subelement is set. + + This is identical to the method + @if java KineticLaw.isSetFormula()@else isSetFormula()@endif. + It is provided in order to mirror the parallel between + @if java KineticLaw.getFormula()@else getFormula()@endif@~ and + @if java KineticLaw.getMath()@else getMath()@endif. + + @return @c True if the formula (meaning the @c math subelement) of + this KineticLaw is set, @c False otherwise. + + @see isSetFormula() +"; + + +%feature("docstring") KineticLaw::isSetTimeUnits " + (SBML Level 2 Version 1 only) Predicate returning @c True if + this SpeciesReference\'s \'timeUnits\' attribute is set. + + @return @c True if the \'timeUnits\' attribute of this KineticLaw object + is set, @c False otherwise. + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::isSetSubstanceUnits " + (SBML Level 2 Version 1 only) Predicate returning @c True if + this SpeciesReference\'s \'substanceUnits\' attribute is set. + + @return @c True if the \'substanceUnits\' attribute of this KineticLaw + object is set, @c False otherwise. + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::setFormula " + Sets the mathematical expression of this KineticLaw instance to the + given @p formula. + + The given @p formula string is copied. Internally, libSBML stores the + mathematical expression as an ASTNode. + + @param formula the mathematical expression to use, represented in + text-string form. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note @htmlinclude level-1-uses-text-string-math.html + + @see setMath() +"; + + +%feature("docstring") KineticLaw::setMath " + Sets the mathematical expression of this KineticLaw instance to a copy + of the given ASTNode. + + This is fundamentally identical to + @if java KineticLaw.setFormula()@else getFormula()@endif. + The latter is provided principally for compatibility compatibility with + SBML Level 1, which represented mathematical formulas in text-string + form. + + @param math an ASTNode representing a formula tree. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @see setFormula() +"; + + +%feature("docstring") KineticLaw::setTimeUnits " + (SBML Level 2 Version 1 only) Sets the \'timeUnits\' attribute + of this KineticLaw object to a copy of the identifier in @p sid. + + @param sid the identifier of the units to use. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::setSubstanceUnits " + (SBML Level 2 Version 1 only) Sets the \'substanceUnits\' + attribute of this KineticLaw object to a copy of the identifier given + in @p sid. + + @param sid the identifier of the units to use. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::unsetTimeUnits " + (SBML Level 2 Version 1 only) Unsets the \'timeUnits\' + attribugte of this KineticLaw object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::unsetSubstanceUnits " + (SBML Level 2 Version 1 only) Unsets the \'substanceUnits\' + attribute of this KineticLaw object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attributes \'timeUnits\' and \'substanceUnits\' are present only + in SBML Level 2 Version 1. In SBML Level 2 + Version 2, the \'timeUnits\' and \'substanceUnits\' attributes were + removed. For compatibility with new versions of SBML, users are + cautioned to avoid these attributes. +"; + + +%feature("docstring") KineticLaw::addParameter " + Adds a copy of the given Parameter object to the list of local + parameters in this KineticLaw. + + @param p the Parameter to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this KineticLaw. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the KineticLaw</em>. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see + @if java KineticLaw.createParameter()@else createParameter()@endif@~ + for a method that does not lead to these issues. + + @see createParameter() +"; + + +%feature("docstring") KineticLaw::addLocalParameter " + Adds a copy of the given LocalParameter object to the list of local + parameters in this KineticLaw. + + @param p the LocalParameter to add + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this KineticLaw. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the KineticLaw</em>. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see + @if java KineticLaw.createParameter()@else createParameter()@endif@~ + for a method that does not lead to these issues. + + @see createLocalParameter() +"; + + +%feature("docstring") KineticLaw::createParameter " + Creates a new Parameter object, adds it to this KineticLaw\'s list of + local parameters, and returns the Parameter object created. + + @return a new Parameter object instance + + @see addParameter() +"; + + +%feature("docstring") KineticLaw::createLocalParameter " + Creates a new LocalParameter object, adds it to this KineticLaw\'s list + of local parameters, and returns the LocalParameter object created. + + @return a new LocalParameter object instance + + @see addLocalParameter() +"; + + +%feature("docstring") KineticLaw::getListOfParameters " + Returns the list of local parameters in this KineticLaw object. + + @return the list of Parameters for this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getListOfLocalParameters " + Returns the list of local parameters in this KineticLaw object. + + @return the list of LocalParameters for this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getParameter(long n)</pre> + + Returns the nth Parameter object in the list of local parameters in + this KineticLaw instance. + + @param n the index of the Parameter object sought + + @return the nth Parameter of this KineticLaw. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getParameter(string sid)</pre> + + Returns a local parameter based on its identifier. + + @param sid the identifier of the Parameter being sought. + + @return the Parameter object in this KineticLaw instace having the + given \'id\', or @c None if no such Parameter exists. +"; + + +%feature("docstring") KineticLaw::getLocalParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getLocalParameter(long n)</pre> + + Returns the nth LocalParameter object in the list of local parameters in + this KineticLaw instance. + + @param n the index of the LocalParameter object sought + + @return the nth LocalParameter of this KineticLaw. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getLocalParameter(string sid)</pre> + + Returns a local parameter based on its identifier. + + @param sid the identifier of the LocalParameter being sought. + + @return the LocalParameter object in this KineticLaw instace having the + given \'id\', or @c None if no such LocalParameter exists. +"; + + +%feature("docstring") KineticLaw::getNumParameters " + Returns the number of local parameters in this KineticLaw instance. + + @return the number of Parameters in this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getNumLocalParameters " + Returns the number of local parameters in this KineticLaw instance. + + @return the number of LocalParameters in this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units + of measurement assumed for the \'math\' expression of this + KineticLaw. + + The units are calculated based on the mathematical expression in the + KineticLaw and the model quantities referenced by + <code><ci></code> elements used within that expression. The + @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + method returns the calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + @warning Note that it is possible the \'math\' expression in the + KineticLaw contains pure numbers or parameters with undeclared + units. In those cases, it is not possible to calculate the units of + the overall expression without making assumptions. LibSBML does not + make assumptions about the units, and + @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + only returns the units as far as it is able to determine them. For + example, in an expression <em>X + Y</em>, if <em>X</em> has + unambiguously-defined units and <em>Y</em> does not, it will return + the units of <em>X</em>. <strong>It is important that callers also + invoke the method</strong> + @if java KineticLaw.containsUndeclaredUnits()@else containsUndeclaredUnits()@endif@~ + <strong>to determine whether this situation holds</strong>. Callers may + wish to take suitable actions in those scenarios. + + @return a UnitDefinition that expresses the units of the math + expression of this KineticLaw, or @c None if one cannot be constructed. + + @see containsUndeclaredUnits() +"; + + +%feature("docstring") KineticLaw::containsUndeclaredUnits " + Predicate returning @c True if + the math expression of this KineticLaw contains + parameters/numbers with undeclared units. + + @return @c True if the math expression of this KineticLaw + includes parameters/numbers + with undeclared units, @c False otherwise. + + @note A return value of @c True indicates that the UnitDefinition + returned by + @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ + may not accurately represent the units of the expression. + + @see getDerivedUnitDefinition() +"; + + +%feature("docstring") KineticLaw::removeParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeParameter(long n)</pre> + + Removes the nth Parameter object in the list of local parameters + in this KineticLaw instance and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the Parameter object to remove + + @return the Parameter object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeParameter(string sid)</pre> + + Removes a Parameter object with the given identifier in the list of + local parameters in this KineticLaw instance and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param sid the identifier of the Parameter to remove + + @return the Parameter object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no Parameter + object with the identifier exists in this KineticLaw instance. +"; + + +%feature("docstring") KineticLaw::removeLocalParameter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeLocalParameter(long n)</pre> + + Removes the nth LocalParameter object in the list of local parameters + in this KineticLaw instance and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the LocalParameter object to remove + + @return the LocalParameter object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeLocalParameter(string sid)</pre> + + Removes a LocalParameter object with the given identifier in the list of + local parameters in this KineticLaw instance and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param sid the identifier of the LocalParameter to remove + + @return the LocalParameter object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no LocalParameter + object with the identifier exists in this KineticLaw instance. +"; + + +%feature("docstring") KineticLaw::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. + + @param d the SBMLDocument to use. +"; + + +%feature("docstring") KineticLaw::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") KineticLaw::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") KineticLaw::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link + libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") KineticLaw::getElementName " + Returns the XML element name of this object, which for Species, is + always @c \'kineticLaw\'. + + @return the name of this element, i.e., @c \'kineticLaw\'. +"; + + +%feature("docstring") KineticLaw::getElementPosition " + @internal + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") KineticLaw::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") KineticLaw::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this KineticLaw object + have been set. + + @note The required attributes for a KineticLaw object are: + @li \'formula\' (SBML Level 1 only) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") KineticLaw::hasRequiredElements " + Predicate returning @c True if + all the required elements for this KineticLaw object + have been set. + + @note The required elements for a KineticLaw object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") KineticLaw::removeFromParentAndDelete " + Finds this KineticLaw\'s Reaction parent and calls unsetKineticLaw() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") KineticLaw::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") KineticLaw::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") KineticLaw::getInternalId " + @internal + Renames all the @c UnitSIdRef attributes on this element + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") KineticLaw::setInternalId " + @internal + Renames all the @c UnitSIdRef attributes on this element + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") KineticLaw::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") KineticLaw::divideAssignmentsToSIdByFunction " + @internal + If this reaction id matches the provided \'id\' string, replace the \'math\' object with the function (existing/function). +"; + + +%feature("docstring") KineticLaw::multiplyAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). +"; + + +%feature("docstring") KineticLaw::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") KineticLaw::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") KineticLaw::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") KineticLaw::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") KineticLaw::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") KineticLaw::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") KineticLaw::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") KineticLaw::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SimpleSpeciesReference " + @ingroup Core + Implementation of %SBML\'s %SimpleSpeciesReference construct. + + As mentioned in the description of Reaction, every species that enters + into a given reaction must appear in that reaction\'s lists of reactants, + products and/or modifiers. In an SBML model, all species that may + participate in any reaction are listed in the \'listOfSpecies\' element of + the top-level Model object. Lists of products, reactants and modifiers + in Reaction objects do not introduce new species, but rather, they refer + back to those listed in the model\'s top-level \'listOfSpecies\'. For + reactants and products, the connection is made using SpeciesReference + objects; for modifiers, it is made using ModifierSpeciesReference + objects. SimpleSpeciesReference is an abstract type that serves as the + parent class of both SpeciesReference and ModifierSpeciesReference. It + is used simply to hold the attributes and elements that are common to + the latter two structures. + + The SimpleSpeciesReference structure has a mandatory attribute, + \'species\', which must be a text string conforming to the identifer + syntax permitted in %SBML. This attribute is inherited by the + SpeciesReference and ModifierSpeciesReference subclasses derived from + SimpleSpeciesReference. The value of the \'species\' attribute must be + the identifier of a species defined in the enclosing Model. The species + is thereby declared as participating in the reaction being defined. The + precise role of that species as a reactant, product, or modifier in the + reaction is determined by the subclass of SimpleSpeciesReference (i.e., + either SpeciesReference or ModifierSpeciesReference) in which the + identifier appears. + + SimpleSpeciesReference also contains an optional attribute, \'id\', + allowing instances to be referenced from other structures. No SBML + structures currently do this; however, such structures are anticipated + in future SBML Levels. +"; + + +%feature("docstring") SimpleSpeciesReference::SimpleSpeciesReference " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SimpleSpeciesReference(long level, long version)</pre> + + Creates a new SimpleSpeciesReference using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this SimpleSpeciesReference + + @param version a long integer, the SBML Version to assign to this + SimpleSpeciesReference + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SimpleSpeciesReference(SimpleSpeciesReference orig)</pre> + + Copy constructor; creates a copy of this SimpleSpeciesReference. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") SimpleSpeciesReference::accept " + Accepts the given SBMLVisitor. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") SimpleSpeciesReference::getId " + Returns the value of the \'id\' attribute of this SimpleSpeciesReference. + + @return the id of this SimpleSpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::getName " + Returns the value of the \'name\' attribute of this SimpleSpeciesReference. + + @return the name of this SimpleSpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::getSpecies " + Get the value of the \'species\' attribute. + + @return the value of the attribute \'species\' for this + SimpleSpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::isSetId " + Predicate returning @c True if this + SimpleSpeciesReference\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this SimpleSpeciesReference is + set, @c False otherwise. +"; + + +%feature("docstring") SimpleSpeciesReference::isSetName " + Predicate returning @c True if this + SimpleSpeciesReference\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this SimpleSpeciesReference is + set, @c False otherwise. +"; + + +%feature("docstring") SimpleSpeciesReference::isSetSpecies " + Predicate returning @c True if this + SimpleSpeciesReference\'s \'species\' attribute is set. + + @return @c True if the \'species\' attribute of this + SimpleSpeciesReference is set, @c False otherwise. +"; + + +%feature("docstring") SimpleSpeciesReference::setSpecies " + Sets the \'species\' attribute of this SimpleSpeciesReference. + + The identifier string passed in @p sid is copied. + + @param sid the identifier of a species defined in the enclosing + Model\'s ListOfSpecies. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SimpleSpeciesReference::setId " + Sets the value of the \'id\' attribute of this SimpleSpeciesReference. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this SimpleSpeciesReference + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") SimpleSpeciesReference::setName " + Sets the value of the \'name\' attribute of this SimpleSpeciesReference. + + The string in @p name is copied. + + @param name the new name for the SimpleSpeciesReference + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") SimpleSpeciesReference::unsetId " + Unsets the value of the \'id\' attribute of this SimpleSpeciesReference. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SimpleSpeciesReference::unsetName " + Unsets the value of the \'name\' attribute of this SimpleSpeciesReference. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SimpleSpeciesReference::isModifier " + Predicate returning @c True if this + is a ModifierSpeciesReference. + + @return @c True if this SimpleSpeciesReference\'s subclass is + ModiferSpeciesReference, @c False if it is a plain SpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") SimpleSpeciesReference::hasRequiredAttributes " + @internal + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") SimpleSpeciesReference::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") SimpleSpeciesReference::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SimpleSpeciesReference::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SimpleSpeciesReference::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SimpleSpeciesReference::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SimpleSpeciesReference::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SpeciesReference " + @ingroup Core + Implementation of %SBML\'s %SpeciesReference construct. + + The Reaction structure provides a way to express which species act as + reactants and which species act as products in a reaction. In a given + reaction, references to those species acting as reactants and/or + products are made using instances of SpeciesReference structures in a + Reaction object\'s lists of reactants and products. + + A species can occur more than once in the lists of reactants and + products of a given Reaction instance. The effective stoichiometry for + a species in a reaction is the sum of the stoichiometry values given on + the SpeciesReference object in the list of products minus the sum of + stoichiometry values given on the SpeciesReference objects in the list + of reactants. A positive value indicates the species is effectively a + product and a negative value indicates the species is effectively a + reactant. SBML places no restrictions on the effective stoichiometry of + a species in a reaction; for example, it can be zero. In the following + SBML fragment, the two reactions have the same effective stoichiometry + for all their species: + @verbatim + <reaction id=\'x\'> + <listOfReactants> + <speciesReference species=\'a\'/> + <speciesReference species=\'a\'/> + <speciesReference species=\'b\'/> + </listOfReactants> + <listOfProducts> + <speciesReference species=\'c\'/> + <speciesReference species=\'b\'/> + </listProducts> + </reaction> + <reaction id=\'y\'> + <listOfReactants> + <speciesReference species=\'a\' stoichiometry=\'2\'/> + </listOfReactants> + <listOfProducts> + <speciesReference species=\'c\'/> + </listProducts> + </reaction> + @endverbatim + + The precise structure of SpeciesReference differs between SBML + Level 2 and Level 3. We discuss the two variants in separate + sections below. + + @section spr-l2 SpeciesReference in SBML Level 2 + + The mandatory \'species\' attribute of SpeciesReference must have as its + value the identifier of an existing species defined in the enclosing + Model. The species is thereby designated as a reactant or product in + the reaction. Which one it is (i.e., reactant or product) is indicated + by whether the SpeciesReference appears in the Reaction\'s \'reactant\' or + \'product\' lists. + + Product and reactant stoichiometries can be specified using + <em>either</em> \'stoichiometry\' or \'stoichiometryMath\' in a + SpeciesReference object. The \'stoichiometry\' attribute is of type + double and should contain values greater than zero (0). The + \'stoichiometryMath\' element is implemented as an element containing a + MathML expression. These two are mutually exclusive; only one of + \'stoichiometry\' or \'stoichiometryMath\' should be defined in a given + SpeciesReference instance. When neither the attribute nor the element + is present, the value of \'stoichiometry\' in the SpeciesReference + instance defaults to @c 1. + + For maximum interoperability, the \'stoichiometry\' attribute should be + used in preference to \'stoichiometryMath\' when a species\' stoichiometry + is a simple scalar number (integer or decimal). When the stoichiometry + is a rational number, or when it is a more complicated formula, + \'stoichiometryMath\' must be used. The MathML expression in + \'stoichiometryMath\' may also refer to identifiers of entities in a model + (except reaction identifiers). However, the only species identifiers + that can be used in \'stoichiometryMath\' are those referenced in the + Reaction list of reactants, products and modifiers. + + The following is a simple example of a species reference for species @c + X0, with stoichiometry @c 2, in a list of reactants within a reaction + having the identifier @c J1: + @verbatim + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\' stoichiometry=\'2\'> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + @endverbatim + + The following is a more complex example of a species reference for + species X0, with a stoichiometry formula consisting of the parameter + @c x: + @verbatim + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\'> + <stoichiometryMath> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <ci>x</ci> + </math> + </stoichiometryMath> + </speciesReference> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + @endverbatim + + + @section spr-l3 SpeciesReference in SBML Level 3 + + In Level 2\'s definition of a reaction, the stoichiometry attribute of a + SpeciesReference is actually a combination of two factors, the standard + biochemical stoichiometry and a conversion factor that may be needed to + translate the units of the species quantity to the units of the reaction + rate. Unfortunately, Level 2 offers no direct way of decoupling + these two factors, or for explicitly indicating the units. The only way + to do it in Level 2 is to use the StoichiometryMath object + associated with SpeciesReferences, and to reference SBML Parameter + objects from within the StoichiometryMath formula. This works because + Parameter offers a way to attach units to a numerical value, but the + solution is indirect and awkward for something that should be a simple + matter. Moreover, the question of how to properly encode + stoichiometries in SBML reactions has caused much confusion among + implementors of SBML software. + + SBML Level 3 approaches this problem differently. It (1) extends + the the use of the SpeciesReference identifier to represent the value of + the \'stoichiometry\' attribute, (2) makes the \'stoichiometry\' attribute + optional, (3) removes StoichiometryMath, and (4) adds a new \'constant\' + boolean attribute on SpeciesReference. + + As in Level 2, the \'stoichiometry\' attribute is of type + @c double and should contain values greater than zero (@c 0). A + missing \'stoichiometry\' implies that the stoichiometry is either + unknown, or to be obtained from an external source, or determined by an + InitialAssignment object or other SBML construct elsewhere in the model. + + A species reference\'s stoichiometry is set by its \'stoichiometry\' + attribute exactly once. If the SpeciesReference object\'s \'constant\' + attribute has the value @c True, then the stoichiometry is fixed and + cannot be changed except by an InitialAssignment object. These two + methods of setting the stoichiometry (i.e., using \'stoichiometry\' + directly, or using InitialAssignment) differ in that the \'stoichiometry\' + attribute can only be set to a literal floating-point number, whereas + InitialAssignment allows the value to be set using an arbitrary + mathematical expression. (As an example, the approach could be used to + set the stoichiometry to a rational number of the form @em p/@em q, + where @em p and @em q are integers, something that is occasionally + useful in the context of biochemical reaction networks.) If the species + reference\'s \'constant\' attribute has the value @c False, the species + reference\'s value may be overridden by an InitialAssignment or changed + by AssignmentRule or AlgebraicRule, and in addition, for simulation time + <em>t > 0</em>, it may also be changed by a RateRule or Event + objects. (However, some of these constructs are mutually exclusive; see + the SBML Level 3 Version 1 Core specifiation for more + details.) It is not an error to define \'stoichiometry\' on a species + reference and also redefine the stoichiometry using an + InitialAssignment, but the \'stoichiometry\' attribute in that case is + ignored. + + The value of the \'id\' attribute of a SpeciesReference can be used as the + content of a <code><ci></code> element in MathML formulas + elsewhere in the model. When the identifier appears in a MathML + <code><ci></code> element, it represents the stoichiometry of the + corresponding species in the reaction where the SpeciesReference object + instance appears. More specifically, it represents the value of the + \'stoichiometry\' attribute on the SpeciesReference object. + + In SBML Level 3, the unit of measurement associated with the value of a + species\' stoichiometry is always considered to be @c dimensionless. + This has the following implications: + <ul> + + <li> When a species reference\'s identifier appears in mathematical + formulas elsewhere in the model, the unit associated with that value is + @c dimensionless. + + <li> The units of the \'math\' elements of AssignmentRule, + InitialAssignment and EventAssignment objects setting the stoichiometry + of the species reference should be @c dimensionless. + + <li> If a species reference\'s identifier is the subject of a RateRule, + the unit associated with the RateRule object\'s value should be + <code>dimensionless</code>/<em>time</em>, where <em>time</em> is the + model-wide unit of time set on the Model object. + + </ul> + + <!---------------------------------------------------------------------- --> +"; + + +%feature("docstring") ListOfSpeciesReferences " + @ingroup Core + Implementation of SBML\'s %ListOfSpeciesReferences construct. + + The ListOfSpeciesReferences class is used to store lists of reactants + and products in a Reaction object. + + As with the various other ListOf___ classes in %SBML, the + ListOfSpeciesReferences is merely a container used for organizing + instances of other objects, in this case SpeciesReference objects. + ListOfSpeciesReferences is derived from the abstract class SBase, and + inherit the various attributes and subelements of SBase, such as + \'metaid\' as and \'annotation\'. The ListOf___ classes do not add any + attributes of their own. +"; + + +%feature("docstring") SpeciesReference::SpeciesReference " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SpeciesReference(SBMLNamespaces sbmlns)</pre> + + Creates a new SpeciesReference using the given SBMLNamespaces object + @p sbmlns. + + @param sbmlns an SBMLNamespaces object. + + @note Upon the addition of a SpeciesReference object to a Model (e.g., + using Reaction.addReactant() or + Reaction.addProduct()), the SBML Level, + SBML Version and XML namespace of the document @em override the values + used when creating the SpeciesReference object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the time + of creation of a SpeciesReference is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SpeciesReference(long level, long version)</pre> + + Creates a new SpeciesReference using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this SpeciesReference + + @param version a long integer, the SBML Version to assign to this + SpeciesReference + + @note Upon the addition of a SpeciesReference object to a Model (e.g., + using Reaction.addReactant() or + Reaction.addProduct()), the SBML Level, + SBML Version and XML namespace of the document @em override the values + used when creating the SpeciesReference object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the time + of creation of a SpeciesReference is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SpeciesReference(SpeciesReference orig)</pre> + + Copy constructor; creates a copy of this SpeciesReference. + + @param orig the SpeciesReference instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") SpeciesReference::accept " + Accepts the given SBMLVisitor. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") SpeciesReference::clone " + Creates and returns a deep copy of this SpeciesReference instance. + + @return a (deep) copy of this SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::initDefaults " + Initializes the fields of this SpeciesReference object to \'typical\' + default values. + + The SBML SpeciesReference component has slightly different aspects and + default attribute values in different SBML Levels and Versions. + This method sets the values to certain common defaults, based + mostly on what they are in SBML Level 2. Specifically: + <ul> + <li> Sets attribute \'stoichiometry\' to @c 1.0 + <li> (Applies to Level 1 models only) Sets attribute \'denominator\' to @c 1 + </ul> + + @see getDenominator() + @see setDenominator() + @see getStoichiometry() + @see setStoichiometry() + @see getStoichiometryMath() + @see setStoichiometryMath() +"; + + +%feature("docstring") SpeciesReference::getStoichiometry " + Get the value of the \'stoichiometry\' attribute. + + In SBML Level 2, product and reactant stoichiometries can be specified + using <em>either</em> \'stoichiometry\' or \'stoichiometryMath\' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The \'stoichiometry\' + attribute is of type @c double and should contain values greater than + zero (@c 0). The \'stoichiometryMath\' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of \'stoichiometry\' in + the SpeciesReference instance defaults to @c 1. For maximum + interoperability between different software tools, the \'stoichiometry\' + attribute should be used in preference to \'stoichiometryMath\' when a + species\' stoichiometry is a simple scalar number (integer or + decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the \'stoichiometry\' attribute. + + @return the value of the (scalar) \'stoichiometry\' attribute of this + SpeciesReference. + + @see getStoichiometryMath() +"; + + +%feature("docstring") SpeciesReference::getStoichiometryMath " + Get the content of the \'stoichiometryMath\' subelement as an ASTNode + tree. + + The \'stoichiometryMath\' element exists only in SBML Level 2. There, + product and reactant stoichiometries can be specified using + <em>either</em> \'stoichiometry\' or \'stoichiometryMath\' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The \'stoichiometry\' + attribute is of type @c double and should contain values greater than + zero (@c 0). The \'stoichiometryMath\' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of \'stoichiometry\' in + the SpeciesReference instance defaults to @c 1. For maximum + interoperability between different software tools, the \'stoichiometry\' + attribute should be used in preference to \'stoichiometryMath\' when a + species\' stoichiometry is a simple scalar number (integer or decimal). + + @return the content of the \'stoichiometryMath\' subelement of this + SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::getDenominator " + Get the value of the \'denominator\' attribute, for the case of a + rational-numbered stoichiometry or a model in SBML Level 1. + + The \'denominator\' attribute is only actually written out in the case + of an SBML Level 1 model. In SBML Level 2, rational-number + stoichiometries are written as MathML elements in the + \'stoichiometryMath\' subelement. However, as a convenience to users, + libSBML allows the creation and manipulation of rational-number + stoichiometries by supplying the numerator and denominator directly + rather than having to manually create an ASTNode structure. LibSBML + will write out the appropriate constructs (either a combination of + \'stoichiometry\' and \'denominator\' in the case of SBML Level 1, or a + \'stoichiometryMath\' subelement in the case of SBML Level 2). + + @return the value of the \'denominator\' attribute of this + SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::getConstant " + Get the value of the \'constant\' attribute. + + @return the value of the \'constant\' attribute of this + SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::isSetStoichiometryMath " + Predicate returning @c True if this + SpeciesReference\'s \'stoichiometryMath\' subelement is set + + @return @c True if the \'stoichiometryMath\' subelement of this + SpeciesReference is set, @c False otherwise. +"; + + +%feature("docstring") SpeciesReference::isSetConstant " + Predicate returning @c True if this + SpeciesReference\'s \'constant\' attribute is set + + @return @c True if the \'constant\' attribute of this + SpeciesReference is set, @c False otherwise. +"; + + +%feature("docstring") SpeciesReference::isSetStoichiometry " + Predicate returning @c True if this + SpeciesReference\'s \'stoichiometry\' attribute is set. + + @return @c True if the \'stoichiometry\' attribute of this + SpeciesReference is set, @c False otherwise. +"; + + +%feature("docstring") SpeciesReference::setStoichiometry " + Sets the value of the \'stoichiometry\' attribute of this + SpeciesReference. + + In SBML Level 2, product and reactant stoichiometries can be specified + using <em>either</em> \'stoichiometry\' or \'stoichiometryMath\' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The \'stoichiometry\' + attribute is of type @c double and should contain values greater than + zero (@c 0). The \'stoichiometryMath\' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of \'stoichiometry\' in + the SpeciesReference instance defaults to @c 1. For maximum + interoperability between different software tools, the \'stoichiometry\' + attribute should be used in preference to \'stoichiometryMath\' when a + species\' stoichiometry is a simple scalar number (integer or + decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the \'stoichiometry\' attribute. + + @param value the new value of the \'stoichiometry\' attribute + + @note In SBML Level 2, the \'stoichiometryMath\' subelement of this + SpeciesReference object will be unset because the \'stoichiometry\' + attribute and the stoichiometryMath\' subelement are mutually + exclusive. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") SpeciesReference::setStoichiometryMath " + Sets the \'stoichiometryMath\' subelement of this SpeciesReference. + + The Abstract Syntax Tree in @p math is copied. + + In SBML Level 2, product and reactant stoichiometries can be specified + using <em>either</em> \'stoichiometry\' or \'stoichiometryMath\' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The \'stoichiometry\' + attribute is of type @c double and should contain values greater than + zero (@c 0). The \'stoichiometryMath\' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of \'stoichiometry\' in + the SpeciesReference instance defaults to @c 1. For maximum + interoperability between different software tools, the \'stoichiometry\' + attribute should be used in preference to \'stoichiometryMath\' when a + species\' stoichiometry is a simple scalar number (integer or + decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the \'stoichiometry\' attribute. + + @param math the StoichiometryMath expression that is to be copied as the + content of the \'stoichiometryMath\' subelement. + + @note In SBML Level 2, the \'stoichiometry\' attribute of this + SpeciesReference object will be unset (isSetStoichiometry() will + return @c False although getStoichiometry() will return @c 1.0) if the + given math is not null because the \'stoichiometry\' attribute and the + stoichiometryMath\' subelement are mutually exclusive. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink +"; + + +%feature("docstring") SpeciesReference::setDenominator " + Set the value of the \'denominator\' attribute, for the case of a + rational-numbered stoichiometry or a model in SBML Level 1. + + The \'denominator\' attribute is only actually written out in the case + of an SBML Level 1 model. In SBML Level 2, rational-number + stoichiometries are written as MathML elements in the + \'stoichiometryMath\' subelement. However, as a convenience to users, + libSBML allows the creation and manipulation of rational-number + stoichiometries by supplying the numerator and denominator directly + rather than having to manually create an ASTNode structure. LibSBML + will write out the appropriate constructs (either a combination of + \'stoichiometry\' and \'denominator\' in the case of SBML Level 1, or + a \'stoichiometryMath\' subelement in the case of SBML Level 2). + + @param value the scalar value + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") SpeciesReference::setConstant " + Sets the \'constant\' attribute of this SpeciesReference to the given boolean + @p flag. + + @param flag a boolean, the value for the \'constant\' attribute of this + SpeciesReference instance + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") SpeciesReference::unsetStoichiometryMath " + Unsets the \'stoichiometryMath\' subelement of this SpeciesReference. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + In SBML Level 2, product and reactant stoichiometries can be specified + using <em>either</em> \'stoichiometry\' or \'stoichiometryMath\' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The \'stoichiometry\' + attribute is of type @c double and should contain values greater than + zero (@c 0). The \'stoichiometryMath\' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of \'stoichiometry\' or \'stoichiometryMath\' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of \'stoichiometry\' in + the SpeciesReference instance defaults to @c 1. For maximum + interoperability between different software tools, the \'stoichiometry\' + attribute should be used in preference to \'stoichiometryMath\' when a + species\' stoichiometry is a simple scalar number (integer or + decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the \'stoichiometry\' attribute. + + @note In SBML Level 2, the \'stoichiometry\' attribute of this + SpeciesReference object will be reset to a default value (@c 1.0) if + the \'stoichiometry\' attribute has not been set. +"; + + +%feature("docstring") SpeciesReference::unsetStoichiometry " + Unsets the \'stoichiometry\' attribute of this SpeciesReference. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note In SBML Level 1, the \'stoichiometry\' attribute of this + SpeciesReference object will be just reset to a default value (@c 1.0) + and isSetStoichiometry() will still return @c True. In SBML + Level 2, the \'stoichiometry\' attribute of this object will be + unset (which will result in isSetStoichiometry() returning @c False, + although getStoichiometry() will return @c 1.0) if the + \'stoichiometryMath\' subelement is set, otherwise the attribute + will be just reset to the default value (@c 1.0) (and + isSetStoichiometry() will still return @c True). In SBML + Level 3, the \'stoichiometry\' attribute of this object will be set + to @c NaN and isSetStoichiometry() will return @c False. +"; + + +%feature("docstring") SpeciesReference::createStoichiometryMath " + Creates a new, empty StoichiometryMath object, adds it to this + SpeciesReference, and returns it. + + @return the newly created StoichiometryMath object instance + + @see Reaction.addReactant() + @see Reaction.addProduct() +"; + + +%feature("docstring") SpeciesReference::setAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setAnnotation(XMLNode annotation)</pre> + + Sets the value of the \'annotation\' subelement of this SBML object to a + copy of @p annotation. + + Any existing content of the \'annotation\' subelement is discarded. + Unless you have taken steps to first copy and reconstitute any + existing annotations into the @p annotation that is about to be + assigned, it is likely that performing such wholesale replacement is + unfriendly towards other software applications whose annotations are + discarded. An alternative may be to use appendAnnotation(). + + @param annotation an XML structure that is to be used as the content + of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see appendAnnotation() + @see appendAnnotation() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setAnnotation(string annotation)</pre> + + Sets the value of the \'annotation\' subelement of this SBML object to a + copy of @p annotation. + + Any existing content of the \'annotation\' subelement is discarded. + Unless you have taken steps to first copy and reconstitute any + existing annotations into the @p annotation that is about to be + assigned, it is likely that performing such wholesale replacement is + unfriendly towards other software applications whose annotations are + discarded. An alternative may be to use appendAnnotation(). + + @param annotation an XML string that is to be used as the content + of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see appendAnnotation() + @see appendAnnotation() +"; + + +%feature("docstring") SpeciesReference::appendAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>appendAnnotation(XMLNode annotation)</pre> + + Appends annotation content to any existing content in the \'annotation\' + subelement of this object. + + The content in @p annotation is copied. Unlike + SpeciesReference.setAnnotation(), + this method allows other annotations to be preserved when an application + adds its own data. + + @param annotation an XML structure that is to be copied and appended + to the content of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see setAnnotation() + @see setAnnotation() + + + <hr> + Method variant with the following signature: + <pre class='signature'>appendAnnotation(string annotation)</pre> + + Appends annotation content to any existing content in the \'annotation\' + subelement of this object. + + The content in @p annotation is copied. Unlike + SpeciesReference.setAnnotation(), this + method allows other annotations to be preserved when an application + adds its own data. + + @param annotation an XML string that is to be copied and appended + to the content of the \'annotation\' subelement of this object + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see setAnnotation() + @see setAnnotation() +"; + + +%feature("docstring") SpeciesReference::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") SpeciesReference::getElementName " + Returns the XML element name of this object, which for + SpeciesReference, is always @c \'speciesReference\'. + + @return the name of this element, i.e., @c \'speciesReference\'. +"; + + +%feature("docstring") SpeciesReference::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") SpeciesReference::sortMath " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") SpeciesReference::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this SpeciesReference object + have been set. + + @note The required attributes for a SpeciesReference object are: + @li \'species\' + @li \'constant\' (only available SBML Level 3) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") SpeciesReference::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") SpeciesReference::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") SpeciesReference::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") SpeciesReference::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SpeciesReference::readL1Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SpeciesReference::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SpeciesReference::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") SpeciesReference::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SpeciesReference::syncAnnotation " + @internal + + Synchronizes the annotation of this SBML object. + + Annotation element (XMLNode mAnnotation) is synchronized with the + current CVTerm objects (List mCVTerm) and id string (string mId) + Currently, this method is called in getAnnotation(), isSetAnnotation(), + and writeElements() methods. +"; + + +%feature("docstring") SpeciesReference::isExplicitlySetStoichiometry " + @internal + + Synchronizes the annotation of this SBML object. + + Annotation element (XMLNode mAnnotation) is synchronized with the + current CVTerm objects (List mCVTerm) and id string (string mId) + Currently, this method is called in getAnnotation(), isSetAnnotation(), + and writeElements() methods. +"; + + +%feature("docstring") SpeciesReference::isExplicitlySetDenominator " + @internal + + Synchronizes the annotation of this SBML object. + + Annotation element (XMLNode mAnnotation) is synchronized with the + current CVTerm objects (List mCVTerm) and id string (string mId) + Currently, this method is called in getAnnotation(), isSetAnnotation(), + and writeElements() methods. +"; + + +%feature("docstring") ListOfSpeciesReferences::ListOfSpeciesReferences " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfSpeciesReferences(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfSpeciesReferences object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfSpeciesReferences object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfSpeciesReferences(long level, long version)</pre> + + Creates a new, empty ListOfSpeciesReferences object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfSpeciesReferences::clone " + Creates and returns a deep copy of this ListOfSpeciesReferences + instance. + + @return a (deep) copy of this ListOfSpeciesReferences. +"; + + +%feature("docstring") ListOfSpeciesReferences::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfSpeciesReferences::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., SpeciesReference objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfSpeciesReferences::getElementName " + Returns the XML element name of this object. + + For ListOfSpeciesReferences, the XML element name is @c + \'listOfSpeciesReferences\'. + + @return the name of this element, i.e., @c \'listOfSpeciesReferences\'. +"; + + +%feature("docstring") ListOfSpeciesReferences::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a SpeciesReference from the ListOfSpeciesReferences. + + @param n the index number of the SpeciesReference to get. + + @return the nth SpeciesReference in this ListOfSpeciesReferences. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a SpeciesReference from the ListOfSpeciesReferences + based on its identifier. + + @param sid a string representing the identifier + of the SpeciesReference to get. + + @return SpeciesReference in this ListOfSpeciesReferences + with the given @p sid or @c None if no such + SpeciesReference exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfSpeciesReferences::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfSpeciesReferences items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfSpeciesReferences items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfSpeciesReferences::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfSpeciesReferences::setType " + @internal + Sets type of this ListOfSpeciesReferences. +"; + + +%feature("docstring") ListOfSpeciesReferences::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") ModifierSpeciesReference " + @ingroup Core + Implementation of %SBML\'s %ModifierSpeciesReference construct. + + Sometimes a species appears in the kinetic rate formula of a reaction + but is itself neither created nor destroyed in that reaction (for + example, because it acts as a catalyst or inhibitor). In SBML, all such + species are simply called @em modifiers without regard to the detailed + role of those species in the model. The Reaction structure provides a + way to express which species act as modifiers in a given reaction. This + is the purpose of the list of modifiers available in Reaction. The list + contains instances of ModifierSpeciesReference structures. + + The ModifierSpeciesReference structure inherits the mandatory attribute + \'species\' and optional attributes \'id\' and \'name\' from the parent class + SimpleSpeciesReference. See the description of SimpleSpeciesReference + for more information about these. + + The value of the \'species\' attribute must be the identifier of a species + defined in the enclosing Model; this species is designated as a modifier + for the current reaction. A reaction may have any number of modifiers. + It is permissible for a modifier species to appear simultaneously in the + list of reactants and products of the same reaction where it is + designated as a modifier, as well as to appear in the list of reactants, + products and modifiers of other reactions in the model. +"; + + +%feature("docstring") ModifierSpeciesReference::ModifierSpeciesReference " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ModifierSpeciesReference(SBMLNamespaces sbmlns)</pre> + + Creates a new ModifierSpeciesReference using the given SBMLNamespaces object + @p sbmlns. + + @param sbmlns an SBMLNamespaces object. + + @note Upon the addition of a ModifierSpeciesReference object to an + SBMLDocument (e.g., using Reaction.addModifier()), the + SBML XML namespace of the document @em overrides the value used when + creating the ModifierSpeciesReference object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the time + of creation of a ModifierSpeciesReference is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ModifierSpeciesReference(long level, long version)</pre> + + Creates a new ModifierSpeciesReference using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this ModifierSpeciesReference + + @param version a long integer, the SBML Version to assign to this + ModifierSpeciesReference + + @note Upon the addition of a ModifierSpeciesReference object to an + SBMLDocument (e.g., using Reaction.addModifier()), the + SBML Level, SBML Version and XML namespace of the document @em + override the values used when creating the ModifierSpeciesReference + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a + ModifierSpeciesReference is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. +"; + + +%feature("docstring") ModifierSpeciesReference::accept " + Accepts the given SBMLVisitor. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") ModifierSpeciesReference::clone " + Creates and returns a deep copy of this ModifierSpeciesReference + instance. + + @return a (deep) copy of this ModifierSpeciesReference. +"; + + +%feature("docstring") ModifierSpeciesReference::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ModifierSpeciesReference::getElementName " + Returns the XML element name of this object, which for Species, is + always @c \'modifierSpeciesReference\'. + + @return the name of this element, i.e., @c \'modifierSpeciesReference\'. +"; + + +%feature("docstring") ModifierSpeciesReference::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this ModifierSpeciesReference object + have been set. + + @note The required attributes for a ModifierSpeciesReference object are: + species +"; + + +%feature("docstring") Event " + @ingroup Core + Implementation of SBML\'s %Event construct. + + An SBML Event object defines when the event can occur, the variables + that are affected by it, how the variables are affected, and the event\'s + relationship to other events. The effect of the event can optionally be + delayed after the occurrence of the condition which invokes it. + + The operation of Event is divided into two phases (even when the event + is not delayed): one when the event is @em triggered, and the other when + the event is @em executed. Trigger objects define the conditions for + triggering an event, Delay objects define when the event is actually + executed, EventAssignment objects define the effects of executing the + event, and (in SBML Level 3) Priority objects influence the order + of EventAssignment performance in cases of simultaneous events. Please + consult the descriptions of Trigger, Delay, EventAssignment and Priority + for more information. + + @section version-diffs SBML Level/Version differences + + @subsection sbml-l3 SBML Level 3 + + SBML Level 3 introduces several changes to the structure and components + of Events compared to SBML Level 2. These changes fall into two + main categories: changes to what is optional or required, and additions + of new attributes and elements. + <ul> + <li> The attribute \'useValuesFromTriggerTime\' on Event is mandatory (it + was optional in Level 2); + <li> Event\'s \'listOfEventAssignments\' element (of class + ListOfEventAssignments) is optional (it was mandatory in Level 2); + <li> Event\'s \'priority\' element (of class Priority) is new in + Level 3; and + <li> The Trigger object gains new mandatory attributes (described as part + of the definition of Trigger). + </ul> + + The changes to the attributes of Event are described below; the changes + to Trigger and Priority are described in their respective sections. + + @subsection sbml-l2 SBML Level 2 + + In SBML Level 2 versions before Version 4, the semantics of + Event time delays were defined such that the expressions in the event\'s + assignments were always evaluated at the time the event was + <em>triggered</em>. This definition made it difficult to define an event + whose assignment formulas were meant to be evaluated at the time the + event was <em>executed</em> (i.e., after the time period defined by the + value of the Delay element). In SBML Level 2 Version 4 and in + Level 3, the attribute \'useValuesFromTriggerTime\' on Event allows a + model to indicate the time at which the event\'s assignments are intended + the values of the assignment formulas are computed at the moment the + event is triggered, not after the delay. If \'useValuesFromTriggerTime\'=@c + false, it means that the formulas in the event\'s assignments are to be + computed @em after the delay, at the time the event is executed. + + The definition of Event in SBML Level 2 Versions 1 and 2 includes + an additional attribute called \'timeUnits\', which allowed the time units + of the Delay to be set explicitly. Later Versions of SBML Level 2 + as well as SBML Level 3 do not define this attribute. LibSBML + supports this attribute for compatibility with previous versions of SBML + Level 2; however, if a model in SBML Level 3 or Level 2 + Versions 3–4 format sets the attribute, the + consistency-checking method SBMLDocument.checkConsistency() will report + an error. + + The attribute \'useValuesFromTriggerTime\' was introduced in SBML + Level 2 Version 4. Models defined in prior Versions of SBML + Level 2 cannot use this attribute, and + SBMLDocument.checkConsistency() will report an error if they do. + + @section semantics Semantics of events in SBML Level 3 Version 1 + + The detailed semantics of events are described in the specification + documents for each SBML Level/Version. Here we include the description + from the SBML Level 1 Version 1. + Any transition of a Trigger object\'s \'math\' formula from the value @c + false to @c True will cause the enclosing Event object to + <em>trigger</em>. Such a transition is not possible at the very start + of a simulation (i.e., at time <em>t = 0</em>) unless the Trigger + object\'s \'initialValue\' attribute has a value of @c False; this defines + the value of the trigger formula to be @c False immediately prior to the + start of simulation, thereby giving it the potential to change in value + from @c False to @c True when the formula is evaluated at <em>t = + 0</em>. If \'initialValue\'=@c True, then the trigger expression cannot + transition from @c False to @c True at <em>t = 0</em> but may do so at + some time <em>t > 0</em>. + + Consider an Event object definition <EM>E</EM> with delay <em>d</em> in + which the Trigger object\'s \'math\' formula makes a transition in value + from @c False to @c True at times <em>t<sub>1</sub></em> and + <em>t<sub>2</sub></em>. The EventAssignment within the Event object + will have effect at <em>t<sub>1</sub> + d</em> and + <em>t<sub>2</sub> + d</em> irrespective of the relative times of + <em>t<sub>1</sub></em> and <em>t<sub>2</sub></em>. For example, events + can \'overlap\' so that <em>t<sub>1</sub> < t<sub>2</sub> < + t<sub>1</sub> + d</em> still causes an event assignments to occur at + <em>t<sub>1</sub> + d</em> and <em>t<sub>2</sub> + d</em>. + + It is entirely possible for two events to be executed simultaneously, + and it is possible for events to trigger other events (i.e., an event + assignment can cause an event to trigger). This leads to several + points: + <ul> + + <li> A software package should retest all event triggers after executing + an event assignment in order to account for the possibility that the + assignment causes another event trigger to transition from @c False to + @c True. This check should be made after each individual Event object\'s + execution, even when several events are to be executed simultaneously. + + <li> Any Event object whose Trigger \'persistent\' attribute has the value + @c False must have its trigger expression reevaluated continuously + between when the event is triggered and when it is executed. If + its trigger expression ever evaluates to @c False, it must be removed + from the queue of events pending execution and treated as any other + event whose trigger expression evaluates to @c False. + + <li> Although the precise time at which events are executed is not + resolved beyond the given execution point in simulated time, it is + assumed that the order in which the events occur <em>is</em> resolved. + This order can be significant in determining the overall outcome of a + given simulation. When an event <EM>X</EM> <em>triggers</em> another + event <EM>Y</EM> and event <EM>Y</EM> has zero delay, then event + <EM>Y</EM> is added to the existing set of simultaneous events that are + pending <em>execution</em>. Events <EM>X</EM> and <EM>Y</EM> form a + cascade of events at the same point in simulation time. An event such + as <EM>Y</EM> may have a special priority if it contains a Priority + subobject. + + <li> All events in a model are open to being in a cascade. The position + of an event in the event queue does not affect whether it can be in the + cascade: event <EM>Y</EM> can be triggered whether it is before or after + <EM>X</EM> in the queue of events pending execution. A cascade of + events can be potentially infinite (never terminate); when this occurs a + simulator should indicate this has occurred—it is incorrect for a + simulator to break a cascade arbitrarily and continue the simulation + without at least indicating that the infinite cascade occurred. + + <li> Simultaneous events having no defined priorities are executed in an + undefined order. This does not mean that the behavior of the simulation + is completely undefined; merely that the <em>order</em> of execution of + these particular events is undefined. A given simulator may use any + algorithm to choose an order as long as every event is executed exactly + once. + + <li> Events with defined priorities are executed in the order implied by + their Priority \'math\' formula values, with events having higher + priorities being executed ahead of events with lower priorities, and + events with identical priorities being executed in a random order with + respect to one another (as determined at run-time by some random + algorithm equivalent to coin-flipping). Newly-triggered events that are + to be executed immediately (i.e., if they define no delays) should be + inserted into the queue of events pending execution according to their + priorities: events with higher priority values value must be inserted + ahead of events with lower priority values and after any pending events + with even higher priorities, and inserted randomly among pending events + with the same priority values. Events without Priority objects must be + inserted into the queue in some fashion, but the algorithm used to place + it in the queue is undefined. Similarly, there is no restriction on the + order of a newly-inserted event with a defined Priority with respect to + any other pending Event without a defined Priority. + + <li> A model variable that is the target of one or more event + assignments can change more than once when simultaneous events are + processed at some time point <em>t</em>. The model\'s behavior (output) + for such a variable is the value of the variable at the end of + processing all the simultaneous events at time <em>t</em>. + + </ul> + + @see Trigger + @see Priority + @see Delay + @see EventAssignment + + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ListOfEvents " + @ingroup Core + Implementation of SBML\'s %ListOfEvents construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + @image html listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + @image latex listof-illustration.jpg \'ListOf___ elements in an SBML Model\' + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the components + all directly at the top level of the model definition. The choice made + in SBML is to group them within XML elements named after + ListOf<em>Classname</em>, in part because it helps organize the + components. More importantly, the fact that the container classes are + derived from SBase means that software tools can add information @em about + the lists themselves into each list container\'s \'annotation\'. + + @see ListOfFunctionDefinitions + @see ListOfUnitDefinitions + @see ListOfCompartmentTypes + @see ListOfSpeciesTypes + @see ListOfCompartments + @see ListOfSpecies + @see ListOfParameters + @see ListOfInitialAssignments + @see ListOfRules + @see ListOfConstraints + @see ListOfReactions + @see ListOfEvents +"; + + +%feature("docstring") Event::Event " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Event(SBMLNamespaces sbmlns)</pre> + + Creates a new Event using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of an Event object to an SBMLDocument (e.g., + using Model.addEvent()), the SBML XML namespace of the document @em + overrides the value used when creating the Event object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Event is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Event(long level, long version)</pre> + + Creates a new Event using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Event + + @param version a long integer, the SBML Version to assign to this + Event + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of an Event object to an SBMLDocument (e.g., + using Model.addEvent()), the SBML Level, SBML Version and XML + namespace of the document @em override the values used when creating + the Event object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of an Event is an + important aid to producing valid SBML. Knowledge of the intented SBML + Level and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Event(Event orig)</pre> + + Copy constructor; creates a copy of this Event. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Event::accept " + Accepts the given SBMLVisitor for this instance of Event. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next Event in the list + of events within which this Event is embedded. +"; + + +%feature("docstring") Event::clone " + Creates and returns a deep copy of this Event. + + @return a (deep) copy of this Event. +"; + + +%feature("docstring") Event::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") Event::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") Event::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth. + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") Event::getId " + Returns the value of the \'id\' attribute of this Event. + + @return the id of this Event. +"; + + +%feature("docstring") Event::getName " + Returns the value of the \'name\' attribute of this Event. + + @return the name of this Event. +"; + + +%feature("docstring") Event::getTrigger " + Get the event trigger portion of this Event. + + @return the Trigger object of this Event. +"; + + +%feature("docstring") Event::getDelay " + Get the assignment delay portion of this Event, if there is one. + + @return the delay of this Event if one is defined, or @c None if none + is defined. +"; + + +%feature("docstring") Event::getPriority " + (SBML Level 3 only) Get the event priority portion of this + Event. + + @return the Priority object of this Event. + + @note The element \'priority\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::getTimeUnits " + Get the value of the \'timeUnits\' attribute of this Event, if it has one. + + @return the value of the attribute \'timeUnits\' as a string. + + @warning Definitions of Event in SBML Level 2 Versions 1 + and 2 included the additional attribute called \'timeUnits\', but + it was removed in SBML Level 2 Version 3. LibSBML supports + this attribute for compatibility with previous versions of SBML + Level 2, but its use is discouraged since models in Level 2 + Versions 3 and 4 cannot contain it. If a Version 3 + or 4 model sets the attribute, the consistency-checking method + SBMLDocument.checkConsistency() will report an error. +"; + + +%feature("docstring") Event::getUseValuesFromTriggerTime " + Get the value of the \'useValuesFromTriggerTime\' attribute of this Event. + + The optional Delay on Event means there are two times to consider when + computing the results of an event: the time at which the event is + <em>triggered</em>, and the time at which assignments are + <em>executed</em>. It is also possible to distinguish between the + time at which the EventAssignment\'s expression is calculated, and the + time at which the assignment is made: the expression could be + evaluated at the same time the assignments are performed, i.e., when + the event is <em>executed</em>, but it could also be defined to be + evaluated at the time the event is <em>triggered</em>. + + In SBML Level 2 versions prior to Version 4, the semantics + of Event time delays were defined such that the expressions in the + event\'s assignments were always evaluated at the time the event was + <em>triggered</em>. This definition made it difficult to define an + event whose assignment formulas were meant to be evaluated at the time + the event was <em>executed</em> (i.e., after the time period defined + by the value of the Delay element). In SBML Level 2 + Version 4, the attribute \'useValuesFromTriggerTime\' on Event + allows a model to indicate the time at which the event\'s assignments + are intended to be evaluated. In SBML Level 2, the attribute has + a default value of @c True, which corresponds to the interpretation of + event assignments prior to Version 4: the values of the + assignment formulas are computed at the moment the event is triggered, + not after the delay. If \'useValuesFromTriggerTime\'=@c False, it means + that the formulas in the event\'s assignments are to be computed after + the delay, at the time the event is executed. In SBML Level 3, + the attribute is mandatory, not optional, and all events must specify + a value for it. + + @return the value of the attribute \'useValuesFromTriggerTime\' as a boolean. + + @warning The attribute \'useValuesFromTriggerTime\' was introduced in + SBML Level 2 Version 4. It is not valid in models defined + using SBML Level 2 versions prior to Version 4. If a + Level 2 Version 1–3 model sets the attribute, the + consistency-checking method SBMLDocument.checkConsistency() will + report an error. +"; + + +%feature("docstring") Event::isSetId " + Predicate returning @c True if this + Event\'s \'id\' attribute is set. + + @return @c True if the \'id\' attribute of this Event is + set, @c False otherwise. +"; + + +%feature("docstring") Event::isSetName " + Predicate returning @c True if this + Event\'s \'name\' attribute is set. + + @return @c True if the \'name\' attribute of this Event is + set, @c False otherwise. +"; + + +%feature("docstring") Event::isSetTrigger " + Predicate for testing whether the trigger for this Event is set. + + @return @c True if the trigger of this Event is set, @c False + otherwise. +"; + + +%feature("docstring") Event::isSetDelay " + Predicate for testing whether the delay for this Event is set. + + @return @c True if the delay of this Event is set, @c False + otherwise. +"; + + +%feature("docstring") Event::isSetPriority " + (SBML Level 3 only) Predicate for testing whether the priority + for this Event is set. + + @return @c True if the priority of this Event is set, @c False + otherwise. + + @note The element \'priority\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::isSetTimeUnits " + Predicate for testing whether the \'timeUnits\' attribute of this Event + is set. + + @return @c True if the \'timeUnits\' attribute of this Event is + set, @c False otherwise. + + @warning Definitions of Event in SBML Level 2 Versions 1 + and 2 included the additional attribute called \'timeUnits\', but + it was removed in SBML Level 2 Version 3. LibSBML supports + this attribute for compatibility with previous versions of SBML + Level 2, but its use is discouraged since models in Level 2 + Versions 3 and 4 cannot contain it. If a Version 3 + or 4 model sets the attribute, the consistency-checking method + SBMLDocument.checkConsistency() will report an error. +"; + + +%feature("docstring") Event::isSetUseValuesFromTriggerTime " + Predicate for testing whether the \'useValuesFromTriggerTime\' attribute of this Event + is set. + + @return @c True if the \'useValuesFromTriggerTime\' attribute of this Event is + set, @c False otherwise. + + @note In SBML Level 2, this attribute is optional and has a default value of + @c True, whereas in Level 3 Version 1, this optional is mandatory and + has no default value. +"; + + +%feature("docstring") Event::setId " + Sets the value of the \'id\' attribute of this Event. + + The string @p sid is copied. Note that SBML has strict requirements + for the syntax of identifiers. @htmlinclude id-syntax.html + + @param sid the string to use as the identifier of this Event + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Event::setName " + Sets the value of the \'name\' attribute of this Event. + + The string in @p name is copied. + + @param name the new name for the Event + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Event::setTrigger " + Sets the trigger definition of this Event to a copy of the given + Trigger object instance. + + @param trigger the Trigger object instance to use. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink +"; + + +%feature("docstring") Event::setDelay " + Sets the delay definition of this Event to a copy of the given Delay + object instance. + + @param delay the Delay object instance to use + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink +"; + + +%feature("docstring") Event::setPriority " + (SBML Level 3 only) Sets the priority definition of this Event + to a copy of the given Priority object instance. + + @param priority the Priority object instance to use + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The element \'priority\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::setTimeUnits " + Sets the \'timeUnits\' attribute of this Event to a copy of @p sid. + + @param sid the identifier of the time units to use. + + @warning Definitions of Event in SBML Level 2 Versions 1 + and 2 included the additional attribute called \'timeUnits\', but + it was removed in SBML Level 2 Version 3. LibSBML supports + this attribute for compatibility with previous versions of SBML + Level 2, but its use is discouraged since models in Level 2 + Versions 3 and 4 cannot contain it. If a Version 3 + or 4 model sets the attribute, the consistency-checking method + SBMLDocument.checkConsistency() will report an error. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") Event::setUseValuesFromTriggerTime " + Sets the \'useValuesFromTriggerTime\' attribute of this Event to a @p value. + + The optional Delay on Event means there are two times to consider when + computing the results of an event: the time at which the event is + <em>triggered</em>, and the time at which assignments are + <em>executed</em>. It is also possible to distinguish between the + time at which the EventAssignment\'s expression is calculated, and the + time at which the assignment is made: the expression could be + evaluated at the same time the assignments are performed, i.e., when + the event is <em>executed</em>, but it could also be defined to be + evaluated at the time the event is <em>triggered</em>. + + In SBML Level 2 versions prior to Version 4, the semantics + of Event time delays were defined such that the expressions in the + event\'s assignments were always evaluated at the time the event was + <em>triggered</em>. This definition made it difficult to define an + event whose assignment formulas were meant to be evaluated at the time + the event was <em>executed</em> (i.e., after the time period defined + by the value of the Delay element). In SBML Level 2 + Version 4, the attribute \'useValuesFromTriggerTime\' on Event + allows a model to indicate the time at which the event\'s assignments + are intended to be evaluated. In SBML Level 2, the attribute has + a default value of @c True, which corresponds to the interpretation of + event assignments prior to Version 4: the values of the + assignment formulas are computed at the moment the event is triggered, + not after the delay. If \'useValuesFromTriggerTime\'=@c False, it means + that the formulas in the event\'s assignments are to be computed after + the delay, at the time the event is executed. In SBML Level 3, + the attribute is mandatory, not optional, and all events must specify + a value for it. + + @param value the value of useValuesFromTriggerTime to use. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @warning The attribute \'useValuesFromTriggerTime\' was introduced in + SBML Level 2 Version 4. It is not valid in models defined + using SBML Level 2 versions prior to Version 4. If a + Version 1– 3 model sets the attribute, the + consistency-checking method SBMLDocument.checkConsistency() will + report an error. +"; + + +%feature("docstring") Event::unsetId " + Unsets the value of the \'id\' attribute of this Event. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Event::unsetName " + Unsets the value of the \'name\' attribute of this Event. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Event::unsetDelay " + Unsets the Delay of this Event. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Event::unsetPriority " + (SBML Level 3 only) Unsets the Priority of this Event. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The element \'priority\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::unsetTrigger " + Unsets the Trigger of this Event. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note The element \'priority\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::unsetTimeUnits " + Unsets the \'timeUnits\' attribute of this Event. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @warning Definitions of Event in SBML Level 2 Versions 1 and 2 + included the attribute called \'timeUnits\', but it was removed in SBML + Level 2 Version 3. LibSBML supports this attribute for + compatibility with previous versions of SBML Level 2, but its use + is discouraged since models in Level 2 Version 3 and + Version 4 cannot contain it. If a Version 3 or 4 model + sets this attribute, the consistency-checking method + SBMLDocument.checkConsistency() will report an error. +"; + + +%feature("docstring") Event::addEventAssignment " + Appends a copy of the given EventAssignment to this Event. + + @param ea the EventAssignment object to add. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink + @li @link libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink + @li @link libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note This method should be used with some caution. The fact that + this method @em copies the object passed to it means that the caller + will be left holding a physically different object instance than the + one contained in this Event. Changes made to the original object + instance (such as resetting attribute values) will <em>not affect the + instance in the Event</em>. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Event.createEventAssignment() + for a method that does not lead to these issues. + + @see createEventAssignment() +"; + + +%feature("docstring") Event::createEventAssignment " + Creates a new, empty EventAssignment, adds it to this Event\'s list of + event assignments and returns the EventAssignment. + + @return the newly created EventAssignment object instance + + @see addEventAssignment() +"; + + +%feature("docstring") Event::createTrigger " + Creates a new, empty Trigger, adds it to this Event and + returns the Trigger. + + @return the newly created Trigger object instance +"; + + +%feature("docstring") Event::createDelay " + Creates a new, empty Delay, adds it to this Event and + returns the Delay. + + @return the newly created Delay object instance +"; + + +%feature("docstring") Event::createPriority " + (SBML Level 3 only) Creates a new, empty Priority, adds it to this + Event and returns the Priority. + + @return the newly created Priority object instance + + @note The element \'priority\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::getListOfEventAssignments " + Returns the list of event assignments for this Event. + + @return the list of EventAssignments for this Event. +"; + + +%feature("docstring") Event::getEventAssignment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getEventAssignment(string variable)</pre> + + Return the event assignment indicated by the given @p variable. + + @param variable a string, the identifier of the variable whose + EventAssignment is being sought. + + @return the EventAssignment for the given @p variable, or @c None if + no such EventAssignment exits. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getEventAssignment(long n)</pre> + + Return a specific EventAssignment object of this Event. + + @param n an integer, the index of the EventAssignment object to return + + @return the <code>n</code>th EventAssignment of this Event. +"; + + +%feature("docstring") Event::getNumEventAssignments " + Returns the number of EventAssignment objects attached to this + Event. + + @return the number of EventAssignments in this Event. +"; + + +%feature("docstring") Event::removeEventAssignment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeEventAssignment(string variable)</pre> + + Removes the EventAssignment object with the given \'variable\' attribute + from this Event object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + If none of the EventAssignment objects in this Event object have the + \'variable\' attribute @p variable, then @c None is returned. + + @param variable the \'variable\' attribute of the EventAssignment object + to remove + + @return the EventAssignment object removed. As mentioned above, the + caller owns the returned object. @c None is returned if no EventAssignment + object with the \'variable\' attribute exists in this Event object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeEventAssignment(long n)</pre> + + Removes the nth EventAssignment object from this Event object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting it. + + @param n the index of the EventAssignment object to remove + + @return the EventAssignment object removed. As mentioned above, + the caller owns the returned item. @c None is returned if the given index + is out of range. +"; + + +%feature("docstring") Event::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. + + @param d the SBMLDocument to use +"; + + +%feature("docstring") Event::connectToChild " + @internal + Sets this SBML object to child SBML objects (if any). + (Creates a child-parent relationship by the parent) + + Subclasses must override this function if they define + one ore more child elements. + Basically, this function needs to be called in + constructor, copy constructor and assignment operator. + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") Event::enablePackageInternal " + @internal + Enables/Disables the given package with this element and child + elements (if any). + (This is an internal implementation for enablePackage function) + + @note Subclasses of the SBML Core package in which one or more child + elements are defined must override this function. +"; + + +%feature("docstring") Event::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Event::getElementName " + Returns the XML element name of this object, which for Event, is + always @c \'event\'. + + @return the name of this element, i.e., @c \'event\'. +"; + + +%feature("docstring") Event::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Event::setInternalIdOnly " + @internal + sets the mInternalIdOnly flag +"; + + +%feature("docstring") Event::hasRequiredAttributes " + Predicate returning @c True if all the required attributes for this + Event object have been set. + + @note The required attributes for a Event object are: + @li \'useValuesfromTriggerTime\' (required in SBML Level 3) +"; + + +%feature("docstring") Event::hasRequiredElements " + Predicate returning @c True if + all the required elements for this Event object + have been set. + + @note The required elements for a Event object are: + @li \'trigger\' + @li \'listOfEventAssignments\' (required in SBML Level 2, optional in Level 3) +"; + + +%feature("docstring") Event::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Event::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Event::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Event::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Event::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Event::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Event::isExplicitlySetUVFTT " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfEvents::ListOfEvents " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfEvents(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfEvents object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfEvents object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfEvents(long level, long version)</pre> + + Creates a new ListOfEvents object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfEvents::clone " + Creates and returns a deep copy of this ListOfEvents. + + @return a (deep) copy of this ListOfEvents. +"; + + +%feature("docstring") ListOfEvents::getTypeCode " + Returns the libSBML type code for this SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfEvents::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., Event objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfEvents::getElementName " + Returns the XML element name of this object. + + For ListOfEvents, the XML element name is @c \'listOfEvents\'. + + @return the name of this element, i.e., @c \'listOfEvents\'. +"; + + +%feature("docstring") ListOfEvents::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a Event from the ListOfEvents. + + @param n the index number of the Event to get. + + @return the <code>n</code>th Event in this ListOfEvents. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a Event from the ListOfEvents + based on its identifier. + + @param sid a string representing the identifier + of the Event to get. + + @return Event in this ListOfEvents + with the given @p sid or @c None if no such + Event exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfEvents::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfEvents items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfEvents items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then + @c None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfEvents::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + The ordering of elements in the XML form of SBML is generally fixed + for most components in SBML. So, for example, the ListOfEvents in a + model is (in SBML Level 2 Version 4) the twelfth ListOf___. + (However, it differs for different Levels and Versions of SBML, so + calling code should not hardwire this number.) + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfEvents::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") EventAssignment " + @ingroup Core + Implementation of %SBML\'s %EventAssignment construct for %Event. + + Event contains an optional element called \'listOfEventAssignments\', of + class ListOfEventAssignments. In every instance of an event definition + in a model, the object\'s \'listOfEventAssignments\' element must have a + non-empty list of one or more \'eventAssignment\' elements of class + EventAssignment. The object class EventAssignment has one required + attribute, \'variable\', and a required element, \'math\'. Being derived + from SBase, it also has all the usual attributes and elements of its + parent class. + + An Event object defines when the event can occur, the variables that are + affected by the event, and how the variables are affected. The purpose + of the EventAssignment object class is to define how variables are + affected by an Event. In SBML Level 2, every Event object instance + must have a nonempty list of event assignments; in SBML Level 3, + the list of assignments is optional. + + The operation of an Event is divided into two phases (regardless of + whether a delay is involved): one phase when the event is @em triggered, + and the other when the event is @em executed. EventAssignment objects + are interpreted when an event is executed. The effects are described + below. + + @section event-variable The attribute \'variable\' + + The EventAssignment attribute \'variable\' must be the identifier of an + existing Compartment, Species, SpeciesReference, or Parameter + instance defined in the model. When the event is executed, the value of + the model component identified by \'variable\' is changed by the + EventAssignment to the value computed by the \'math\' element; that is, a + species\' quantity, species reference\'s stoichiometry, compartment\'s size + or parameter\'s value are reset to the value computed by \'math\'. + + Certain restrictions are placed on what can appear in \'variable\': + <ul> + <li> The object identified by the value of the EventAssignment attribute + \'variable\' must not have its \'constant\' attribute set to or default to + @c True. (Constants cannot be affected by events.) + + <li> The \'variable\' attribute must not contain the identifier of a + reaction; only species, species references, compartment and parameter + values may be set by an Event. + + <li> The value of every \'variable\' attribute must be unique among the set + of EventAssignment structures within a given Event structure. In other + words, a single event cannot have multiple EventAssignment objects + assigning the same variable. (All of them would be performed at the + same time when that particular Event triggers, resulting in + indeterminacy.) However, @em separate Event instances can refer to the + same variable. + + <li> A variable cannot be assigned a value in an EventAssignment object + instance and also be assigned a value by an AssignmentRule; i.e., the + value of an EventAssignment\'s \'variable\' attribute cannot be the same as + the value of a AssignmentRule\' \'variable\' attribute. (Assignment rules + hold at all times, therefore it would be inconsistent to also define an + event that reassigns the value of the same variable.) + </ul> + + Note that the time of assignment of the object identified by the + value of the \'variable\' attribute is always the time at which the Event + is <em>executed</em>, not when it is <em>triggered</em>. The timing is + controlled by the optional Delay in an Event. The time of + assignment is not affected by the \'useValuesFromTriggerTime\' + attribute on Eventmdash;that attribute affects the time at which the + EventAssignment\'s \'math\' expression is @em evaluated. In other + words, SBML allows decoupling the time at which the + \'variable\' is assigned from the time at which its value + expression is calculated. + + @section event-math The \'math\' subelement in an EventAssignment + + The MathML expression contained in an EventAssignment defines the new + value of the variable being assigned by the Event. + + As mentioned above, the time at which the expression in \'math\' is + evaluated is determined by the attribute \'useValuesFromTriggerTime\' on + Event. If the attribute value is @c True, the expression must be + evaluated when the event is @em triggered; more precisely, the values of + identifiers occurring in MathML <code><ci></code> elements in the + EventAssignment\'s \'math\' expression are the values they have at the + point when the event @em triggered. If, instead, + \'useValuesFromTriggerTime\'\'s value is @c False, it means the values at + @em execution time should be used; that is, the values of identifiers + occurring in MathML <code><ci></code> elements in the + EventAssignment\'s \'math\' expression are the values they have at the + point when the event @em executed. + + @section version-diffs SBML Level/Version differences + + Between Version 4 and previous versions of SBML Level 2, the + requirements regarding the matching of units between an + EvengAssignment\'s formula and the units of the object identified by the + \'variable\' attribute changed. Previous versions required consistency, + but in SBML Level 2 Version 4 and in SBML Level 3, unit + consistency is only @em recommended. More precisely: + <ul> + + <li> In the case of a species, an EventAssignment sets the referenced + species\' quantity (concentration or amount of substance) to the value + determined by the formula in the EventAssignment\'s \'math\' subelement. + The units of the \'math\' formula should (in SBML Level 2 + Version 4 and in Level 3) or must (in previous Versions of + Level 2) be identical to the units of the species. + + <li> (SBML Level 3 only.) In the case of a species reference, an + EventAssignment sets the stoichiometry of the reactant or product + referenced by the SpeciesReference object to the value determined by the + formula in the \'math\' element. The unit associated with the value + produced by the \'math\' formula should be @c dimensionless, because + reactant and product stoichiometries in reactions are dimensionless + quantities. + + <li> In the case of a compartment, an EventAssignment sets the + referenced compartment\'s size to the size determined by the formula in + the \'math\' subelement of the EventAssignment. The overall units of the + formula should (in SBML Level 2 Version 4 and in Level 3) + or must (in previous Versions of Level 2) be identical to the units + specified for the size of the compartment identified by the + EventAssignment\'s \'variable\' attribute. + + <li> In the case of a parameter, an EventAssignment sets the referenced + parameter\'s value to that determined by the formula in \'math\'. The + overall units of the formula should (in SBML Level 2 Version 4 + and Level 3) or must (in previous Versions of Level 2) be + identical to the units defined for the parameter. + </ul> + + Note that the formula placed in the \'math\' element <em>has no assumed + units</em>. The consistency of the units of the formula, and the units + of the entity which the assignment affects, must be explicitly + established just as in the case of the value of the Delay subelement. + An approach similar to the one discussed in the context of Delay may be + used for the formula of an EventAssignment. + + @see Event +"; + + +%feature("docstring") ListOfEventAssignments " + @ingroup Core + Implementation of SBML\'s %ListOfEventAssignments construct. + + The various ListOf___ classes in %SBML are merely containers used for + organizing the main components of an %SBML model. All are derived from + the abstract class SBase, and inherit the various attributes and + subelements of SBase, such as \'metaid\' as and \'annotation\'. The + ListOf___ classes do not add any attributes of their own. + + ListOfEventAssignments is entirely contained within Event. +"; + + +%feature("docstring") EventAssignment::EventAssignment " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>EventAssignment(SBMLNamespaces sbmlns)</pre> + + Creates a new EventAssignment using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a EventAssignment object to an SBMLDocument + (e.g., using Event.addEventAssignment()), + the SBML XML namespace of the document @em overrides the value used + when creating the EventAssignment object via this constructor. This + is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the time + of creation of a EventAssignment is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>EventAssignment(long level, long version)</pre> + + Creates a new EventAssignment using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this EventAssignment + + @param version a long integer, the SBML Version to assign to this + EventAssignment + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a EventAssignment object to an SBMLDocument + (e.g., using Event.addEventAssignment()), + the SBML Level, SBML Version and XML namespace of the document @em + override the values used when creating the EventAssignment object via + this constructor. This is necessary to ensure that an SBML document + is a consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a EventAssignment is an important + aid to producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>EventAssignment(EventAssignment orig)</pre> + + Copy constructor; creates a copy of this EventAssignment. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") EventAssignment::accept " + Accepts the given SBMLVisitor for this instance of EventAssignment. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>, which indicates + whether the Visitor would like to visit the next EventAssignment in + the list within which this EventAssignment is embedded (i.e., in the + ListOfEventAssignments located in the enclosing Event instance). +"; + + +%feature("docstring") EventAssignment::clone " + Creates and returns a deep copy of this EventAssignment. + + @return a (deep) copy of this EventAssignment. +"; + + +%feature("docstring") EventAssignment::getVariable " + Get the value of this EventAssignment\'s \'variable\' attribute. + + @return the identifier stored in the \'variable\' attribute of this + EventAssignment. +"; + + +%feature("docstring") EventAssignment::getMath " + Get the mathematical expression in this EventAssignment\'s \'math\' + subelement. + + @return the top ASTNode of an abstract syntax tree representing the + mathematical formula in this EventAssignment. +"; + + +%feature("docstring") EventAssignment::isSetVariable " + Predicate for testing whether the attribute \'variable\' of this + EventAssignment is set. + + @return @c True if the \'variable\' attribute of this EventAssignment + is set, @c False otherwise. +"; + + +%feature("docstring") EventAssignment::isSetMath " + Predicate for testing whether the \'math\' subelement of this + EventAssignment is set. + + @return @c True if this EventAssignment has a \'math\' subelement, + @c False otherwise. +"; + + +%feature("docstring") EventAssignment::setVariable " + Sets the attribute \'variable\' of this EventAssignment to a copy of + the given identifier string. + + @param sid the identifier of a Compartment, Species or (global) + Parameter defined in this model. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") EventAssignment::setMath " + Sets the \'math\' subelement of this EventAssignment to a copy of the + given ASTNode. + + @param math an ASTNode that will be copied and stored as the + mathematical formula for this EventAssignment. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") EventAssignment::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units + of measurement assumed for the \'math\' expression of this + EventAssignment. + + The units are calculated based on the mathematical expression in the + EventAssignment and the model quantities referenced by + <code><ci></code> elements used within that expression. The + EventAssignment.getDerivedUnitDefinition() method returns the + calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + @warning Note that it is possible the \'math\' expression in the + EventAssignment contains literal numbers or parameters with undeclared + units. In those cases, it is not possible to calculate the units of + the overall expression without making assumptions. LibSBML does not + make assumptions about the units, and + EventAssignment.getDerivedUnitDefinition() only returns the units as + far as it is able to determine them. For example, in an expression + <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and + <em>Y</em> does not, it will return the units of <em>X</em>. When + using this method, <strong>it is critical that callers also invoke the + method</strong> EventAssignment.containsUndeclaredUnits() <strong>to + determine whether this situation holds</strong>. Callers should take + suitable action in those situations. + + @return a UnitDefinition that expresses the units of the math + expression of this EventAssignment, or @c None if one cannot be constructed. + + @see containsUndeclaredUnits() +"; + + +%feature("docstring") EventAssignment::containsUndeclaredUnits " + Predicate returning @c True if the math + expression of this EventAssignment contains literal numbers or + parameters with undeclared units. + + The EventAssignment.getDerivedUnitDefinition() method returns what + libSBML computes to be the units of the \'math\', to the extent that + libSBML can compute them. However, if the expression contains literal + numbers or parameters with undeclared units, libSBML may not be able + to compute the full units of the expression and will only return what + it can compute. Callers should always use + EventAssignment.containsUndeclaredUnits() when using + EventAssignment.getDerivedUnitDefinition() to decide whether the + returned units may be incomplete. + + @return @c True if the math expression of this EventAssignment + includes parameters/numbers + with undeclared units, @c False otherwise. + + @note A return value of @c True indicates that the UnitDefinition + returned by EventAssignment.getDerivedUnitDefinition() may not + accurately represent the units of the expression. + + @see getDerivedUnitDefinition() +"; + + +%feature("docstring") EventAssignment::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") EventAssignment::getElementName " + Returns the XML element name of this object, which for + EventAssignment, is always @c \'eventAssignment\'. + + @return the name of this element, i.e., @c \'eventAssignment\'. +"; + + +%feature("docstring") EventAssignment::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") EventAssignment::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this EventAssignment object + have been set. + + @note The required attributes for a EventAssignment object are: + @li \'variable\' + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") EventAssignment::hasRequiredElements " + Predicate returning @c True if + all the required elements for this EventAssignment object + have been set. + + @note The required elements for a EventAssignment object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") EventAssignment::getId " + @internal + Predicate returning @c True if + all the required elements for this EventAssignment object + have been set. + + @note The required elements for a EventAssignment object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") EventAssignment::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") EventAssignment::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") EventAssignment::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") EventAssignment::divideAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing/function). +"; + + +%feature("docstring") EventAssignment::multiplyAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). +"; + + +%feature("docstring") EventAssignment::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") EventAssignment::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") EventAssignment::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") EventAssignment::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") EventAssignment::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") EventAssignment::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") ListOfEventAssignments::ListOfEventAssignments " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfEventAssignments(SBMLNamespaces sbmlns)</pre> + + Creates a new ListOfEventAssignments object. + + The object is constructed such that it is valid for the SBML Level and + Version combination determined by the SBMLNamespaces object in @p + sbmlns. + + @param sbmlns an SBMLNamespaces object that is used to determine the + characteristics of the ListOfEventAssignments object to be created. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ListOfEventAssignments(long level, long version)</pre> + + Creates a new ListOfEventAssignments object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + @param level the SBML Level + + @param version the Version within the SBML Level +"; + + +%feature("docstring") ListOfEventAssignments::clone " + Creates and returns a deep copy of this ListOfEventAssignments. + + @return a (deep) copy of this ListOfEventAssignments. +"; + + +%feature("docstring") ListOfEventAssignments::getTypeCode " + Returns the libSBML type code for this %SBML object. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfEventAssignments::getItemTypeCode " + Returns the libSBML type code for the objects contained in this ListOf + (i.e., EventAssignment objects, if the list is non-empty). + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for the objects contained in this ListOf + instance, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") ListOfEventAssignments::getElementName " + Returns the XML element name of this object. + + For ListOfEventAssignments, the XML element name is @c + \'listOfEventAssignments\'. + + @return the name of this element, i.e., @c \'listOfEventAssignments\'. +"; + + +%feature("docstring") ListOfEventAssignments::get " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>get(long n)</pre> + + Get a EventAssignment from the ListOfEventAssignments. + + @param n the index number of the EventAssignment to get. + + @return the nth EventAssignment in this ListOfEventAssignments. + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>get(string sid)</pre> + + Get a EventAssignment from the ListOfEventAssignments + based on its identifier. + + @param sid a string representing the identifier + of the EventAssignment to get. + + @return EventAssignment in this ListOfEventAssignments + with the given @p sid or @c None if no such + EventAssignment exists. + + @see get() + @see size() +"; + + +%feature("docstring") ListOfEventAssignments::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(long n)</pre> + + Removes the nth item from this ListOfEventAssignments items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + @param n the index of the item to remove + + @see size() + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string sid)</pre> + + Removes item in this ListOfEventAssignments items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier @p sid, then @c + None is returned. + + @param sid the identifier of the item to remove + + @return the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfEventAssignments::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. Note that EventAssignments do not actually have IDs, but the libsbml interface pretends that they do: no event assignment is returned by this function. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") ListOfEventAssignments::getElementPosition " + @internal + Get the ordinal position of this element in the containing object + (which in this case is the Model object). + + @return the ordinal position of the element with respect to its + siblings, or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") ListOfEventAssignments::createObject " + @internal + @return the SBML object corresponding to next XMLToken in the + XMLInputStream or @c None if the token was not recognized. +"; + + +%feature("docstring") Trigger " + @ingroup Core + Implementation of %SBML\'s %Trigger construct for %Event. + + An Event object defines when the event can occur, the variables that are + affected by the event, and how the variables are affected. The Trigger + construct in SBML is used to define a mathematical expression that + determines when an Event is @em triggered. + + A Trigger object in SBML Level 2 and Level 3 contains one + subelement named \'math\' containing a MathML expression. The expression + must evaluate to a value of type @c boolean. The exact moment at which + the expression evaluates to @c True is the time point when the Event is + @em triggered. In SBML Level 3, Trigger has additional attributes + that must be assigned values; they are discussed in a separate section + below. + + An event only @em triggers when its Trigger expression makes the + transition in value from @c False to @c True. The event will also + trigger at any subsequent time points when the trigger makes this + transition; in other words, an event can be triggered multiple times + during a simulation if its trigger condition makes the transition from + @c False to @c True more than once. In SBML Level 3, the behavior + at the very start of simulation (i.e., at <em>t = 0</em>, where + <em>t</em> stands for time) is determined in part by the boolean flag + \'initialValue\'. This and other additional features introduced in SBML + Level 3 are discussed further below. + + @section version-diffs Version differences + + SBML Level 3 Version 1 introduces two required attributes + on the Trigger object: \'persistent\' and \'initialValue\'. The rest of + this introduction describes these two attributes. + + @subsection trigger-persistent The \'persistent\' attribute on Trigger + + In the interval between when an Event object <em>triggers</em> (i.e., + its Trigger object expression transitions in value from @c False to + @c True) and when its assignments are to be <em>executed</em>, conditions + in the model may change such that the trigger expression transitions + back from @c True to @c False. Should the event\'s assignments still be + made if this happens? Answering this question is the purpose of the + \'persistent\' attribute on Trigger. + + If the boolean attribute \'persistent\' has a value of @c True, then once + the event is triggered, all of its assignments are always performed when + the time of execution is reached. The name @em persistent is meant to + evoke the idea that the trigger expression does not have to be + re-checked after it triggers if \'persistent\'=@c True. Conversely, if + the attribute value is @c False, then the trigger expression is not + assumed to persist: if the expression transitions in value back to @c + false at any time between when the event triggered and when it is to be + executed, the event is no longer considered to have triggered and its + assignments are not executed. (If the trigger expression transitions + once more to @c True after that point, then the event is triggered, but + this then constitutes a whole new event trigger-and-execute sequence.) + + The \'persistent\' attribute can be especially useful when Event objects + contain Delay objects, but it is relevant even in a model without delays + if the model contains two or more events. As explained in the + introduction to this section, the operation of all events in SBML + (delayed or not) is conceptually divided into two phases, + <em>triggering</em> and <em>execution</em>; however, unless events have + priorities associated with them, SBML does not mandate a particular + ordering of event execution in the case of simultaneous events. Models + with multiple events can lead to situations where the execution of one + event affects another event\'s trigger expression value. If that other + event has \'persistent\'=@c False, and its trigger expression evaluates to + @c False before it is to be executed, the event must not be executed + after all. + + @subsection trigger-initialvalue The \'initialValue\' attribute on Trigger + + As mentioned above, an event <em>triggers</em> when the mathematical + expression in its Trigger object transitions in value from @c False to + @c True. An unanswered question concerns what happens at the start of a + simulation: can event triggers make this transition at <em>t = 0</em>, + where <em>t</em> stands for time? + + In order to determine whether an event may trigger at <em>t = 0</em>, it + is necessary to know what value the Trigger object\'s \'math\' expression + had immediately prior to <em>t = 0</em>. This starting value of the + trigger expression is determined by the value of the boolean attribute + \'initialValue\'. A value of @c True means the trigger expression is + taken to have the value @c True immediately prior to <em>t = 0</em>. In + that case, the trigger cannot transition in value from @c False to @c + true at the moment simulation begins (because it has the value @c True + both before and after <em>t = 0</em>), and can only make the transition + from @c False to @c True sometime <em>after</em> <em>t = 0</em>. (To do + that, it would also first have to transition to @c False before it could + make the transition from @c False back to @c True.) Conversely, if + \'initialValue\'=@c False, then the trigger expression is assumed to start + with the value @c False, and therefore may trigger at <em>t = 0</em> if + the expression evaluates to @c True at that moment. + + + @see Event + @see Delay + @see EventAssignment +"; + + +%feature("docstring") Trigger::Trigger " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Trigger(SBMLNamespaces sbmlns)</pre> + + Creates a new Trigger using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Trigger(long level, long version)</pre> + + Creates a new Trigger using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Trigger + + @param version a long integer, the SBML Version to assign to this + Trigger + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Trigger(Trigger orig)</pre> + + Copy constructor; creates a copy of this Trigger. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Trigger::accept " + Accepts the given SBMLVisitor for this instance of Trigger. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") Trigger::clone " + Creates and returns a deep copy of this Trigger. + + @return a (deep) copy of this Trigger. +"; + + +%feature("docstring") Trigger::getMath " + Get the mathematical formula for the trigger and return it + as an AST. + + @return the math of this Trigger. +"; + + +%feature("docstring") Trigger::getInitialValue " + (SBML Level 3 only) Get the value of the \'initialValue\' attribute + of this Trigger. + + @return the boolean value stored as the \'initialValue\' attribute value + in this Trigger. + + @note The attribute \'initialValue\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::getPersistent " + (SBML Level 3 only) Get the value of the \'persistent\' attribute + of this Trigger. + + @return the boolean value stored as the \'persistent\' attribute value + in this Trigger. + + @note The attribute \'persistent\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::isSetMath " + Predicate to test whether the math for this trigger is set. + + @return @c True if the formula (meaning the \'math\' subelement) of + this Trigger is set, @c False otherwise. +"; + + +%feature("docstring") Trigger::isSetInitialValue " + (SBML Level 3 only) Predicate to test whether the \'initialValue\' + attribute for this trigger is set. + + @return @c True if the initialValue attribute of + this Trigger is set, @c False otherwise. + + @note The attribute \'initialValue\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::isSetPersistent " + (SBML Level 3 only) Predicate to test whether the \'persistent\' + attribute for this trigger is set. + + @return @c True if the persistent attribute of + this Trigger is set, @c False otherwise. + + @note The attribute \'persistent\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::setMath " + Sets the trigger expression of this Trigger instance to a copy of the given + ASTNode. + + @param math an ASTNode representing a formula tree. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") Trigger::setInitialValue " + (SBML Level 3 only) Sets the \'initialValue\' attribute of this Trigger instance. + + @param initialValue a boolean representing the initialValue to be set. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attribute \'initialValue\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::setPersistent " + (SBML Level 3 only) Sets the \'persistent\' attribute of this Trigger instance. + + @param persistent a boolean representing the persistent value to be set. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + + @note The attribute \'persistent\' is available in SBML Level 3 + Version 1 Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this SBML object. + + @param d the SBMLDocument to use. +"; + + +%feature("docstring") Trigger::setParentSBMLObject " + @internal + Sets the parent SBML object of this SBML object. + + @param sb the SBML object to use +"; + + +%feature("docstring") Trigger::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Trigger::getElementName " + Returns the XML element name of this object, which for Trigger, is + always @c \'trigger\'. + + @return the name of this element, i.e., @c \'trigger\'. +"; + + +%feature("docstring") Trigger::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Trigger::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Trigger::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Trigger::getElementPosition " + @internal + Returns the position of this element. + + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") Trigger::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Trigger::hasRequiredElements " + Predicate returning @c True if + all the required elements for this Trigger object + have been set. + + @note The required elements for a Trigger object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Trigger::hasRequiredAttributes " + Predicate returning @c True if + all the required attributes for this Trigger object + have been set. + + @note The required attributes for a Trigger object are: + @li \'persistent\' (required in SBML Level 3) + @li \'initialValue\' (required in SBML Level 3) + + @return a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Trigger::removeFromParentAndDelete " + Finds this Trigger\'s Event parent and calls unsetTrigger() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Trigger::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") Trigger::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Trigger::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Trigger::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Trigger::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Trigger::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Delay " + @ingroup Core + Implementation of %SBML\'s %Delay construct for %Event. + + An Event object defines when the event can occur, the variables that + are affected by the event, and how the variables are affected. The + effect of the event can optionally be delayed after the occurrence of + the condition which invokes it. An event delay is defined using an + object of class Delay. + + The object class Delay is derived from SBase and adds a single + subelement called \'math\'. This subelement is used to hold MathML + content. The mathematical formula represented by \'math\' must evaluate + to a numerical value. It is used as the length of time between when the + event is @em triggered and when the event\'s assignments are + actually @em executed. If no delay is present on a given Event, a time + delay of zero is assumed. + + The expression in \'math\' must be evaluated at the time the event is @em + triggered. The expression must always evaluate to a nonnegative number + (otherwise, a nonsensical situation could arise where an event is + defined to execute before it is triggered!). + + @section delay-units The units of the mathematical expression in a Delay + + In SBML Level 2 versions before Version 4, the units of the + numerical value computed by the Delay\'s \'math\' expression are @em + required to be in units of time, or the model is considered to have a + unit consistency error. In Level 2 Version 4 as well as SBML + Level 3 Version 1 Core, this requirement is relaxed; these + specifications only stipulate that the units of the numerical value + computed by a Delay instance\'s \'math\' expression @em should match the + model\'s units of time (meaning the definition of the @c time units in + the model). LibSBML respects these requirements, and depending on + whether an earlier Version of SBML Level 2 is in use, libSBML may + or may not flag unit inconsistencies as errors or merely warnings. + + Note that <em>units are not predefined or assumed</em> for the contents + of \'math\' in a Delay object; rather, they must be defined explicitly for + each instance of a Delay object in a model. This is an important point + to bear in mind when literal numbers are used in delay expressions. For + example, the following Event instance would result in a warning logged + by SBMLDocument.checkConsistency() about the fact that libSBML cannot + verify the consistency of the units of the expression. The reason is + that the formula inside the \'math\' element does not have any declared + units, whereas what is expected in this context is units of time: + @verbatim + <model> + ... + <listOfEvents> + <event useValuesFromTriggerTime=\'true\'> + ... + <delay> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <cn> 1 </cn> + </math> + </delay> + ... + </event> + </listOfEvents> + ... + </model> + @endverbatim + + The <code><cn> 1 </cn></code> within the mathematical formula + of the @c delay above has <em>no units declared</em>. To make the + expression have the needed units of time, literal numbers should be + avoided in favor of defining Parameter objects for each quantity, and + declaring units for the Parameter values. The following fragment of + SBML illustrates this approach: + @verbatim + <model> + ... + <listOfParameters> + <parameter id=\'transcriptionDelay\' value=\'10\' units=\'second\'/> + </listOfParameters> + ... + <listOfEvents> + <event useValuesFromTriggerTime=\'true\'> + ... + <delay> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <ci> transcriptionDelay </ci> + </math> + </delay> + ... + </event> + </listOfEvents> + ... + </model> + @endverbatim + + In SBML Level 3, an alternative approach is available in the form + of the @c units attribute, which SBML Level 3 allows to appear on + MathML @c cn elements. The value of this attribute can be used to + indicate the unit of measurement to be associated with the number in the + content of a @c cn element. The attribute is named @c units but, + because it appears inside MathML element (which is in the XML namespace + for MathML and not the namespace for SBML), it must always be prefixed + with an XML namespace prefix for the SBML Level 3 Version 1 + namespace. The following is an example of this approach: + @verbatim + <model timeUnits=\'second\' ...> + ... + <listOfEvents> + <event useValuesFromTriggerTime=\'true\'> + ... + <delay> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\' + xmlns:sbml=\'http://www.sbml.org/sbml/level3/version1/core\'> + <cn sbml:units=\'second\'> 10 </cn> + </math> + </delay> + ... + </event> + </listOfEvents> + ... + </model> + @endverbatim +"; + + +%feature("docstring") Delay::Delay " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Delay(SBMLNamespaces sbmlns)</pre> + + Creates a new Delay using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Delay object to an Event (e.g., using + Event.setDelay()), the SBML XML namespace of + the document @em overrides the value used when creating the Delay + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a Delay is an important + aid to producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add a particular Delay object + to an existing Event. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Delay(long level, long version)</pre> + + Creates a new Delay using the given SBML @p level and @p version + values. + + @param level a long integer, the SBML Level to assign to this Delay + + @param version a long integer, the SBML Version to assign to this + Delay + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Delay object to an Event (e.g., using + Event.setDelay()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used when + creating the Delay object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a Delay is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add a + particular Delay object to an existing Event. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Delay(Delay orig)</pre> + + Copy constructor; creates a copy of this Delay. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Delay::accept " + Accepts the given SBMLVisitor for this instance of Delay. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") Delay::clone " + Creates and returns a deep copy of this Delay. + + @return a (deep) copy of this Delay. +"; + + +%feature("docstring") Delay::getMath " + Get the mathematical formula for the delay and return it + as an AST. + + @return the math of this Delay. +"; + + +%feature("docstring") Delay::isSetMath " + Predicate to test whether the formula for this delay is set. + + @return @c True if the formula (meaning the @c math subelement) of + this Delay is set, @c False otherwise. +"; + + +%feature("docstring") Delay::setMath " + Sets the delay expression of this Delay instance to a copy of the given + ASTNode. + + @param math an ASTNode representing a formula tree. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") Delay::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units + of measurement assumed for the \'math\' expression of this Delay. + + Delay elements in SBML express a time delay for an Event. Beginning + with SBML Level 2 Version 2, the units of that time are + calculated based on the mathematical expression and the model + quantities referenced by <code><ci></code> elements used within + that expression. The Delay.getDerivedUnitDefinition() method returns + what libSBML computes the units to be, to the extent that libSBML can + compute them. + + (Prior to SBML Level 2 Version 2, there existed an attribute + on Event called \'timeUnits\'. This attribute could be used to set the + intended units of the delay expression. For such models, this will + return a UnitDefinition object that corresponds to the declared + \'timeUnits\' units.) + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + @warning Note that it is possible the \'math\' expression in the Delay + contains literal numbers or parameters with undeclared units. In + those cases, it is not possible to calculate the units of the overall + expression without making assumptions. LibSBML does not make + assumptions about the units, and Delay.getDerivedUnitDefinition() + only returns the units as far as it is able to determine them. For + example, in an expression <em>X + Y</em>, if <em>X</em> has + unambiguously-defined units and <em>Y</em> does not, it will return + the units of <em>X</em>. When using this method, <strong>it is + critical that callers also invoke the method</strong> + Delay.containsUndeclaredUnits() <strong>to determine whether this + situation holds</strong>. Callers should take suitable action in + those situations. + + @return a UnitDefinition that expresses the units of the math + expression of this Delay, or @c None if one cannot be constructed. + + @see containsUndeclaredUnits() +"; + + +%feature("docstring") Delay::containsUndeclaredUnits " + Predicate returning @c True if + the \'math\' expression in this Delay instance contains + parameters with undeclared units or literal numbers. + + Delay elements in SBML express a time delay for an Event. Beginning + with SBML Level 2 Version 2, the units of that time are + calculated based on the mathematical expression and the model + quantities referenced by <code><ci></code> elements used within + that expression. The Delay.getDerivedUnitDefinition() method returns + what libSBML computes the units to be, to the extent that libSBML can + compute them. However, if the expression contains literal numbers or + parameters with undeclared units, libSBML may not be able to compute + the full units of the expression and will only return what it can + compute. Callers should always use Delay.containsUndeclaredUnits() + when using Delay.getDerivedUnitDefinition() to decide whether the + returned units may be incomplete. + + @return @c True if the math expression of this Delay includes + numbers/parameters with undeclared units, @c False otherwise. + + @note A return value of @c True indicates that the UnitDefinition + returned by Delay.getDerivedUnitDefinition() may not accurately + represent the units of the expression. + + @see getDerivedUnitDefinition() +"; + + +%feature("docstring") Delay::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Delay::getElementName " + Returns the XML element name of this object, which for Delay, is + always @c \'delay\'. + + @return the name of this element, i.e., @c \'delay\'. + + @see getTypeCode() +"; + + +%feature("docstring") Delay::getElementPosition " + @internal + Returns the position of this element. + + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") Delay::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Delay::hasRequiredElements " + Predicate returning @c True if + all the required elements for this Delay object + have been set. + + @note The required elements for a Delay object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Delay::removeFromParentAndDelete " + Finds this Delay\'s Event parent and calls unsetDelay() on it, indirectly + deleting itself. + + Overridden from the SBase function since the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Delay::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Delay::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Delay::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Delay::getInternalId " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Delay::setInternalId " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Delay::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") Delay::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Delay::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Delay::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Delay::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Delay::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") Priority " + @ingroup Core + Implementation of %SBML Level 3\'s %Priority construct + for Event. + + The Priority object class (which was introduced in SBML Level 3 + Version 1), like Delay, is derived from SBase and contains a MathML + formula stored in the element \'math\'. This formula is used to compute a + dimensionless numerical value that influences the order in which a + simulator is to perform the assignments of two or more events that + happen to be executed simultaneously. The formula may evaluate to any + @c double value (and thus may be a positive or negative number, or + zero), with positive numbers taken to signifying a higher priority than + zero or negative numbers. If no Priority object is present on a given + Event object, no priority is defined for that event. + + @section priority-interp The interpretation of priorities on events in a model + + For the purposes of SBML, <em>simultaneous event execution</em> is + defined as the situation in which multiple events have identical + times of execution. The time of execution is calculated as the + sum of the time at which a given event\'s Trigger is <em>triggered</em> + plus its Delay duration, if any. Here, <em>identical times</em> means + <em>mathematically equal</em> instants in time. (In practice, + simulation software adhering to this specification may have to + rely on numerical equality instead of strict mathematical + equality; robust models will ensure that this difference will not + cause significant discrepancies from expected behavior.) + + If no Priority subobjects are defined for two or more Event objects, + then those events are still executed simultaneously but their order of + execution is <em>undefined by the SBML Level 3 Version 1 + specification</em>. A software implementation may choose to execute + such simultaneous events in any order, as long as each event is executed + only once and the requirements of checking the \'persistent\' attribute + (and acting accordingly) are satisfied. + + If Priority subobjects are defined for two or more + simultaneously-triggered events, the order in which those particular + events must be executed is dictated by their Priority objects, + as follows. If the values calculated using the two Priority + objects\' \'math\' expressions differ, then the event having + the higher priority value must be executed before the event with + the lower value. If, instead, the two priority values are + mathematically equal, then the two events must be triggered in a + <em>random</em> order. It is important to note that a <em>random + order is not the same as an undefined order</em>: given multiple + runs of the same model with identical conditions, an undefined + ordering would permit a system to execute the events in (for + example) the same order every time (according to whatever scheme + may have been implemented by the system), whereas the explicit + requirement for random ordering means that the order of execution + in different simulation runs depends on random chance. In other + words, given two events <em>A</em> and <em>B</em>, a randomly-determined + order must lead to an equal chance of executing <em>A</em> first or + <em>B</em> first, every time those two events are executed + simultaneously. + + A model may contain a mixture of events, some of which have + Priority subobjects and some do not. Should a combination of + simultaneous events arise in which some events have priorities + defined and others do not, the set of events with defined + priorities must trigger in the order determined by their Priority + objects, and the set of events without Priority objects must be + executed in an <em>undefined</em> order with respect to each other + and with respect to the events with Priority subobjects. (Note + that <em>undefined order</em> does not necessarily mean random + order, although a random ordering would be a valid implementation + of this requirement.) + + The following example may help further clarify these points. + Suppose a model contains four events that should be executed + simultaneously, with two of the events having Priority objects + with the same value and the other two events having Priority + objects with the same, but different, value. The two events with + the higher priorities must be executed first, in a random order + with respect to each other, and the remaining two events must be + executed after them, again in a random order, for a total of four + possible and equally-likely event executions: A-B-C-D, A-B-D-C, + B-A-C-D, and B-A-D-C. If, instead, the model contains four events + all having the same Priority values, there are 4! or 24 + possible orderings, each of which must be equally likely to be + chosen. Finally, if none of the four events has a Priority + subobject defined, or even if exactly one of the four events has a + defined Priority, there are again 24 possible orderings, but the + likelihood of choosing any particular ordering is undefined; the + simulator can choose between events as it wishes. (The SBML + specification only defines the effects of priorities on Event + objects with respect to <em>other</em> Event objects with + priorities. Putting a priority on a <em>single</em> Event object + in a model does not cause it to fall within that scope.) + + @section priority-eval Evaluation of Priority expressions + + An event\'s Priority object \'math\' expression must be + evaluated at the time the Event is to be <em>executed</em>. During + a simulation, all simultaneous events have their Priority values + calculated, and the event with the highest priority is selected for + next execution. Note that it is possible for the execution of one + Event object to cause the Priority value of another + simultaneously-executing Event object to change (as well as to + trigger other events, as already noted). Thus, after executing + one event, and checking whether any other events in the model have + been triggered, all remaining simultaneous events that + <em>either</em> (i) have Trigger objects with attributes + \'persistent\'=@c False <em>or</em> (ii) have Trigger + expressions that did not transition from @c True to + @c False, must have their Priority expression reevaluated. + The highest-priority remaining event must then be selected for + execution next. + + @section priority-units Units of Priority object\'s mathematical expressions + + The unit associated with the value of a Priority object\'s + \'math\' expression should be @c dimensionless. This is + because the priority expression only serves to provide a relative + ordering between different events, and only has meaning with + respect to other Priority object expressions. The value of + Priority objects is not comparable to any other kind of object in + an SBML model. + + @note The Priority construct exists only in SBML Level 3; it cannot + be used in SBML Level 2 or Level 1 models. + + @see Event + @see Delay + @see EventAssignment +"; + + +%feature("docstring") Priority::Priority " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Priority(SBMLNamespaces sbmlns)</pre> + + Creates a new Priority object using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Priority object to an Event (e.g., using + Event.setPriority()), the SBML XML namespace of + the document @em overrides the value used when creating the Priority + object via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a Priority is an important + aid to producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add a particular Priority object + to an existing Event.<br><br> + + @note The Priority construct exists only in SBML Level 3; it + cannot be used in SBML Level 2 or Level 1 models. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Priority(long level, long version)</pre> + + Creates a new Priority object using the given SBML @p level and @p + version values. + + @param level a long integer, the SBML Level to assign to this Priority + + @param version a long integer, the SBML Version to assign to this + Priority + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a Priority object to an Event (e.g., using + Event.setPriority()), the SBML Level, SBML Version + and XML namespace of the document @em override the values used when + creating the Priority object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a Priority is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add a + particular Priority object to an existing Event.<br><br> + + @note The Priority construct exists only in SBML Level 3; it + cannot be used in SBML Level 2 or Level 1 models. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Priority(Priority orig)</pre> + + Copy constructor; creates a copy of this Priority. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Priority::accept " + Accepts the given SBMLVisitor for this instance of Priority. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") Priority::clone " + Creates and returns a deep copy of this Priority. + + @return a (deep) copy of this Priority. +"; + + +%feature("docstring") Priority::getMath " + Get the mathematical formula for the priority and return it + as an AST. + + @return the math of this Priority. +"; + + +%feature("docstring") Priority::isSetMath " + Predicate to test whether the formula for this delay is set. + + @return @c True if the formula (meaning the @c math subelement) of + this Priority is set, @c False otherwise. +"; + + +%feature("docstring") Priority::setMath " + Sets the math expression of this Priority instance to a copy of the given + ASTNode. + + @param math an ASTNode representing a formula tree. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") Priority::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") Priority::getElementName " + Returns the XML element name of this object, which for Priority, is + always @c \'priority\'. + + @return the name of this element, i.e., @c \'priority\'. + + @see getTypeCode() +"; + + +%feature("docstring") Priority::getElementPosition " + @internal + Returns the position of this element. + + @return the ordinal position of the element with respect to its + siblings or -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") Priority::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") Priority::hasRequiredElements " + Predicate returning @c True if + all the required elements for this Priority object + have been set. + + @note The required elements for a Priority object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") Priority::removeFromParentAndDelete " + Finds this Priority\'s Event parent and calls unsetPriority() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") Priority::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Priority::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") Priority::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Priority::getInternalId " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Priority::setInternalId " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") Priority::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") Priority::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") Priority::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Priority::readL3Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") Priority::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SBO " + @ingroup Core + Methods for interacting with Systems Biology Ontology terms. + + @htmlinclude not-sbml-warning.html + + The values of \'id\' attributes on SBML components allow the components to + be cross-referenced within a model. The values of \'name\' attributes on + SBML components provide the opportunity to assign them meaningful labels + suitable for display to humans. The specific identifiers and labels + used in a model necessarily must be unrestricted by SBML, so that + software and users are free to pick whatever they need. However, this + freedom makes it more difficult for software tools to determine, without + additional human intervention, the semantics of models more precisely + than the semantics provided by the SBML object classes defined in other + sections of this document. For example, there is nothing inherent in a + parameter with identifier <code>k</code> that would indicate to a + software tool it is a first-order rate constant (if that\'s what + <code>k</code> happened to be in some given model). However, one may + need to convert a model between different representations (e.g., + Henri-Michaelis-Menten versus elementary steps), or to use it with + different modeling approaches (discrete or continuous). One may also + need to relate the model components with other description formats such + as SBGN (<a target=\'_blank\' + href=\'http://www.sbgn.org/\'>http://www.sbgn.org/</a>) using deeper + semantics. Although an advanced software tool <em>might</em> be able to + deduce the semantics of some model components through detailed analysis + of the kinetic rate expressions and other parts of the model, this + quickly becomes infeasible for any but the simplest of models. + + An approach to solving this problem is to associate model components + with terms from carefully curated controlled vocabularies (CVs). This + is the purpose of the optional \'sboTerm\' attribute provided on the SBML + class SBase. The \'sboTerm\' attribute always refers to terms belonging + to the Systems Biology Ontology (SBO). + + @section use Use of SBO + + Labeling model components with terms from shared controlled vocabularies + allows a software tool to identify each component using identifiers that + are not tool-specific. An example of where this is useful is the desire + by many software developers to provide users with meaningful names for + reaction rate equations. Software tools with editing interfaces + frequently provide these names in menus or lists of choices for users. + However, without a standardized set of names or identifiers shared + between developers, a given software package cannot reliably interpret + the names or identifiers of reactions used in models written by other + tools. + + The first solution that might come to mind is to stipulate that certain + common reactions always have the same name (e.g., \'Michaelis-Menten\'), but + this is simply impossible to do: not only do humans often disagree on + the names themselves, but it would not allow for correction of errors or + updates to the list of predefined names except by issuing new releases + of the SBML specification—to say nothing of many other limitations + with this approach. Moreover, the parameters and variables that appear + in rate expressions also need to be identified in a way that software + tools can interpret mechanically, implying that the names of these + entities would also need to be regulated. + + The Systems Biology Ontology (SBO) provides terms for identifying most + elements of SBML. The relationship implied by an \'sboTerm\' on an SBML + model component is <em>is-a</em> between the characteristic of the + component meant to be described by %SBO on this element and the %SBO + term identified by the value of the \'sboTerm\'. By adding %SBO term + references on the components of a model, a software tool can provide + additional details using independent, shared vocabularies that can + enable <em>other</em> software tools to recognize precisely what the + component is meant to be. Those tools can then act on that information. + For example, if the %SBO identifier @c \'SBO:0000049\' is assigned + to the concept of \'first-order irreversible mass-action kinetics, + continuous framework\', and a given KineticLaw object in a model has an + \'sboTerm\' attribute with this value, then regardless of the identifier + and name given to the reaction itself, a software tool could use this to + inform users that the reaction is a first-order irreversible mass-action + reaction. This kind of reverse engineering of the meaning of reactions + in a model would be difficult to do otherwise, especially for more + complex reaction types. + + The presence of %SBO labels on Compartment, Species, and Reaction + objects in SBML can help map those entities to equivalent concepts in + other standards, such as (but not limited to) BioPAX (<a target=\'_blank\' + href=\'http://www.biopax.org/\'>http://www.biopax.org/</a>), PSI-MI (<a + target=\'_blank\' + href=\'http://www.psidev.info/index.php?q=node/60\'>http://www.psidev.info</a>), + or the Systems Biology Graphical Notation (SBGN, <a target=\'_blank\' + href=\'http://www.sbgn.org/\'>http://www.sbgn.org/</a>). Such mappings + can be used in conversion procedures, or to build interfaces, with %SBO + becoming a kind of \'glue\' between standards of representation. + + The presence of the label on a kinetic expression can also allow + software tools to make more intelligent decisions about reaction rate + expressions. For example, an application could recognize certain types + of reaction formulas as being ones it knows how to solve with optimized + procedures. The application could then use internal, optimized code + implementing the rate formula indexed by identifiers such as + @c \'SBO:0000049\' appearing in SBML models. + + Finally, %SBO labels may be very valuable when it comes to model + integration, by helping identify interfaces, convert mathematical + expressions and parameters etc. + + Although the use of %SBO can be beneficial, it is critical to keep in + mind that the presence of an \'sboTerm\' value on an object <em>must not + change the fundamental mathematical meaning</em> of the model. An SBML + model must be defined such that it stands on its own and does not depend + on additional information added by %SBO terms for a correct mathematical + interpretation. %SBO term definitions will not imply any alternative + mathematical semantics for any SBML object labeled with that term. Two + important reasons motivate this principle. First, it would be too + limiting to require all software tools to be able to understand the %SBO + vocabularies in addition to understanding SBML. Supporting %SBO is not + only additional work for the software developer; for some kinds of + applications, it may not make sense. If %SBO terms on a model are + optional, it follows that the SBML model <em>must</em> remain + unambiguous and fully interpretable without them, because an application + reading the model may ignore the terms. Second, we believe allowing the + use of \'sboTerm\' to alter the mathematical meaning of a model would + allow too much leeway to shoehorn inconsistent concepts into SBML + objects, ultimately reducing the interoperability of the models. + + @section relationship Relationships between SBO and SBML + + The goal of %SBO labeling for SBML is to clarify to the fullest extent + possible the nature of each element in a model. The approach taken in + %SBO begins with a hierarchically-structured set of controlled + vocabularies with six main divisions: (1) entity, (2) participant role, + (3) quantitative parameter, (4) modeling framework, (5) mathematical + expression, and (6) interaction. The web site for %SBO (<a + target=\'_blank\' + href=\'http://biomodels.net/sbo\'>http://biomodels.net</a>) should be + consulted for the current version of the ontology. + + The Systems Biology Ontology (SBO) is not part of SBML; it is being + developed separately, to allow the modeling community to evolve the + ontology independently of SBML. However, the terms in the ontology are + being designed keeping SBML components in mind, and are classified into + subsets that can be directly related with SBML components such as + reaction rate expressions, parameters, and others. The use of \'sboTerm\' + attributes is optional, and the presence of \'sboTerm\' on an element does + not change the way the model is <em>interpreted</em>. Annotating SBML + elements with %SBO terms adds additional semantic information that may + be used to <em>convert</em> the model into another model, or another + format. Although %SBO support provides an important source of + information to understand the meaning of a model, software does not need + to support \'sboTerm\' to be considered SBML-compliant. +"; + + +%feature("docstring") SBO::readTerm " + @internal + Reads (and checks) sboTerm from the given XMLAttributes set. + + @return the sboTerm as an integer or -1 if the sboTerm was not in the + correct format or not found. +"; + + +%feature("docstring") SBO::writeTerm " + @internal + Writes sboTerm as an XMLAttribute with the given prefix to the given XMLOutputStream. +"; + + +%feature("docstring") SBO::isQuantitativeParameter " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'quantiative parameter\'</em>, @c False + otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isQuantitativeParameter(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isParticipantRole " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'participant role\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isParticipantRole(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isModellingFramework " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'modeling framework\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isModellingFramework(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isMathematicalExpression " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'mathematical expression\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isMathematicalExpression(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isKineticConstant " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'kinetic constant\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isKineticConstant(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isReactant " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'reactant\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isReactant(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isProduct " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'product\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isProduct(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isModifier " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'modifier\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isModifier(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isRateLaw " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'rate law\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isRateLaw(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isEvent " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'event\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isEvent(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isPhysicalParticipant " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'physical participant</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isPhysicalParticipant(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isParticipant " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'participant\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isParticipant(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isInteraction " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'interaction\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isInteraction(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isEntity " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'entity\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isEntity(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isFunctionalEntity " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'functional entity\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isFunctionalEntity(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isMaterialEntity " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'material entity\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isMaterialEntity(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isConservationLaw " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'conservation law\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isConservationLaw(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isSteadyStateExpression " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'steady state expression\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isSteadyStateExpression(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isFunctionalCompartment " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'functional compartment\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isFunctionalCompartment(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isContinuousFramework " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'continuous framework\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isContinuousFramework(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isDiscreteFramework " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'discrete framework\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isDiscreteFramework(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isLogicalFramework " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'logical framework\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isLogicalFramework(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isMetadataRepresentation " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'metadata representation\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isMetadataRepresentation(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isOccurringEntityRepresentation " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'occurring entity representation\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isOccurringEntityRepresentation(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isPhysicalEntityRepresentation " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'physical entity representation\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isPhysicalEntityRepresentation(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isSystemsDescriptionParameter " + Returns @c True if the given term identifier comes from the stated branch of %SBO. + + @return @c True if @p term is-a %SBO <em>\'systems description parameter\'</em>, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isSystemsDescriptionParameter(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isObselete " + Predicate for checking whether the given term is obsolete. + + @return @c True if @p term is-a %SBO <em>\'obsolete\'</em> term, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_isObselete(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::intToString " + Returns the integer as a correctly formatted %SBO identifier string. + + @return the given integer sboTerm as a zero-padded seven digit string. + + @note If the sboTerm is not in the correct range + (0000000–9999999), an empty string is returned. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_intToString(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::stringToInt " + Returns the string as a correctly formatted %SBO integer portion. + + @return the given string sboTerm as an integer. If the sboTerm is not + in the correct format (a zero-padded, seven digit string), <code>-1</code> is + returned. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_stringToInt(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::checkTerm " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>checkTerm(string sboTerm)</pre> + + Checks the format of the given %SBO identifier string. + + @return @c True if sboTerm is in the correct format (a zero-padded, seven + digit string), @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_checkTerm(). They are functionally identical. @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>checkTerm(int sboTerm)</pre> + + Checks the format of the given %SBO identifier, given in the form of + the integer portion alone. + + @return @c True if sboTerm is in the range (0000000–9999999), @c False + otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBO), and the other will + be a standalone top-level function with the name + SBO_checkTerm(). They are functionally identical. @endif@~ +"; + + +%feature("docstring") SBO::isChildOf " + @internal + Returns @c True if the given term identifier comes from the stated branch of %SBO. + * @return true if the term is-a parent, false otherwise +"; + + +%feature("docstring") SBO::populateSBOTree " + @internal + Returns @c True if the given term identifier comes from the stated branch of %SBO. + populates the parent-child map +"; + + +%feature("docstring") SyntaxChecker " + @ingroup Core + Methods for checking syntax of SBML identifiers and other strings. + + @htmlinclude not-sbml-warning.html + + This utility class provides static methods for checking the syntax of + identifiers and other text used in an SBML model. The methods allow + callers to verify that strings such as SBML identifiers and XHTML notes + text conform to the SBML specifications. +"; + + +%feature("docstring") SyntaxChecker::isValidSBMLSId " + Returns true @c True or @c False depending on whether the argument + string conforms to the syntax of SBML identifiers. + + In SBML, identifiers that are the values of \'id\' attributes on objects + must conform to a data type called <code>SId</code> in the SBML + specifications. LibSBML does not provide an explicit <code>SId</code> + data type; it uses ordinary character strings, which is easier for + applications to support. LibSBML does, however, test for identifier + validity at various times, such as when reading in models from files + and data streams. + + This method provides programs with the ability to test explicitly that + the identifier strings they create conform to the SBML identifier + syntax. + + @param sid string to be checked for conformance to SBML identifier + syntax. + + @return @c True if the string conforms to type SBML data type + <code>SId</code>, @c False otherwise. + + @note @htmlinclude id-syntax.html + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SyntaxChecker), and the + other will be a standalone top-level function with the name + SyntaxChecker_isValidSBMLSId(). They are functionally + identical. @endif@~ + + @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~ + @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~ +"; + + +%feature("docstring") SyntaxChecker::isValidXMLID " + Returns @c True or @c False depending on whether the argument string + conforms to the XML data type <code>ID</code>. + + In SBML, identifiers that are the values of \'metaid\' attributes on + objects must conform to the <a target=\'_blank\' + href=\'http://www.w3.org/TR/REC-xml/#id\'>XML ID</a> data type. LibSBML + does not provide an explicit XML <code>ID</code> data type; it uses + ordinary character strings, which is easier for applications to + support. LibSBML does, however, test for identifier validity at + various times, such as when reading in models from files and data + streams. + + This method provides programs with the ability to test explicitly that + the identifier strings they create conform to the SBML identifier + syntax. + + @param id string to be checked for conformance to the syntax of + <a target=\'_blank\' href=\'http://www.w3.org/TR/REC-xml/#id\'>XML ID</a>. + + @return @c True if the string is a syntactically-valid value for the + XML type <a target=\'_blank\' + href=\'http://www.w3.org/TR/REC-xml/#id\'>ID</a>, @c False otherwise. + + @note @htmlinclude xmlid-syntax.html + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SyntaxChecker), and the + other will be a standalone top-level function with the name + SyntaxChecker_isValidXMLID(). They are functionally + identical. @endif@~ + + @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~ + @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~ +"; + + +%feature("docstring") SyntaxChecker::isValidXMLanyURI " + Returns @c True or @c False depending on whether the @param uri argument string + conforms to the XML data type <code>anyURI</code>. + + Type anyURI is defined by XML Schema 1.0. It is a character string + data type whose values are interpretable as URIs (Universal Resource + Identifiers) as described by the W3C document RFC 3986. LibSBML + does not provide an explicit XML <code>anyURI</code> data type; it uses + ordinary character strings, which is easier for applications to + support. LibSBML does, however, test for anyURI validity at + various times, such as when reading in models from files and data + streams. + + This method provides programs with the ability to test explicitly that + the strings they create conform to the XML anyURI syntax. + + @param uri string to be checked for conformance to the syntax of + <a target=\'_blank\' + href=\'http://www.w3.org/TR/xmlschema-2/#anyURI\'>anyURI</a>. + + @return @c True if the string is a syntactically-valid value for the + XML type <a target=\'_blank\' + href=\'http://www.w3.org/TR/xmlschema-2/#anyURI\'>anyURI</a>, + @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SyntaxChecker), and the + other will be a standalone top-level function with the name + SyntaxChecker_isValidXMLanyURI(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") SyntaxChecker::isValidUnitSId " + Returns @c True or @c False depending on whether the argument string + conforms to the syntax of SBML unit identifiers. + + In SBML, the identifiers of units (of both the predefined units and + user-defined units) must conform to a data type called + <code>UnitSId</code> in the SBML specifications. LibSBML does not + provide an explicit <code>UnitSId</code> data type; it uses ordinary + character strings, which is easier for applications to support. + LibSBML does, however, test for identifier validity at various times, + such as when reading in models from files and data streams. + + This method provides programs with the ability to test explicitly that + the identifier strings they create conform to the SBML identifier + syntax. + + @param units string to be checked for conformance to SBML unit + identifier syntax. + + @return @c True if the string conforms to type SBML data type + <code>UnitSId</code>, @c False otherwise. + + @note @htmlinclude unitid-syntax.html + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SyntaxChecker), and the + other will be a standalone top-level function with the name + SyntaxChecker_isValidUnitSId(). They are functionally + identical. @endif@~ + + @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~ + @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~ +"; + + +%feature("docstring") SyntaxChecker::hasExpectedXHTMLSyntax " + Returns @c True or @c False depending on whether the given XMLNode + object contains valid XHTML content. + + In SBML, the content of the \'notes\' subelement available on SBase, as + well as the \'message\' subelement available on Constraint, must conform + to <a target=\'_blank\' + href=\'http://www.w3.org/TR/xhtml1/\'>XHTML 1.0</a> (which is + simply an XML-ized version of HTML). However, the content cannot be + @em entirely free-form; it must satisfy certain requirements defined in + the <a target=\'_blank\' + href=\'http://sbml.org/Documents/Specifications\'>SBML + specifications</a> for specific SBML Levels. This method implements a + verification process that lets callers check whether the content of a + given XMLNode object conforms to the SBML requirements for \'notes\' and + \'message\' structure. + + An aspect of XHTML validity is that the content is declared to be in + the XML namespace for XHTML 1.0. There is more than one way in + which this can be done in XML. In particular, a model might not + contain the declaration within the \'notes\' or \'message\' subelement + itself, but might instead place the declaration on an enclosing + element and use an XML namespace prefix within the \'notes\' element to + refer to it. In other words, the following is valid: + @verbatim + <sbml xmlns=\'http://www.sbml.org/sbml/level2/version3\' level=\'2\' version=\'3\' + xmlns:xhtml=\'http://www.w3.org/1999/xhtml\'> + <model> + <notes> + <xhtml:body> + <xhtml:center><xhtml:h2>A Simple Mitotic Oscillator</xhtml:h2></xhtml:center> + <xhtml:p>A minimal cascade model for the mitotic oscillator.</xhtml:p> + </xhtml:body> + </notes> + ... rest of model ... + </sbml> + @endverbatim + Contrast the above with the following, self-contained version, which + places the XML namespace declaration within the <code><notes></code> + element itself: + @verbatim + <sbml xmlns=\'http://www.sbml.org/sbml/level2/version3\' level=\'2\' version=\'3\'> + <model> + <notes> + <html xmlns=\'http://www.w3.org/1999/xhtml\'> + <head> + <title/> + </head> + <body> + <center><h2>A Simple Mitotic Oscillator</h2></center> + <p>A minimal cascade model for the mitotic oscillator.</p> + </body> + </html> + </notes> + ... rest of model ... + </sbml> + @endverbatim + + Both of the above are valid XML. The purpose of the @p sbmlns + argument to this method is to allow callers to check the validity of + \'notes\' and \'message\' subelements whose XML namespace declarations + have been put elsewhere in the manner illustrated above. Callers can + can pass in the SBMLNamespaces object of a higher-level model + component if the XMLNode object does not itself have the XML namespace + declaration for XHTML 1.0. + + @param xhtml the XMLNode to be checked for conformance. + @param sbmlns the SBMLNamespaces associated with the object. + + @return @c True if the XMLNode content conforms, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SyntaxChecker), and the + other will be a standalone top-level function with the name + SyntaxChecker_hasExpectedXHTMLSyntax(). They are functionally + identical. @endif@~ + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SyntaxChecker::isValidInternalSId " + @internal + Returns true @c True or @c False depending on whether the argument + string conforms to the syntax of SBML identifiers or is empty. +"; + + +%feature("docstring") SyntaxChecker::isValidInternalUnitSId " + @internal + Returns true @c True or @c False depending on whether the argument + string conforms to the syntax of SBML identifiers or is empty. +"; + + +%feature("docstring") SyntaxChecker::isAllowedElement " + @internal + Returns true @c True or @c False depending on whether the argument + string conforms to the syntax of SBML identifiers or is empty. +"; + + +%feature("docstring") SyntaxChecker::hasDeclaredNS " + @internal + Returns true @c True or @c False depending on whether the argument + string conforms to the syntax of SBML identifiers or is empty. +"; + + +%feature("docstring") SyntaxChecker::isCorrectHTMLNode " + @internal + Returns true @c True or @c False depending on whether the argument + string conforms to the syntax of SBML identifiers or is empty. +"; + + +%feature("docstring") SyntaxChecker::isUnicodeLetter " + @internal + Checks if a character is part of the Unicode Letter set. + @return true if the character is a part of the set, false otherwise. +"; + + +%feature("docstring") SyntaxChecker::isUnicodeDigit " + @internal + Checks if a character is part of the Unicode Digit set. + @return true if the character is a part of the set, false otherwise. +"; + + +%feature("docstring") SyntaxChecker::isCombiningChar " + @internal + Checks if a character is part of the Unicode CombiningChar set. + @return true if the character is a part of the set, false otherwise. +"; + + +%feature("docstring") SyntaxChecker::isExtender " + @internal + Checks if a character is part of the Unicode Extender set. + @return true if the character is a part of the set, false otherwise. +"; + + +%feature("docstring") StoichiometryMath " + @ingroup Core + Implementation of SBML Level 2\'s %StoichiometryMath construct. + + @section l2-stoichiometries Stoichiometries in SBML Level 2 + + In SBML Level 2, product and reactant stoichiometries can be specified + using @em either the \'stoichiometry\' attribute or a \'stoichiometryMath\' + element in a SpeciesReference object. The \'stoichiometry\' attribute is + of type @c double and should contain values greater than zero (0). The + \'stoichiometryMath\' element is implemented as an element containing a + MathML expression. These two are mutually exclusive; only one of + \'stoichiometry\' or \'stoichiometryMath\' should be defined in a given + SpeciesReference instance. When neither the attribute nor the element + is present, the value of \'stoichiometry\' in the enclosing + SpeciesReference instance defaults to @c 1. + + For maximum interoperability, SpeciesReference\'s \'stoichiometry\' + attribute should be used in preference to \'stoichiometryMath\' when a + species\' stoichiometry is a simple scalar number (integer or decimal). + When the stoichiometry is a rational number, or when it is a more + complicated formula, \'stoichiometryMath\' must be used. The MathML + expression in \'stoichiometryMath\' may also refer to identifiers of + entities in a model (except reaction identifiers). However, the only + species identifiers that can be used in \'stoichiometryMath\' are those + referenced in the enclosing Reaction\'s list of reactants, products and + modifiers. + + The \'stoichiometry\' attribute and the \'stoichiometryMath\' element, when + either is used, is each interpreted as a factor applied to the reaction + rate to produce the rate of change of the species identified by the + \'species\' attribute in the enclosing SpeciesReference. This is the + normal interpretation of a stoichiometry, but in SBML, one additional + consideration has to be taken into account. The reaction rate, which is + the result of the KineticLaw\'s \'math\' element, is always in the model\'s + @em substance per @em time units. However, the rate of change of the + species will involve the species\' @em substance units (i.e., the units + identified by the Species object\'s \'substanceUnits\' attribute), and + these units may be different from the model\'s default @em substance + units. If the units @em are different, the stoichiometry must + incorporate a conversion factor for converting the model\'s @em substance + units to the species\' @em substance units. The conversion factor is + assumed to be included in the scalar value of the \'stoichiometry\' + attribute if \'stoichiometry\' is used. If instead \'stoichiometryMath\' is + used, then the product of the model\'s \'substance\' units times the + \'stoichiometryMath\' units must match the @em substance units of the + species. Note that in either case, if the species\' units and the + model\'s default @em substance units are the same, the stoichiometry ends + up being a dimensionless number and equivalent to the standard chemical + stoichiometry found in textbooks. Examples and more explanations of + this are given in the SBML specification. + + The following is a simple example of a species reference for species @c + \'X0\', with stoichiometry @c 2, in a list of reactants within a reaction + having the identifier @c \'J1\': + @verbatim + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\' stoichiometry=\'2\'> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + @endverbatim + + The following is a more complex example of a species reference for + species @c \'X0\', with a stoichiometry formula consisting of + a rational number: + @verbatim + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\'> + <stoichiometryMath> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <cn type=\'rational\'> 3 <sep/> 2 </cn> + </math> + </stoichiometryMath> + </speciesReference> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + @endverbatim + + Additional discussions of stoichiometries and implications for species + and reactions are included in the documentation of SpeciesReference + class. + + @section l3-stoichiometries Stoichiometries in SBML Level 3 + + The StoichiometryMath construct is not defined in SBML Level 3 + Version 1 Core. Instead, Level 3 defines the identifier of + SpeciesReference objects as a stand-in for the stoichiometry of the + reactant or product being referenced, and allows that identifier to be + used elsewhere in SBML models, including (for example) InitialAssignment + objects. This makes it possible to achieve the same effect as + StoichiometryMath, but with other SBML objects. For instance, to + produce a stoichiometry value that is a rational number, a model can use + InitialAssignment to assign the identifier of a SpeciesReference object + to a MathML expression evaluating to a rational number. This is + analogous to the same way that, in Level 2, the model would use + StoichiometryMath with a MathML expression evaluating to a rational + number. + + In SBML Level 2, the stoichiometry of a reactant or product is a + combination of both a <em>biochemical stoichiometry</em> (meaning, the + standard stoichiometry of a species in a reaction) and any necessary + unit conversion factors. The introduction of an explicit attribute on + the Species object for a conversion factor allows Level 3 to avoid + having to overload the meaning of stoichiometry. In Level 3, the + stoichiometry given by a SpeciesReference object in a reaction is a + \'proper\' biochemical stoichiometry, meaning a dimensionless number free + of unit conversions. + + @see SpeciesReference + @see Reaction +"; + + +%feature("docstring") StoichiometryMath::StoichiometryMath " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>StoichiometryMath(SBMLNamespaces sbmlns)</pre> + + Creates a new StoichiometryMath object using the given SBMLNamespaces object + @p sbmlns. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + A common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + @param sbmlns an SBMLNamespaces object. + + The StoichiometryMath construct exists only in SBML Level 2. It + is an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a StoichiometryMath object to an + SBMLDocument (e.g., using + SpeciesReference.createStoichiometryMath()), the SBML XML namespace + of the document @em overrides the value used when creating the + StoichiometryMath object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. Nevertheless, + the ability to supply the values at the time of creation of a + StoichiometryMath is an important aid to producing valid SBML. + Knowledge of the intented SBML Level and Version determine whether it + is valid to assign a particular value to an attribute, or whether it + is valid to add an object to an existing SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>StoichiometryMath(long level, long version)</pre> + + Creates a new StoichiometryMath object using the given SBML @p level + values. + + @param level a long integer, the SBML Level to assign to this StoichiometryMath + + @param version a long integer, the SBML Version to assign to this + StoichiometryMath + + The StoichiometryMath construct exists only in SBML Level 2. It + is an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the given @p level and @p version combination, or this kind + of SBML object, are either invalid or mismatched with respect to the + parent SBMLDocument object. + + @note Upon the addition of a StoichiometryMath object to an + SBMLDocument (e.g., using + SpeciesReference.createStoichiometryMath()), the SBML Level, SBML + Version and XML namespace of the document @em override the values used + when creating the StoichiometryMath object via this constructor. This + is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the time + of creation of a StoichiometryMath is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + + <hr> + Method variant with the following signature: + <pre class='signature'>StoichiometryMath(StoichiometryMath orig)</pre> + + Copy constructor; creates a copy of this StoichiometryMath. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") StoichiometryMath::accept " + Accepts the given SBMLVisitor for this instance of StoichiometryMath. + + @param v the SBMLVisitor instance to be used. + + @return the result of calling <code>v.visit()</code>. +"; + + +%feature("docstring") StoichiometryMath::clone " + Creates and returns a deep copy of this StoichiometryMath object. + + @return a (deep) copy of this StoichiometryMath. +"; + + +%feature("docstring") StoichiometryMath::getMath " + Retrieves the mathematical formula within this StoichiometryMath and + return it as an AST. + + @return the math of this StoichiometryMath. + + The StoichiometryMath construct exists only in SBML Level 2. It + is an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. +"; + + +%feature("docstring") StoichiometryMath::isSetMath " + Predicate to test whether the math for this StoichiometryMath object + is set. + + @return @c True if the formula (meaning the @c math subelement) of + this StoichiometryMath is set, @c False otherwise. + + The StoichiometryMath construct exists only in SBML Level 2. It + is an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. +"; + + +%feature("docstring") StoichiometryMath::setMath " + Sets the \'math\' expression of this StoichiometryMath instance to a + copy of the given ASTNode. + + @param math an ASTNode representing a formula tree. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + The StoichiometryMath construct exists only in SBML Level 2. It + is an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. +"; + + +%feature("docstring") StoichiometryMath::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition object that expresses the + units returned by the math expression in this StoichiometryMath + object. + + The units are calculated based on the mathematical expression in the + StoichiometryMath and the model quantities referenced by + <code><ci></code> elements used within that expression. The + StoichiometryMath.getDerivedUnitDefinition() method returns the + calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, + unit analysis is not possible and this method will return @c None. + + @warning Note that it is possible the \'math\' expression in the + StoichiometryMath instance contains literal numbers or parameters with + undeclared units. In those cases, it is not possible to calculate the + units of the overall expression without making assumptions. LibSBML + does not make assumptions about the units, and + StoichiometryMath.getDerivedUnitDefinition() only returns the units + as far as it is able to determine them. For example, in an expression + <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and + <em>Y</em> does not, it will return the units of <em>X</em>. When + using this method, <strong>it is critical that callers also invoke the + method</strong> StoichiometryMath.containsUndeclaredUnits() + <strong>to determine whether this situation holds</strong>. Callers + should take suitable action in those situations. + + @return a UnitDefinition that expresses the units of the math, + or @c None if one cannot be constructed. + + @see containsUndeclaredUnits() +"; + + +%feature("docstring") StoichiometryMath::containsUndeclaredUnits " + Predicate returning @c True if the math + expression of this StoichiometryMath object contains literal numbers + or parameters with undeclared units. + + The StoichiometryMath.getDerivedUnitDefinition() method returns what + libSBML computes the units of the Stoichiometry to be, to the extent + that libSBML can compute them. However, if the expression contains + literal numbers or parameters with undeclared units, libSBML may not + be able to compute the full units of the expression and will only + return what it can compute. Callers should always use + StoichiometryMath.containsUndeclaredUnits() when using + StoichiometryMath.getDerivedUnitDefinition() to decide whether the + returned units may be incomplete. + + @return @c True if the math expression of this StoichiometryMath + includes numbers/parameters with undeclared units, @c False otherwise. + + @note A return value of @c True indicates that the UnitDefinition + returned by StoichiometryMath.getDerivedUnitDefinition() may not + accurately represent the units of the expression. + + @see getDerivedUnitDefinition() +"; + + +%feature("docstring") StoichiometryMath::getTypeCode " + Returns the libSBML type code of this object instance. + + @if clike LibSBML attaches an identifying code to every kind of SBML + object. These are known as <em>SBML type codes</em>. The set of + possible type codes is defined in the enumeration #SBMLTypeCode_t. + The names of the type codes all begin with the characters @c + SBML_. @endif@if java LibSBML attaches an identifying code to every + kind of SBML object. These are known as <em>SBML type codes</em>. In + other languages, the set of type codes is stored in an enumeration; in + the Java language interface for libSBML, the type codes are defined as + static integer constants in the interface class {@link + libsbmlConstants}. The names of the type codes all begin with the + characters @c SBML_. @endif@if python LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the Python language interface for libSBML, the type + codes are defined as static integer constants in the interface class + @link libsbml@endlink. The names of the type codes all begin with the + characters @c SBML_. @endif@if csharp LibSBML attaches an identifying + code to every kind of SBML object. These are known as <em>SBML type + codes</em>. In the C# language interface for libSBML, the type codes + are defined as static integer constants in the interface class @link + libsbmlcs.libsbml@endlink. The names of the type codes all begin with + the characters @c SBML_. @endif@~ + + @return the SBML type code for this object, or @link libsbml.SBML_UNKNOWN SBML_UNKNOWN@endlink (default). + + @see getElementName() +"; + + +%feature("docstring") StoichiometryMath::getElementName " + Returns the XML element name of this object, which for StoichiometryMath, is + always @c \'stoichiometryMath\'. + + @return the name of this element, i.e., @c \'stoichiometryMath\'. +"; + + +%feature("docstring") StoichiometryMath::getElementPosition " + @internal + Returns the position of this element. + + @return the ordinal position of the element with respect to its + siblings or @c -1 (default) to indicate the position is not significant. +"; + + +%feature("docstring") StoichiometryMath::writeElements " + @internal + Subclasses should override this method to write out their contained + SBML objects as XML elements. Be sure to call your parents + implementation of this method as well. +"; + + +%feature("docstring") StoichiometryMath::hasRequiredElements " + Predicate returning @c True if + all the required elements for this StoichiometryMath object + have been set. + + @note The required elements for a StoichiometryMath object are: + @li \'math\' + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") StoichiometryMath::removeFromParentAndDelete " + Finds this StoichiometryMath\'s SpeciesReference parent and calls unsetStoichiometryMath() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") StoichiometryMath::renameSIdRefs " + Renames all the @c SIdRef attributes on this element, including any + found in MathML. + + @htmlinclude what-is-sidref.html + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of @p + oldid. If any matches are found, the matching identifiers are replaced + with @p newid. The method does @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") StoichiometryMath::renameUnitSIdRefs " + Renames all the @c UnitSIdRef attributes on this element. + + @htmlinclude what-is-unitsidref.html + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing the + unit identifiers to the value of @p oldid. If any matches are found, + the matching identifiers are replaced with @p newid. The method does + @em not descend into child elements. + + @param oldid the old identifier + @param newid the new identifier +"; + + +%feature("docstring") StoichiometryMath::replaceSIDWithFunction " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") StoichiometryMath::getInternalId " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") StoichiometryMath::setInternalId " + @internal + Replace all nodes with the name \'id\' from the child \'math\' object with the provided function. +"; + + +%feature("docstring") StoichiometryMath::readOtherXML " + @internal + Subclasses should override this method to read (and store) XHTML, + MathML, etc. directly from the XMLInputStream. + + @return true if the subclass read from the stream, false otherwise. +"; + + +%feature("docstring") StoichiometryMath::addExpectedAttributes " + @internal + Subclasses should override this method to get the list of + expected attributes. + This function is invoked from corresponding readAttributes() + function. +"; + + +%feature("docstring") StoichiometryMath::readAttributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") StoichiometryMath::readL2Attributes " + @internal + Subclasses should override this method to read values from the given + XMLAttributes set into their specific fields. Be sure to call your + parents implementation of this method as well. +"; + + +%feature("docstring") StoichiometryMath::writeAttributes " + @internal + Subclasses should override this method to write their XML attributes + to the XMLOutputStream. Be sure to call your parents implementation + of this method as well. +"; + + +%feature("docstring") SBMLNamespaces " + @ingroup Core + Class to store SBML level, version and namespace information. + + @htmlinclude not-sbml-warning.html + + There are differences in the definitions of components between different + SBML Levels, as well as Versions within Levels. For example, the + \'sboTerm\' attribute was not introduced until Level 2 + Version 2, and then only on certain component classes; the SBML + Level 2 Version 3 specification moved the \'sboTerm\' attribute + to the SBase class, thereby allowing nearly all components to have SBO + annotations. As a result of differences such as those, libSBML needs to + track the SBML Level and Version of every object created. + + The purpose of the SBMLNamespaces object class is to make it easier to + communicate SBML Level and Version data between libSBML constructors and + other methods. The SBMLNamespaces object class tracks 3-tuples + (triples) consisting of SBML Level, Version, and the corresponding SBML + XML namespace. + + The plural name (SBMLNamespaces) is not a mistake, because in SBML + Level 3, objects may have extensions added by Level 3 packages + used by a given model and therefore may have multiple namespaces + associated with them; however, until the introduction of SBML + Level 3, the SBMLNamespaces object only records one SBML + Level/Version/namespace combination at a time. Most constructors for + SBML objects in libSBML take a SBMLNamespaces object as an argument, + thereby allowing the constructor to produce the proper combination of + attributes and other internal data structures for the given SBML Level + and Version. +"; + + +%feature("docstring") SBMLNamespaces::SBMLNamespaces " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLNamespaces(SBMLNamespaces orig)</pre> + + Copy constructor; creates a copy of a SBMLNamespaces. + + @param orig the SBMLNamespaces instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLNamespaces(long level = SBML_DEFAULT_LEVEL, long version = SBML_DEFAULT_VERSION)</pre> + + Creates a new SBMLNamespaces object corresponding to the given SBML + @p level and @p version. + + SBMLNamespaces objects are used in libSBML to communicate SBML Level + and Version data between constructors and other methods. The + SBMLNamespaces object class tracks 3-tuples (triples) consisting of + SBML Level, Version, and the corresponding SBML XML namespace. Most + constructors for SBML objects in libSBML take a SBMLNamespaces object + as an argument, thereby allowing the constructor to produce the proper + combination of attributes and other internal data structures for the + given SBML Level and Version. + + The plural name (SBMLNamespaces) is not a mistake, because in SBML + Level 3, objects may have extensions added by Level 3 + packages used by a given model and therefore may have multiple + namespaces associated with them; however, until the introduction of + SBML Level 3, the SBMLNamespaces object only records one SBML + Level/Version/namespace combination at a time. Most constructors for + SBML objects in libSBML take a SBMLNamespaces object as an argument, + thereby allowing the constructor to produce the proper combination of + attributes and other internal data structures for the given SBML Level + and Version. + + @param level the SBML level + @param version the SBML version + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLNamespaces(long level, long version, string &pkgName, long pkgVersion, string pkgPrefix = \'\')</pre> + + (For Extension) + + Creates a new SBMLNamespaces object corresponding to the combination of + (1) the given SBML @p level and @p version, and (2) the given @p package + with the @p package @p version. + + @note SBMLExtensionException will be thrown if the extension module + that supports the combination of the given sbml level, sbml version, + package name, and package version has not been registered. + + @param level the SBML level + @param version the SBML version + @param pkgName the string of package name (e.g. \'layout\', \'multi\') + @param pkgVersion the package version + @param pkgPrefix the prefix of the package namespace (e.g. \'layout\', \'multi\') to be added. + The package\'s name will be used if the given string is empty (default). +"; + + +%feature("docstring") SBMLNamespaces::clone " + Creates and returns a deep copy of this SBMLNamespaces. + + @return a (deep) copy of this SBMLNamespaces. +"; + + +%feature("docstring") SBMLNamespaces::getSBMLNamespaceURI " + Returns a string representing the SBML XML namespace for the + given @p level and @p version of SBML. + + @param level the SBML level + @param version the SBML version + + @return a string representing the SBML namespace that reflects the + SBML Level and Version specified. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLNamespaces), and the + other will be a standalone top-level function with the name + SBMLNamespaces_getSBMLNamespaceURI(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") SBMLNamespaces::getSupportedNamespaces " + Returns a list of all supported SBMLNamespaces in this version of + libsbml. + + @return a list with supported SBML namespaces. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLNamespaces), and the + other will be a standalone top-level function with the name + SBMLNamespaces_getSupportedNamespaces(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") SBMLNamespaces::getURI " + Returns a string representing the SBML XML namespace of this + object. + + @return a string representing the SBML namespace that reflects the + SBML Level and Version of this object. +"; + + +%feature("docstring") SBMLNamespaces::getLevel " + Get the SBML Level of this SBMLNamespaces object. + + @return the SBML Level of this SBMLNamespaces object. +"; + + +%feature("docstring") SBMLNamespaces::getVersion " + Get the SBML Version of this SBMLNamespaces object. + + @return the SBML Version of this SBMLNamespaces object. +"; + + +%feature("docstring") SBMLNamespaces::getNamespaces " + Get the XML namespaces list for this SBMLNamespaces object. + + The plural is not a mistake, because in SBML Level 3, objects may + have extensions added by Level 3 packages used by a given model, + and therefore there may be multiple XML namespaces involved too. + However, until the introduction of SBML Level 3, the + SBMLNamespaces object only records one SBML Level/Version/namespace + combination at a time, and so this method will also only return + a list of one item. + + @return the XML namespaces of this SBMLNamespaces object. +"; + + +%feature("docstring") SBMLNamespaces::addNamespaces " + Add the given XML namespaces list to the set of namespaces within this + SBMLNamespaces object. + + The following code gives an example of how one could add the XHTML + namespace to the list of namespaces recorded by the top-level + <code><sbml></code> element of a model. It gives the new + namespace a prefix of <code>html</code>. @if clike + @verbatim + SBMLDocumentsd; + try + { + sd = new SBMLDocument(3, 1); + } + catch (SBMLConstructorException e) + { + // Here, have code to handle a truly exceptional situation. Candidate + // causes include invalid combinations of SBML Level and Version + // (impossible if hardwired as given here), running out of memory, and + // unknown system exceptions. + } + + SBMLNamespaces sn = sd->getNamespaces(); + if (sn != None) + { + sn->add(\'http://www.w3.org/1999/xhtml\', \'html\'); + } + else + { + // Handle another truly exceptional situation. + } + @endverbatim + @endif@if java + @verbatim + SBMLDocument sd; + try + { + sd = new SBMLDocument(3, 1); + } + catch (SBMLConstructorException e) + { + // Here, have code to handle a truly exceptional situation. Candidate + // causes include invalid combinations of SBML Level and Version + // (impossible if hardwired as given here), running out of memory, and + // unknown system exceptions. + } + + SBMLNamespaces sn = sd.getNamespaces(); + if (sn != null) + { + sn.add(\'http://www.w3.org/1999/xhtml\', \'html\'); + } + else + { + // Handle another truly exceptional situation. + } + @endverbatim + @endif@if python + @verbatim + sbmlDoc = None + try: + sbmlDoc = SBMLDocument(3, 1) + except ValueError: + # Do something to handle exceptional situation. Candidate + # causes include invalid combinations of SBML Level and Version + # (impossible if hardwired as given here), running out of memory, and + # unknown system exceptions. + + namespaces = sbmlDoc.getNamespaces() + if namespaces == None: + # Do something to handle case of no namespaces. + + status = namespaces.add(\'http://www.w3.org/1999/xhtml\', \'html\') + if status != LIBSBML_OPERATION_SUCCESS: + # Do something to handle failure. + @endverbatim + @endif@if csharp + @verbatim + SBMLDocument sd = null; + try + { + sd = new SBMLDocument(3, 1); + } + catch (SBMLConstructorException e) + { + // Here, have code to handle a truly exceptional situation. + // Candidate causes include invalid combinations of SBML + // Level and Version (impossible if hardwired as given here), + // running out of memory, and unknown system exceptions. + } + + XMLNamespaces sn = sd.getNamespaces(); + if (sn != null) + { + sn.add(\'http://www.w3.org/1999/xhtml\', \'html\'); + } + else + { + // Handle another truly exceptional situation. + } + @endverbatim + @endif@~ + + @param xmlns the XML namespaces to be added. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") SBMLNamespaces::addNamespace " + Add an XML namespace (a pair of URI and prefix) to the set of namespaces + within this SBMLNamespaces object. + + @param uri the XML namespace to be added. + @param prefix the prefix of the namespace to be added. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") SBMLNamespaces::removeNamespace " + Removes an XML namespace from the set of namespaces within this + SBMLNamespaces object. + + @param uri the XML namespace to be added. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") SBMLNamespaces::addPackageNamespace " + Add an XML namespace (a pair of URI and prefix) of a package extension + to the set of namespaces within this SBMLNamespaces object. + The SBML Level and SBML Version of this object is used. + + @note An XML namespace of a non-registered package extension can\'t be + added by this function (@link + libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + will be returned). + + @param pkgName the string of package name (e.g. \'layout\', \'multi\') + @param pkgVersion the package version + @param prefix the prefix of the package namespace to be added. + The package\'s name will be used if the given string is empty (default). + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @see addNamespace() +"; + + +%feature("docstring") SBMLNamespaces::addPackageNamespaces " + Add the XML namespaces of package extensions in the given + XMLNamespace object to the set of namespaces within this + SBMLNamespaces object (Non-package XML namespaces are not added + by this function). + + @note XML namespaces of a non-registered package extensions are not + added (just ignored) by this function. @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + will be returned if the given xmlns is null. + + @param xmlns the XML namespaces to be added. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SBMLNamespaces::removePackageNamespace " + Removes an XML namespace of a package extension from the set of namespaces + within this SBMLNamespaces object. + + @param level the SBML level + @param version the SBML version + @param pkgName the string of package name (e.g. \'layout\', \'multi\') + @param pkgVersion the package version + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") SBMLNamespaces::addPkgNamespace " + @internal + Add an XML namespace (a pair of URI and prefix) of a package extension + to the set of namespaces within this SBMLNamespaces object. + The SBML Level and SBML Version of this object is used. + + @note An XML namespace of a non-registered package extension can\'t be + added by this function (@link + libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + will be returned). + + @param pkgName the string of package name (e.g. \'layout\', \'multi\') + @param pkgVersion the package version + @param prefix the prefix of the package namespace to be added. + The package\'s name will be used if the given string is empty (default). + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @see addNamespace() +"; + + +%feature("docstring") SBMLNamespaces::addPkgNamespaces " + @internal + Add the XML namespaces of package extensions in the given + XMLNamespace object to the set of namespaces within this + SBMLNamespaces object (Non-package XML namespaces are not added + by this function). + + @note XML namespaces of a non-registered package extensions are not + added (just ignored) by this function. @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + will be returned if the given xmlns is null. + + @param xmlns the XML namespaces to be added. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SBMLNamespaces::removePkgNamespace " + @internal + Removes an XML namespace of a package extension from the set of namespaces + within this SBMLNamespaces object. + + @param level the SBML level + @param version the SBML version + @param pkgName the string of package name (e.g. \'layout\', \'multi\') + @param pkgVersion the package version + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") SBMLNamespaces::isSBMLNamespace " + Predicate returning @c True if the given + URL is one of SBML XML namespaces. + + @param uri the URI of namespace + + @return @c True if the \'uri\' is one of SBML namespaces, @c False otherwise. + + @if notclike @note Because this is a @em static method, the + non-C++ language interfaces for libSBML will contain two variants. One + will be a static method on the class (i.e., SBMLNamespaces), and the + other will be a standalone top-level function with the name + SBMLNamespaces_isSBMLNamespace(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") SBMLNamespaces::isValidCombination " + Predicate returning @c True if the given + set of namespaces represent a valid set + + @return @c True if the set of namespaces is valid, @c False otherwise. +"; + + +%feature("docstring") SBMLNamespaces::setLevel " + @internal + Predicate returning @c True if the given + set of namespaces represent a valid set + + @return @c True if the set of namespaces is valid, @c False otherwise. +"; + + +%feature("docstring") SBMLNamespaces::setVersion " + @internal + Predicate returning @c True if the given + set of namespaces represent a valid set + + @return @c True if the set of namespaces is valid, @c False otherwise. +"; + + +%feature("docstring") SBMLNamespaces::setNamespaces " + @internal + Predicate returning @c True if the given + set of namespaces represent a valid set + + @return @c True if the set of namespaces is valid, @c False otherwise. +"; + + +%feature("docstring") SBMLNamespaces::getPackageName " + Returns the name of the main package for this namespace. + + @return the name of the main package for this namespace. + \'core\' will be returned if this namespace is defined in the SBML + core. +"; + + +%feature("docstring") SBMLNamespaces::initSBMLNamespace " + @internal + Returns the name of the main package for this namespace. + + @return the name of the main package for this namespace. + \'core\' will be returned if this namespace is defined in the SBML + core. +"; + + +%feature("docstring") SBMLConstructorException " + @ingroup Core + Class of exceptions thrown by constructors of some libSBML objects. + + In some situations, constructors for SBML objects may need to indicate to + callers that the creation of the object failed. The failure may be for + different reasons, such as an attempt to use invalid parameters or a + system condition such as a memory error. To communicate this to callers, + those classes will throw an SBMLConstructorException. + + In languages that don\'t have an exception mechanism (e.g., C), the + constructors generally try to return an error code instead of throwing + an exception. +"; + + +%feature("docstring") SBMLConstructorException::getSBMLErrMsg " + Returns the message associated with this SBML exception. + + @return the message string. +"; + + +%feature("docstring") ConversionOption " + @ingroup Core + Class of object that encapsulates a conversion option. + + @htmlinclude libsbml-facility-only-warning.html + + LibSBML provides a number of converters that can perform transformations + on SBML documents. These converters allow their behaviors to be + controlled by setting property values. Converter properties are + communicated using objects of class ConversionProperties, and within + such objects, individual options are encapsulated using ConversionOption + objects. + + A ConversionOption object consists of four parts: + @li A @em key, acting as the name of the option; + @li A @em value of this option; + @li A @em type for the value; this is chosen from the enumeration type + <a class=\'el\' href=\'#ConversionOptionType_t\'>ConversionOptionType_t</a>; and + @li A @em description consisting of a text string that describes the + option in some way. + + There are no constraints on the values of keys or descriptions; + authors of SBML converters are free to choose them as they see fit. + + @section ConversionOptionType_t Conversion option data types + + An option in ConversionOption must have a data type declared, to + indicate whether it is a string value, an integer, and so forth. The + possible types of values are taken from the enumeration <a + class=\'el\' href=\'#ConversionOptionType_t\'>ConversionOptionType_t</a>. + The following are the possible values: + + <p> + <center> + <table width=\'90%\' cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'normal-font\'> + <tr style=\'background: lightgray\' class=\'normal-font\'> + <td><strong>Enumerator</strong></td> + <td><strong>Meaning</strong></td> + </tr> + <tr> + <td><code>@link libsbml.CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink</code></td> + <td>Indicates the value type is a Boolean.</td> + </tr> + <tr> + <td><code>@link libsbml.CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink</code></td> + <td>Indicates the value type is a double-sized float.</td> + </tr> + <tr> + <td><code>@link libsbml.CNV_TYPE_INT CNV_TYPE_INT@endlink</code></td> + <td>Indicates the value type is an integer.</td> + </tr> + <tr> + <td><code>@link libsbml.CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink</code></td> + <td>Indicates the value type is a float.</td> + </tr> + <tr> + <td><code>@link libsbml.CNV_TYPE_STRING CNV_TYPE_STRING@endlink</code></td> + <td>Indicates the value type is a string.</td> + </tr> + </table> + </center> + + @see ConversionProperties +"; + + +%feature("docstring") ConversionOption::ConversionOption " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(string key, double value, string description=\'\')</pre> + + Creates a new ConversionOption specialized for double-type options. + + @param key the key for this option + @param value the value for this option + @param description an optional description + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(string key, int value, string description=\'\')</pre> + + Creates a new ConversionOption specialized for integer-type options. + + @param key the key for this option + @param value the value for this option + @param description an optional description + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(string key, float value, string description=\'\')</pre> + + Creates a new ConversionOption specialized for float-type options. + + @param key the key for this option + @param value the value for this option + @param description an optional description + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(string key, string value, string description=\'\')</pre> + + Creates a new ConversionOption specialized for string-type options. + + @param key the key for this option + @param value the value for this option + @param description an optional description + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(string key, bool value, string description=\'\')</pre> + + Creates a new ConversionOption specialized for Boolean-type options. + + @param key the key for this option + @param value the value for this option + @param description an optional description + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(string key, string value=\'\', ConversionOptionType_t type=CNV_TYPE_STRING, string description=\'\')</pre> + + Creates a new ConversionOption. + + This is the general constructor, taking arguments for all aspects of + an option. Other constructors exist with different arguments. + + @param key the key for this option + @param value an optional value for this option + @param type the type of this option + @param description the description for this option + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionOption(ConversionOption orig)</pre> + + Copy constructor; creates a copy of an ConversionOption object. + + @param orig the ConversionOption object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") ConversionOption::clone " + Creates and returns a deep copy of this ConversionOption object. + + @return a (deep) copy of this ConversionOption object. +"; + + +%feature("docstring") ConversionOption::getKey " + Returns the key for this option. + + @return the key, as a string. +"; + + +%feature("docstring") ConversionOption::setKey " + Sets the key for this option. + + @param key a string representing the key to set. +"; + + +%feature("docstring") ConversionOption::getValue " + Returns the value of this option. + + @return the value of this option, as a string. +"; + + +%feature("docstring") ConversionOption::setValue " + Sets the value for this option. + + @param value the value to set, as a string. +"; + + +%feature("docstring") ConversionOption::getDescription " + Returns the description string for this option. + + @return the description of this option. +"; + + +%feature("docstring") ConversionOption::setDescription " + Sets the description text for this option. + + @param description the description to set for this option. +"; + + +%feature("docstring") ConversionOption::getType " + Returns the type of this option + + @return the type of this option. +"; + + +%feature("docstring") ConversionOption::setType " + Sets the type of this option. + + @param type the type value to use. +"; + + +%feature("docstring") ConversionOption::getBoolValue " + Returns the value of this option as a Boolean. + + @return the value of this option. +"; + + +%feature("docstring") ConversionOption::setBoolValue " + Set the value of this option to a given Boolean value. + + Invoking this method will also set the type of the option to + @link libsbml.CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink. + + @param value the Boolean value to set +"; + + +%feature("docstring") ConversionOption::getDoubleValue " + Returns the value of this option as a @c double. + + @return the value of this option. +"; + + +%feature("docstring") ConversionOption::setDoubleValue " + Set the value of this option to a given @c double value. + + Invoking this method will also set the type of the option to + @link libsbml.CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink. + + @param value the value to set +"; + + +%feature("docstring") ConversionOption::getFloatValue " + Returns the value of this option as a @c float. + + @return the value of this option as a float +"; + + +%feature("docstring") ConversionOption::setFloatValue " + Set the value of this option to a given @c float value. + + Invoking this method will also set the type of the option to + @link libsbml.CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink. + + @param value the value to set +"; + + +%feature("docstring") ConversionOption::getIntValue " + Returns the value of this option as an @c integer. + + @return the value of this option, as an int +"; + + +%feature("docstring") ConversionOption::setIntValue " + Set the value of this option to a given @c int value. + + Invoking this method will also set the type of the option to + @link libsbml.CNV_TYPE_INT CNV_TYPE_INT@endlink. + + @param value the value to set +"; + + +%feature("docstring") ConversionProperties " + @ingroup Core + Class of object that encapsulates the properties of an SBML converter. + + @htmlinclude libsbml-facility-only-warning.html + + The properties of SBML converters are communicated using objects of + class ConversionProperties, and within such objects, individual options + are encapsulated using ConversionOption objects. The ConversionProperties + class provides numerous methods for setting and getting options. + + ConversionProperties objects are also used to determine the target SBML + namespace when an SBML converter\'s behavior depends on the intended + Level+Version combination of SBML. In addition, it is conceivable that + conversions may be affected by SBML Level 3 packages being used + by an SBML document. These, too, are communicated by the values of + the SBML namespaces set on a ConversionProperties object. + + @see ConversionOption + @see SBMLNamespaces +"; + + +%feature("docstring") ConversionProperties::ConversionProperties " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionProperties(ConversionProperties orig)</pre> + + Copy constructor. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ConversionProperties(SBMLNamespaces targetNS=None)</pre> + + Constructor that initializes the conversion properties + with a specific SBML target namespace. + + @param targetNS the target namespace to convert to +"; + + +%feature("docstring") ConversionProperties::clone " + Creates and returns a deep copy of this ConversionProperties object. + + @return a (deep) copy of this ConversionProperties object. +"; + + +%feature("docstring") ConversionProperties::getTargetNamespaces " + Returns the current target SBML namespace. + + @return the SBMLNamepaces object expressing the target namespace. +"; + + +%feature("docstring") ConversionProperties::hasTargetNamespaces " + Returns @c True if the target SBML namespace has been set. + + @return @c True if the target namespace has been set, @c False + otherwise. +"; + + +%feature("docstring") ConversionProperties::setTargetNamespaces " + Sets the target namespace. + + @param targetNS the target namespace to use. +"; + + +%feature("docstring") ConversionProperties::getDescription " + Returns the description string for a given option in this properties + object. + + @param key the key for the option. + + @return the description text of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::getType " + Returns the type of a given option in this properties object. + + @param key the key for the option. + + @return the type of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::getOption " + Returns the ConversionOption object for a given key. + + @param key the key for the option. + + @return the option with the given key. +"; + + +%feature("docstring") ConversionProperties::addOption " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(ConversionOption option)</pre> + + Adds a copy of the given option to this properties object. + + @param option the option to add + + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(string key, double value, string description=\'\')</pre> + + Adds a new ConversionOption object with the given parameters. + + @param key the key for the new option + @param value the double value of that option + @param description (optional) the description for the option + + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(string key, int value, string description=\'\')</pre> + + Adds a new ConversionOption object with the given parameters. + + @param key the key for the new option + @param value the integer value of that option + @param description (optional) the description for the option + + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(string key, float value, string description=\'\')</pre> + + Adds a new ConversionOption object with the given parameters. + + @param key the key for the new option + @param value the float value of that option + @param description (optional) the description for the option + + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(string key, string value, string description=\'\')</pre> + + Adds a new ConversionOption object with the given parameters. + + @param key the key for the new option + @param value the string value of that option + @param description (optional) the description for the option + + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(string key, bool value, string description=\'\')</pre> + + Adds a new ConversionOption object with the given parameters. + + @param key the key for the new option + @param value the boolean value of that option + @param description (optional) the description for the option + + + <hr> + Method variant with the following signature: + <pre class='signature'>addOption(string key, string value=\'\', ConversionOptionType_t type=CNV_TYPE_STRING, string description=\'\')</pre> + + Adds a new ConversionOption object with the given parameters. + + @param key the key for the new option + @param value (optional) the value of that option + @param type (optional) the type of the option + @param description (optional) the description for the option +"; + + +%feature("docstring") ConversionProperties::removeOption " + Removes the option with the given key from this properties object. + + @param key the key for the new option to remove + @return the removed option +"; + + +%feature("docstring") ConversionProperties::hasOption " + Returns @c True if this properties object contains an option with + the given key. + + @param key the key of the option to find. + + @return @c True if an option with the given @p key exists in + this properties object, @c False otherwise. +"; + + +%feature("docstring") ConversionProperties::getValue " + Returns the value of the given option as a string. + + @param key the key for the option. + + @return the string value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setValue " + Sets the value of the given option to a string. + + @param key the key for the option + @param value the new value +"; + + +%feature("docstring") ConversionProperties::getBoolValue " + Returns the value of the given option as a Boolean. + + @param key the key for the option. + + @return the boolean value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setBoolValue " + Sets the value of the given option to a Boolean. + + @param key the key for the option. + + @param value the new Boolean value. +"; + + +%feature("docstring") ConversionProperties::getDoubleValue " + Returns the value of the given option as a @c double. + + @param key the key for the option. + + @return the double value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setDoubleValue " + Sets the value of the given option to a @c double. + + @param key the key for the option. + + @param value the new double value. +"; + + +%feature("docstring") ConversionProperties::getFloatValue " + Returns the value of the given option as a @c float. + + @param key the key for the option. + + @return the float value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setFloatValue " + Sets the value of the given option to a @c float. + + @param key the key for the option. + + @param value the new float value. +"; + + +%feature("docstring") ConversionProperties::getIntValue " + Returns the value of the given option as an integer. + + @param key the key for the option. + + @return the int value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setIntValue " + Sets the value of the given option to an integer. + + @param key the key for the option. + + @param value the new integer value. +"; + + +%feature("docstring") SBMLConverter " + @ingroup Core + Base class for SBML converters. + + @htmlinclude libsbml-facility-only-warning.html + + The SBMLConverter class is the base class for the various SBML @em + converters: classes of objects that transform or convert SBML documents. + These transformations can involve essentially anything that can be + written algorithmically; examples include converting the units of + measurement in a model, or converting from one Level+Version combination + of SBML to another. + + LibSBML provides a number of built-in converters, and applications can + create their own by subclassing SBMLConverter and following the examples + of the existing converters. The following are the built-in converters + in libSBML @htmlinclude libsbml-version.html: + @li SBMLFunctionDefinitionConverter + @li SBMLInitialAssignmentConverter + @li SBMLLevelVersionConverter + @li SBMLRuleConverter + @li SBMLStripPackageConverter + @li SBMLUnitsConverter + + Many converters provide the ability to configure their behavior to some + extent. This is realized through the use of @em properties that offer + different @em options. Two related classes implement these features: + ConversionProperties and ConversionOptions. The default property values + for each converter can be interrogated using the method + SBMLConverter.getDefaultProperties() on the converter class. +"; + + +%feature("docstring") SBMLConverter::SBMLConverter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLConverter()</pre> + + Creates a new SBMLConverter object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLConverter(SBMLConverter c)</pre> + + Copy constructor; creates a copy of an SBMLConverter object. + + @param c the SBMLConverter object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") SBMLConverter::clone " + Creates and returns a deep copy of this SBMLConverter object. + + @return a (deep) copy of this SBMLConverter object. +"; + + +%feature("docstring") SBMLConverter::getDocument " + Returns the SBML document that is the subject of the conversions. + + @return the current SBMLDocument object. +"; + + +%feature("docstring") SBMLConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. The run-time properties of the converter object can + be adjusted by using the method + SBMLConverter.setProperties(). + + @return the default properties for the converter. + + @see setProperties() + @see matchesProperties() +"; + + +%feature("docstring") SBMLConverter::getTargetNamespaces " + Returns the target SBML namespaces of the currently set properties. + + SBML namespaces are used by libSBML to express the Level+Version of + the SBML document (and, possibly, any SBML Level 3 packages in + use). Some converters\' behavior is affected by the SBML namespace + configured in the converter. For example, the actions of + SBMLLevelVersionConverter, the converter for converting SBML documents + from one Level+Version combination to another, are fundamentally + dependent on the SBML namespaces being targeted. + + @return the SBMLNamespaces object that describes the SBML namespaces + in effect. +"; + + +%feature("docstring") SBMLConverter::matchesProperties " + Predicate returning @c True if this converter\'s properties matches a + given set of configuration properties. + + @param props the configuration properties to match. + + @return @c True if this converter\'s properties match, @c False + otherwise. +"; + + +%feature("docstring") SBMLConverter::setDocument " + Sets the current SBML document to the given SBMLDocument object. + + @param doc the document to use for this conversion. + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The set of possible values that may + be returned ultimately depends on the specific subclass of + SBMLConverter being used, but the default method can return the + following values: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") SBMLConverter::setProperties " + Sets the configuration properties to be used by this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method sets + the current properties for this converter. + + @param props the ConversionProperties object defining the properties + to set. + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The set of possible values that may + be returned ultimately depends on the specific subclass of + SBMLConverter being used, but the default method can return the + following values: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see getProperties() + @see matchesProperties() +"; + + +%feature("docstring") SBMLConverter::getProperties " + Returns the current properties in effect for this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the current properties for this converter; in other words, the + settings in effect at this moment. To change the property values, you + can use SBMLConverter.setProperties(). + + @return the currently set configuration properties. + + @see setProperties() + @see matchesProperties() +"; + + +%feature("docstring") SBMLConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and + with the configuration options set by + SBMLConverter.setProperties(). + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The set of possible values that may + be returned depends on the converter subclass; please consult + the documentation for the relevant class to find out what the + possibilities are. +"; + + +%feature("docstring") SBMLConverterRegistry " + @ingroup Core + Registry of all SBML converters. + + @htmlinclude libsbml-facility-only-warning.html + + LibSBML provides facilities for transforming and converting SBML + documents in various ways. These transformations can involve + essentially anything that can be written algorithmically; examples + include converting the units of measurement in a model, or converting + from one Level+Version combination of SBML to another. Converters are + implemented as objects derived from the class SBMLConverter. + + The converter registry, implemented as a singleton object of class + SBMLConverterRegistry, maintains a list of known converters and provides + methods for discovering them. Callers can use the method + SBMLConverterRegistry.getNumConverters() to find out how many + converters are registered, then use + SBMLConverterRegistry.getConverterByIndex() to + iterate over each one; alternatively, callers can use + SBMLConverterRegistry.getConverterFor() + to search for a converter having specific properties. +"; + + +%feature("docstring") SBMLConverterRegistry::getInstance " + Returns the singleton instance for the converter registry. + + Prior to using the registry, callers have to obtain a copy of the + registry. This static method provides the means for doing that. + + @return the singleton for the converter registry. +"; + + +%feature("docstring") SBMLConverterRegistry::addConverter " + Adds the given converter to the registry of SBML converters. + + @param converter the converter to add to the registry. + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") SBMLConverterRegistry::getConverterByIndex " + Returns the converter with the given index number. + + Converters are given arbitrary index numbers by the registry. Callers + can use the method SBMLConverterRegistry.getNumConverters() to find + out how many converters are registered, then use this method to + iterate over the list and obtain each one in turn. + + @param index the zero-based index of the converter to fetch. + + @return the converter with the given index number, or @c None if the + number is less than @c 0 or there is no converter at the given index + position. +"; + + +%feature("docstring") SBMLConverterRegistry::getConverterFor " + Returns the converter that best matches the given configuration + properties. + + Many converters provide the ability to configure their behavior. This + is realized through the use of @em properties that offer different @em + options. The present method allows callers to search for converters + that have specific property values. Callers can do this by creating a + ConversionProperties object, adding the desired option(s) to the + object, then passing the object to this method. + + @param props a ConversionProperties object defining the properties + to match against. + + @return the converter matching the properties, or @c None if no + suitable converter is found. + + @see getConverterByIndex() +"; + + +%feature("docstring") SBMLConverterRegistry::getNumConverters " + Returns the number of converters known by the registry. + + @return the number of registered converters. + + @see getConverterByIndex() +"; + + +%feature("docstring") SBMLConverterRegistry::SBMLConverterRegistry " + @internal + protected constructor, use the getInstance() method to access the registry. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter " + @ingroup Core + SBML converter for replacing function definitions. + + @htmlinclude libsbml-facility-only-warning.html + + This is an SBML converter for manipulating user-defined functions in an + SBML file. When invoked on the current model, it performs the following + operation: + <ol> + <li>Read the list of user-defined functions in the model (i.e., the + list of FunctionDefinition objects); + <li>Look for invocations of the function in mathematical expressions + throughout the model; and + <li>For each invocation found, replaces the invocation with a + in-line copy of the function\'s body, similar to how macro expansions + might be performed in scripting and programming languages. + </ol> + + For example, suppose the model contains a function definition + representing the function <i>f(x, y) = x * y</i>. Further + suppose this functions invoked somewhere else in the model, in + a mathematical formula, as <i>f(s, p)</i>. The outcome of running + SBMLFunctionDefinitionConverter on the model will be to replace + the call to <i>f</i> with the expression <i>s * p</i>. + + @see SBMLInitialAssignmentConverter + @see SBMLLevelVersionConverter + @see SBMLRuleConverter + @see SBMLStripPackageConverter + @see SBMLUnitsConverter +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::SBMLFunctionDefinitionConverter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLFunctionDefinitionConverter()</pre> + + Creates a new SBMLFunctionDefinitionConverter object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLFunctionDefinitionConverter(SBMLFunctionDefinitionConverter obj)</pre> + + Copy constructor; creates a copy of an SBMLFunctionDefinitionConverter + object. + + @param obj the SBMLFunctionDefinitionConverter object to copy. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::clone " + Creates and returns a deep copy of this SBMLFunctionDefinitionConverter + object. + + @return a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::matchesProperties " + Returns @c True if this converter object\'s properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLFunctionDefinitionConverter object to find out if the object\'s + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() + to search across all registered converters for one matching particular + properties. + + @param props the properties to match. + + @return @c True if this converter\'s properties match, @c False + otherwise. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::convert " + Replaces invocations of each user-defined function with an in-line + copy, similar to macro expansion. + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT @endlink +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + @return the ConversionProperties object describing the default properties + for this converter. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::expandFD_errors " + @internal + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + @return the ConversionProperties object describing the default properties + for this converter. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter " + @ingroup Core + SBML converter for replacing initial assignments. + + @htmlinclude libsbml-facility-only-warning.html + + This is an SBML converter for replacing InitialAssignment objects + (when possible) by setting the initial value attributes on the model + objects being assigned. In other words, for every object that is + the target of an initial assignment in the model, it evaluates the + mathematical expression of the assignment to get a numerical value, + and then sets the corresponding attribute of the object to the + value. The effects for different kinds of SBML components are + as follows: + + <center> + <table border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> + <tr style=\'background: lightgray; font-size: 14px;\'> + <th align=\'left\' width=\'200\'>Component</th> + <th align=\'left\'>Effect</th> + </tr> + <tr> + <td>Compartment</td> + <td>Sets the value of the <code>size</code> attribute.</td> + </tr> + <tr> + <td>Species</td> + <td>Sets the value of either the <code>initialAmount</code> + or the <code>initialConcentration</code> attributes, depending + on the value of the Species object\'s + <code>hasOnlySubstanceUnits</code> attribute.</td> + </tr> + <tr> + <td>Parameter</td> + <td>Sets the value of the <code>value</code> attribute.</td> + </tr> + <tr> + <td>SpeciesReference</td> + <td>Sets the value of the <code>stoichiometry</code> attribute + in the Reaction object where the SpeciesReference object appears.</td> + </tr> + </table> + </center> + + @see SBMLFunctionDefinitionConverter + @see SBMLLevelVersionConverter + @see SBMLRuleConverter + @see SBMLStripPackageConverter + @see SBMLUnitsConverter +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::SBMLInitialAssignmentConverter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLInitialAssignmentConverter(SBMLInitialAssignmentConverter obj)</pre> + + Copy constructor; creates a copy of an SBMLInitialAssignmentConverter + object. + + @param obj the SBMLInitialAssignmentConverter object to copy. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLInitialAssignmentConverter()</pre> + + Creates a new SBMLInitialAssignmentConverter object. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::clone " + Creates and returns a deep copy of this SBMLInitialAssignmentConverter + object. + + @return a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::matchesProperties " + Returns @c True if this converter object\'s properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLInitialAssignmentConverter object to find out if the object\'s + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() + to search across all registered converters for one matching particular + properties. + + @param props the properties to match. + + @return @c True if this converter\'s properties match, @c False + otherwise. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and + with the configuration options set by + SBMLConverter.setProperties(). + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + @return the ConversionProperties object describing the default properties + for this converter. +"; + + +%feature("docstring") SBMLLevelVersionConverter " + @ingroup Core + SBML converter for transforming documents from one Level+Version to another. + + @htmlinclude libsbml-facility-only-warning.html + + This SBML converter takes an SBML document of one SBML Level+Version + combination and attempts to convert it to another Level+Version combination. + The target Level+Version is set using an SBMLNamespace object in the + ConversionProperties object that controls this converter. + + This class is the basis for + SBMLDocument.setLevelAndVersion(). + + @see SBMLFunctionDefinitionConverter + @see SBMLInitialAssignmentConverter + @see SBMLRuleConverter + @see SBMLStripPackageConverter + @see SBMLUnitsConverter +"; + + +%feature("docstring") SBMLLevelVersionConverter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLLevelVersionConverter()</pre> + + Creates a new SBMLLevelVersionConverter object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLLevelVersionConverter(SBMLLevelVersionConverter obj)</pre> + + Copy constructor; creates a copy of an SBMLLevelVersionConverter + object. + + @param obj the SBMLLevelVersionConverter object to copy. +"; + + +%feature("docstring") clone " + Creates and returns a deep copy of this SBMLLevelVersionConverter + object. + + @return a (deep) copy of this converter. +"; + + +%feature("docstring") matchesProperties " + Returns @c True if this converter object\'s properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLLevelVersionConverter object to find out if the object\'s + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() + to search across all registered converters for one matching particular + properties. + + @param props the properties to match. + + @return @c True if this converter\'s properties match, @c False + otherwise. +"; + + +%feature("docstring") convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and + with the configuration options set by + SBMLConverter.setProperties(). + SBMLConverter.setProperties(). + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + @return the ConversionProperties object describing the default properties + for this converter. +"; + + +%feature("docstring") getTargetLevel " + Returns the target SBML Level for the conversion. + + @return an integer indicating the SBML Level. +"; + + +%feature("docstring") getTargetVersion " + Returns the target SBML Version for the conversion. + + @return an integer indicating the Version within the SBML Level. +"; + + +%feature("docstring") getValidityFlag " + Returns the flag indicating whether the conversion has been set to \'strict\'. + + @return @c True if strict validity has been requested, @c False + otherwise. +"; + + +%feature("docstring") SBMLRuleConverter " + @ingroup Core + SBML converter for reordering rules and assignments in a model. + + @htmlinclude libsbml-facility-only-warning.html + + This converter reorders assignments in a model. Specifically, it sorts + the list of assignment rules (i.e., the AssignmentRule objects contained + in the ListOfAssignmentRules within the Model object) and the initial + assignments (i.e., the InitialAssignment objects contained in the + ListOfInitialAssignments) such that, within each set, assignments that + depend on prior values are placed after the values are set. For + example, if there is an assignment rule stating <i>a = b + 1</i>, and + another rule stating <i>b = 3</i>, the list of rules is sorted and the + rules are arranged so that the rule for <i>b = 3</i> appears @em before + the rule for <i>a = b + 1</i>. Similarly, if dependencies of this + sort exist in the list of initial assignments in the model, the initial + assignments are sorted as well. + + Beginning with SBML Level 2, assignment rules have no ordering + required—the order in which the rules appear in an SBML file has + no significance. Software tools, however, may need to reorder + assignments for purposes of evaluating them. For example, for + simulators that use time integration methods, it would be a good idea to + reorder assignment rules such as the following, + + <i>b = a + 10 seconds</i><br> + <i>a = time</i> + + so that the evaluation of the rules is independent of integrator + step sizes. (This is due to the fact that, in this case, the order in + which the rules are evaluated changes the result.) This converter + can be used to reorder the SBML objects regardless of whether the + input file contained them in the desired order. Here is a code + fragment to illustrate how to do that: + @verbatim + ConversionProperties props; + props.addOption(\'sortRules\', true, \'sort rules\'); + + SBMLConverter converter; + converter.setProperties(&props); + converter.setDocument(&doc); + converter.convert(); + @endverbatim + + @note The two sets of assignments (list of assignment rules on the one + hand, and list of initial assignments on the other hand) are handled @em + independently. In an SBML model, these entities are treated differently + and no amount of sorting can deal with inter-dependencies between + assignments of the two kinds. + + @see SBMLFunctionDefinitionConverter + @see SBMLInitialAssignmentConverter + @see SBMLLevelVersionConverter + @see SBMLStripPackageConverter + @see SBMLUnitsConverter +"; + + +%feature("docstring") SBMLRuleConverter::SBMLRuleConverter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLRuleConverter(SBMLRuleConverter obj)</pre> + + Copy constructor; creates a copy of an SBMLLevelVersionConverter + object. + + @param obj the SBMLLevelVersionConverter object to copy. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLRuleConverter()</pre> + + Creates a new SBMLLevelVersionConverter object. +"; + + +%feature("docstring") SBMLRuleConverter::clone " + Creates and returns a deep copy of this SBMLLevelVersionConverter + object. + + @return a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLRuleConverter::matchesProperties " + Returns @c True if this converter object\'s properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLLevelVersionConverter object to find out if the object\'s + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() + to search across all registered converters for one matching particular + properties. + + @param props the properties to match. + + @return @c True if this converter\'s properties match, @c False + otherwise. +"; + + +%feature("docstring") SBMLRuleConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and + with the configuration options set by + SBMLConverter.setProperties(). + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT @endlink +"; + + +%feature("docstring") SBMLRuleConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + @return the ConversionProperties object describing the default properties + for this converter. +"; + + +%feature("docstring") SBMLStripPackageConverter " + @ingroup Core + SBML converter for removing packages. + + @htmlinclude libsbml-facility-only-warning.html + + This SBML converter takes an SBML document and removes (strips) a package + from it. No conversion is performed; the package constructs are simply + removed from the SBML document. The package to be stripped is determined + by the value of the option \'package\' on the conversion properties. + + @see SBMLFunctionDefinitionConverter + @see SBMLLevelVersionConverter + @see SBMLRuleConverter + @see SBMLLevelVersionConverter + @see SBMLUnitsConverter +"; + + +%feature("docstring") SBMLStripPackageConverter::SBMLStripPackageConverter " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLStripPackageConverter()</pre> + + Creates a new SBMLStripPackageConverter object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLStripPackageConverter(SBMLStripPackageConverter obj)</pre> + + Copy constructor; creates a copy of an SBMLStripPackageConverter + object. + + @param obj the SBMLStripPackageConverter object to copy. +"; + + +%feature("docstring") SBMLStripPackageConverter::clone " + Creates and returns a deep copy of this SBMLStripPackageConverter + object. + + @return a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLStripPackageConverter::matchesProperties " + Returns @c True if this converter object\'s properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLStripPackageConverter object to find out if the object\'s + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() + to search across all registered converters for one matching particular + properties. + + @param props the properties to match. + + @return @c True if this converter\'s properties match, @c False + otherwise. +"; + + +%feature("docstring") SBMLStripPackageConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and + with the configuration options set by + SBMLConverter.setProperties(). + + @return integer value indicating the success/failure of the operation. + @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SBMLStripPackageConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the @em default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + @return the ConversionProperties object describing the default properties + for this converter. +"; + + +%feature("docstring") SBMLUnitsConverter " + @ingroup Core + SBML converter to convert a model\'s units to SI units. + + @htmlinclude libsbml-facility-only-warning.html + + This SBML converter converts the units in a model to base SI units, + namely metre, kilogram, second, Ampere, Kelvin, mole and candela. + + Unit conversion will only be performed on models that are fully unit + consistent; that is, all objects have associated units, and there are no + literal numbers with no units specified. In the case of an SBML + Level 3 model involving math expressions, this means that the @c + timeUnits attribute on the Model object must be set, and if there are + any reactions in the model, the @c extentUnits attribute on the Model + object must also be set. + + This converter has the additional Boolean property \'removeUnusedUnits\' + that can be used to tell the converter whether to remove any + UnitDefinition objects that are not referred to, after conversion is + complete. You can set this value by adding the property using + @verbatim + prop.addOption(\'removeUnusedUnits\', false); + @endverbatim + The converter\'s default behavior is to remove the unused + UnitDefinition objects in the model. + + @see SBMLFunctionDefinitionConverter + @see SBMLLevelVersionConverter + @see SBMLRuleConverter + @see SBMLStripPackageConverter + @see SBMLUnitsConverter +"; + + +%feature("docstring") SBMLValidator " + @ingroup Core + Base class for SBML validators + + @htmlinclude not-sbml-warning.html + + LibSBML implements facilities for verifying that a given SBML document + is valid according to the SBML specifications; it also exposes the + validation interface so that user programs and SBML Level 3 package + authors may use the facilities to implement new validators. There are + two main interfaces to libSBML\'s validation facilities, based on the + classes Validator and SBMLValidator. + + The Validator class is the basis of the system for validating an SBML + document against the validation rules defined in the SBML + specifications. The scheme used by Validator relies is compact and uses + the @em visitor programming pattern, but it relies on C/C++ features and + is not directly accessible from language bindings. SBMLValidator offers + a framework for straightforward class-based extensibility, so that user + code can subclass SBMLValidator to implement new validation systems, + different validators can be introduced or turned off at run-time, and + interfaces can be provided in the libSBML language bindings. + SBMLValidator can call Validator functionality internally (as is the + case in the current implementation of SBMLInternalValidator) or use + entirely different implementation approaches, as necessary. + + Users of libSBML may already be familiar with the facilities encompassed + by the validation system, in the form of the consistency-checking methods + defined on SBMLDocument. The methods SBMLDocument.setConsistencyChecks(), + SBMLDocument.checkConsistency(), SBMLDocument.checkInternalConsistency() + and other method of that sort are in fact implemented via SBMLValidator, + specifically as methods on the class SBMLInternalValidator. + + Authors may use SBMLValidator as the base class for their own validator + extensions to libSBML. The class SBMLInternalValidator may serve as a + code example for how to implement such things. +"; + + +%feature("docstring") SBMLValidator::SBMLValidator " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLValidator()</pre> + + Creates a new SBMLValidator. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLValidator(const SBMLValidator& orig)</pre> + + Copy constructor; creates a copy of an SBMLValidator object. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") SBMLValidator::clone " + Creates and returns a deep copy of this SBMLValidator. + + @return a (deep) copy of this SBMLValidator. +"; + + +%feature("docstring") SBMLValidator::getDocument " + Returns the current SBML document in use by this validator. + + @return the current SBML document + + @see setDocument() +"; + + +%feature("docstring") SBMLValidator::setDocument " + Sets the current SBML document to the given SBMLDocument object. + + @param doc the document to use for this validation + + @return an integer value indicating the success/failure of the + validation. @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values returned by this + function are + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see getDocument() +"; + + +%feature("docstring") SBMLValidator::validate " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>validate(string filename)</pre> + + Validates the SBML document located at the given @p filename. + + This is a convenience method that saves callers the trouble of + using SBMLReader to read the document first. + + @param filename the path to the file to be read and validated. + + @return the number of validation failures that occurred. The objects + describing the actual failures can be retrieved using getFailures(). + + + <hr> + Method variant with the following signature: + <pre class='signature'>validate()</pre> + + Runs this validator on the current SBML document. + + @return an integer value indicating the success/failure of the + validation. @if clike The value is drawn from the enumeration + #OperationReturnValues_t. @endif@~ The possible values returned by this + function are determined by the specific subclasses of this class. + + + <hr> + Method variant with the following signature: + <pre class='signature'>validate(SBMLDocument d)</pre> + + Validates the given SBMLDocument object. + + This is identical to calling setDocument(@if java SBMLDocument d @endif) + followed by validate(). + + @param d the SBML document to validate + + @return the number of validation failures that occurred. The objects + describing the actual failures can be retrieved using getFailures(). +"; + + +%feature("docstring") SBMLValidator::clearFailures " + Clears this validator\'s list of failures. + + If you are validating multiple SBML documents with the same validator, + call this method after you have processed the list of failures from + the last validation run and before validating the next document. + + @if clike @see getFailures() @endif@~ +"; + + +%feature("docstring") SBMLValidator::getFailures " + Returns a list of SBMLError objects (if any) that were logged by the + last run of this validator. + + @return a list of errors, warnings and other diagnostics logged during + validation. + + @see clearFailures() +"; + + +%feature("docstring") SBMLValidator::logFailure " + Adds the given failure to this list of Validators failures. + + @param err an SBMLError object representing an error or warning + + @if clike @see getFailures() @endif@~ +"; + + +%feature("docstring") SBMLValidator::getErrorLog " + Returns the list of errors or warnings logged during parsing, + consistency checking, or attempted translation of this model. + + Note that this refers to the SBMLDocument object\'s error log (i.e., + the list returned by SBMLDocument.getErrorLog()). @em That list of + errors and warnings is @em separate from the validation failures + tracked by this validator (i.e., the list returned by getFailures()). + + @return the SBMLErrorLog used for the SBMLDocument + + @if clike @see getFailures() @endif@~ +"; + + +%feature("docstring") SBMLValidator::getModel " + Returns the Model object stored in the SBMLDocument. + + It is important to note that this method <em>does not create</em> a + Model instance. The model in the SBMLDocument must have been created + at some prior time, for example using SBMLDocument.createModel() + or SBMLDocument.setModel(). + This method returns @c None if a model does not yet exist. + + @return the Model contained in this validator\'s SBMLDocument object. + + @see SBMLDocument.setModel() + @see SBMLDocument.createModel() +"; + + +%feature("docstring") SBMLValidator::getNumFailures " + Returns the number of failures encountered in the last validation run. + + This method returns the number of failures logged by this validator. + This number only reflects @em this validator\'s actions; the number may + not be the same as the number of errors and warnings logged on the + SBMLDocument object\'s error log (i.e., the object returned by + SBMLDocument.getErrorLog()), because other parts of libSBML may log + errors and warnings beyond those found by this validator. + + @return the number of errors logged by this validator. +"; + + +%feature("docstring") SBMLValidator::getFailure " + Returns the failure object at index n in this validator\'s list of + failures logged during the last run. + + Callers should use getNumFailures() first, to find out the number + of entries in this validator\'s list of failures. + + @param n an integer indicating the index of the object to return from + the failures list; index values start at 0. + + @return the failure at the given index number. + + @see getNumFailures() +"; + + +%feature("docstring") SBMLExternalValidator::SBMLExternalValidator " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLExternalValidator()</pre> + + Constructor. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLExternalValidator(SBMLExternalValidator)</pre> + + Copy constructor. +"; + + +%feature("docstring") SBMLExternalValidator::clone " + Creates and returns a deep copy of this converter. + + @return a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLExternalValidator::validate " + the actual conversion + + @return status code represeting success/failure/conversion impossible +"; + + +%feature("docstring") SBMLExternalValidator::getProgram " + @return the program name of the validator to be run +"; + + +%feature("docstring") SBMLExternalValidator::setProgram " + Sets the name of the program to run + + @param program the program to be started +"; + + +%feature("docstring") SBMLExternalValidator::getOutputFileName " + @return the output file name (this is the file the external program will write) +"; + + +%feature("docstring") SBMLExternalValidator::setOutputFileName " + Sets the output file name + + @param outputFileName the name of the output XML file +"; + + +%feature("docstring") SBMLExternalValidator::getSBMLFileName " + @return the name of the SBML file (the document of this validator will be written to it) +"; + + +%feature("docstring") SBMLExternalValidator::setSBMLFileName " + Sets the filename for the temporary file to be created + + @param sbmlFileName the temporary name +"; + + +%feature("docstring") SBMLExternalValidator::clearArguments " + Clear all additional arguments +"; + + +%feature("docstring") SBMLExternalValidator::addArgument " + Adds the given argument to the list of additional arguments + + @param arg the argument +"; + + +%feature("docstring") SBMLExternalValidator::getNumArguments " + @return the number of arguments. +"; + + +%feature("docstring") SBMLExternalValidator::getArgument " + Returns the argument for the given index. + + @param n the zero based index of the argument. + + @return the argument at the given index. +"; + + +%feature("docstring") SBMLExternalValidator::getArguments " + @return all arguments +"; + + +%feature("docstring") SBMLExternalValidator::setArguments " + Sets the additional arguments + + @param args teh additional arguments +"; + + +%feature("docstring") readMathML " + @internal + Reads the MathML from the given XMLInputStream, constructs a corresponding + abstract syntax tree and returns a pointer to the root of the tree. +"; + + +%feature("docstring") writeMathML " + @internal + Writes the given ASTNode (and its children) to the XMLOutputStream as + MathML. +"; + + +%feature("docstring") readMathMLFromString " + Reads the MathML from the given XML string, constructs a corresponding + abstract syntax tree, and returns a pointer to the root of the tree. + + @param xml a string containing a full MathML expression + + @return the root of an AST corresponding to the given mathematical + expression, otherwise @c None is returned if the given string is @c None + or invalid. +"; + + +%feature("docstring") writeMathMLToString " + Writes the given ASTNode (and its children) to a string as MathML, and + returns the string. + + @param node the root of an AST to write out to the stream. + + @return a string containing the written-out MathML representation + of the given AST. + + @note The string is owned by the caller and should be freed (with + free()) when no longer needed. @c None is returned if the given + argument is @c None. +"; + + +%feature("docstring") ASTNode " + @ingroup Core + Abstract Syntax Tree (AST) representation of a + mathematical expression. + + @htmlinclude not-sbml-warning.html + + Abstract Syntax Trees (ASTs) are a simple kind of data structure used in + libSBML for storing mathematical expressions. The ASTNode is the + cornerstone of libSBML\'s AST representation. An AST \'node\' represents the + most basic, indivisible part of a mathematical formula and come in many + types. For instance, there are node types to represent numbers (with + subtypes to distinguish integer, real, and rational numbers), names + (e.g., constants or variables), simple mathematical operators, logical + or relational operators and functions. LibSBML ASTs provide a canonical, + in-memory representation for all mathematical formulas regardless of + their original format (which might be MathML or might be text strings). + + An AST @em node in libSBML is a recursive structure containing a pointer + to the node\'s value (which might be, for example, a number or a symbol) + and a list of children nodes. Each ASTNode node may have none, one, + two, or more children depending on its type. The following diagram + illustrates an example of how the mathematical expression <code>\'1 + + 2\'</code> is represented as an AST with one @em plus node having two @em + integer children nodes for the numbers <code>1</code> and + <code>2</code>. The figure also shows the corresponding MathML + representation: + + @htmlinclude astnode-illustration.html + + The following are other noteworthy points about the AST representation + in libSBML: + <ul> + <li> A numerical value represented in MathML as a real number with an + exponent is preserved as such in the AST node representation, even if + the number could be stored in a @c double data type. This is done + so that when an SBML model is read in and then written out again, the + amount of change introduced by libSBML to the SBML during the round-trip + activity is minimized. + + <li> Rational numbers are represented in an AST node using separate + numerator and denominator values. These can be retrieved using the + methods ASTNode.getNumerator() and ASTNode.getDenominator(). + + <li> The children of an ASTNode are other ASTNode objects. The list of + children is empty for nodes that are leaf elements, such as numbers. + For nodes that are actually roots of expression subtrees, the list of + children points to the parsed objects that make up the rest of the + expression. + </ul> + + + @if clike <h3><a class=\'anchor\' name=\'ASTNodeType_t\'> + ASTNodeType_t</a></h3> @else <h3><a class=\'anchor\' + name=\'ASTNodeType_t\'>The set of possible %ASTNode types</a></h3> @endif@~ + + Every ASTNode has an associated type code to indicate, + for example, whether it holds a number or stands for an arithmetic + operator. + @if clike The type is recorded as a value drawn from the enumeration + @link ASTNode.h::ASTNodeType_t ASTNodeType_t@endlink.@endif + @if java The type is recorded as a value drawn from a + set of static integer constants defined in the class {@link + libsbmlConstants}. Their names begin with the characters @c AST_.@endif + @if python The type is recorded as a value drawn from a + set of static integer constants defined in the class {@link + libsbml}. Their names begin with the characters @c AST_.@endif + @if csharp The type is recorded as a value drawn from a + set of static integer constants defined in the class {@link + libsbml}. Their names begin with the characters @c AST_.@endif + The list of possible types is quite long, because it covers all the + mathematical functions that are permitted in SBML. The values are shown + in the following table: + + @htmlinclude astnode-types.html + + The types have the following meanings: + <ul> + <li> If the node is basic mathematical operator (e.g., @c \'+\'), then the + node\'s type will be @c AST_PLUS, @c AST_MINUS, @c AST_TIMES, @c AST_DIVIDE, + or @c AST_POWER, as appropriate. + + <li> If the node is a predefined function or operator from %SBML Level 1 + (in the string-based formula syntax used in Level 1) or %SBML Levels 2 and 3 + (in the subset of MathML used in SBML Levels 2 and 3), then the node\'s type + will be either <code>AST_FUNCTION_</code><em><span + class=\'placeholder\'>X</span></em>, <code>AST_LOGICAL_</code><em><span + class=\'placeholder\'>X</span></em>, or + <code>AST_RELATIONAL_</code><em><span class=\'placeholder\'>X</span></em>, + as appropriate. (Examples: @c AST_FUNCTION_LOG, @c AST_RELATIONAL_LEQ.) + + <li> If the node refers to a user-defined function, the node\'s type will + be @c AST_FUNCTION (because it holds the name of the function). + + <li> If the node is a lambda expression, its type will be @c AST_LAMBDA. + + <li> If the node is a predefined constant (@c \'ExponentialE\', @c \'Pi\', + @c \'True\' or @c \'False\'), then the node\'s type will be @c AST_CONSTANT_E, + @c AST_CONSTANT_PI, @c AST_CONSTANT_TRUE, or @c AST_CONSTANT_FALSE. + + <li> (Levels 2 and 3 only) If the node is the special MathML csymbol @c time, + the value of the node will be @c AST_NAME_TIME. (Note, however, that the + MathML csymbol @c delay is translated into a node of type + @c AST_FUNCTION_DELAY. The difference is due to the fact that @c time is a + single variable, whereas @c delay is actually a function taking + arguments.) + + <li> (Level 3 only) If the node is the special MathML csymbol @c avogadro, + the value of the node will be @c AST_NAME_AVOGADRO. + + <li> If the node contains a numerical value, its type will be + @c AST_INTEGER, @c AST_REAL, @c AST_REAL_E, or @c AST_RATIONAL, + as appropriate. + </ul> + + + <h3><a class=\'anchor\' name=\'math-convert\'>Converting between ASTs and text strings</a></h3> + + The text-string form of mathematical formulas produced by @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString()</a></code>@endif@~ and + read by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + and + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ + are in a simple C-inspired infix notation. A + formula in this text-string form can be handed to a program that + understands SBML mathematical expressions, or used as part + of a translation system. The libSBML distribution comes with an example + program in the @c \'examples\' subdirectory called @c translateMath that + implements an interactive command-line demonstration of translating + infix formulas into MathML and vice-versa. + + The formula strings may contain operators, function calls, symbols, and + white space characters. The allowable white space characters are tab + and space. The following are illustrative examples of formulas + expressed in the syntax: + + @verbatim + 0.10 * k4^2 + @endverbatim + @verbatim + (vm * s1)/(km + s1) + @endverbatim + + The following table shows the precedence rules in this syntax. In the + Class column, @em operand implies the construct is an operand, @em + prefix implies the operation is applied to the following arguments, @em + unary implies there is one argument, and @em binary implies there are + two arguments. The values in the Precedence column show how the order + of different types of operation are determined. For example, the + expression <em>a * b + c</em> is evaluated as <em>(a * b) + c</em> + because the <code>*</code> operator has higher precedence. The + Associates column shows how the order of similar precedence operations + is determined; for example, <em>a - b + c</em> is evaluated as <em>(a - + b) + c</em> because the <code>+</code> and <code>-</code> operators are + left-associative. The precedence and associativity rules are taken from + the C programming language, except for the symbol <code>^</code>, which + is used in C for a different purpose. (Exponentiation can be invoked + using either <code>^</code> or the function @c power.) + + @htmlinclude math-precedence-table.html + + A program parsing a formula in an SBML model should assume that names + appearing in the formula are the identifiers of Species, Parameter, + Compartment, FunctionDefinition, Reaction (in SBML Levels 2 + and 3), or SpeciesReference (in SBML Level 3 only) objects + defined in a model. When a function call is involved, the syntax + consists of a function identifier, followed by optional white space, + followed by an opening parenthesis, followed by a sequence of zero or + more arguments separated by commas (with each comma optionally preceded + and/or followed by zero or more white space characters), followed by a + closing parenthesis. There is an almost one-to-one mapping between the + list of predefined functions available, and those defined in MathML. + All of the MathML functions are recognized; this set is larger than the + functions defined in SBML Level 1. In the subset of functions that + overlap between MathML and SBML Level 1, there exist a few + differences. The following table summarizes the differences between the + predefined functions in SBML Level 1 and the MathML equivalents in + SBML Levels 2 and  3: + + @htmlinclude math-functions.html + + @warning @htmlinclude L1-math-syntax-warning.html + + @if clike @see SBML_parseL3Formula()@endif@~ + @if csharp @see SBML_parseL3Formula()@endif@~ + @if python @see libsbml.parseL3Formula()@endif@~ + @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ + @if clike @see SBML_parseFormula()@endif@~ + @if csharp @see SBML_parseFormula()@endif@~ + @if python @see libsbml.parseFormula()@endif@~ + @if java @see <code><a href=\'libsbml.html#parseFormula(String formula)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ +"; + + +%feature("docstring") ASTNode::ASTNode " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ASTNode(ASTNode orig)</pre> + + Copy constructor; creates a deep copy of the given ASTNode. + + @param orig the ASTNode to be copied. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ASTNode(Token_t *token)</pre> + + Creates a new ASTNode from the given Token. The resulting ASTNode + will contain the same data as the Token. + + @param token the Token to add. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ASTNode(ASTNodeType_t type = AST_UNKNOWN)</pre> + + Creates and returns a new ASTNode. + + Unless the argument @p type is given, the returned node will by + default have a type of @link libsbml.AST_UNKNOWN + AST_UNKNOWN@endlink. If the type isn\'t supplied when caling this + constructor, the caller should set the node type to something else as + soon as possible using + @if clike setType()@else ASTNode.setType()@endif. + + @param type an optional + @if clike @link #ASTNodeType_t ASTNodeType_t@endlink@else type@endif@~ + code indicating the type of node to create. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") ASTNode::freeName " + Frees the name of this ASTNode and sets it to @c None. + + This operation is only applicable to ASTNode objects corresponding to + operators, numbers, or @link libsbml.AST_UNKNOWN + AST_UNKNOWN@endlink. This method has no effect on other types of + nodes. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") ASTNode::canonicalize " + Converts this ASTNode to a canonical form and returns @c True if + successful, @c False otherwise. + + The rules determining the canonical form conversion are as follows: + <ul> + + <li> If the node type is @link libsbml.AST_NAME AST_NAME@endlink + and the node name matches @c \'ExponentialE\', @c \'Pi\', @c \'True\' or @c + \'False\' the node type is converted to the corresponding + <code>AST_CONSTANT_</code><em><span class=\'placeholder\'>X</span></em> type. + + <li> If the node type is an @link libsbml.AST_FUNCTION + AST_FUNCTION@endlink and the node name matches an SBML (MathML) function name, logical operator name, or + relational operator name, the node is converted to the corresponding + <code>AST_FUNCTION_</code><em><span class=\'placeholder\'>X</span></em> or + <code>AST_LOGICAL_</code><em><span class=\'placeholder\'>X</span></em> type. + + </ul> + + SBML Level 1 function names are searched first; thus, for + example, canonicalizing @c log will result in a node type of @link + libsbml.AST_FUNCTION_LN AST_FUNCTION_LN@endlink. (See the SBML + Level 1 Version 2 Specification, Appendix C.) + + Sometimes, canonicalization of a node results in a structural + conversion of the node as a result of adding a child. For example, a + node with the SBML Level 1 function name @c sqr and a single + child node (the argument) will be transformed to a node of type + @link libsbml.AST_FUNCTION_POWER AST_FUNCTION_POWER@endlink with + two children. The first child will remain unchanged, but the second + child will be an ASTNode of type @link libsbml.AST_INTEGER + AST_INTEGER@endlink and a value of 2. The function names that result + in structural changes are: @c log10, @c sqr, and @c sqrt. +"; + + +%feature("docstring") ASTNode::addChild " + Adds the given node as a child of this ASTNode. Child nodes are added + in-order, from left to right. + + @param child the ASTNode instance to add + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note Adding a child to an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. Callers need to be careful to use + this method in the context of other operations to create complete and + correct formulas. The method + @if clike isWellFormedASTNode()@else ASTNode.isWellFormedASTNode()@endif@~ + may also be useful for checking the results of node modifications. + + @see prependChild() + @see replaceChild() + @see insertChild() + @see removeChild() + @see isWellFormedASTNode() +"; + + +%feature("docstring") ASTNode::prependChild " + Adds the given node as a child of this ASTNode. This method adds + child nodes from right to left. + + @param child the ASTNode instance to add + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note Prepending a child to an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + @see addChild() + @see replaceChild() + @see insertChild() + @see removeChild() +"; + + +%feature("docstring") ASTNode::removeChild " + Removes the nth child of this ASTNode object. + + @param n long the index of the child to remove + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + @note Removing a child from an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + @see addChild() + @see prependChild() + @see replaceChild() + @see insertChild() +"; + + +%feature("docstring") ASTNode::replaceChild " + Replaces the nth child of this ASTNode with the given ASTNode. + + @param n long the index of the child to replace + @param newChild ASTNode to replace the nth child + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note Replacing a child from an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + @see addChild() + @see prependChild() + @see insertChild() + @see removeChild() +"; + + +%feature("docstring") ASTNode::insertChild " + Insert the given ASTNode at point n in the list of children + of this ASTNode. + + @param n long the index of the ASTNode being added + @param newChild ASTNode to insert as the nth child + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note Inserting a child into an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + @see addChild() + @see prependChild() + @see replaceChild() + @see removeChild() +"; + + +%feature("docstring") ASTNode::deepCopy " + Creates a recursive copy of this node and all its children. + + @return a copy of this ASTNode and all its children. The caller owns + the returned ASTNode and is reponsible for deleting it. +"; + + +%feature("docstring") ASTNode::getChild " + Get a child of this node according to its index number. + + @param n the index of the child to get + + @return the nth child of this ASTNode or @c None if this node has no nth + child (<code>n > </code> + @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~ + <code>- 1</code>). +"; + + +%feature("docstring") ASTNode::getLeftChild " + Get the left child of this node. + + @return the left child of this ASTNode. This is equivalent to calling + @if clike getChild()@else ASTNode.getChild()@endif@~ + with an argument of @c 0. +"; + + +%feature("docstring") ASTNode::getRightChild " + Get the right child of this node. + + @return the right child of this ASTNode, or @c None if this node has no + right child. If + @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~ + <code>> 1</code>, then this is equivalent to: + @code + getChild( getNumChildren() - 1 ); + @endcode +"; + + +%feature("docstring") ASTNode::getNumChildren " + Get the number of children that this node has. + + @return the number of children of this ASTNode, or 0 is this node has + no children. +"; + + +%feature("docstring") ASTNode::addSemanticsAnnotation " + Adds the given XMLNode as a <em>semantic annotation</em> of this ASTNode. + + @htmlinclude about-semantic-annotations.html + + @param sAnnotation the annotation to add. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @note Although SBML permits the semantic annotation construct in + MathML expressions, the truth is that this construct has so far (at + this time of this writing, which is early 2011) seen very little use + in SBML software. The full implications of using semantic annotations + are still poorly understood. If you wish to use this construct, we + urge you to discuss possible uses and applications on the SBML + discussion lists, particularly <a target=\'_blank\' + href=\'http://sbml.org/Forums\'>sbml-discuss@caltech.edu</a> and/or <a + target=\'_blank\' + href=\'http://sbml.org/Forums\'>sbml-interoperability@caltech.edu</a>. +"; + + +%feature("docstring") ASTNode::getNumSemanticsAnnotations " + Get the number of <em>semantic annotation</em> elements inside this node. + + @htmlinclude about-semantic-annotations.html + + @return the number of annotations of this ASTNode. + + @see ASTNode.addSemanticsAnnotation() +"; + + +%feature("docstring") ASTNode::getSemanticsAnnotation " + Get the nth semantic annotation of this node. + + @htmlinclude about-semantic-annotations.html + + @return the nth annotation of this ASTNode, or @c None if this node has + no nth annotation (<code>n ></code> + @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~ + <code>- 1</code>). + + @see ASTNode.addSemanticsAnnotation() +"; + + +%feature("docstring") ASTNode::getListOfNodes " + Performs a depth-first search of the tree rooted at this ASTNode + object, and returns a List of nodes where the given function + <code>predicate(node)</code> returns @c True (non-zero). + + For portability between different programming languages, the predicate + is passed in as a pointer to a function. @if clike The function + definition must have the type @link ASTNode::ASTNodePredicate + ASTNodePredicate @endlink, which is defined as + @code + int (*ASTNodePredicate) (const ASTNode_t *node); + @endcode + where a return value of non-zero represents @c True and zero + represents @c False. @endif + + @param predicate the predicate to use + + @return the list of nodes for which the predicate returned @c True + (non-zero). The List returned is owned by the caller and should be + deleted after the caller is done using it. The ASTNode objects in the + list; however, are not owned by the caller (as they still belong to + the tree itself), and therefore should not be deleted. +"; + + +%feature("docstring") ASTNode::fillListOfNodes " + Performs a depth-first search of the tree rooted at this ASTNode + object, and adds to the list @p lst the nodes where the given function + <code>predicate(node)</code> returns @c True (non-zero). + + This method is identical to getListOfNodes(ASTNodePredicate predicate) const, + except that instead of creating a new List object, it uses the one passed + in as argument @p lst. + + For portability between different programming languages, the predicate + is passed in as a pointer to a function. The function definition must + have the type @link ASTNode.h::ASTNodePredicate ASTNodePredicate + @endlink, which is defined as + @code + int (*ASTNodePredicate) (const ASTNode_t *node); + @endcode + where a return value of non-zero represents @c True and zero + represents @c False. + + @param predicate the predicate to use. + + @param lst the List to which ASTNode objects should be added. + + @see getListOfNodes() const +"; + + +%feature("docstring") ASTNode::getCharacter " + Get the value of this node as a single character. This function + should be called only when + @if clike getType()@else ASTNode.getType()@endif@~ returns + @link libsbml.AST_PLUS AST_PLUS@endlink, + @link libsbml.AST_MINUS AST_MINUS@endlink, + @link libsbml.AST_TIMES AST_TIMES@endlink, + @link libsbml.AST_DIVIDE AST_DIVIDE@endlink or + @link libsbml.AST_POWER AST_POWER@endlink. + + @return the value of this ASTNode as a single character +"; + + +%feature("docstring") ASTNode::getId " + Get the id of this ASTNode. + + @return the mathml id of this ASTNode. +"; + + +%feature("docstring") ASTNode::getClass " + Get the class of this ASTNode. + + @return the mathml class of this ASTNode. +"; + + +%feature("docstring") ASTNode::getStyle " + Get the style of this ASTNode. + + @return the mathml style of this ASTNode. +"; + + +%feature("docstring") ASTNode::getInteger " + Get the value of this node as an integer. This function should be + called only when + @if clike getType()@else ASTNode.getType()@endif@~ + <code>== @link libsbml.AST_INTEGER AST_INTEGER@endlink</code>. + + @return the value of this ASTNode as a (<code>long</code>) integer. +"; + + +%feature("docstring") ASTNode::getName " + Get the value of this node as a string. This function may be called + on nodes that (1) are not operators, i.e., nodes for which + @if clike isOperator()@else ASTNode.isOperator()@endif@~ + returns @c False, and (2) are not numbers, i.e., + @if clike isNumber()@else ASTNode.isNumber()@endif@~ returns @c False. + + @return the value of this ASTNode as a string. +"; + + +%feature("docstring") ASTNode::getOperatorName " + Get the value of this operator node as a string. This function may be called + on nodes that are operators, i.e., nodes for which + @if clike isOperator()@else ASTNode.isOperator()@endif@~ + returns @c True. + + @return the name of this operator ASTNode as a string (or None if not an operator). +"; + + +%feature("docstring") ASTNode::getNumerator " + Get the value of the numerator of this node. This function should be + called only when + @if clike getType()@else ASTNode.getType()@endif@~ + <code>== @link libsbml.AST_RATIONAL AST_RATIONAL@endlink</code>. + + @return the value of the numerator of this ASTNode. +"; + + +%feature("docstring") ASTNode::getDenominator " + Get the value of the denominator of this node. This function should + be called only when + @if clike getType()@else ASTNode.getType()@endif@~ + <code>== @link libsbml.AST_RATIONAL AST_RATIONAL@endlink</code>. + + @return the value of the denominator of this ASTNode. +"; + + +%feature("docstring") ASTNode::getReal " + Get the real-numbered value of this node. This function + should be called only when + @if clike isReal()@else ASTNode.isReal()@endif@~ + <code>== true</code>. + + This function performs the necessary arithmetic if the node type is + @link libsbml.AST_REAL_E AST_REAL_E@endlink (<em>mantissa * + 10<sup> exponent</sup></em>) or @link libsbml.AST_RATIONAL + AST_RATIONAL@endlink (<em>numerator / denominator</em>). + + @return the value of this ASTNode as a real (double). +"; + + +%feature("docstring") ASTNode::getMantissa " + Get the mantissa value of this node. This function should be called + only when @if clike getType()@else ASTNode.getType()@endif@~ + returns @link libsbml.AST_REAL_E AST_REAL_E@endlink + or @link libsbml.AST_REAL AST_REAL@endlink. + If @if clike getType()@else ASTNode.getType()@endif@~ + returns @link libsbml.AST_REAL AST_REAL@endlink, + this method is identical to + @if clike getReal()@else ASTNode.getReal()@endif. + + @return the value of the mantissa of this ASTNode. +"; + + +%feature("docstring") ASTNode::getExponent " + Get the exponent value of this ASTNode. This function should be + called only when + @if clike getType()@else ASTNode.getType()@endif@~ + returns @link libsbml.AST_REAL_E AST_REAL_E@endlink + or @link libsbml.AST_REAL AST_REAL@endlink. + + @return the value of the exponent of this ASTNode. +"; + + +%feature("docstring") ASTNode::getPrecedence " + Get the precedence of this node in the infix math syntax of SBML + Level 1. For more information about the infix syntax, see the + discussion about <a href=\'#math-convert\'>text string formulas</a> at + the top of the documentation for ASTNode. + + @return an integer indicating the precedence of this ASTNode +"; + + +%feature("docstring") ASTNode::getType " + Get the type of this ASTNode. The value returned is one of the + enumeration values such as @link libsbml.AST_LAMBDA + AST_LAMBDA@endlink, @link libsbml.AST_PLUS AST_PLUS@endlink, + etc. + + @return the type of this ASTNode. +"; + + +%feature("docstring") ASTNode::getUnits " + Get the units of this ASTNode. + + @htmlinclude about-sbml-units-attrib.html + + @return the units of this ASTNode. + + @note The <code>sbml:units</code> attribute is only available in SBML + Level 3. It may not be used in Levels 1–2 of SBML. + + @if clike @see SBML_parseL3Formula()@endif@~ + @if csharp @see SBML_parseL3Formula()@endif@~ + @if python @see libsbml.parseL3Formula()@endif@~ + @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ +"; + + +%feature("docstring") ASTNode::isAvogadro " + Predicate returning @c True (non-zero) if this node is the special + symbol @c avogadro. The predicate returns @c False (zero) otherwise. + + @return @c True if this ASTNode is the special symbol avogadro. + + @if clike @see SBML_parseL3Formula()@endif@~ + @if csharp @see SBML_parseL3Formula()@endif@~ + @if python @see libsbml.parseL3Formula()@endif@~ + @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ +"; + + +%feature("docstring") ASTNode::isBoolean " + Predicate returning @c True (non-zero) if this node has a boolean type + (a logical operator, a relational operator, or the constants @c True + or @c False). + + @return true if this ASTNode is a boolean, false otherwise. +"; + + +%feature("docstring") ASTNode::returnsBoolean " + Predicate returning @c True (non-zero) if this node returns a boolean type + or @c False (zero) otherwise. + + This function looks at the whole ASTNode rather than just the top + level of the ASTNode. Thus it will consider return values from + piecewise statements. In addition, if this ASTNode uses a function + call, the return value of the functionDefinition will be determined. + Note that this is only possible where the ASTNode can trace its parent + Model, that is, the ASTNode must represent the math element of some + SBML object that has already been added to an instance of an SBMLDocument. + + @see isBoolean() + + @return true if this ASTNode returns a boolean, false otherwise. +"; + + +%feature("docstring") ASTNode::isConstant " + Predicate returning @c True (non-zero) if this node represents a MathML + constant (e.g., @c True, @c Pi). + + @return @c True if this ASTNode is a MathML constant, @c False otherwise. + + @note this function will also return @c True for @link + libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink in SBML Level 3. +"; + + +%feature("docstring") ASTNode::isFunction " + Predicate returning @c True (non-zero) if this node represents a + MathML function (e.g., <code>abs()</code>), or an SBML Level 1 + function, or a user-defined function. + + @return @c True if this ASTNode is a function, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isInfinity " + Predicate returning @c True (non-zero) if this node represents + the special IEEE 754 value infinity, @c False (zero) otherwise. + + @return @c True if this ASTNode is the special IEEE 754 value infinity, + @c False otherwise. +"; + + +%feature("docstring") ASTNode::isInteger " + Predicate returning @c True (non-zero) if this node contains an + integer value, @c False (zero) otherwise. + + @return @c True if this ASTNode is of type @link + libsbml.AST_INTEGER AST_INTEGER@endlink, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isLambda " + Predicate returning @c True (non-zero) if this node is a MathML + <code><lambda></code>, @c False (zero) otherwise. + + @return @c True if this ASTNode is of type @link libsbml.AST_LAMBDA + AST_LAMBDA@endlink, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isLog10 " + Predicate returning @c True (non-zero) if this node represents a + @c log10 function, @c False (zero) otherwise. More precisely, this + predicate returns @c True if the node type is @link + libsbml.AST_FUNCTION_LOG AST_FUNCTION_LOG@endlink with two + children, the first of which is an @link libsbml.AST_INTEGER + AST_INTEGER@endlink equal to 10. + + @return @c True if the given ASTNode represents a log10() function, @c + false otherwise. + + @if clike @see SBML_parseL3Formula()@endif@~ + @if csharp @see SBML_parseL3Formula()@endif@~ + @if python @see libsbml.parseL3Formula()@endif@~ + @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ +"; + + +%feature("docstring") ASTNode::isLogical " + Predicate returning @c True (non-zero) if this node is a MathML + logical operator (i.e., @c and, @c or, @c not, @c xor). + + @return @c True if this ASTNode is a MathML logical operator +"; + + +%feature("docstring") ASTNode::isName " + Predicate returning @c True (non-zero) if this node is a user-defined + variable name in SBML L1, L2 (MathML), or the special symbols @c delay + or @c time. The predicate returns @c False (zero) otherwise. + + @return @c True if this ASTNode is a user-defined variable name in SBML + L1, L2 (MathML) or the special symbols delay or time. +"; + + +%feature("docstring") ASTNode::isNaN " + Predicate returning @c True (non-zero) if this node represents the + special IEEE 754 value \'not a number\' (NaN), @c False (zero) + otherwise. + + @return @c True if this ASTNode is the special IEEE 754 NaN. +"; + + +%feature("docstring") ASTNode::isNegInfinity " + Predicate returning @c True (non-zero) if this node represents the + special IEEE 754 value \'negative infinity\', @c False (zero) otherwise. + + @return @c True if this ASTNode is the special IEEE 754 value negative + infinity, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isNumber " + Predicate returning @c True (non-zero) if this node contains a number, + @c False (zero) otherwise. This is functionally equivalent to the + following code: + @code + isInteger() || isReal() + @endcode + + @return @c True if this ASTNode is a number, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isOperator " + Predicate returning @c True (non-zero) if this node is a mathematical + operator, meaning, <code>+</code>, <code>-</code>, <code>*</code>, + <code>/</code> or <code>^</code> (power). + + @return @c True if this ASTNode is an operator. +"; + + +%feature("docstring") ASTNode::isPiecewise " + Predicate returning @c True (non-zero) if this node is the MathML + <code><piecewise></code> construct, @c False (zero) otherwise. + + @return @c True if this ASTNode is a MathML @c piecewise function +"; + + +%feature("docstring") ASTNode::isRational " + Predicate returning @c True (non-zero) if this node represents a rational + number, @c False (zero) otherwise. + + @return @c True if this ASTNode is of type @link + libsbml.AST_RATIONAL AST_RATIONAL@endlink. +"; + + +%feature("docstring") ASTNode::isReal " + Predicate returning @c True (non-zero) if this node can represent a + real number, @c False (zero) otherwise. More precisely, this node + must be of one of the following types: @link libsbml.AST_REAL + AST_REAL@endlink, @link libsbml.AST_REAL_E AST_REAL_E@endlink or + @link libsbml.AST_RATIONAL AST_RATIONAL@endlink. + + @return @c True if the value of this ASTNode can represented as a real + number, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isRelational " + Predicate returning @c True (non-zero) if this node is a MathML + relational operator, meaning <code>==</code>, <code>>=</code>, + <code>></code>, <code><</code>, and <code>!=</code>. + + @return @c True if this ASTNode is a MathML relational operator, @c + false otherwise +"; + + +%feature("docstring") ASTNode::isSqrt " + Predicate returning @c True (non-zero) if this node represents a + square root function, @c False (zero) otherwise. More precisely, the + node type must be @link libsbml.AST_FUNCTION_ROOT + AST_FUNCTION_ROOT@endlink with two children, the first of which is an + @link libsbml.AST_INTEGER AST_INTEGER@endlink node having value + equal to 2. + + @return @c True if the given ASTNode represents a sqrt() function, + @c False otherwise. +"; + + +%feature("docstring") ASTNode::isUMinus " + Predicate returning @c True (non-zero) if this node is a unary minus + operator, @c False (zero) otherwise. A node is defined as a unary + minus node if it is of type @link libsbml.AST_MINUS + AST_MINUS@endlink and has exactly one child. + + For numbers, unary minus nodes can be \'collapsed\' by negating the + number. In fact, + @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + does this during its parsing process, and + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ + has a configuration option that allows this behavior to be turned + on or off. However, unary minus nodes for symbols + (@link libsbml.AST_NAME AST_NAME@endlink) cannot + be \'collapsed\', so this predicate function is necessary. + + @return @c True if this ASTNode is a unary minus, @c False otherwise. + + @if clike @see SBML_parseL3Formula()@endif@~ + @if csharp @see SBML_parseL3Formula()@endif@~ + @if python @see libsbml.parseL3Formula()@endif@~ + @if java @see <code><a href=\'libsbml.html#parseL3Formula(String formula)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ +"; + + +%feature("docstring") ASTNode::isUPlus " + Predicate returning @c True (non-zero) if this node is a unary plus + operator, @c False (zero) otherwise. A node is defined as a unary + minus node if it is of type @link libsbml.AST_MINUS + AST_MINUS@endlink and has exactly one child. + + @return @c True if this ASTNode is a unary plus, @c False otherwise. +"; + + +%feature("docstring") ASTNode::hasTypeAndNumChildren " + Predicate returning @c True if this node is of type @param type + and has @param numchildren number of children. Designed + for use in cases where it is useful to discover if the node is + a unary not or unary minus, or a times node with no children, etc. + + @return @c True if this ASTNode is has the specified type and number + of children, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isUnknown " + Predicate returning @c True (non-zero) if this node has an unknown type. + + \'Unknown\' nodes have the type @link libsbml.AST_UNKNOWN + AST_UNKNOWN@endlink. Nodes with unknown types will not appear in an + ASTNode tree returned by libSBML based upon valid SBML input; the only + situation in which a node with type @link libsbml.AST_UNKNOWN + AST_UNKNOWN@endlink may appear is immediately after having create a + new, untyped node using the ASTNode constructor. Callers creating + nodes should endeavor to set the type to a valid node type as soon as + possible after creating new nodes. + + @return @c True if this ASTNode is of type @link + libsbml.AST_UNKNOWN AST_UNKNOWN@endlink, @c False otherwise. +"; + + +%feature("docstring") ASTNode::isSetId " + Predicate returning @c True (non-zero) if this node has the mathml attribute + <code>id</code>. + + @return true if this ASTNode has an attribute id, false otherwise. +"; + + +%feature("docstring") ASTNode::isSetClass " + Predicate returning @c True (non-zero) if this node has the mathml attribute + <code>class</code>. + + @return true if this ASTNode has an attribute class, false otherwise. +"; + + +%feature("docstring") ASTNode::isSetStyle " + Predicate returning @c True (non-zero) if this node has the mathml attribute + <code>style</code>. + + @return true if this ASTNode has an attribute style, false otherwise. +"; + + +%feature("docstring") ASTNode::isSetUnits " + Predicate returning @c True (non-zero) if this node has the attribute + <code>sbml:units</code>. + + @htmlinclude about-sbml-units-attrib.html + + @return @c True if this ASTNode has units associated with it, @c False otherwise. + + @note The <code>sbml:units</code> attribute is only available in SBML + Level 3. It may not be used in Levels 1–2 of SBML. +"; + + +%feature("docstring") ASTNode::hasUnits " + Predicate returning @c True (non-zero) if this node or any of its + children nodes have the attribute <code>sbml:units</code>. + + @htmlinclude about-sbml-units-attrib.html + + @return @c True if this ASTNode or its children has units associated + with it, @c False otherwise. + + @note The <code>sbml:units</code> attribute is only available in SBML + Level 3. It may not be used in Levels 1–2 of SBML. +"; + + +%feature("docstring") ASTNode::setCharacter " + Sets the value of this ASTNode to the given character. If character + is one of @c +, @c -, <code>*</code>, <code>/</code> or @c ^, the node + type will be set accordingly. For all other characters, the node type + will be set to @link libsbml.AST_UNKNOWN AST_UNKNOWN@endlink. + + @param value the character value to which the node\'s value should be + set. + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::setId " + Sets the mathml id of this ASTNode to id. + + @param id @c string representing the identifier. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::setClass " + Sets the mathml class of this ASTNode to className. + + @param className @c string representing the mathml class for this node. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::setStyle " + Sets the mathml style of this ASTNode to style. + + @param style @c string representing the identifier. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::setName " + Sets the value of this ASTNode to the given name. + + As a side-effect, this ASTNode object\'s type will be reset to + @link libsbml.AST_NAME AST_NAME@endlink if (and <em>only + if</em>) the ASTNode was previously an operator ( + @if clike isOperator()@else ASTNode.isOperator()@endif@~ + <code>== true</code>), number ( + @if clike isNumber()@else ASTNode.isNumber()@endif@~ + <code>== true</code>), or unknown. + This allows names to be set for @link libsbml.AST_FUNCTION + AST_FUNCTION@endlink nodes and the like. + + @param name the string containing the name to which this node\'s value + should be set + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::setValue " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setValue(long numerator, long denominator)</pre> + + Sets the value of this ASTNode to the given rational in two parts: the + numerator and denominator. The node type is set to @link + libsbml.AST_RATIONAL AST_RATIONAL@endlink. + + @param numerator the numerator value of the rational + @param denominator the denominator value of the rational + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>setValue(double mantissa, long exponent)</pre> + + Sets the value of this ASTNode to the given real (@c double) in two + parts: the mantissa and the exponent. The node type is set to + @link libsbml.AST_REAL_E AST_REAL_E@endlink. + + @param mantissa the mantissa of this node\'s real-numbered value + @param exponent the exponent of this node\'s real-numbered value + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>setValue(int value)</pre> + + Sets the value of this ASTNode to the given integer and sets the node + type to @link libsbml.AST_INTEGER AST_INTEGER@endlink. + + @param value the integer to which this node\'s value should be set + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>setValue(double value)</pre> + + Sets the value of this ASTNode to the given real (@c double) and sets + the node type to @link libsbml.AST_REAL AST_REAL@endlink. + + This is functionally equivalent to: + @code + setValue(value, 0); + @endcode + + @param value the @c double format number to which this node\'s value + should be set + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: @li @link + libsbml.LIBSBML_OPERATION_SUCCESS + LIBSBML_OPERATION_SUCCESS @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>setValue(long value)</pre> + + Sets the value of this ASTNode to the given (@c long) integer and sets + the node type to @link libsbml.AST_INTEGER AST_INTEGER@endlink. + + @param value the integer to which this node\'s value should be set + + @return integer value indicating success/failure of the function. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::setType " + Sets the type of this ASTNode to the given type code. A side-effect + of doing this is that any numerical values previously stored in this + node are reset to zero. + + @param type the type to which this node should be set + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") ASTNode::setUnits " + Sets the units of this ASTNode to units. + + The units will be set @em only if this ASTNode object represents a + MathML <code><cn></code> element, i.e., represents a number. + Callers may use + @if clike isNumber()@else ASTNode.isNumber()@endif@~ + to inquire whether the node is of that type. + + @htmlinclude about-sbml-units-attrib.html + + @param units @c string representing the unit identifier. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink + + @note The <code>sbml:units</code> attribute is only available in SBML + Level 3. It may not be used in Levels 1–2 of SBML. +"; + + +%feature("docstring") ASTNode::swapChildren " + Swap the children of this ASTNode object with the children of the + given ASTNode object. + + @param that the other node whose children should be used to replace + <em>this</em> node\'s children + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ASTNode::renameSIdRefs " + Renames all the SIdRef attributes on this node and any child node +"; + + +%feature("docstring") ASTNode::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this node and any child node. + (The only place UnitSIDRefs appear in MathML <code><cn></code> elements.) +"; + + +%feature("docstring") ASTNode::replaceIDWithFunction " + @internal + Replace any nodes of type AST_NAME with the name \'id\' from the child \'math\' object with the provided ASTNode. +"; + + +%feature("docstring") ASTNode::multiplyTimeBy " + @internal + Replaces any \'AST_NAME_TIME\' nodes with a node that multiplies time by the given function. +"; + + +%feature("docstring") ASTNode::unsetUnits " + Unsets the units of this ASTNode. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ASTNode::unsetId " + Unsets the mathml id of this ASTNode. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ASTNode::unsetClass " + Unsets the mathml class of this ASTNode. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ASTNode::unsetStyle " + Unsets the mathml style of this ASTNode. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ASTNode::setSemanticsFlag " + @internal + Sets the flag indicating that this ASTNode has semantics attached. + + @htmlinclude about-semantic-annotations.html + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::unsetSemanticsFlag " + @internal + Unsets the flag indicating that this ASTNode has semantics attached. + + @htmlinclude about-semantic-annotations.html + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::getSemanticsFlag " + @internal + Gets the flag indicating that this ASTNode has semantics attached. + + @htmlinclude about-semantic-annotations.html + + @return @c True if this node has semantics attached, @c False otherwise. +"; + + +%feature("docstring") ASTNode::setDefinitionURL " + @internal + Sets the attribute \'definitionURL\'. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ASTNode::getDefinitionURL " + Gets the MathML @c definitionURL attribute value. + + @return the value of the @c definitionURL attribute, in the form of + a libSBML XMLAttributes object. +"; + + +%feature("docstring") ASTNode::replaceArgument " + Replaces occurences of a given name within this ASTNode with the + name/value/formula represented by @p arg. + + For example, if the formula in this ASTNode is <code>x + y</code>, + then the <code><bvar></code> is @c x and @c arg is an ASTNode + representing the real value @c 3. This method substitutes @c 3 for @c + x within this ASTNode object. + + @param bvar a string representing the variable name to be substituted + @param arg an ASTNode representing the name/value/formula to substitute +"; + + +%feature("docstring") ASTNode::setParentSBMLObject " + @internal + Sets the parent SBML object. + + @param sb the parent SBML object of this ASTNode. +"; + + +%feature("docstring") ASTNode::getParentSBMLObject " + Returns the parent SBML object. + + @return the parent SBML object of this ASTNode. +"; + + +%feature("docstring") ASTNode::reduceToBinary " + Reduces this ASTNode to a binary tree. + + Example: if this ASTNode is <code>and(x, y, z)</code>, then the + formula of the reduced node is <code>and(and(x, y), z)</code>. The + operation replaces the formula stored in the current ASTNode object. +"; + + +%feature("docstring") ASTNode::setUserData " + Sets the user data of this node. This can be used by the application + developer to attach custom information to the node. In case of a deep + copy this attribute will passed as it is. The attribute will be never + interpreted by this class. + + @param userData specifies the new user data. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ASTNode::*getUserData " + Returns the user data that has been previously set via setUserData(). + + @return the user data of this node, or @c None if no user data has been set. + + @if clike + @see ASTNode::setUserData + @endif@~ +"; + + +%feature("docstring") ASTNode::isWellFormedASTNode " + Predicate returning @c True or @c False depending on whether this + ASTNode is well-formed. + + @note An ASTNode may be well-formed, with each node and its children + having the appropriate number of children for the given type, but may + still be invalid in the context of its use within an SBML model. + + @return @c True if this ASTNode is well-formed, @c False otherwise. + + @see hasCorrectNumberArguments() +"; + + +%feature("docstring") ASTNode::hasCorrectNumberArguments " + Predicate returning @c True or @c False depending on whether this + ASTNode has the correct number of children for it\'s type. + + For example, an ASTNode with type @link libsbml.AST_PLUS + AST_PLUS@endlink expects 2 child nodes. + + @note This function performs a check on the toplevel node only. + Child nodes are not checked. + + @return @c True if this ASTNode is has appropriate number of children + for it\'s type, @c False otherwise. + + @see isWellFormedASTNode() +"; + + +%feature("docstring") ASTNode::isBvar " + @internal + Predicate returning @c True or @c False depending on whether this + ASTNode has the correct number of children for it\'s type. + + For example, an ASTNode with type @link libsbml.AST_PLUS + AST_PLUS@endlink expects 2 child nodes. + + @note This function performs a check on the toplevel node only. + Child nodes are not checked. + + @return @c True if this ASTNode is has appropriate number of children + for it\'s type, @c False otherwise. + + @see isWellFormedASTNode() +"; + + +%feature("docstring") ASTNode::setBvar " + @internal + Predicate returning @c True or @c False depending on whether this + ASTNode has the correct number of children for it\'s type. + + For example, an ASTNode with type @link libsbml.AST_PLUS + AST_PLUS@endlink expects 2 child nodes. + + @note This function performs a check on the toplevel node only. + Child nodes are not checked. + + @return @c True if this ASTNode is has appropriate number of children + for it\'s type, @c False otherwise. + + @see isWellFormedASTNode() +"; + + +%feature("docstring") ASTNode::canonicalizeConstant " + @internal + Internal helper function for canonicalize(). +"; + + +%feature("docstring") ASTNode::canonicalizeFunction " + @internal + Internal helper function for canonicalize(). +"; + + +%feature("docstring") ASTNode::canonicalizeFunctionL1 " + @internal + Internal helper function for canonicalize(). +"; + + +%feature("docstring") ASTNode::canonicalizeLogical " + @internal + Internal helper function for canonicalize(). +"; + + +%feature("docstring") ASTNode::canonicalizeRelational " + @internal + Internal helper function for canonicalize(). +"; + + +%feature("docstring") SBML_parseFormula " + Parses the given SBML formula and returns a representation of it as an + Abstract Syntax Tree (AST). + + The text-string form of mathematical formulas produced by + @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ + and read by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + and + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~ + use a simple C-inspired infix notation. A + formula in this text-string form therefore can be handed to a program + that understands SBML mathematical expressions, or used as + part of a formula translation system. The syntax is described in detail + in the documentation for ASTNode. + + This returns the root node of the AST corresponding to the formula. If + the formula contains a syntax error, @c None is returned instead. + + Note that this facility is provided as a convenience by libSBML—the + MathML standard does not actually define a \'string-form\' equivalent to + MathML expression trees, so the choice of formula syntax is somewhat + arbitrary. The approach taken by libSBML is to use the syntax defined by + SBML Level 1 (which in fact used a text-string representation of + formulas and not MathML). This formula syntax is based mostly on C + programming syntax, and may contain operators, function calls, symbols, + and white space characters. The following table provides the precedence + rules for the different entities that may appear in formula strings. + + @htmlinclude math-precedence-table.html + + In the table above, @em operand implies the construct is an operand, @em + prefix implies the operation is applied to the following arguments, @em + unary implies there is one argument, and @em binary implies there are + two arguments. The values in the <b>Precedence</b> column show how the + order of different types of operation are determined. For example, the + expression <code>a * b + c</code> is evaluated as <code>(a * b) + + c</code> because the @c * operator has higher precedence. The + <b>Associates</b> column shows how the order of similar precedence + operations is determined; for example, <code>a - b + c</code> is + evaluated as <code>(a - b) + c</code> because the @c + and @c - + operators are left-associative. + + The function call syntax consists of a function name, followed by optional + white space, followed by an opening parenthesis token, followed by a + sequence of zero or more arguments separated by commas (with each comma + optionally preceded and/or followed by zero or more white space + characters, followed by a closing parenthesis token. The function name + must be chosen from one of the pre-defined functions in SBML or a + user-defined function in the model. The following table lists the names + of certain common mathematical functions; this table corresponds to + Table 6 in the <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2\'>SBML Level 1 Version 2 specification</a>: + + @htmlinclude string-functions-table.html + + @warning There are differences between the symbols used to represent the + common mathematical functions and the corresponding MathML token names. + This is a potential source of incompatibilities. Note in particular that + in this text-string syntax, <code>log(x)</code> represents the natural + logarithm, whereas in MathML, the natural logarithm is + <code><ln/></code>. Application writers are urged to be careful + when translating between text forms and MathML forms, especially if they + provide a direct text-string input facility to users of their software + systems.<br><br> + @htmlinclude L1-math-syntax-warning.html + + @param formula the text-string formula expression to be parsed + + @return the root node of the AST, or @c None if an error occurred in + parsing the formula + + @if clike @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @see libsbml.getLastParseL3Error() + @see libsbml.getDefaultL3ParserSettings() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> + @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> + @endif@~ +"; + + +%feature("docstring") SBML_formulaToString " + Converts an AST to a string representation of a formula using a syntax + basically derived from SBML Level 1. + + The text-string form of mathematical formulas produced by + @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ + and read by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + use a simple C-inspired infix notation taken from SBML Level 1. A + formula in this text-string form therefore can be handed to a program + that understands SBML Level 1 mathematical expressions, or used as + part of a formula translation system. The syntax is described in detail + in the documentation for ASTNode. + + Note that this facility is provided as a convenience by libSBML—the + MathML standard does not actually define a \'string-form\' equivalent to + MathML expression trees, so the choice of formula syntax is somewhat + arbitrary. The approach taken by libSBML is to use the syntax defined by + SBML Level 1 (which in fact used a text-string representation of + formulas and not MathML). This formula syntax is based mostly on C + programming syntax, and may contain operators, function calls, symbols, + and white space characters. The following table provides the precedence + rules for the different entities that may appear in formula strings. + + @htmlinclude math-precedence-table.html + + In the table above, @em operand implies the construct is an operand, @em + prefix implies the operation is applied to the following arguments, @em + unary implies there is one argument, and @em binary implies there are + two arguments. The values in the <b>Precedence</b> column show how the + order of different types of operation are determined. For example, the + expression <code>a * b + c</code> is evaluated as <code>(a * b) + + c</code> because the @c * operator has higher precedence. The + <b>Associates</b> column shows how the order of similar precedence + operations is determined; for example, <code>a - b + c</code> is + evaluated as <code>(a - b) + c</code> because the @c + and @c - + operators are left-associative. + + The function call syntax consists of a function name, followed by optional + white space, followed by an opening parenthesis token, followed by a + sequence of zero or more arguments separated by commas (with each comma + optionally preceded and/or followed by zero or more white space + characters, followed by a closing parenthesis token. The function name + must be chosen from one of the pre-defined functions in SBML or a + user-defined function in the model. The following table lists the names + of certain common mathematical functions; this table corresponds to + Table 6 in the <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2\'>SBML Level 1 Version 2 specification</a>: + + @htmlinclude string-functions-table.html + + @warning There are differences between the symbols used to represent the + common mathematical functions and the corresponding MathML token names. + This is a potential source of incompatibilities. Note in particular that + in this text-string syntax, <code>log(x)</code> represents the natural + logarithm, whereas in MathML, the natural logarithm is + <code><ln/></code>. Application writers are urged to be careful + when translating between text forms and MathML forms, especially if they + provide a direct text-string input facility to users of their software + systems.<br><br> + @htmlinclude L1-math-syntax-warning.html + + @param tree the AST to be converted. + + @return the formula from the given AST as an SBML Level 1 text-string + mathematical formula. The caller owns the returned string and is + responsible for freeing it when it is no longer needed. + + @if clike @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @see libsbml.getLastParseL3Error() + @see libsbml.getDefaultL3ParserSettings() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> + @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> + @endif@~ +"; + + +%feature("docstring") SBML_parseL3Formula " + Parses the given mathematical formula and returns a representation of it + as an Abstract Syntax Tree (AST). + + The text-string form of mathematical formulas read by this function + are expanded versions of the formats produced and read by @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ + and + @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~, + respectively. The latter two libSBML functions were originally + developed to support conversion between SBML Levels 1 and 2, + and were focused on the syntax of mathematical formulas used in SBML + Level 1. With time, and the use of MathML in SBML Levels 2 + and 3, it became clear that supporting Level 2 and 3\'s + expanded mathematical syntax would be useful for software developers. + To maintain backwards compatibility, the original + @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)\'>libsbml.formulaToString(ASTNode tree)</a></code>@endif@~ + and + @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + have been left untouched, and instead, the new functionality is + provided in the form of + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. + + The following are the differences in the formula syntax supported by + this function, compared to what is supported by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~: + + @li Units may be asociated with bare numbers, using the following syntax: + <div style=\'margin: 10px auto 10px 25px; display: block\'> + <span class=\'code\' style=\'background-color: #d0d0ee\'>number</span> + <span class=\'code\' style=\'background-color: #edd\'>unit</span> + </div> + The <span class=\'code\' style=\'background-color: #d0d0ee\'>number</span> + may be in any form (an integer, real, or rational + number), and the + <span class=\'code\' style=\'background-color: #edd\'>unit</span> + must conform to the syntax of an SBML identifier (technically, the + type defined as @c SId in the SBML specifications). The whitespace between + <span class=\'code\' style=\'background-color: #d0d0ee\'>number</span> + and <span class=\'code\' style=\'background-color: #edd\'>unit</span> + is optional. + @li The Boolean function symbols @c &&, @c ||, @c !, and @c != may be used. + @li The @em modulo operation is allowed as the symbol @c @% and + will produce a piecewise function in the MathML. + @li All inverse trigonometric functions may be defined in the infix + either using @c arc as a prefix or simply @c a; in other words, both + @c arccsc and @c acsc are interpreted as the operator @em arccosecant + defined in MathML. (Many functions in the SBML Level 1 infix-notation + parser implemented by @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + are defined this way as well, but not all.) + @li The following expression is parsed as a rational number instead of + as a numerical division: + <pre style=\'display: block; margin-left: 25px\'> + (<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>/<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>)</pre> + No spaces are allowed in this construct; in other words, + "<code>(3 / 4)</code>" will be parsed into the MathML + <code><divide></code> construct rather than a rational number. The + general number syntax allows you to assign units to a rational number, e.g., + "<code>(3/4) ml</code>". (If the string is a division, units + are not interpreted in this way.) + @li Various settings may be altered by using an L3ParserSettings object + in conjunction with the alternative function call + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~, including the following: + <ul> + <li> The function @c log with a single argument ("<code>log(x)</code>") + can be parsed as <code>log10(x)</code>, <code>ln(x)</code>, or treated + as an error, as desired. + <li> Unary minus signs can be collapsed or preserved; that is, + sequential pairs of unary minuses (e.g., "<code>- -3</code>") + can be removed from the input entirely and single unary minuses can be + incorporated into the number node, or all minuses can be preserved in + the AST node structure. + <li> Parsing of units embedded in the input string can be turned on and + off. + <li> The string @c avogadro can be parsed as a MathML @em csymbol or + as an identifier. + <li> A Model object may optionally be provided to the parser using + the variant function call @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.SBML_parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~. + or stored in a L3ParserSettings object passed to the variant function + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~. + When a Model object is provided, identifiers (values of type @c SId) + from that model are used in preference to pre-defined MathML + definitions. More precisely, the Model entities whose identifiers will + shadow identical symbols in the mathematical formula are: Species, + Compartment, Parameter, Reaction, and SpeciesReference. For instance, + if the parser is given a Model containing a Species with the identifier + "<code>pi</code>", and the formula to be parsed is + "<code>3*pi</code>", the MathML produced will contain the + construct <code><ci> pi </ci></code> instead of the + construct <code><pi/></code>. + <li> Similarly, when a Model object is provided, @c SId values of + user-defined functions present in the model will be used preferentially + over pre-defined MathML functions. For example, if the passed-in Model + contains a FunctionDefinition with the identifier + "<code>sin</code>", that function will be used instead of the + predefined MathML function <code><sin/></code>. + </ul> + These configuration settings cannot be changed using @em this function + (i.e., @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~), + but they can be change on a per-call basis by using the alternative function + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~ + + This function returns the root node of the AST corresponding to the + formula given as the argument. If the formula contains a syntax error, + this function will return @c None instead. When @c None is returned, an + error is set; information about the error can be retrieved using + @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. + + Note that this facility and the SBML Level 1-based @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~ + are provided as a convenience by libSBML—the MathML standard does not + actually define a \'string-form\' equivalent to MathML expressions, so the + choice of formula syntax is arbitrary. The approach taken by libSBML is + to start with the syntax defined by SBML Level 1 (which in fact + used a text-string representation of formulas, and not MathML), and + expand it to include the above functionality. This formula syntax is + based mostly on C programming syntax, and may contain operators, + function calls, symbols, and white space characters. The following + table provides the precedence rules for the different entities that may + appear in formula strings. + + @htmlinclude math-precedence-table-l3.html + + In the table above, @em operand implies the construct is an operand, @em + prefix implies the operation is applied to the following arguments, @em + unary implies there is one argument, and @em binary implies there are + two arguments. The values in the <b>Precedence</b> column show how the + order of different types of operation are determined. For example, the + expression <code>a + b * c</code> is evaluated as <code>a + (b * c)</code> + because the @c * operator has higher precedence. The + <b>Associates</b> column shows how the order of similar precedence + operations is determined; for example, <code>a && b || c</code> is + evaluated as <code>(a && b) || c</code> because the @c && and @c || + operators are left-associative and have the same precedence. + + The function call syntax consists of a function name, followed by optional + white space, followed by an opening parenthesis token, followed by a + sequence of zero or more arguments separated by commas (with each comma + optionally preceded and/or followed by zero or more white space + characters), followed by a closing parenthesis token. The function name + must be chosen from one of the pre-defined functions in SBML or a + user-defined function in the model. The following table lists the names + of certain common mathematical functions; this table corresponds to + Table 6 in the <a target=\'_blank\' href=\'http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2\'>SBML Level 1 Version 2 specification</a> with additions based on the + functions added in SBML Level 2 and Level 3: + + @htmlinclude string-functions-table-l3.html + + Note that this function\'s interpretation of the string + "<code>log</code>" as a function with a single argument can be + changed; use the function @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~ + instead of this function and pass it an appropriate L3ParserSettings + object. By default, unlike the SBML Level 1 parser implemented by + @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(String formula)</a></code>@endif@~, + the string "<code>log</code>" is interpreted as the base 10 + logarithm, and @em not as the natural logarithm. However, you can change + the interpretation to be base-10 log, natural log, or as an error; since + the name \'log\' by itself is ambiguous, you require that the parser uses + @c log10 or @c ln instead, which are more clear. Please refer to + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~. + + In addition, the following symbols will be translated to their MathML + equivalents, if no symbol with the same @c SId identifier string exists + in the Model object provided: + + @htmlinclude string-values-table-l3.html + + Note that whether the string "<code>avogadro</code>" is parsed + as an AST node of type @link libsbml.AST_NAME_AVOGADRO + AST_NAME_AVOGADRO@endlink or @link libsbml.AST_NAME + AST_NAME@endlink is configurable; use the alternate version of this + function, called + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~. + This functionality is provided because SBML Level 2 models may not + use @link libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink AST nodes. + + @param formula the text-string formula expression to be parsed + + @return the root node of an AST representing the mathematical formula, + or @c None if an error occurred while parsing the formula. When @c None + is returned, an error is recorded internally; information about the + error can be retrieved using + @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. + + @if clike @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @see libsbml.getLastParseL3Error() + @see libsbml.getDefaultL3ParserSettings() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> + @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> + @endif@~ +"; + + +%feature("docstring") SBML_parseL3FormulaWithModel " + Parses the given mathematical formula using specific a specific Model to + resolve symbols, and returns an Abstract Syntax Tree (AST) + representation of the result. + + This is identical to + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~, + except that this function uses the given model in the argument @p model + to check against identifiers that appear in the @p formula. + + For more details about the parser, please see the definition of + the function @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. + + @param formula the mathematical formula expression to be parsed + + @param model the Model object to use for checking identifiers + + @return the root node of an AST representing the mathematical formula, + or @c None if an error occurred while parsing the formula. When @c None + is returned, an error is recorded internally; information about the + error can be retrieved using + @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. + + @if clike @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.getLastParseL3Error() + @see libsbml.getDefaultL3ParserSettings() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> + @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> + @endif@~ +"; + + +%feature("docstring") SBML_parseL3FormulaWithSettings " + Parses the given mathematical formula using specific parser settings and + returns an Abstract Syntax Tree (AST) representation of the result. + + This is identical to + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~, + except that this function uses the parser settings given in the argument + @p settings. The settings override the default parsing behavior. + + The parameter @p settings allows callers to change the following parsing + behaviors: + + @li Use a specific Model object against which identifiers to compare + identifiers. This causes the parser to search the Model for identifiers + that the parser encounters in the formula. If a given symbol in the + formula matches the identifier of a Species, Compartment, Parameter, + Reaction, SpeciesReference or FunctionDefinition in the Model, then the + symbol is assumed to refer to that model entity instead of any possible + mathematical terms with the same symbol. For example, if the parser is + given a Model containing a Species with the identifier + "<code>pi</code>", and the formula to be parsed is + "<code>3*pi</code>", the MathML produced will contain the + construct <code><ci> pi </ci></code> instead of the + construct <code><pi/></code>. + @li Whether to parse "<code>log(x)</code>" with a single + argument as the base 10 + logarithm of x, the natural logarithm of x, or treat the case as an + error. + @li Whether to parse "<code>number id</code>" by interpreting + @c id as the identifier of a unit of measurement associated with the + number, or whether to treat the case as an error. + @li Whether to parse "<code>avogadro</code>" as an ASTNode of + type @link libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or + as type @link libsbml.AST_NAME AST_NAME@endlink. + @li Whether to always create explicit ASTNodes of type @link + libsbml.AST_MINUS AST_MINUS@endlink for all unary minuses, or + collapse and remove minuses where possible. + + For more details about the parser, please see the definition of + L3ParserSettings and + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. + + @param formula the mathematical formula expression to be parsed + + @param settings the settings to be used for this parser invocation + + @return the root node of an AST representing the mathematical formula, + or @c None if an error occurred while parsing the formula. When @c None + is returned, an error is recorded internally; information about the + error can be retrieved using + @if clike SBML_getLastParseL3Error()@endif@if csharp SBML_getLastParseL3Error()@endif@if python libsbml.getLastParseL3Error()@endif@if java <code><a href=\'libsbml.html#getLastParseL3Error()\'>libsbml.getLastParseL3Error()</a></code>@endif@~. + + @if clike @see SBML_formulaToString() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @see libsbml.getLastParseL3Error() + @see libsbml.getDefaultL3ParserSettings() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> + @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> + @endif@~ +"; + + +%feature("docstring") SBML_getDefaultL3ParserSettings " + Returns a copy of the default parser settings used by @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. + + The settings structure allows callers to change the following parsing + behaviors: + + @li Use a specific Model object against which identifiers to compare + identifiers. This causes the parser to search the Model for identifiers + that the parser encounters in the formula. If a given symbol in the + formula matches the identifier of a Species, Compartment, Parameter, + Reaction, SpeciesReference or FunctionDefinition in the Model, then the + symbol is assumed to refer to that model entity instead of any possible + mathematical terms with the same symbol. For example, if the parser is + given a Model containing a Species with the identifier + "<code>pi</code>", and the formula to be parsed is + "<code>3*pi</code>", the MathML produced will contain the + construct <code><ci> pi </ci></code> instead of the + construct <code><pi/></code>. + @li Whether to parse "<code>log(x)</code>" with a single + argument as the base 10 + logarithm of x, the natural logarithm of x, or treat the case as an + error. + @li Whether to parse "<code>number id</code>" by interpreting + @c id as the identifier of a unit of measurement associated with the + number, or whether to treat the case as an error. + @li Whether to parse "<code>avogadro</code>" as an ASTNode of + type @link libsbml.AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or + as type @link libsbml.AST_NAME AST_NAME@endlink. + @li Whether to always create explicit ASTNodes of type @link + libsbml.AST_MINUS AST_MINUS@endlink for all unary minuses, or + collapse and remove minuses where possible. + + For more details about the parser, please see the definition of + L3ParserSettings and + @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~. + + @if clike @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getLastParseL3Error() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @see libsbml.getLastParseL3Error() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @see <code><a href=\'libsbml.html#getLastParseL3Error()\'>getLastParseL3Error()</a></code> + @endif@~ +"; + + +%feature("docstring") SBML_getLastParseL3Error " + Returns the last error reported by the parser. + + If @if clike SBML_parseL3Formula()@endif@if csharp SBML_parseL3Formula()@endif@if python libsbml.parseL3Formula()@endif@if java <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code>@endif@~, + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~, or + @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~ return @c None, an error is set internally which is accessible + via this function. + + @return a string describing the error that occurred. This will contain + the string the parser was trying to parse, which character it had parsed + when it encountered the error, and a description of the error. + + @if clike @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if csharp @see SBML_formulaToString() + @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @see SBML_getDefaultL3ParserSettings() + @endif@~ + @if python @see libsbml.formulaToString() + @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @see libsbml.getDefaultL3ParserSettings() + @endif@~ + @if java @see <code><a href=\'libsbml.html#formulaToString(org.sbml.libsbml.ASTNode tree)\'>libsbml.formulaToString(ASTNode tree)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @see <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>getDefaultL3ParserSettings()</a></code> + @endif@~ +"; + + +%feature("docstring") L3ParserSettings " + @ingroup Core + A helper class for controlling the behavior of the text-string + formula parser. + + @htmlinclude not-sbml-warning.html + + The function + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code>@endif@~, + along with its variants + @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(java.lang.String formula)</a></code>@endif@~ + and + @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~, + are the interfaces to a parser for mathematical formulas expressed as + text strings. The parser converts the text-string formulas into + Abstract Syntax Trees (ASTs), represented in libSBML using ASTNode + objects. Compared to the parser implemented by the function + @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href=\'libsbml.html#parseFormula(java.lang.String)\'>libsbml.parseFormula(java.lang.String formula)</a></code>@endif@~, + which was designed primarily for converting the mathematical formula + strings in SBML Level 1, the \'L3\' variant of the parser accepts an + extended formula syntax. It also has a number of configurable behaviors. + This class (L3ParserSettings) is an object used to communicate the + configuration settings with callers. + + The following aspects of the parser are configurable: + <ul> + <li> The function @c log with a single argument ("<code>log(x)</code>") + can be parsed as <code>log10(x)</code>, <code>ln(x)</code>, or treated + as an error, as desired. + <li> Unary minus signs can be collapsed or preserved; that is, + sequential pairs of unary minuses (e.g., "<code>- -3</code>") + can be removed from the input entirely and single unary minuses can be + incorporated into the number node, or all minuses can be preserved in + the AST node structure. + <li> Parsing of units embedded in the input string can be turned on and + off. + <li> The string @c avogadro can be parsed as a MathML @em csymbol or + as an identifier. + <li> A Model object may optionally be provided to the parser using + the variant function call @if clike SBML_parseL3FormulaWithModel()@endif@if csharp SBML_parseL3FormulaWithModel()@endif@if python libsbml.SBML_parseL3FormulaWithModel()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>libsbml.parseL3FormulaWithModel(String formula, Model model)</a></code>@endif@~. + or stored in a L3ParserSettings object passed to the variant function + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, org.sbml.libsbml.L3ParserSettings settings)</a></code>@endif@~. + When a Model object is provided, identifiers (values of type @c SId) + from that model are used in preference to pre-defined MathML + definitions. More precisely, the Model entities whose identifiers will + shadow identical symbols in the mathematical formula are: Species, + Compartment, Parameter, Reaction, and SpeciesReference. For instance, + if the parser is given a Model containing a Species with the identifier + "<code>pi</code>", and the formula to be parsed is + "<code>3*pi</code>", the MathML produced will contain the + construct <code><ci> pi </ci></code> instead of the + construct <code><pi/></code>. + <li> Similarly, when a Model object is provided, @c SId values of + user-defined functions present in the Model will be used preferentially + over pre-defined MathML functions. For example, if the passed-in Model + contains a FunctionDefinition with the identifier + "<code>sin</code>", that function will be used instead of the + predefined MathML function <code><sin/></code>. + </ul> + + To obtain the default configuration values, callers can use the function + @if clike SBML_getDefaultL3ParserSettings()@endif@if csharp SBML_getDefaultL3ParserSettings()@endif@if python libsbml.SBML_getDefaultL3ParserSettings()@endif@if java <code><a href=\'libsbml.html#getDefaultL3ParserSettings()\'>libsbml.getDefaultL3ParserSettings()</a></code>@endif@~. + To change the configuration, callers can create an L3ParserSettings + object, set the desired characteristics using the methods + provided, and pass that object to + @if clike SBML_parseL3FormulaWithSettings()@endif@if csharp SBML_parseL3FormulaWithSettings()@endif@if python libsbml.parseL3FormulaWithSettings()@endif@if java <a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'><code>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</code></a>@endif@~. + + @if clike @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @endif@~ + @if csharp @see SBML_parseL3FormulaWithSettings() + @see SBML_parseL3Formula() + @see SBML_parseL3FormulaWithModel() + @endif@~ + @if python @see libsbml.parseL3FormulaWithSettings() + @see libsbml.parseL3Formula() + @see libsbml.parseL3FormulaWithModel() + @endif@~ + @if java @see <code><a href=\'libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)\'>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</a></code> + @see <code><a href=\'libsbml.html#parseL3Formula(java.lang.String)\'>libsbml.parseL3Formula(String formula)</a></code> + @see <code><a href=\'libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)\'>parseL3FormulaWithModel(String formula, Model model)</a></code> + @endif@~ +"; + + +%feature("docstring") L3ParserSettings::L3ParserSettings " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>L3ParserSettings(Model model, ParseLogType_t parselog, bool collapseminus, bool parseunits, bool avocsymbol)</pre> + + Creates a new L3ParserSettings object with specific values for all + possible settings. + + @param model a Model object to be used for disambiguating identifiers + + @param parselog a flag that controls how the parser will handle + the symbol @c log in formulas + + @param collapseminus a flag that controls how the parser will handle + minus signs + + @param parseunits a flag that controls how the parser will handle + apparent references to units of measurement associated with raw + numbers in a formula + + @param avocsymbol a flag that controls how the parser will handle + the appearance of the symbol @c avogadro in a formula + + @see getModel() + @see setModel() + @see unsetModel() + @see getParseLog() + @see setParseLog() + @see getParseUnits() + @see setParseUnits() + @see getParseCollapseMinus() + @see setParseCollapseMinus() + @see getParseAvogadroCsymbol() + @see setParseAvogadroCsymbol() + + + <hr> + Method variant with the following signature: + <pre class='signature'>L3ParserSettings()</pre> + + Creates a new L3ParserSettings object with default values. + + This is the default constructor for the L3ParserSettings object. It + sets the Model to @c None and other settings to @c + L3P_PARSE_LOG_AS_LOG10, @c L3P_EXPAND_UNARY_MINUS, @c L3P_PARSE_UNITS, + and @c L3P_AVOGADRO_IS_CSYMBOL. +"; + + +%feature("docstring") L3ParserSettings::setModel " + Sets the model reference in this L3ParserSettings object. + + When a Model object is provided, identifiers (values of type @c SId) + from that model are used in preference to pre-defined MathML + definitions. More precisely, the Model entities whose identifiers will + shadow identical symbols in the mathematical formula are: Species, + Compartment, Parameter, Reaction, and SpeciesReference. For instance, + if the parser is given a Model containing a Species with the identifier + "<code>pi</code>", and the formula to be parsed is + "<code>3*pi</code>", the MathML produced will contain the + construct <code><ci> pi </ci></code> instead of the + construct <code><pi/></code>. + Similarly, when a Model object is provided, @c SId values of + user-defined functions present in the Model will be used preferentially + over pre-defined MathML functions. For example, if the passed-in Model + contains a FunctionDefinition with the identifier + "<code>sin</code>", that function will be used instead of the + predefined MathML function <code><sin/></code>. + + @param model a Model object to be used for disambiguating identifiers + + @warning This does @em not copy the Model object. This means that + modifications made to the object after invoking this method may affect + parsing behavior. + + @see getModel() + @see unsetModel() +"; + + +%feature("docstring") L3ParserSettings::getModel " + Returns the Model object referenced by this L3ParserSettings object. + + @see setModel() + @see unsetModel() +"; + + +%feature("docstring") L3ParserSettings::unsetModel " + Sets the Model reference in this L3ParserSettings object to @c None. + + @see setModel() + @see getModel() +"; + + +%feature("docstring") L3ParserSettings::setParseLog " + Sets the behavior for handling @c log in mathematical formulas. + + The function @c log with a single argument + ("<code>log(x)</code>") can be parsed as + <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as + desired. + + @param type a constant, one of following three possibilities: + @li @link libsbml.L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink + @li @link libsbml.L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink + @li @link libsbml.L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink + + @see getParseLog() +"; + + +%feature("docstring") L3ParserSettings::getParseLog " + Returns the current setting indicating what to do with formulas + containing the function @c log with one argument. + + The function @c log with a single argument + ("<code>log(x)</code>") can be parsed as + <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as + desired. + + @return One of following three constants: + @li @link libsbml.L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink + @li @link libsbml.L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink + @li @link libsbml.L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink + + @see setParseLog() +"; + + +%feature("docstring") L3ParserSettings::setParseCollapseMinus " + Sets the behavior for handling unary minuses appearing in mathematical + formulas. + + This setting affects two behaviors. First, pairs of multiple unary + minuses in a row (e.g., "<code>- -3</code>") can be + collapsed and ignored in the input, or the multiple minuses can be + preserved in the AST node tree that is generated by the parser. + Second, minus signs in front of numbers can be collapsed into the + number node itself; for example, a "<code>- 4.1</code>" can + be turned into a single ASTNode of type @link libsbml.AST_REAL + AST_REAL@endlink with a value of <code>-4.1</code>, or it can be + turned into a node of type @link libsbml.AST_MINUS + AST_MINUS@endlink having a child node of type @link + libsbml.AST_REAL AST_REAL@endlink. This method lets you tell + the parser which behavior to use—either collapse minuses or + always preserve them. The two possibilities are represented using the + following constants: + + @li @link libsbml.L3P_COLLAPSE_UNARY_MINUS + L3P_COLLAPSE_UNARY_MINUS@endlink (value = @c True): collapse unary + minuses where possible. + @li @link libsbml.L3P_EXPAND_UNARY_MINUS + L3P_EXPAND_UNARY_MINUS@endlink (value = @c False): do not collapse + unary minuses, and instead translate each one into an AST node of type + @link libsbml.AST_MINUS AST_MINUS@endlink. + + @param collapseminus a boolean value (one of the constants + @link libsbml.L3P_COLLAPSE_UNARY_MINUS + L3P_COLLAPSE_UNARY_MINUS@endlink or + @link libsbml.L3P_EXPAND_UNARY_MINUS + L3P_EXPAND_UNARY_MINUS@endlink) indicating how unary minus signs in + the input should be handled. + + @see getParseCollapseMinus() +"; + + +%feature("docstring") L3ParserSettings::getParseCollapseMinus " + Returns a flag indicating the current behavior set for handling + multiple unary minuses in formulas. + + This setting affects two behaviors. First, pairs of multiple unary + minuses in a row (e.g., "<code>- -3</code>") can be + collapsed and ignored in the input, or the multiple minuses can be + preserved in the AST node tree that is generated by the parser. + Second, minus signs in front of numbers can be collapsed into the + number node itself; for example, a "<code>- 4.1</code>" can + be turned into a single ASTNode of type @link libsbml.AST_REAL + AST_REAL@endlink with a value of <code>-4.1</code>, or it can be + turned into a node of type @link libsbml.AST_MINUS + AST_MINUS@endlink having a child node of type @link + libsbml.AST_REAL AST_REAL@endlink. This method lets you tell + the parser which behavior to use—either collapse minuses or + always preserve them. The two possibilities are represented using the + following constants: + + @li @link libsbml.L3P_COLLAPSE_UNARY_MINUS + L3P_COLLAPSE_UNARY_MINUS@endlink (value = @c True): collapse unary + minuses where possible. + @li @link libsbml.L3P_EXPAND_UNARY_MINUS + L3P_EXPAND_UNARY_MINUS@endlink (value = @c False): do not collapse + unary minuses, and instead translate each one into an AST node of type + @link libsbml.AST_MINUS AST_MINUS@endlink. + + @return A boolean, one of @link + libsbml.L3P_COLLAPSE_UNARY_MINUS + L3P_COLLAPSE_UNARY_MINUS@endlink or @link + libsbml.L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink. + + @see setParseCollapseMinus() +"; + + +%feature("docstring") L3ParserSettings::setParseUnits " + Sets the parser\'s behavior in handling units associated with numbers + in a mathematical formula. + + In SBML Level 2, there is no means of associating a unit of + measurement with a pure number in a formula, while SBML Level 3 + does define a syntax for this. In Level 3, MathML + <code><cn></code> elements can have an attribute named @c units + placed in the SBML namespace, which can be used to indicate the units + to be associated with the number. The text-string infix formula + parser allows units to be placed after raw numbers; they are + interpreted as unit identifiers for units defined by the SBML + specification or in the containing Model object. Some examples + include: "<code>4 mL</code>", "<code>2.01 + Hz</code>", "<code>3.1e-6 M</code>", and + "<code>(5/8) inches</code>". To produce a valid SBML model, + there must either exist a UnitDefinition corresponding to the + identifier of the unit, or the unit must be defined in Table 2 of + the SBML specification. + + @param units A boolean indicating whether to parse units: + @li @link libsbml.L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink + (value = @c True): parse units in the text-string formula. + @li @link libsbml.L3P_NO_UNITS L3P_NO_UNITS@endlink (value = @c + false): treat units in the text-string formula as errors. + + @see getParseUnits() +"; + + +%feature("docstring") L3ParserSettings::getParseUnits " + Returns @c if the current settings allow units in text-string + mathematical formulas. + + In SBML Level 2, there is no means of associating a unit of + measurement with a pure number in a formula, while SBML Level 3 + does define a syntax for this. In Level 3, MathML + <code><cn></code> elements can have an attribute named @c units + placed in the SBML namespace, which can be used to indicate the units + to be associated with the number. The text-string infix formula + parser allows units to be placed after raw numbers; they are + interpreted as unit identifiers for units defined by the SBML + specification or in the containing Model object. Some examples + include: "<code>4 mL</code>", "<code>2.01 + Hz</code>", "<code>3.1e-6 M</code>", and + "<code>(5/8) inches</code>". To produce a valid SBML model, + there must either exist a UnitDefinition corresponding to the + identifier of the unit, or the unit must be defined in Table 2 of + the SBML specification. + + Since SBML Level 2 does not have the ability to associate units with + pure numbers, the value should be set to @c False when parsing text-string + formulas intended for use in SBML Level 2 documents. + + @return A boolean indicating whether to parse units: + @li @link libsbml.L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink + (value = @c True): parse units in the text-string formula. + @li @link libsbml.L3P_NO_UNITS L3P_NO_UNITS@endlink (value = @c + false): treat units in the text-string formula as errors. + + @see setParseUnits() +"; + + +%feature("docstring") L3ParserSettings::setParseAvogadroCsymbol " + Sets the parser\'s behavior in handling the string @c avogadro in + mathematical formulas. + + SBML Level 3 defines a symbol for representing the value of + Avogadro\'s constant, but it is not defined in SBML Level 2. As a + result, the text-string formula parser must behave differently + depending on which SBML Level is being targeted. The argument to this + method can be one of two values: + + @li @link libsbml.L3P_AVOGADRO_IS_CSYMBOL + L3P_AVOGADRO_IS_CSYMBOL@endlink (value = @c True): tells the parser to + translate the string @c avogadro (in any capitalization) into an AST + node of type @link libsbml.AST_NAME_AVOGADRO + AST_NAME_AVOGADRO@endlink. + @li @link libsbml.L3P_AVOGADRO_IS_NAME + L3P_AVOGADRO_IS_NAME@endlink (value = @c False): tells the parser to + translate the string @c avogadro into an AST of type @link + libsbml.AST_NAME AST_NAME@endlink. + + Since SBML Level 2 does not define a symbol for Avogadro\'s + constant, the value should be set to @c False when parsing text-string + formulas intended for use in SBML Level 2 documents. + + @param l2only a boolean value (one of the constants + @link libsbml.L3P_AVOGADRO_IS_CSYMBOL + L3P_AVOGADRO_IS_CSYMBOL@endlink or + @link libsbml.L3P_AVOGADRO_IS_NAME + L3P_AVOGADRO_IS_NAME@endlink) indicating how the string @c avogadro + should be treated when encountered in a formula. + + @see getParseAvogadroCsymbol() +"; + + +%feature("docstring") L3ParserSettings::getParseAvogadroCsymbol " + Returns @c True if the current settings are oriented towards handling + @c avogadro for SBML Level 3. + + SBML Level 3 defines a symbol for representing the value of + Avogadro\'s constant, but it is not defined in SBML Level 2. As a + result, the text-string formula parser must behave differently + depending on which SBML Level is being targeted. + + @return A boolean indicating which mode is currently set; the value is + one of the following possibilities: + @li @link libsbml.L3P_AVOGADRO_IS_CSYMBOL + L3P_AVOGADRO_IS_CSYMBOL@endlink (value = @c True): tells the parser to + translate the string @c avogadro (in any capitalization) into an AST + node of type @link libsbml.AST_NAME_AVOGADRO + AST_NAME_AVOGADRO@endlink. + @li @link libsbml.L3P_AVOGADRO_IS_NAME + L3P_AVOGADRO_IS_NAME@endlink (value = @c False): tells the parser to + translate the string @c avogadro into an AST of type @link + libsbml.AST_NAME AST_NAME@endlink. + + @see setParseAvogadroCsymbol() +"; + + +%feature("docstring") XMLAttributes " + @ingroup Core + Representation of attributes on an XML node. + + @htmlinclude not-sbml-warning.html + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") XMLConstructorException " + @ingroup Core + Class of exceptions thrown by constructors of some libSBML objects. + + @htmlinclude not-sbml-warning.html + + In some situations, constructors for SBML objects may need to indicate + to callers that the creation of the object failed. The failure may be + for different reasons, such as an attempt to use invalid parameters or a + system condition such as a memory error. To communicate this to + callers, those classes will throw an XMLConstructorException. @if cpp + Callers can use the standard C++ <code>std::exception</code> method + <code>what()</code> to extract the diagnostic message stored with the + exception.@endif@~ + <p> + In languages that don\'t have an exception mechanism (e.g., C), the + constructors generally try to return an error code instead of throwing + an exception. + + @see SBMLConstructorException +"; + + +%feature("docstring") XMLAttributes::XMLAttributes " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLAttributes()</pre> + + Creates a new empty XMLAttributes set. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLAttributes(XMLAttributes orig)</pre> + + Copy constructor; creates a copy of this XMLAttributes set. + + @p orig the XMLAttributes object to copy. + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") XMLAttributes::clone " + Creates and returns a deep copy of this XMLAttributes set. + + @return a (deep) copy of this XMLAttributes set. +"; + + +%feature("docstring") XMLAttributes::add " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>add( XMLTriple triple, string value)</pre> + + Adds an attribute with the given XMLTriple/value pair to this XMLAttributes set. + + @note if local name with the same namespace URI already exists in this attribute set, + its value and prefix will be replaced. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a string, the value of the attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>add( string name , string value , string namespaceURI = \'\' , string prefix = \'\')</pre> + + Adds an attribute (a name/value pair) to this XMLAttributes object, + optionally with a prefix and URI defining a namespace. + + @param name a string, the local name of the attribute. + @param value a string, the value of the attribute. + @param namespaceURI a string, the namespace URI of the attribute. + @param prefix a string, the prefix of the namespace + + @return an integer code indicating the success or failure of the + function. The possible values returned by this + function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @note if local name with the same namespace URI already exists in this + attribute set, its value and prefix will be replaced. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLAttributes::addResource " + @internal + Adds an name/value pair to this XMLAttributes set. + + This method is similar to the add method but an attribute with same name wont + be overwritten. This facilitates the addition of multiple resource attributes + in CVTerm class. + + @param name a string, the name of the attribute. + @param value a string, the value of the attribute. + + @note This function is only internally used to store multiple rdf:resource + attributes in CVTerm class, and thus should not be used for other purposes. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") XMLAttributes::removeResource " + Removes an attribute with the given index from this XMLAttributes set. + + @param n an integer the index of the resource to be deleted + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") XMLAttributes::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(XMLTriple triple)</pre> + + Removes an attribute with the given XMLTriple from this XMLAttributes set. + + @param triple an XMLTriple, the XML triple of the attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(int n)</pre> + + Removes an attribute with the given index from this XMLAttributes set. + (This function is an alias of XMLAttributes.removeResource() ). + + @param n an integer the index of the resource to be deleted + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string name, string uri = \'\')</pre> + + Removes an attribute with the given local name and namespace URI from + this XMLAttributes set. + + @param name a string, the local name of the attribute. + @param uri a string, the namespace URI of the attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") XMLAttributes::clear " + Clears (deletes) all attributes in this XMLAttributes object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") XMLAttributes::getIndex " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getIndex(XMLTriple triple)</pre> + + Return the index of an attribute with the given XMLTriple. + + @param triple an XMLTriple, the XML triple of the attribute for which + the index is required. + + @return the index of an attribute with the given XMLTriple, or -1 if not present. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getIndex(string name, string uri)</pre> + + Return the index of an attribute with the given local name and namespace URI. + + @param name a string, the local name of the attribute. + @param uri a string, the namespace URI of the attribute. + + @return the index of an attribute with the given local name and namespace URI, + or -1 if not present. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getIndex(string name)</pre> + + Return the index of an attribute with the given name. + + @note A namespace bound to the name is not checked by this function. + Thus, if there are multiple attributes with the given local name and + different namespaces, the smallest index among those attributes will + be returned. XMLAttributes.getIndex() const or + XMLAttributes.getIndex() const should be used to get an index of an + attribute with the given local name and namespace. + + @param name a string, the local name of the attribute for which the + index is required. + + @return the index of an attribute with the given local name, or -1 if not present. +"; + + +%feature("docstring") XMLAttributes::getLength " + Return the number of attributes in the set. + + @return the number of attributes in this XMLAttributes set. +"; + + +%feature("docstring") XMLAttributes::getNumAttributes " + Return the number of attributes in the set. + + @return the number of attributes in this XMLAttributes set. + + This function is an alias for getLength introduced for consistency + with other XML classes. +"; + + +%feature("docstring") XMLAttributes::getName " + Return the local name of an attribute in this XMLAttributes set (by position). + + @param index an integer, the position of the attribute whose local name is + required. + + @return the local name of an attribute in this list (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for the attribute + existence. +"; + + +%feature("docstring") XMLAttributes::getPrefix " + Return the prefix of an attribute in this XMLAttributes set (by position). + + @param index an integer, the position of the attribute whose prefix is + required. + + @return the namespace prefix of an attribute in this list (by + position). + + @note If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for the attribute + existence. +"; + + +%feature("docstring") XMLAttributes::getPrefixedName " + Return the prefixed name of an attribute in this XMLAttributes set (by position). + + @param index an integer, the position of the attribute whose prefixed + name is required. + + @return the prefixed name of an attribute in this list (by + position). + + @note If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. +"; + + +%feature("docstring") XMLAttributes::getURI " + Return the namespace URI of an attribute in this XMLAttributes set (by position). + + @param index an integer, the position of the attribute whose namespace URI is + required. + + @return the namespace URI of an attribute in this list (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. +"; + + +%feature("docstring") XMLAttributes::getValue " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getValue(XMLTriple triple)</pre> + + Return a value of an attribute with the given XMLTriple. + + @param triple an XMLTriple, the XML triple of the attribute whose + value is required. + + @return The attribute value as a string. + + @note If an attribute with the given XMLTriple does not exist, an + empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getValue(int index)</pre> + + Return the value of an attribute in this XMLAttributes set (by position). + + @param index an integer, the position of the attribute whose value is + required. + + @return the value of an attribute in the list (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getValue(string name)</pre> + + Return an attribute\'s value by name. + + @param name a string, the local name of the attribute whose value is required. + + @return The attribute value as a string. + + @note If an attribute with the given local name does not exist, an + empty string will be returned. Use + XMLAttributes.hasAttribute() const + to test for attribute existence. A namespace bound to the local name + is not checked by this function. Thus, if there are multiple + attributes with the given local name and different namespaces, the + value of an attribute with the smallest index among those attributes + will be returned. XMLAttributes.getValue() const or + XMLAttributes.getValue() const should be used to get a value of an + attribute with the given local name and namespace. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getValue(string name, string uri)</pre> + + Return a value of an attribute with the given local name and namespace URI. + + @param name a string, the local name of the attribute whose value is required. + @param uri a string, the namespace URI of the attribute. + + @return The attribute value as a string. + + @note If an attribute with the given local name and namespace URI does + not exist, an empty string will be returned. Use + XMLAttributes.hasAttribute() const + to test for attribute existence. +"; + + +%feature("docstring") XMLAttributes::hasAttribute " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>hasAttribute(XMLTriple triple)</pre> + + Predicate returning @c True or @c False depending on whether + an attribute with the given XML triple exists in this XMLAttributes. + + @param triple an XMLTriple, the XML triple of the attribute + + @return @c True if an attribute with the given XML triple exists in this + XMLAttributes, @c False otherwise. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>hasAttribute(int index)</pre> + + Predicate returning @c True or @c False depending on whether + an attribute with the given index exists in this XMLAttributes. + + @param index an integer, the position of the attribute. + + @return @c True if an attribute with the given index exists in this + XMLAttributes, @c False otherwise. + + + <hr> + Method variant with the following signature: + <pre class='signature'>hasAttribute(string name, string uri=\'\')</pre> + + Predicate returning @c True or @c False depending on whether + an attribute with the given local name and namespace URI exists in this + XMLAttributes. + + @param name a string, the local name of the attribute. + @param uri a string, the namespace URI of the attribute. + + @return @c True if an attribute with the given local name and namespace + URI exists in this XMLAttributes, @c False otherwise. +"; + + +%feature("docstring") XMLAttributes::isEmpty " + Predicate returning @c True or @c False depending on whether + this XMLAttributes set is empty. + + @return @c True if this XMLAttributes set is empty, @c False otherwise. +"; + + +%feature("docstring") XMLAttributes::readInto " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( XMLTriple triple , string& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute with the given XMLTriple into value. + If the XMLTriple was not found, value is not modified. + + If an XMLErrorLog is passed in and required is true, missing + attributes are logged. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a string, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( XMLTriple triple , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute XMLTriple into value. + If the XMLTriple was not found or value could be interpreted as a long, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, we + limit values to what can be stored in a long. For more information, + see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a long, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( XMLTriple triple , double& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute with the given XMLTriple into value. + If the triple was not found or value could be interpreted as a double, +value is not modified. + + According to the W3C XML Schema, valid doubles are the same as valid + doubles for C and the special values \'INF\', \'-INF\', and \'NaN\' + (case-sensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#double + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a double, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( string name , string& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute name into value. If the given local + name was not found, value is not modified. + + If an XMLErrorLog is passed in and required is true, missing + attributes are logged. + + @param name a string, the local name of the attribute. + @param value a string, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @note A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const + should be used to read a value for an attribute name with a prefix and + namespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( string name , bool& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute name into value. If the given local + name was not found or value could be interpreted as a boolean, value + is not modified. + + According to the W3C XML Schema, valid boolean values are: \'true\', + \'false\', \'1\', and \'0\' (case-insensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#boolean + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + + @param name a string, the local name of the attribute. + @param value a boolean, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @note A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should + be used to read a value for an attribute name with a prefix and + namespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( string name , int& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute name into value. If the given local + name was not found or value could be interpreted as an int, value is + not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, we + limit values to what can be stored in a int. For more information, + see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param name a string, the local name of the attribute. + @param value an integer, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @note A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should + be used to read a value for an attribute name with a prefix and + namespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( XMLTriple triple , bool& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute with the given XMLTriple into value. + If the XMLTriple was not found or value could be interpreted as a boolean, + value is not modified. + + According to the W3C XML Schema, valid boolean values are: \'true\', + \'false\', \'1\', and \'0\' (case-insensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#boolean + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a boolean, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( string name , double& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute name into value. If the given local + name was not found or value could be interpreted as a double, value is + not modified. + + According to the W3C XML Schema, valid doubles are the same as valid + doubles for C and the special values \'INF\', \'-INF\', and \'NaN\' + (case-sensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#double + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param name a string, the local name of the attribute. + @param value a double, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @note A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const + should be used to read a value for an attribute name with a prefix and + namespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( string name , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute name into value. If the given local + name was not found or value could be interpreted as an long, value is + not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, we + limit values to what can be stored in a long. For more information, + see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param name a string, the local name of the attribute. + @param value a long, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @note A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should + be used to read a value for an attribute name with a prefix and + namespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( string name , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute name into value. If the given local + name was not found or value could be interpreted as a long integer, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, we + limit values to what can be stored in a long. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param name a string, the local name of the attribute. + @param value a long integereger, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @note A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a value for an attribute name with a + prefix and namespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( XMLTriple triple , int& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute with the given XMLTriple into value. + If the XMLTriple was not found or value could be interpreted as an int, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, we + limit values to what can be stored in a int. For more information, + see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value an integer, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>readInto( XMLTriple triple , long& value , XMLErrorLog log = None , bool required = false , const long line = 0 , const long column = 0)</pre> + + Reads the value for the attribute with the given XMLTriple into value. + If the XMLTriple was not found or value could be interpreted as a long integer, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, we + limit values to what can be stored in a long. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a long integereger, the value of the attribute. + @param log an XMLErrorLog, the error log. + @param required a boolean, indicating whether the attribute is required. + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. + + @returns @c True if the attribute was read into value, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLAttributes::write " + @internal + Writes this XMLAttributes set to stream. + + @param stream XMLOutputStream, stream to which this XMLAttributes + set is to be written. +"; + + +%feature("docstring") XMLAttributes::setErrorLog " + @internal + (Optional) Sets the log used when logging attributeTypeError() and + attributeRequired() errors. + + @param log the log to use + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") XMLAttributes::attributeTypeError " + @internal + Logs an attribute datatype error. + + @param name name of the attribute + @param type the datatype of the attribute value. + @param log the XMLErrorLog where the error should be logged + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. +"; + + +%feature("docstring") XMLAttributes::attributeRequiredError " + @internal + Logs an error indicating a required attribute was missing. + Used internally. + + @param name name of the attribute + @param log the XMLErrorLog where the error should be logged + @param line a long integer, the line number at which the error occured. + @param column a long integer, the column number at which the error occured. +"; + + +%feature("docstring") XMLConstructorException " + @ingroup Core + Class of exceptions thrown by constructors of some libSBML objects. + + @htmlinclude not-sbml-warning.html + + In some situations, constructors for SBML objects may need to indicate + to callers that the creation of the object failed. The failure may be + for different reasons, such as an attempt to use invalid parameters or a + system condition such as a memory error. To communicate this to + callers, those classes will throw an XMLConstructorException. @if cpp + Callers can use the standard C++ <code>std::exception</code> method + <code>what()</code> to extract the diagnostic message stored with the + exception.@endif@~ + <p> + In languages that don\'t have an exception mechanism (e.g., C), the + constructors generally try to return an error code instead of throwing + an exception. + + @see SBMLConstructorException +"; + + +%feature("docstring") XMLNamespaces " + @ingroup Core + Representation of XML Namespaces. + + @htmlinclude not-sbml-warning.html + + This class serves to organize functionality for tracking XML namespaces + in a document or data stream. The namespace declarations are stored as + a list of pairs of XML namespace URIs and prefix strings. These + correspond to the parts of a namespace declaration on an XML element. + For example, in the following XML fragment, + @verbatim + <annotation> + <mysim:nodecolors xmlns:mysim=\'urn:lsid:mysim.org\' + mysim:bgcolor=\'green\' mysim:fgcolor=\'white\'/> + </annotation> + @endverbatim + there is one namespace declaration. Its URI is + <code>urn:lsid:mysim.org</code> and its prefix is <code>mysim</code>. + This pair could be stored as one item in an XMLNamespaces list. + + XMLNamespaces provides various methods for manipulating the list of + prefix-URI pairs. Individual namespaces stored in a given XMLNamespace + object instance can be retrieved based on their index using + XMLNamespaces.getPrefix(), or by their characteristics such as + their URI or position in the list. +"; + + +%feature("docstring") XMLNamespaces::XMLNamespaces " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNamespaces()</pre> + + Creates a new empty list of XML namespace declarations. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNamespaces(XMLNamespaces orig)</pre> + + Copy constructor; creates a copy of this XMLNamespaces list. + + @param orig the XMLNamespaces object to copy + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") XMLNamespaces::clone " + Creates and returns a deep copy of this XMLNamespaces list. + + @return a (deep) copy of this XMLNamespaces list. +"; + + +%feature("docstring") XMLNamespaces::add " + Appends an XML namespace prefix and URI pair to this list of namespace + declarations. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. If there is an XML namespace with the given @p uri prefix + in this list, then its corresponding URI will be overwritten by the + new @p uri unless the uri represents the core sbml namespace. + Calling programs could use one of the other XMLNamespaces + methods, such as + XMLNamespaces.hasPrefix() and + XMLNamespaces.hasURI() to + inquire whether a given prefix and/or URI + is already present in this XMLNamespaces object. + If the @p uri represents the sbml namespaces then it will not be + overwritten, as this has potentially serious consequences. If it + is necessary to replace the sbml namespace the namespace should be removed + prior to adding the new namespace. + + @param uri a string, the uri for the namespace + @param prefix a string, the prefix for the namespace + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLNamespaces::remove " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(int index)</pre> + + Removes an XML Namespace stored in the given position of this list. + + @param index an integer, position of the namespace to remove. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>remove(string prefix)</pre> + + Removes an XML Namespace with the given prefix. + + @param prefix a string, prefix of the required namespace. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + @see remove() +"; + + +%feature("docstring") XMLNamespaces::clear " + Clears (deletes) all XML namespace declarations in this XMLNamespaces + object. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink + + @see remove() +"; + + +%feature("docstring") XMLNamespaces::getIndex " + Look up the index of an XML namespace declaration by URI. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. If this XMLNamespaces object contains a pair with the given + URI @p uri, this method returns its index in the list. + + @param uri a string, the URI of the sought-after namespace. + + @return the index of the given declaration, or <code>-1</code> if not + present. +"; + + +%feature("docstring") XMLNamespaces::containsUri " + Tests whether the given uri is contained in this set of namespaces. +"; + + +%feature("docstring") XMLNamespaces::getIndexByPrefix " + Look up the index of an XML namespace declaration by prefix. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. If this XMLNamespaces object contains a pair with the given + prefix @p prefix, this method returns its index in the list. + + @param prefix a string, the prefix string of the sought-after + namespace + + @return the index of the given declaration, or <code>-1</code> if not + present. +"; + + +%feature("docstring") XMLNamespaces::getLength " + Returns the total number of URI-and-prefix pairs stored in this + particular XMLNamespaces instance. + + @return the number of namespaces in this list. +"; + + +%feature("docstring") XMLNamespaces::getNumNamespaces " + Returns the total number of URI-and-prefix pairs stored in this + particular XMLNamespaces instance. + + @return the number of namespaces in this list. + + This function is an alias for getLength introduced for consistency + with other XML classes. +"; + + +%feature("docstring") XMLNamespaces::getPrefix " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getPrefix(int index)</pre> + + Look up the prefix of an XML namespace declaration by its position. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. This method returns the prefix of the <code>n</code>th + element in that list (if it exists). Callers should use + XMLAttributes.getLength() first to find out how many namespaces are + stored in the list. + + @param index an integer, position of the sought-after prefix + + @return the prefix of an XML namespace declaration in this list (by + position), or an empty string if the @p index is out of range + + @see getLength() + + + <hr> + Method variant with the following signature: + <pre class='signature'>getPrefix(string uri)</pre> + + Look up the prefix of an XML namespace declaration by its URI. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. This method returns the prefix for a pair that has the + given @p uri. + + @param uri a string, the URI of the prefix being sought + + @return the prefix of an XML namespace declaration given its URI, or + an empty string if no such @p uri exists in this XMLNamespaces object +"; + + +%feature("docstring") XMLNamespaces::getURI " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getURI(int index)</pre> + + Look up the URI of an XML namespace declaration by its position. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. This method returns the URI of the <code>n</code>th element + in that list (if it exists). Callers should use + XMLAttributes.getLength() first to find out how many namespaces are + stored in the list. + + @param index an integer, position of the required URI. + + @return the URI of an XML namespace declaration in this list (by + position), or an empty string if the @p index is out of range. + + @see getLength() + + + <hr> + Method variant with the following signature: + <pre class='signature'>getURI(string prefix = \'\')</pre> + + Look up the URI of an XML namespace declaration by its prefix. + + An XMLNamespaces object stores a list of pairs of namespaces and their + prefixes. This method returns the namespace URI for a pair that has + the given @p prefix. + + @param prefix a string, the prefix of the required URI + + @return the URI of an XML namespace declaration having the given @p + prefix, or an empty string if no such prefix-and-URI pair exists + in this XMLNamespaces object + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + @see getURI() +"; + + +%feature("docstring") XMLNamespaces::isEmpty " + Predicate returning @c True or @c False depending on whether this + XMLNamespaces list is empty. + + @return @c True if this XMLNamespaces list is empty, @c False otherwise. +"; + + +%feature("docstring") XMLNamespaces::hasURI " + Predicate returning @c True or @c False depending on whether an XML + Namespace with the given URI is contained in this XMLNamespaces list. + + @param uri a string, the uri for the namespace + + @return @c True if an XML Namespace with the given URI is contained in + this XMLNamespaces list, @c False otherwise. +"; + + +%feature("docstring") XMLNamespaces::hasPrefix " + Predicate returning @c True or @c False depending on whether an XML + Namespace with the given prefix is contained in this XMLNamespaces + list. + + @param prefix a string, the prefix for the namespace + + @return @c True if an XML Namespace with the given URI is contained in + this XMLNamespaces list, @c False otherwise. +"; + + +%feature("docstring") XMLNamespaces::hasNS " + Predicate returning @c True or @c False depending on whether an XML + Namespace with the given URI and prefix pair is contained in this + XMLNamespaces list. + + @param uri a string, the URI for the namespace + @param prefix a string, the prefix for the namespace + + @return @c True if an XML Namespace with the given uri/prefix pair is + contained in this XMLNamespaces list, @c False otherwise. +"; + + +%feature("docstring") XMLNamespaces::removeDefault " + @internal + Removes the default XML namespace. +"; + + +%feature("docstring") XMLNamespaces::containIdenticalSetNS " + @internal + Removes the default XML namespace. +"; + + +%feature("docstring") XMLToken " + @ingroup Core + Representation of a token in an XML stream. + + @htmlinclude not-sbml-warning.html +"; + + +%feature("docstring") XMLToken::XMLToken " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLToken()</pre> + + Creates a new empty XMLToken. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLToken(XMLToken orig)</pre> + + Copy constructor; creates a copy of this XMLToken. + + @param orig the XMLToken object to copy. + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLToken( XMLTriple triple , XMLAttributes attributes , const long line = 0 , const long column = 0 )</pre> + + Creates a start element XMLToken with the given set of attributes. + + @param triple XMLTriple. + @param attributes XMLAttributes, the attributes to set. + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLToken( XMLTriple triple , const long line = 0 , const long column = 0 )</pre> + + Creates an end element XMLToken. + + @param triple XMLTriple. + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLToken( XMLTriple triple , XMLAttributes attributes , XMLNamespaces namespaces , const long line = 0 , const long column = 0 )</pre> + + Creates a start element XMLToken with the given set of attributes and + namespace declarations. + + @param triple XMLTriple. + @param attributes XMLAttributes, the attributes to set. + @param namespaces XMLNamespaces, the namespaces to set. + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLToken( string chars , const long line = 0 , const long column = 0 )</pre> + + Creates a text XMLToken. + + @param chars a string, the text to be added to the XMLToken + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::clone " + Creates and returns a deep copy of this XMLToken. + + @return a (deep) copy of this XMLToken set. +"; + + +%feature("docstring") XMLToken::getAttributes " + Returns the attributes of this element. + + @return the XMLAttributes of this XML element. +"; + + +%feature("docstring") XMLToken::setAttributes " + Sets an XMLAttributes to this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @param attributes XMLAttributes to be set to this XMLToken. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note This function replaces the existing XMLAttributes with the new one. +"; + + +%feature("docstring") XMLToken::addAttr " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>addAttr( XMLTriple triple, string value)</pre> + + Adds an attribute with the given XMLTriple/value pair to the attribute set + in this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @note if local name with the same namespace URI already exists in the + attribute set, its value and prefix will be replaced. + + @param triple an XMLTriple, the XML triple of the attribute. + @param value a string, the value of the attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>addAttr( string name , string value , string namespaceURI = \'\' , string prefix = \'\')</pre> + + Adds an attribute to the attribute set in this XMLToken optionally + with a prefix and URI defining a namespace. + Nothing will be done if this XMLToken is not a start element. + + @param name a string, the local name of the attribute. + @param value a string, the value of the attribute. + @param namespaceURI a string, the namespace URI of the attribute. + @param prefix a string, the prefix of the namespace + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + + @note if local name with the same namespace URI already exists in the + attribute set, its value and prefix will be replaced. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::removeAttr " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeAttr(XMLTriple triple)</pre> + + Removes an attribute with the given XMLTriple from the attribute set + in this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @param triple an XMLTriple, the XML triple of the attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeAttr(int n)</pre> + + Removes an attribute with the given index from the attribute set in + this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @param n an integer the index of the resource to be deleted + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeAttr(string name, string uri = \'\')</pre> + + Removes an attribute with the given local name and namespace URI from + the attribute set in this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @param name a string, the local name of the attribute. + @param uri a string, the namespace URI of the attribute. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") XMLToken::clearAttributes " + Clears (deletes) all attributes in this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink +"; + + +%feature("docstring") XMLToken::getAttrIndex " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getAttrIndex(XMLTriple triple)</pre> + + Return the index of an attribute with the given XMLTriple. + + @param triple an XMLTriple, the XML triple of the attribute for which + the index is required. + + @return the index of an attribute with the given XMLTriple, or <code>-1</code> if not present. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getAttrIndex(string name, string uri=\'\')</pre> + + Return the index of an attribute with the given local name and namespace URI. + + @param name a string, the local name of the attribute. + @param uri a string, the namespace URI of the attribute. + + @return the index of an attribute with the given local name and namespace URI, + or <code>-1</code> if not present. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::getAttributesLength " + Return the number of attributes in the attributes set. + + @return the number of attributes in the attributes set in this XMLToken. +"; + + +%feature("docstring") XMLToken::getAttrName " + Return the local name of an attribute in the attributes set in this + XMLToken (by position). + + @param index an integer, the position of the attribute whose local name + is required. + + @return the local name of an attribute in this list (by position). + + @note If index + is out of range, an empty string will be returned. Use + XMLToken.hasAttr() + to test for the attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrPrefix " + Return the prefix of an attribute in the attribute set in this + XMLToken (by position). + + @param index an integer, the position of the attribute whose prefix is + required. + + @return the namespace prefix of an attribute in the attribute set + (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test + for the attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrPrefixedName " + Return the prefixed name of an attribute in the attribute set in this + XMLToken (by position). + + @param index an integer, the position of the attribute whose prefixed + name is required. + + @return the prefixed name of an attribute in the attribute set + (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test + for attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrURI " + Return the namespace URI of an attribute in the attribute set in this + XMLToken (by position). + + @param index an integer, the position of the attribute whose namespace + URI is required. + + @return the namespace URI of an attribute in the attribute set (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test + for attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrValue " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getAttrValue(XMLTriple triple)</pre> + + Return a value of an attribute with the given XMLTriple. + + @param triple an XMLTriple, the XML triple of the attribute whose + value is required. + + @return The attribute value as a string. + + @note If an attribute with the + given XMLTriple does not exist, an empty string will be returned. + Use XMLToken.hasAttr() + to test for attribute existence. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getAttrValue(int index)</pre> + + Return the value of an attribute in the attribute set in this XMLToken + (by position). + + @param index an integer, the position of the attribute whose value is + required. + + @return the value of an attribute in the attribute set (by position). + + @note If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test + for attribute existence. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getAttrValue(string name, string uri=\'\')</pre> + + Return a value of an attribute with the given local name and namespace URI. + + @param name a string, the local name of the attribute whose value is required. + @param uri a string, the namespace URI of the attribute. + + @return The attribute value as a string. + + @note If an attribute with the + given local name and namespace URI does not exist, an empty string will be + returned. + Use XMLToken.hasAttr() + to test for attribute existence. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::hasAttr " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>hasAttr(XMLTriple triple)</pre> + + Predicate returning @c True or @c False depending on whether + an attribute with the given XML triple exists in the attribute set in + this XMLToken + + @param triple an XMLTriple, the XML triple of the attribute + + @return @c True if an attribute with the given XML triple exists + in the attribute set in this XMLToken, @c False otherwise. + + + + <hr> + Method variant with the following signature: + <pre class='signature'>hasAttr(int index)</pre> + + Predicate returning @c True or @c False depending on whether + an attribute with the given index exists in the attribute set in this + XMLToken. + + @param index an integer, the position of the attribute. + + @return @c True if an attribute with the given index exists in the attribute + set in this XMLToken, @c False otherwise. + + + <hr> + Method variant with the following signature: + <pre class='signature'>hasAttr(string name, string uri=\'\')</pre> + + Predicate returning @c True or @c False depending on whether + an attribute with the given local name and namespace URI exists + in the attribute set in this XMLToken. + + @param name a string, the local name of the attribute. + @param uri a string, the namespace URI of the attribute. + + @return @c True if an attribute with the given local name and namespace + URI exists in the attribute set in this XMLToken, @c False otherwise. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::isAttributesEmpty " + Predicate returning @c True or @c False depending on whether + the attribute set in this XMLToken set is empty. + + @return @c True if the attribute set in this XMLToken is empty, + @c False otherwise. +"; + + +%feature("docstring") XMLToken::getNamespaces " + Returns the XML namespace declarations for this XML element. + + @return the XML namespace declarations for this XML element. +"; + + +%feature("docstring") XMLToken::setNamespaces " + Sets an XMLnamespaces to this XML element. + Nothing will be done if this XMLToken is not a start element. + + @param namespaces XMLNamespaces to be set to this XMLToken. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + + @note This function replaces the existing XMLNamespaces with the new one. +"; + + +%feature("docstring") XMLToken::addNamespace " + Appends an XML namespace prefix and URI pair to this XMLToken. + If there is an XML namespace with the given prefix in this XMLToken, + then the existing XML namespace will be overwritten by the new one. + + Nothing will be done if this XMLToken is not a start element. + + @param uri a string, the uri for the namespace + @param prefix a string, the prefix for the namespace + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::removeNamespace " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>removeNamespace(int index)</pre> + + Removes an XML Namespace stored in the given position of the XMLNamespaces + of this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @param index an integer, position of the removed namespace. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink + + + <hr> + Method variant with the following signature: + <pre class='signature'>removeNamespace(string prefix)</pre> + + Removes an XML Namespace with the given prefix. + Nothing will be done if this XMLToken is not a start element. + + @param prefix a string, prefix of the required namespace. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE @endlink +"; + + +%feature("docstring") XMLToken::clearNamespaces " + Clears (deletes) all XML namespace declarations in the XMLNamespaces of + this XMLToken. + Nothing will be done if this XMLToken is not a start element. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink +"; + + +%feature("docstring") XMLToken::getNamespaceIndex " + Look up the index of an XML namespace declaration by URI. + + @param uri a string, uri of the required namespace. + + @return the index of the given declaration, or <code>-1</code> if not present. +"; + + +%feature("docstring") XMLToken::getNamespaceIndexByPrefix " + Look up the index of an XML namespace declaration by prefix. + + @param prefix a string, prefix of the required namespace. + + @return the index of the given declaration, or <code>-1</code> if not present. +"; + + +%feature("docstring") XMLToken::getNamespacesLength " + Returns the number of XML namespaces stored in the XMLNamespaces + of this XMLToken. + + @return the number of namespaces in this list. +"; + + +%feature("docstring") XMLToken::getNamespacePrefix " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getNamespacePrefix(int index)</pre> + + Look up the prefix of an XML namespace declaration by position. + + Callers should use getNamespacesLength() to find out how many + namespaces are stored in the XMLNamespaces. + + @param index an integer, position of the required prefix. + + @return the prefix of an XML namespace declaration in the XMLNamespaces + (by position). + + @note If index is out of range, an empty string will be + returned. + + @see getNamespacesLength() + + + <hr> + Method variant with the following signature: + <pre class='signature'>getNamespacePrefix(string uri)</pre> + + Look up the prefix of an XML namespace declaration by its URI. + + @param uri a string, the URI of the prefix being sought + + @return the prefix of an XML namespace declaration given its URI. + + @note If @p uri does not exist, an empty string will be returned. +"; + + +%feature("docstring") XMLToken::getNamespaceURI " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getNamespaceURI(int index)</pre> + + Look up the URI of an XML namespace declaration by its position. + + @param index an integer, position of the required URI. + + @return the URI of an XML namespace declaration in the XMLNamespaces + (by position). + + @note If @p index is out of range, an empty string will be + returned. + + @see getNamespacesLength() + + + <hr> + Method variant with the following signature: + <pre class='signature'>getNamespaceURI(string prefix = \'\')</pre> + + Look up the URI of an XML namespace declaration by its prefix. + + @param prefix a string, the prefix of the required URI + + @return the URI of an XML namespace declaration given its prefix. + + @note If @p prefix does not exist, an empty string will be returned. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLToken::isNamespacesEmpty " + Predicate returning @c True or @c False depending on whether + the XMLNamespaces of this XMLToken is empty. + + @return @c True if the XMLNamespaces of this XMLToken is empty, + @c False otherwise. +"; + + +%feature("docstring") XMLToken::hasNamespaceURI " + Predicate returning @c True or @c False depending on whether + an XML Namespace with the given URI is contained in the XMLNamespaces of + this XMLToken. + + @param uri a string, the uri for the namespace + + @return @c True if an XML Namespace with the given URI is contained in the + XMLNamespaces of this XMLToken, @c False otherwise. +"; + + +%feature("docstring") XMLToken::hasNamespacePrefix " + Predicate returning @c True or @c False depending on whether + an XML Namespace with the given prefix is contained in the XMLNamespaces of + this XMLToken. + + @param prefix a string, the prefix for the namespace + + @return @c True if an XML Namespace with the given URI is contained in the + XMLNamespaces of this XMLToken, @c False otherwise. +"; + + +%feature("docstring") XMLToken::hasNamespaceNS " + Predicate returning @c True or @c False depending on whether + an XML Namespace with the given uri/prefix pair is contained in the + XMLNamespaces ofthis XMLToken. + + @param uri a string, the uri for the namespace + @param prefix a string, the prefix for the namespace + + @return @c True if an XML Namespace with the given uri/prefix pair is + contained in the XMLNamespaces of this XMLToken, @c False otherwise. +"; + + +%feature("docstring") XMLToken::setTriple " + Sets the XMLTripe (name, uri and prefix) of this XML element. + Nothing will be done if this XML element is a text node. + + @param triple XMLTriple to be added to this XML element. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") XMLToken::getName " + Returns the (unqualified) name of this XML element. + + @return the (unqualified) name of this XML element. +"; + + +%feature("docstring") XMLToken::getPrefix " + Returns the namespace prefix of this XML element. + + @return the namespace prefix of this XML element. + + @note If no prefix + exists, an empty string will be return. +"; + + +%feature("docstring") XMLToken::getURI " + Returns the namespace URI of this XML element. + + @return the namespace URI of this XML element. +"; + + +%feature("docstring") XMLToken::getCharacters " + Returns the text of this element. + + @return the characters of this XML text. +"; + + +%feature("docstring") XMLToken::append " + Appends characters to this XML text content. + + @param chars string, characters to append + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink +"; + + +%feature("docstring") XMLToken::getColumn " + Returns the column at which this XMLToken occurred in the input + document or data stream. + + @return the column at which this XMLToken occurred. +"; + + +%feature("docstring") XMLToken::getLine " + Returns the line at which this XMLToken occurred in the input document + or data stream. + + @return the line at which this XMLToken occurred. +"; + + +%feature("docstring") XMLToken::isElement " + Predicate returning @c True or @c False depending on whether + this XMLToken is an XML element. + + @return @c True if this XMLToken is an XML element, @c False otherwise. +"; + + +%feature("docstring") XMLToken::isEnd " + Predicate returning @c True or @c False depending on whether + this XMLToken is an XML end element. + + @return @c True if this XMLToken is an XML end element, @c False otherwise. +"; + + +%feature("docstring") XMLToken::isEndFor " + Predicate returning @c True or @c False depending on whether + this XMLToken is an XML end element for the given start element. + + @param element XMLToken, element for which query is made. + + @return @c True if this XMLToken is an XML end element for the given + XMLToken start element, @c False otherwise. +"; + + +%feature("docstring") XMLToken::isEOF " + Predicate returning @c True or @c False depending on whether + this XMLToken is an end of file marker. + + @return @c True if this XMLToken is an end of file (input) marker, @c False + otherwise. +"; + + +%feature("docstring") XMLToken::isStart " + Predicate returning @c True or @c False depending on whether + this XMLToken is an XML start element. + + @return @c True if this XMLToken is an XML start element, @c False otherwise. +"; + + +%feature("docstring") XMLToken::isText " + Predicate returning @c True or @c False depending on whether + this XMLToken is an XML text element. + + @return @c True if this XMLToken is an XML text element, @c False otherwise. +"; + + +%feature("docstring") XMLToken::setEnd " + Declares this XML start element is also an end element. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink +"; + + +%feature("docstring") XMLToken::setEOF " + Declares this XMLToken is an end-of-file (input) marker. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink +"; + + +%feature("docstring") XMLToken::unsetEnd " + Declares this XML start/end element is no longer an end element. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink +"; + + +%feature("docstring") XMLToken::write " + @internal + Writes this XMLToken to stream. + + @param stream XMLOutputStream, stream to which this XMLToken + is to be written. +"; + + +%feature("docstring") XMLToken::toString " + Prints a string representation of the underlying token stream, for + debugging purposes. +"; + + +%feature("docstring") XMLNode " + @ingroup Core + Representation of a node in an XML document tree. + + Beginning with version 3.0.0, libSBML implements an XML abstraction + layer. This layer presents a uniform XML interface to calling programs + regardless of which underlying XML parser libSBML has actually been + configured to use. The basic data object in the XML abstraction is a + @em node, represented by XMLNode. + + An XMLNode can contain any number of children. Each child is another + XMLNode, thereby forming a tree. The methods XMLNode.getNumChildren() + and XMLNode.getChild() can be used to access the tree + structure starting from a given node. + + Each XMLNode is subclassed from XMLToken, and thus has the same methods + available as XMLToken. These methods include XMLToken.getNamespaces(), + XMLToken.getPrefix(), XMLToken.getName(), XMLToken.getURI(), and + XMLToken.getAttributes(). + + @section xmlnode-str2xmlnode Conversion between an XML string and an XMLNode + + LibSBML provides the following utility functions for converting an XML + string (e.g., <code><annotation>...</annotation></code>) + to/from an XMLNode object. + <ul> + <li> XMLNode.toXMLString() returns a string representation of the XMLNode object. + + <li> XMLNode.convertXMLNodeToString() + (static function) returns a string representation + of the given XMLNode object. + + <li> XMLNode.convertStringToXMLNode() + (static function) returns an XMLNode object converted + from the given XML string. + </ul> + + The returned XMLNode object by XMLNode.convertStringToXMLNode() + is a dummy root (container) XMLNode if the given XML string has two or + more top-level elements (e.g., + "<code><p>...</p><p>...</p></code>"). In the + dummy root node, each top-level element in the given XML string is + contained as a child XMLNode. XMLToken.isEOF() can be used to identify + if the returned XMLNode object is a dummy node or not. Here is an + example: @if clike + @verbatim + // Checks if the XMLNode object returned by XMLNode.convertStringToXMLNode() is a dummy root node: + + string str = \'...\'; + XMLNode xn = XMLNode.convertStringToXMLNode(); + if ( xn == None ) + { + // returned value is null (error) + ... + } + else if ( xn->isEOF() ) + { + // root node is a dummy node + for ( int i = 0; i < xn->getNumChildren(); i++ ) + { + // access to each child node of the dummy node. + XMLNode xnChild = xn->getChild(i); + ... + } + } + else + { + // root node is NOT a dummy node + ... + } + @endverbatim + @endif@if java + @verbatim + // Checks if the returned XMLNode object is a dummy root node: + + String str = \'...\'; + XMLNode xn = XMLNode.convertStringToXMLNode(str); + if ( xn == null ) + { + // returned value is null (error) + ... + } + else if ( xn.isEOF() ) + { + // root node is a dummy node + for ( int i = 0; i < xn.getNumChildren(); i++ ) + { + // access to each child node of the dummy node. + XMLNode xnChild = xn.getChild(i); + ... + } + } + else + { + // root node is NOT a dummy node + ... + } + @endverbatim + @endif@if python + @verbatim + xn = XMLNode.convertStringToXMLNode(\'<p></p>\') + if xn == None: + # Do something to handle exceptional situation. + + elif xn.isEOF(): + # Node is a dummy node. + + else: + # None is not a dummy node. + @endverbatim + @endif@~ +"; + + +%feature("docstring") XMLNode::XMLNode " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode(XMLToken token)</pre> + + Creates a new XMLNode by copying token. + + @param token XMLToken to be copied to XMLNode + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode( XMLTriple triple , XMLAttributes attributes , XMLNamespaces namespaces , const long line = 0 , const long column = 0 )</pre> + + Creates a new start element XMLNode with the given set of attributes and + namespace declarations. + + @param triple XMLTriple. + @param attributes XMLAttributes, the attributes to set. + @param namespaces XMLNamespaces, the namespaces to set. + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode(XMLNode orig)</pre> + + Copy constructor; creates a copy of this XMLNode. + + @param orig the XMLNode instance to copy. + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode()</pre> + + Creates a new empty XMLNode with no children. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode( XMLTriple triple , XMLAttributes attributes , const long line = 0 , const long column = 0 )</pre> + + Creates a start element XMLNode with the given set of attributes. + + @param triple XMLTriple. + @param attributes XMLAttributes, the attributes to set. + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode( XMLTriple triple , const long line = 0 , const long column = 0 )</pre> + + Creates an end element XMLNode. + + @param triple XMLTriple. + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLNode( string chars , const long line = 0 , const long column = 0 )</pre> + + Creates a text XMLNode. + + @param chars a string, the text to be added to the XMLToken + @param line a long integer, the line number (default = 0). + @param column a long integer, the column number (default = 0). + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLNode::clone " + Creates and returns a deep copy of this XMLNode. + + @return a (deep) copy of this XMLNode. +"; + + +%feature("docstring") XMLNode::addChild " + Adds a copy of @p node as a child of this XMLNode. + + The given @p node is added at the end of the list of children. + + @param node the XMLNode to be added as child. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION @endlink + + @note The given node is added at the end of the children list. +"; + + +%feature("docstring") XMLNode::insertChild " + Inserts a copy of the given node as the <code>n</code>th child of this + XMLNode. + + If the given index @p n is out of range for this XMLNode instance, + the @p node is added at the end of the list of children. Even in + that situation, this method does not throw an error. + + @param n an integer, the index at which the given node is inserted + @param node an XMLNode to be inserted as <code>n</code>th child. + + @return a reference to the newly-inserted child @p node +"; + + +%feature("docstring") XMLNode::removeChild " + Removes the <code>n</code>th child of this XMLNode and returns the + removed node. + + It is important to keep in mind that a given XMLNode may have more + than one child. Calling this method erases all existing references to + child nodes @em after the given position @p n. If the index @p n is + greater than the number of child nodes in this XMLNode, this method + takes no action (and returns @c None). + + @param n an integer, the index of the node to be removed + + @return the removed child, or @c None if @p n is greater than the number + of children in this node + + @note The caller owns the returned node and is responsible for deleting it. +"; + + +%feature("docstring") XMLNode::removeChildren " + Removes all children from this node. + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") XMLNode::getChild " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getChild(long n)</pre> + + Returns the <code>n</code>th child of this XMLNode. + + If the index @p n is greater than the number of child nodes, or it is + 0 or less, this method returns an empty node. + + @param n an integer, the index of the node to return + + @return the <code>n</code>th child of this XMLNode. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getChild(string name)</pre> + + Returns the first child of this XMLNode with the corresponding name. + + If no child with corrsponding name can be found, + this method returns an empty node. + + @param name the name of the node to return + + @return the first child of this XMLNode with given name. +"; + + +%feature("docstring") XMLNode::getIndex " + Return the index of the first child of this XMLNode with the given name. + + @param name a string, the name of the child for which the + index is required. + + @return the index of the first child of this XMLNode with the given + name, or -1 if not present. +"; + + +%feature("docstring") XMLNode::hasChild " + Return a boolean indicating whether this XMLNode has a child with the + given name. + + @param name a string, the name of the child to be checked. + + @return boolean indicating whether this XMLNode has a child with the + given name. +"; + + +%feature("docstring") XMLNode::equals " + Compare this XMLNode against another XMLNode returning true if both + nodes represent the same XML tree, or false otherwise. + + @param other another XMLNode to compare against. + + @param ignoreURI whether to ignore the namespace URI when doing the + comparison. + + @return boolean indicating whether this XMLNode represents the same XML + tree as another. +"; + + +%feature("docstring") XMLNode::getNumChildren " + Returns the number of children for this XMLNode. + + @return the number of children for this XMLNode. +"; + + +%feature("docstring") XMLNode::write " + @internal + Writes this XMLNode and its children to stream. + + @param stream XMLOutputStream, stream to which this XMLNode + is to be written. +"; + + +%feature("docstring") XMLNode::toXMLString " + Returns a string representation of this XMLNode. + + @return a string derived from this XMLNode. +"; + + +%feature("docstring") XMLNode::convertXMLNodeToString " + Returns a string representation of a given XMLNode. + + @param node the XMLNode to be represented as a string + + @return a string-form representation of @p node +"; + + +%feature("docstring") XMLNode::convertStringToXMLNode " + Returns an XMLNode which is derived from a string containing XML + content. + + The XML namespace must be defined using argument @p xmlns if the + corresponding XML namespace attribute is not part of the string of the + first argument. + + @param xmlstr string to be converted to a XML node. + @param xmlns XMLNamespaces the namespaces to set (default value is @c None). + + @note The caller owns the returned XMLNode and is reponsible for + deleting it. The returned XMLNode object is a dummy root (container) + XMLNode if the top-level element in the given XML string is NOT + <code><html></code>, <code><body></code>, + <code><annotation></code>, or <code><notes></code>. In + the dummy root node, each top-level element in the given XML string is + contained as a child XMLNode. XMLToken.isEOF() can be used to + identify if the returned XMLNode object is a dummy node. + + @return a XMLNode which is converted from string @p xmlstr. If the + conversion failed, this method returns @c None. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLTriple " + @ingroup Core + Representation of a qualified XML name. + + @htmlinclude not-sbml-warning.html + + A \'triple\' in the libSBML XML layer encapsulates the notion of qualified + name, meaning an element name or an attribute name with an optional + namespace qualifier. An XMLTriple instance carries up to three data items: + + <ul> + + <li> The name of the attribute or element; that is, the attribute name + as it appears in an XML document or data stream; + + <li> The XML namespace prefix (if any) of the attribute. For example, + in the following fragment of XML, the namespace prefix is the string + <code>mysim</code> and it appears on both the element + <code>someelement</code> and the attribute <code>attribA</code>. When + both the element and the attribute are stored as XMLTriple objects, + their <i>prefix</i> is <code>mysim</code>. + @verbatim + <mysim:someelement mysim:attribA=\'value\' /> + @endverbatim + + <li> The XML namespace URI with which the prefix is associated. In + XML, every namespace used must be declared and mapped to a URI. + + </ul> + + XMLTriple objects are the lowest-level data item in the XML layer + of libSBML. Other objects such as XMLToken make use of XMLTriple + objects. +"; + + +%feature("docstring") XMLTriple::XMLTriple " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLTriple( string name , string uri , string prefix )</pre> + + Creates a new XMLTriple with the given @p name, @p uri and and @p + prefix. + + @param name a string, name for the XMLTriple. + @param uri a string, URI of the XMLTriple. + @param prefix a string, prefix for the URI of the XMLTriple, + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLTriple(string triplet, const char sepchar = \' \')</pre> + + Creates a new XMLTriple by splitting the given @p triplet on the + separator character @p sepchar. + + Triplet may be in one of the following formats: + <ul> + <li> name + <li> URI sepchar name + <li> URI sepchar name sepchar prefix + </ul> + @param triplet a string representing the triplet as above + @param sepchar a character, the sepchar used in the triplet + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLTriple()</pre> + + Creates a new, empty XMLTriple. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLTriple(XMLTriple orig)</pre> + + Copy constructor; creates a copy of this XMLTriple set. + + @param orig the XMLTriple object to copy. + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") XMLTriple::clone " + Creates and returns a deep copy of this XMLTriple set. + + @return a (deep) copy of this XMLTriple set. +"; + + +%feature("docstring") XMLTriple::getName " + Returns the @em name portion of this XMLTriple. + + @return a string, the name from this XMLTriple. +"; + + +%feature("docstring") XMLTriple::getPrefix " + Returns the @em prefix portion of this XMLTriple. + + @return a string, the @em prefix portion of this XMLTriple. +"; + + +%feature("docstring") XMLTriple::getURI " + Returns the @em URI portion of this XMLTriple. + + @return URI a string, the @em prefix portion of this XMLTriple. +"; + + +%feature("docstring") XMLTriple::getPrefixedName " + Returns the prefixed name from this XMLTriple. + + @return a string, the prefixed name from this XMLTriple. +"; + + +%feature("docstring") XMLTriple::isEmpty " + Predicate returning @c True or @c False depending on whether + this XMLTriple is empty. + + @return @c True if this XMLTriple is empty, @c False otherwise. +"; + + +%feature("docstring") XMLOutputStream " + @ingroup Core + + @if notclike @internal @endif@~ +"; + + +%feature("docstring") XMLOutputStream::endElement " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>endElement(XMLTriple triple)</pre> + + Writes the given XML end element \'prefix:name\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>endElement(string name, string prefix = \'\')</pre> + + Writes the given XML end element name to this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::setAutoIndent " + Turns automatic indentation on or off for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::startElement " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>startElement(XMLTriple triple)</pre> + + Writes the given XML start element \'prefix:name\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>startElement(string name, string prefix = \'\')</pre> + + Writes the given XML start element name to this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::startEndElement " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>startEndElement(XMLTriple triple)</pre> + + Writes the given XML start and end element \'prefix:name\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>startEndElement(string name, string prefix = \'\')</pre> + + Writes the given XML start and end element name to this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::writeAttribute " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, string value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string prefix, const double& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string prefix, string value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, const bool& value)</pre> + + Writes the given attribute, prefix:name=\'true\' or prefix:name=\'false\' + to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, const double& value)</pre> + + Writes the given attribute, name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, const long& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, const double& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, const long& value)</pre> + + Writes the given attribute, name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string value)</pre> + + Writes the given attribute, name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string value)</pre> + + Writes the given attribute, name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string prefix, const long& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string prefix, const long& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string prefix, const int& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, const long& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, const int& value)</pre> + + Writes the given attribute, name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, const int& value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, const bool& value)</pre> + + Writes the given attribute, name=\'true\' or name=\'false\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(XMLTriple triple, string value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this + XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, const long& value)</pre> + + Writes the given attribute, name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string prefix, string value)</pre> + + Writes the given attribute, prefix:name=\'value\' to this XMLOutputStream. + + + <hr> + Method variant with the following signature: + <pre class='signature'>writeAttribute(string name, string &prefix, const bool& value)</pre> + + Writes the given attribute, prefix:name=\'true\' or prefix:name=\'false\' to this + XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::writeXMLDecl " + Writes the XML declaration: + <?xml version=\'1.0\' encoding=\'...\'?> +"; + + +%feature("docstring") XMLOutputStream::writeComment " + Writes an XML comment: + <?xml version=\'1.0\' encoding=\'...\'?> +"; + + +%feature("docstring") XMLOutputStream::downIndent " + Decreases the indentation level for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::upIndent " + Increases the indentation level for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::getStringStream " + @internal + Increases the indentation level for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::writeChars " + @internal + Outputs the given characters to the underlying stream. +"; + + +%feature("docstring") XMLOutputStream::writeIndent " + @internal + Outputs indentation whitespace. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLOutputStream::setStringStream " + @internal + Outputs the int value in quotes. +"; + + +%feature("docstring") XMLOutputStream::unsetStringStream " + @internal + Outputs the int value in quotes. +"; + + +%feature("docstring") XMLOutputStringStream::XMLOutputStringStream " + @internal + Creates a new XMLOutputStream that wraps stream. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLOutputStringStream::getString " + @internal + Creates a new XMLOutputStream that wraps stream. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLOutputFileStream::XMLOutputFileStream " + @internal + Creates a new XMLOutputStream that wraps stream. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLInputStream " + @ingroup Core + + @if notclike @internal @endif@~ +"; + + +%feature("docstring") XMLInputStream::getEncoding " + @internal + @return the encoding of the XML stream. +"; + + +%feature("docstring") XMLInputStream::getVersion " + @internal + @return the version of the XML stream. +"; + + +%feature("docstring") XMLInputStream::getErrorLog " + @internal + @return an XMLErrorLog which can be used to log XML parse errors and + other validation errors (and messages). +"; + + +%feature("docstring") XMLInputStream::isEOF " + @internal + @return true if end of file (stream) has been reached, false + otherwise. +"; + + +%feature("docstring") XMLInputStream::isError " + @internal + @return true if a fatal error occurred while reading from this stream. +"; + + +%feature("docstring") XMLInputStream::isGood " + @internal + @return true if the stream is in a good state (i.e. isEOF() and + isError() are both false), false otherwise. +"; + + +%feature("docstring") XMLInputStream::next " + @internal + Consumes the next XMLToken and return it. + + @return the next XMLToken or EOF (XMLToken.isEOF() == true). +"; + + +%feature("docstring") XMLInputStream::peek " + @internal + Returns the next XMLToken without consuming it. A subsequent call to + either peek() or next() will return the same token. + + @return the next XMLToken or EOF (XMLToken.isEOF() == true). +"; + + +%feature("docstring") XMLInputStream::skipPastEnd " + @internal + Consume zero or more XMLTokens up to and including the corresponding + end XML element or EOF. +"; + + +%feature("docstring") XMLInputStream::skipText " + @internal + Consume zero or more XMLTokens up to but not including the next XML + element or EOF. +"; + + +%feature("docstring") XMLInputStream::setErrorLog " + @internal + Sets the XMLErrorLog this stream will use to log errors. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") XMLInputStream::toString " + @internal + Prints a string representation of the underlying token stream, for + debugging purposes. +"; + + +%feature("docstring") XMLInputStream::getSBMLNamespaces " + @internal + Prints a string representation of the underlying token stream, for + debugging purposes. +"; + + +%feature("docstring") XMLInputStream::setSBMLNamespaces " + @internal + Prints a string representation of the underlying token stream, for + debugging purposes. +"; + + +%feature("docstring") XMLInputStream::queueToken " + @internal + Runs mParser until mTokenizer is ready to deliver at least one + XMLToken or a fatal error occurs. +"; + + +%feature("docstring") XMLError " + @ingroup Core + Representation of errors, warnings and other diagnostics + + @htmlinclude not-sbml-warning.html + + LibSBML can be configured to use any of a number of XML parsers; at the + time of this writing, libSBML supports Xerces versions 2.4 through 3.1, + Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher. + These parsers each report different status codes for the various + exceptions that can occur during XML processing. The XMLError object + class abstracts away from the particular diagnostics reported by the + different parsers and presents a single uniform interface and set of + status codes, along with operations for manipulating the error objects. + + When the libSBML XML parser layer encounters an error in the XML content + being processed, or when there is something else wrong (such as an + out-of-memory condition), the problems are reported as XMLError objects. + Each XMLError object instance has an identification number that + identifies the nature of the problem. + @if clike This error identifier will be up to five digits + long and drawn from the enumeration <a class=\'el\' + href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>. Applications can use the + error identifiers as a means of recognizing the error encountered and + changing their behavior if desired. @else This + error identifier is one of the constants listed in the next section below. + Applications can use the error identifiers as a means of recognizing the + error encountered and changing their behavior if desired. @endif@~ + + Integer error codes are useful for software, but not so much for telling + humans what happened. For this reason, XMLError also provides two text + messages describing the nature of the error. These messages are + accessible by means of the methods XMLError.getShortMessage() and + XMLError.getMessage(). The method XMLError.getShortMessage() returns + a very brief synopsis of the warning or error condition, whereas + XMLError.getMessage() returns a longer explanation. These text strings + are suitable for displaying to human users. + + Each XMLError object also contains a category code; its value may be + retrieved using the method XMLError.getCategory(). Category values + are drawn from @if clike the enumeration <a class=\'el\' href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a> described below.@else a + set of constants whose names begin with the characters @c LIBSBML_CAT_, described below.@endif@~  Categories + are used by libSBML to provide more information to calling programs about + the nature of a given error. + + In addition to category codes, each XMLError object also has a severity + code; its value may be retrieved using the method + XMLError.getSeverity(). Severity code values are drawn from + @if clike the enumeration <a class=\'el\' href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a>@else a + set of constants whose names begin with the characters @c LIBSBML_SEV_@endif, + described below. Severity levels range from informational + (@link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) to + fatal errors (@link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink). + + Finally, XMLError objects record the line and column near where the + problem occurred in the XML content. The values can be retrieved using + the methods XMLError.getLine() and XMLError.getColumn(). We say \'near + where the problem occurred\', because many factors affect how accurate + the line/column information ultimately is. For example, sometimes, the + underlying XML parsers can only report such information for the parent + XML element where an error occurs, and not for the specific point where + the problem occurs. In other situations, some parsers report invalid + line and/or column numbers altogether. If this occurs, libSBML sets the + line and/or column number in the XMLError object to either + <code>0</code> or the value of the maximum unsigned long integer + representable on the platform where libSBML is running. The probability + that a true line or column number in an SBML model would equal this + value is vanishingly small; thus, if an application encounters these + values in an XMLError object, it can assume no valid line/column number + could be provided by libSBML in that situation. + + @if clike + <h3><a class=\'anchor\' name=\'XMLErrorCode_t\'>XMLErrorCode_t</a></h3> + + This is an enumeration of all the error and warning codes returned by + the XML layer in libSBML. Each code is an integer with a 4-digit value + less than 10000. The following table lists each possible value and a + brief description of its meaning. + @endif@if java <h3><a class=\'anchor\' + name=\'XMLErrorCode_t\'>Error codes associated with XMLError objects</a></h3> + + The error and warning codes returned by the XML layer in libSBML are + listed in the table below. In the libSBML Java language interface, + these error identifiers are currently implemented as static integer + constants defined in the interface class <code><a + href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. This is + admittedly not an ideal approach from the standpoint of modern Java + programming, but it was necessary to work around the lack of + enumerations in Java prior to JDK 1.5. Future versions of libSBML may + use a proper Java enumeration type to define the error + identifiers. @endif@if csharp <h3><a class=\'anchor\' + name=\'XMLErrorCode_t\'>Error codes associated with XMLError objects</a></h3> + + The error and warning codes returned by the XML layer in libSBML are + listed in the table below. In the libSBML C# language interface, + these error identifiers are currently implemented as static integer + constants defined in the interface class @link libsbmlcs.libsbml@endlink.@endif@~ + + <center> + <table cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> + <caption>Possible XMLError error codes. Depending on the programming + language in use, the <em>Enumerator</em> values will be defined either + as a value from the enumeration XMLErrorCode_t or as integer constants. + To make this table more compact, we have shortened the identifiers for + the category and severity codes to their essential parts. To get the + actual names of the constants, prepend <code>LIBSBML_CAT_</code> to the + category names and <code>LIBSBML_SEV_</code> to the severity names + shown in the two right-hand columns. + </caption> + <tr style=\'background: lightgray\' class=\'normal-font\'> + <th>Enumerator</th> + <th>Meaning</th> + <th width=\'90\'>Category</th> + <th width=\'90\'>Severity</th> + </tr> + <tr><td>@link libsbml.XMLUnknownError XMLUnknownError@endlink</td><td>Unrecognized error encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>@link libsbml.XMLOutOfMemory XMLOutOfMemory@endlink</td> <td>Out of memory</td><td>SYSTEM</td><td>FATAL</td></tr> + <tr><td>@link libsbml.XMLFileUnreadable XMLFileUnreadable@endlink</td> <td>File unreadable</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLFileUnwritable XMLFileUnwritable@endlink</td> <td>File unwritable</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLFileOperationError XMLFileOperationError@endlink</td><td>Error encountered while attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLNetworkAccessError XMLNetworkAccessError@endlink</td><td>Network access error</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>@link libsbml.InternalXMLParserError InternalXMLParserError@endlink</td><td>Internal XML parser state error</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>@link libsbml.UnrecognizedXMLParserCode UnrecognizedXMLParserCode@endlink</td><td>XML parser returned an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>@link libsbml.XMLTranscoderError XMLTranscoderError@endlink</td><td>Character transcoder error</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>@link libsbml.MissingXMLDecl MissingXMLDecl@endlink</td><td>Missing XML declaration at beginning of XML input</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.MissingXMLEncoding MissingXMLEncoding@endlink</td><td>Missing encoding attribute in XML declaration</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLDecl BadXMLDecl@endlink</td><td>Invalid or unrecognized XML declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLDOCTYPE BadXMLDOCTYPE@endlink</td><td>Invalid, malformed or unrecognized XML DOCTYPE declaration</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.InvalidCharInXML InvalidCharInXML@endlink</td><td>Invalid character in XML content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadlyFormedXML BadlyFormedXML@endlink</td><td>XML content is not well-formed</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.UnclosedXMLToken UnclosedXMLToken@endlink</td><td>Unclosed XML token</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.InvalidXMLConstruct InvalidXMLConstruct@endlink</td><td>XML construct is invalid or not permitted</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLTagMismatch XMLTagMismatch@endlink</td><td>Element tag mismatch or missing tag</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.DuplicateXMLAttribute DuplicateXMLAttribute@endlink</td><td>Duplicate XML attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.UndefinedXMLEntity UndefinedXMLEntity@endlink</td><td>Undefined XML entity</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadProcessingInstruction BadProcessingInstruction@endlink</td><td>Invalid, malformed or unrecognized XML processing instruction</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLPrefix BadXMLPrefix@endlink</td><td>Invalid or undefined XML namespace prefix</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLPrefixValue BadXMLPrefixValue@endlink</td><td>Invalid XML namespace prefix value</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.MissingXMLRequiredAttribute MissingXMLRequiredAttribute@endlink</td><td>Missing a required XML attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLAttributeTypeMismatch XMLAttributeTypeMismatch@endlink</td><td>Data type mismatch for the value of an attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLBadUTF8Content XMLBadUTF8Content@endlink</td><td>Invalid UTF8 content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.MissingXMLAttributeValue MissingXMLAttributeValue@endlink</td><td>Missing or improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLAttributeValue BadXMLAttributeValue@endlink</td><td>Invalid or unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLAttribute BadXMLAttribute@endlink</td><td>Invalid, unrecognized or malformed attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.UnrecognizedXMLElement UnrecognizedXMLElement@endlink</td><td>Element either not recognized or not permitted</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLComment BadXMLComment@endlink</td><td>Badly formed XML comment</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLDeclLocation BadXMLDeclLocation@endlink</td><td>XML declaration not permitted in this location</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLUnexpectedEOF XMLUnexpectedEOF@endlink</td><td>Reached end of input unexpectedly</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLIDValue BadXMLIDValue@endlink</td><td>Value is invalid for XML ID, or has already been used</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLIDRef BadXMLIDRef@endlink</td><td>XML ID value was never declared</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.UninterpretableXMLContent UninterpretableXMLContent@endlink</td><td>Unable to interpret content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.BadXMLDocumentStructure BadXMLDocumentStructure@endlink</td><td>Bad XML document structure</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.InvalidAfterXMLContent InvalidAfterXMLContent@endlink</td><td>Encountered invalid content after expected content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLExpectedQuotedString XMLExpectedQuotedString@endlink</td><td>Expected to find a quoted string</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted@endlink</td><td>An empty value is not permitted in this context</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLBadNumber XMLBadNumber@endlink</td><td>Invalid or unrecognized number</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLBadColon XMLBadColon@endlink</td><td>Colon characters are invalid in this context</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.MissingXMLElements MissingXMLElements@endlink</td><td>One or more expected elements are missing</td><td>XML</td><td>ERROR</td></tr> + <tr><td>@link libsbml.XMLContentEmpty XMLContentEmpty@endlink</td><td>Main XML content is empty</td><td>XML</td><td>ERROR</td></tr> + </table> + </center> + + + @if clike + <h3><a class=\'anchor\' name=\'XMLErrorCategory_t\'>XMLErrorCategory_t</a></h3> + + As discussed above, each XMLError object contains a value for a category + identifier, describing the type of issue that the XMLError object + represents. The category can be retrieved from an XMLError object using + the method XMLError.getCategory(). The value is chosen from the + enumeration of category codes <a class=\'el\' href=\'#XMLErrorCategory_t\'> + XMLErrorCategory_t</a>. The following table + lists each possible value and a brief description of its meaning. + @endif@if java <h3><a class=\'anchor\' + name=\'XMLErrorCategory_t\'>Category codes associated with XMLError objects</a></h3> + + As discussed above, each XMLError object contains a value for a category + identifier, describing the type of issue that the XMLError object represents. + The category can be retrieved from an XMLError object using the method + XMLError.getCategory(). The following table lists each possible value + and a brief description of its meaning. + + As is the case with the error codes, in the libSBML Java language + interface, the category identifiers are currently implemented as static + integer constants defined in the interface class + <code>libsbmlConstants</code> in the file \'<a + href=\'libsbmlConstants.html\'>libsbmlConstants.java</a>\'. + @endif@if csharp <h3><a class=\'anchor\' + name=\'XMLErrorCategory_t\'>Category codes associated with XMLError objects</a></h3> + + As discussed above, each XMLError object contains a value for a category + identifier, describing the type of issue that the XMLError object represents. + The category can be retrieved from an XMLError object using the method + XMLError.getCategory(). The following table lists each possible value + and a brief description of its meaning. + + As is the case with the error codes, in the libSBML C# language + interface, the category identifiers are currently implemented as static + integer constants defined in the interface + class @link libsbmlcs.libsbml@endlink. @endif@~ + + <center> + <table width=\'90%\' cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> + <tr style=\'background: lightgray\' class=\'normal-font\'> + <th>Enumerator</th> + <th>Meaning</th> + </tr> + <tr><td>@link libsbml.LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink</td> + <td>A problem involving the libSBML + software itself or the underlying XML parser. This almost certainly + indicates a software defect (i.e., bug) in libSBML. Please report + instances of this to the libSBML developers.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink</td> + <td>A problem reported by the operating + system, such as an inability to read or write a file. This indicates + something that is not a program error but is outside of the control of + libSBML.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink</td> + <td>A problem in the XML content itself. This + usually arises from malformed XML or the use of + constructs not permitted in SBML.</td></tr> + </table> + </center> + + + @if clike + <h3><a class=\'anchor\' name=\'XMLErrorSeverity_t\'>XMLErrorSeverity_t</a></h3> + + As described above, each XMLError object contains a value for a severity + code, describing how critical is the issue that the XMLError object + represents. The severity can be retrieved from an XMLError object using + the method XMLError.getSeverity(). The value is chosen from the + enumeration of category codes <a class=\'el\' href=\'#XMLErrorSeverity_t\'> + XMLErrorSeverity_t</a>. The following table + lists each possible value and a brief description of its meaning. + @endif@if java <h3><a class=\'anchor\' + name=\'XMLErrorSeverity_t\'>Severity codes associated with XMLError objects</a></h3> + + As described above, each XMLError object contains a value for a severity + code, describing how severe is the issue that the XMLError object + represents. The severity be retrieved from an XMLError object using the + method XMLError.getSeverity(). The following table lists each possible + value and a brief description of its meaning. + + As is the case with the category codes, in the libSBML Java language + interface, these severity codes are currently + implemented as static integer constants defined in the interface class + <code>libsbmlConstants</code> in the file \'<a + href=\'libsbmlConstants.html\'>libsbmlConstants.java</a>\'. This + is admittedly not an ideal approach from the standpoint of modern Java + programming, but it was necessary to work around the lack of + enumerations in Java prior to JDK 1.5. Future versions of libSBML may + use a proper Java enumeration type to define the severity + codes. @endif@if csharp <h3><a class=\'anchor\' + name=\'XMLErrorSeverity_t\'>Severity codes associated with XMLError objects</a></h3> + + As described above, each XMLError object contains a value for a severity + code, describing how severe is the issue that the XMLError object + represents. The severity be retrieved from an XMLError object using the + method XMLError.getSeverity(). The following table lists each possible + value and a brief description of its meaning. + + As is the case with the category codes, in the libSBML C# language + interface, these severity codes are currently + implemented as static integer constants defined in the interface class + @link libsbmlcs.libsbml@endlink.@endif@~ + + <center> + <table width=\'90%\' cellspacing=\'1\' cellpadding=\'1\' border=\'0\' class=\'text-table width80 normal-font alt-row-colors\'> + <tr style=\'background: lightgray\' class=\'normal-font\'> + <th>Enumerator</th> + <th>Meaning</th> + </tr> + <tr><td>@link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink</td> + <td>The error is actually informational and + not necessarily a serious problem.</td></tr> + <tr><td>@link libsbml.LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink</td> + <td>The error object represents a problem + that is not serious enough to necessarily stop the problem, but + applications should take note of the problem and evaluate what its + implications may be.</td></tr> + <tr><td>@link libsbml.LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink</td> + <td>The error object represents a serious + error. The application may continue running but it is unlikely to be + able to continue processing the same XML file or data stream.</td></tr> + <tr><td>@link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink</td> + <td>A serious error occurred, such as an + out-of-memory condition, and the software should terminate + immediately.</td></tr> + </table> + </center> +"; + + +%feature("docstring") XMLError::XMLError " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLError(XMLError orig)</pre> + + Copy constructor; creates a copy of this XMLError. + + @p orig the XMLError object to copy. + + @throws @if python ValueError @else XMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>XMLError( const int errorId = 0 , string details = \'\' , const long line = 0 , const long column = 0 , const long severity = LIBSBML_SEV_FATAL , const long category = LIBSBML_CAT_INTERNAL )</pre> + + Creates a new XMLError to report that something occurred during XML + processing. + + XMLError objects have identification numbers to indicate the nature of + the exception. @if clike These numbers are drawn from + the enumeration <a class=\'el\' + href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>. + @else These numbers are defined as unsigned + integer constants in the file + \'libsbmlConstants.java\'. See the <a class=\'el\' + href=\'#XMLErrorCode_t\'>top of this documentation</a> for a table + listing the possible values and their meanings. @endif@~ The argument @p + errorId to this constructor @em can be (but does not have to be) a + value from this @if clike enumeration. If it is a value + from <a class=\'el\' href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>, the + XMLError class assumes the error is a low-level system or XML layer + error and <em>prepends</em> a built-in, predefined error message to + any string passed in the argument @p details to this constructor. In + addition, all <a class=\'el\' href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a> + errors have associated values for the @p severity and @p category + codes, and these fields are filled-in as well from the enumerations <a + class=\'el\' href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a> and <a + class=\'el\' href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a>, + respectively. @else set of constants. If it is + one of the predefined error identifiers, the XMLError class assumes + the error is a low-level system or XML layer error and + <em>prepends</em> a built-in, predefined error message to any string + passed in the argument @p details to this constructor. In addition, + all the predefined error identifiers have associated values for the @p + severity and @p category codes, and these fields are filled-in as + well. @endif@~ + + If the error identifier @p errorId is a number greater than 9999, this + constructor assumes that the error was generated from another part of + the software, and does not do additional filling in of values beyond + the defaults in the constructor itself. This allows XMLError to serve + as a base class for other errors (and is used in this way elsewhere in + libSBML). Callers should fill in all the parameters with suitable + values if generating errors with codes greater than 9999 to make + maximum use of the XMLError facilities. + + @if clike As mentioned above, there are two other + enumerations, <a class=\'el\' + href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a> and <a class=\'el\' + href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a>, used for indicating + the severity and category of error for the predefined XMLError codes. + The values passed in @p severity and @p category override the defaults + assigned based on the error code. If the value of @p errorId is a + value from <a class=\'el\' href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>, + callers do not need to fill in @p severity and @p category. + Conversely, if @p errorId is not a value from <a class=\'el\' + href=\'#XMLErrorCode_t\'>XMLErrorCode_t</a>, callers can use other + values (not just those from <a class=\'el\' + href=\'#XMLErrorSeverity_t\'>XMLErrorSeverity_t</a> and <a class=\'el\' + href=\'#XMLErrorCategory_t\'>XMLErrorCategory_t</a>, but their own + special values) for @p severity and @p + category. @else As mentioned above, + there are additional constants defined for <a class=\'el\' + href=\'#XMLErrorSeverity_t\'>standard severity</a> and <a class=\'el\' + href=\'#XMLErrorCategory_t\'>standard category</a> codes, and every predefined + error in libSBML has an associated value for severity and category taken + from these predefined sets. These constants have symbol names + prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>, + respectively. If the value of @p errorId is one of the standard error + codes, callers do not need to fill in @p severity and @p category in a + call to this constructor. Conversely, if @p errorId is not an existing + XML-level error code, callers can use other values for @p severity and + @p category. @endif@~ + + @param errorId a long integer, the identification number of the error. + + @param details a string containing additional details about the error. + If the error code in @p errorId is one that is recognized by XMLError, + the given message is @em appended to a predefined message associated + with the given code. If the error code is not recognized, the message + is stored as-is as the text of the error. + + @param line a long integer, the line number at which the error occured. + + @param column a long integer, the column number at which the error occured. + + @param severity an integer indicating severity of the error. + + @param category an integer indicating the category to which the error + belongs. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLError::getErrorId " + Returns the identifier of this error. + + @return the error code for this error. + + @see getMessage() + @see getShortMessage() + @see getCategory() + @see getSeverity() +"; + + +%feature("docstring") XMLError::getMessage " + Returns the message text of this error. + + The message associated with an error object describes the nature of + the problem. The message returned by this method is generally longer + and clearer than the message returned by XMLError.getShortMessage(), + but not in all cases. + + Callers may use XMLError.getCategory() and XMLError.getSeverity() to + obtain additional information about the nature and severity of the + problem. + + @return the message text + + @see getErrorId() + @see getShortMessage() + @see getCategory() + @see getSeverity() +"; + + +%feature("docstring") XMLError::getShortMessage " + Returns a brief message for this error. + + This is an alternative error message that, in general, is as short as + the authors could make it. However, brevity is often inversely + proportional to clarity, so this short message may not be sufficiently + informative to understand the nature of the error. Calling + applications may wish to check XMLError.getMessage() in addition or + instead. + + @return the short error message text + + @see getErrorId() + @see getMessage() + @see getCategory() + @see getSeverity() +"; + + +%feature("docstring") XMLError::getLine " + Returns the line number in the XML input near where the error, warning + or other diagnostic occurred. + + We say \'near where the problem occurred\', because many factors affect + how accurate the line/column information ultimately is. For example, + sometimes, the underlying XML parsers can only report such information + for the parent XML element where an error occurs, and not for the + specific point where the problem occurs. In other situations, some + parsers report invalid line and/or column numbers altogether. If this + occurs, libSBML sets the line and/or column number in the XMLError + object to either <code>0</code> or the value of the maximum unsigned + long integer representable on the platform where libSBML is running. + The probability that a true line or column number in an SBML model + would equal this value is vanishingly small; thus, if an application + encounters these values in an XMLError object, it can assume no valid + line/column number could be provided by libSBML in that situation. + + @return the line number + + @see getColumn() +"; + + +%feature("docstring") XMLError::getColumn " + Returns the column number in the XML input near where the error, + warning or other diagnostic occurred. + + We say \'near where the problem occurred\', because many factors affect + how accurate the line/column information ultimately is. For example, + sometimes, the underlying XML parsers can only report such information + for the parent XML element where an error occurs, and not for the + specific point where the problem occurs. In other situations, some + parsers report invalid line and/or column numbers altogether. If this + occurs, libSBML sets the line and/or column number in the XMLError + object to either <code>0</code> or the value of the maximum unsigned + long integer representable on the platform where libSBML is running. + The probability that a true line or column number in an SBML model + would equal this value is vanishingly small; thus, if an application + encounters these values in an XMLError object, it can assume no valid + line/column number could be provided by libSBML in that situation. + + @return the column number + + @see getLine() +"; + + +%feature("docstring") XMLError::getSeverity " + Returns the severity of this error. + + XMLError defines an enumeration of severity codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own severity codes with numbers higher than those in the predefined + set of severity codes. + + @return the severity of this XMLError. + + @see getSeverityAsString() + @see getCategory() +"; + + +%feature("docstring") XMLError::getSeverityAsString " + Returns a string describing the severity level of this error. + + XMLError defines an enumeration of severity codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own severity codes with numbers higher than those in the predefined + set of severity codes. + + @return string representing the severity of this XMLError. + + @see getSeverity() + @see getCategoryAsString() +"; + + +%feature("docstring") XMLError::getCategory " + Returns the category of this error. + + XMLError defines an enumeration of category codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own categories with numbers higher than those in the predefined + set of category codes. + + Categories can be used to partition errors into distinct groups. + Among other things, this can be used to prevent id conflicts by + uniquely identifying an XMLError by both id and category. + + @return the category of this XMLError. + + @see getSeverity() + @see getCategoryAsString() +"; + + +%feature("docstring") XMLError::getCategoryAsString " + Returns a string describing the category of this error. + + XMLError defines an enumeration of category codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own categories with numbers higher than those in the predefined + set of category codes. + + Categories can be used to partition errors into distinct groups. + Among other things, this can be used to prevent id conflicts by + uniquely identifying an XMLError by both id and category. + + @return string representing the category of this XMLError. + + @see getCategory() + @see getSeverityAsString() +"; + + +%feature("docstring") XMLError::isInfo " + Predicate returning @c True or @c False depending on whether this + error object is for information purposes only. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value @link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink from the + @if clike enumeration #XMLErrorSeverity_t. @else set of predefined + severity codes.@endif@~ + + @return @c True if this XMLError is for informational purposes only, + @c False otherwise. + + @see isWarning() + @see isError() + @see isFatal() +"; + + +%feature("docstring") XMLError::isWarning " + Predicate returning @c True or @c False depending on whether + this error object is a warning. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value @link libsbml.LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink from the + @if clike enumeration #XMLErrorSeverity_t. @else set of predefined + severity codes.@endif@~ + + @return @c True if this error is a warning, @c False otherwise. + + @see isInfo() + @see isError() + @see isFatal() +"; + + +%feature("docstring") XMLError::isError " + Predicate returning @c True or @c False depending on whether this + error is a significant error. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value @link libsbml.LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink from the + @if clike enumeration #XMLErrorSeverity_t. @else set of predefined + severity codes.@endif@~ + + @return @c True if this error is an error, @c False otherwise. + + @see isInfo() + @see isWarning() + @see isFatal() +"; + + +%feature("docstring") XMLError::isFatal " + Predicate returning @c True or @c False depending on whether this + error is a fatal run-time error. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value @link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink from the + @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~ + + @return @c True if this error is a fatal error, @c False otherwise. + + @see isInfo() + @see isWarning() + @see isError() +"; + + +%feature("docstring") XMLError::isInternal " + Predicate returning @c True or @c False depending on whether this + error resulted from an internal program error. + + This is equivalent to obtaining the category identifier from an + XMLError object (via XMLError.getCategory()) and then comparing it to + the value @link libsbml.LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink from the + @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ + + @return @c True or @c False + + @see isSystem() + @see isXML() +"; + + +%feature("docstring") XMLError::isSystem " + Predicate returning @c True or @c False depending on whether this + error was generated by the operating system. + + This is equivalent to obtaining the category identifier from an + XMLError object (via XMLError.getCategory()) and then comparing it to + the value @link libsbml.LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink from the + @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ + + @return @c True or @c False + + @see isInternal() + @see isXML() +"; + + +%feature("docstring") XMLError::isXML " + Predicate returning @c True or @c False depending on whether this + error resulted from a problem in the XML input (e.g., an XML syntax + error). + + This is equivalent to obtaining the category identifier from an + XMLError object (via XMLError.getCategory()) and then comparing it to + the value @link libsbml.LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink from the + @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ + + @return @c True or @c False + + @see isInternal() + @see isSystem() +"; + + +%feature("docstring") XMLError::isValid " + Predicate returning @c True or @c False depending on whether this + error resulted from a problem or whether it was logged as an unknown + error. + + This is equivalent to obtaining the error identifier from an + XMLError object (via XMLError.getErrorId()) and then comparing it to + the value XMLUnknownError or UnknownError from the + @if clike enumeration #XMLErrorCode_t. @else set of predefined error codes.@endif@~ + + @return @c True or @c False +"; + + +%feature("docstring") XMLError::setLine " + Sets the line number where this error occurred. + + @param line a long integer, the line number to set. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see setColumn() +"; + + +%feature("docstring") XMLError::setColumn " + Sets the column number where this error occurred. + + @param column a long integer, the column number to set. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see setLine() +"; + + +%feature("docstring") XMLError::getStandardMessage " + Returns a copy of the message string associated with the given + predefined XMLError code. + + @param code the error code whose message is sought; it must be a + predefined value from @if clike <a class=\'el\' href=\'#XMLErrorCode_t\'> + XMLErrorCode_t</a>. @else <a class=\'el\' href=\'#XMLErrorCode_t\'>the set + of predefined error identifiers</a>.@endif@~ +"; + + +%feature("docstring") XMLError::getPackage " + Returns a copy of the message string associated with the given + predefined XMLError code. + + @param code the error code whose message is sought; it must be a + predefined value from @if clike <a class=\'el\' href=\'#XMLErrorCode_t\'> + XMLErrorCode_t</a>. @else <a class=\'el\' href=\'#XMLErrorCode_t\'>the set + of predefined error identifiers</a>.@endif@~ +"; + + +%feature("docstring") XMLError::getErrorIdOffset " + Returns a copy of the message string associated with the given + predefined XMLError code. + + @param code the error code whose message is sought; it must be a + predefined value from @if clike <a class=\'el\' href=\'#XMLErrorCode_t\'> + XMLErrorCode_t</a>. @else <a class=\'el\' href=\'#XMLErrorCode_t\'>the set + of predefined error identifiers</a>.@endif@~ +"; + + +%feature("docstring") XMLErrorLog " + @ingroup Core + Log of errors and other events encountered while processing an XML + file or data stream. + + @htmlinclude not-sbml-warning.html + + The error log is a list. The XML layer of libSBML maintains an error + log associated with a given XML document or data stream. When an + operation results in an error, or when there is something wrong with the + XML content, the problem is reported as an XMLError object stored in the + XMLErrorLog list. Potential problems range from low-level issues (such + as the inability to open a file) to XML syntax errors (such as + mismatched tags or other problems). + + A typical approach for using this error log is to first use + @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ + to inquire how many XMLError object instances it contains, and then to + iterate over the list of objects one at a time using + getError(long n) const. Indexing in the list begins at 0. + + In normal circumstances, programs using libSBML will actually obtain an + SBMLErrorLog rather than an XMLErrorLog. The former is subclassed from + XMLErrorLog and simply wraps commands for working with SBMLError objects + rather than the low-level XMLError objects. Classes such as + SBMLDocument use the higher-level SBMLErrorLog. +"; + + +%feature("docstring") XMLErrorLog::getNumErrors " + Returns the number of errors that have been logged. + + To retrieve individual errors from the log, callers may use + @if clike getError() @else XMLErrorLog.getError() @endif. + + @return the number of errors that have been logged. +"; + + +%feature("docstring") XMLErrorLog::getError " + Returns the <i>n</i>th XMLError object in this log. + + Index @p n is counted from 0. Callers should first inquire about the + number of items in the log by using the method + @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif. + Attempts to use an error index number that exceeds the actual number + of errors in the log will result in a @c None being returned. + + @param n the index number of the error to retrieve (with 0 being the + first error). + + @return the <i>n</i>th XMLError in this log, or @c None if @p n is + greater than or equal to + @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif. + + @see getNumErrors() +"; + + +%feature("docstring") XMLErrorLog::clearLog " + Deletes all errors from this log. +"; + + +%feature("docstring") XMLErrorLog::XMLErrorLog " + @internal + Creates a new empty XMLErrorLog. +"; + + +%feature("docstring") XMLErrorLog::setParser " + @internal + Sets the XMLParser associated with this XMLErrorLog. + + The XMLParser will be used to obtain the current line and column + number for XMLError objects that lack line and column numbers when + they are logged. This method is used by libSBML\'s internal XML + parsing code and probably has no useful reason to be called from + application programs. + + @param p XMLParser, the parser to use + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") XMLErrorLog::toString " + Writes all errors contained in this log to a string and returns it. + + This method uses printErrors() to format the diagnostic messages. + Please consult that method for information about the organization + of the messages in the string returned by this method. + + @return a string containing all logged errors and warnings. + + @see printErrors() +"; + + +%feature("docstring") XMLErrorLog::printErrors " + Prints all the errors or warnings stored in this error log + + It prints the text to the stream given by the optional parameter @p + stream. If no parameter is given, it prints the output to the + standard error stream. + + If no errors have occurred, i.e., <code>getNumErrors() == 0</code>, no + output will be sent to the stream. + + The format of the output is: + @verbatim + N error(s): + line NNN: (id) message + @endverbatim + + @param stream the ostream or ostringstream object indicating where + the output should be printed. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") XMLErrorLog::isSeverityOverridden " + Returns a boolean indicating whether or not the severity is overriden +"; + + +%feature("docstring") XMLErrorLog::unsetSeverityOverride " + usets an existing override +"; + + +%feature("docstring") XMLErrorLog::getSeverityOverride " + Returns the current override +"; + + +%feature("docstring") XMLErrorLog::setSeverityOverride " + Set the severity override. + + If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be + logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG + no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then + all errors will be logged as warnings. +"; + + +%feature("docstring") XMLErrorLog::changeErrorSeverity " + Set the severity override. + + If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be + logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG + no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then + all errors will be logged as warnings. +"; + + +%feature("docstring") SBMLErrorLog " + @ingroup Core + Log of errors and other events encountered during SBML processing. + + @htmlinclude not-sbml-warning.html + + The error log is a list. Each SBMLDocument maintains its own + SBMLErrorLog. When a libSBML operation on SBML content results in an + error, or when there is something worth noting about the SBML content, + the issue is reported as an SBMLError object stored in the SBMLErrorLog + list. + + SBMLErrorLog is derived from XMLErrorLog, an object class that serves + exactly the same purpose but for the XML parsing layer. XMLErrorLog + provides crucial methods such as + @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ + for determining how many SBMLError or XMLError objects are in the log. + SBMLErrorLog inherits these methods. + + The general approach to working with SBMLErrorLog in user programs + involves first obtaining a pointer to a log from a libSBML object such + as SBMLDocument. Callers should then use + @if java XMLErrorLog.getNumErrors()@else getNumErrors() @endif@~ to inquire how + many objects there are in the list. (The answer may be 0.) If there is + at least one SBMLError object in the SBMLErrorLog instance, callers can + then iterate over the list using + SBMLErrorLog.getError()@if clike const@endif, + using methods provided by the SBMLError class to find out the error code + and associated information such as the error severity, the message, and + the line number in the input. + + If you wish to simply print the error strings for a human to read, an + easier and more direct way might be to use SBMLDocument.printErrors(). + + @see SBMLError + @see XMLErrorLog + @see XMLError +"; + + +%feature("docstring") SBMLErrorLog::getError " + Returns the <i>n</i>th SBMLError object in this log. + + Index @p n is counted from 0. Callers should first inquire about the + number of items in the log by using the + @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ method. + Attempts to use an error index number that exceeds the actual number + of errors in the log will result in a @c None being returned. + + @param n the index number of the error to retrieve (with 0 being the + first error). + + @return the <i>n</i>th SBMLError in this log, or @c None if @p n is + greater than or equal to + @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif. + + @see getNumErrors() +"; + + +%feature("docstring") SBMLErrorLog::getNumFailsWithSeverity " + Returns the number of errors that have been logged with the given + severity code. + + LibSBML associates severity levels with every SBMLError object to + provide an indication of how serious the problem is. Severities range + from informational diagnostics to fatal (irrecoverable) errors. Given + an SBMLError object instance, a caller can interrogate it for its + severity level using methods such as SBMLError.getSeverity(), + SBMLError.isFatal(), and so on. The present method encapsulates + iteration and interrogation of all objects in an SBMLErrorLog, making + it easy to check for the presence of error objects with specific + severity levels. + + @if clike @param severity a value from + #SBMLErrorSeverity_t @endif@if java @param severity a + value from the set of <code>LIBSBML_SEV_</code> constants defined by + the interface class <code><a + href=\'libsbmlConstants.html\'>libsbmlConstants</a></code> @endif@if python @param severity a + value from the set of <code>LIBSBML_SEV_</code> constants defined by + the interface class @link libsbml libsbml@endlink. @endif@~ + + @return a count of the number of errors with the given severity code. + + @see getNumErrors() +"; + + +%feature("docstring") SBMLErrorLog::SBMLErrorLog " + @internal + Creates a new, empty SBMLErrorLog. +"; + + +%feature("docstring") SBMLErrorLog::logError " + @internal + Convenience function that combines creating an SBMLError object and + adding it to the log. + + @param errorId a long integer, the identification number of the error. + + @param level a long integer, the SBML Level + + @param version a long integer, the SBML Level\'s Version + + @param details a string containing additional details about the error. + If the error code in @p errorId is one that is recognized by SBMLError, + the given message is @em appended to a predefined message associated + with the given code. If the error code is not recognized, the message + is stored as-is as the text of the error. + + @param line a long integer, the line number at which the error occured. + + @param column a long integer, the column number at which the error occured. + + @param severity an integer indicating severity of the error. + + @param category an integer indicating the category to which the error + belongs. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SBMLErrorLog::logPackageError " + @internal + Convenience function that combines creating an SBMLError object and + adding it to the log. + + @param errorId a long integer, the identification number of the error. + + @param level a long integer, the SBML Level + + @param version a long integer, the SBML Level\'s Version + + @param details a string containing additional details about the error. + If the error code in @p errorId is one that is recognized by SBMLError, + the given message is @em appended to a predefined message associated + with the given code. If the error code is not recognized, the message + is stored as-is as the text of the error. + + @param line a long integer, the line number at which the error occured. + + @param column a long integer, the column number at which the error occured. + + @param severity an integer indicating severity of the error. + + @param category an integer indicating the category to which the error + belongs. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") SBMLErrorLog::remove " + Removes an error having errorId from the SBMLError list. + + Only the first item will be removed if there are multiple errors + with the given errorId. + + @param errorId the error identifier of the error to be removed. +"; + + +%feature("docstring") SBMLErrorLog::contains " + Returns true if SBMLErrorLog contains an errorId + + @param errorId the error identifier of the error to be found. +"; + + +%feature("docstring") SBMLError " + @ingroup Core + Representation of errors, warnings and other diagnostics + + @htmlinclude not-sbml-warning.html + + When a libSBML operation on SBML content results in an error, or when + there is something wrong with the SBML content, the problems are + reported as SBMLError objects. These are generally stored in an + SBMLErrorLog object; this log object, in turn, is kept in the + SBMLDocument object containing the SBML content. Applications can + obtain the list of logged errors using SBMLDocument.getErrorLog() and + then use the methods provided by SBMLErrorLog to access individual + SBMLError objects. (Note that despite the word \'error\' in the name, + SBMLError objects are used to represent not only \'true\' errors, but also + warnings and some informational diagnostics. The name is a historical + hold-over from early versions of libSBML, in which the object really was + only used to report errors.) + + @if clike + Each SBMLError object instance has an identification number that + identifies the nature of the problem. This \'error id\' number will be up + to five digits long, and it will be listed in one of two enumerations: + <a class=\'el\' href=\'#SBMLErrorCode_t\'> SBMLErrorCode_t</a> (described <a + class=\'el\' href=\'#SBMLErrorCode_t\'> below</a>) or @link + XMLError::XMLErrorCode_t XMLErrorCode_t @endlink (described in the + documentation for the class XMLError). The former enumeration contains + all the SBML validation rule numbers listed in the appendices of the + SBML specification documents, as well as some additional + libSBML-specific error codes. + @endif@if java + Each SBMLError object instance has an identification number that + identifies the nature of the problem. This \'error id\' number will be up + to five digits long, and it will come from one of two sets of static + integer constants defined in the interface class <code><a + href=\'libsbmlConstants.html\'> libsbmlConstants</a></code>: either the + SBML error identifiers <a class=\'el\' href=\'#SBMLErrorCode_t\'> (described + below)</a> or the XML error identifiers (described in the documentation + for the class <code><a href=\'XMLError.html\'> XMLError</a></code>). The + former set of constants includes all the SBML validation rule numbers + listed in the appendices of the SBML specification documents, as well as + some additional libSBML-specific error codes. + @endif@if python + Each SBMLError object instance has an identification number that + identifies the nature of the problem. This \'error id\' number will be up + to five digits long, and it will come from one + of two sets of static integer constants defined in + the interface class @link libsbml libsbml@endlink: either the SBML + error identifiers <a + class=\'el\' href=\'#SBMLErrorCode_t\'> (described below)</a> or the XML + error identifiers (described in the documentation for the class XMLError). + The former set of constants + includes all the SBML validation rule numbers listed in the appendices + of the SBML specification documents, as well as some additional + libSBML-specific error codes. + @endif@~ + + Error codes are useful mainly for software. For human readers, + SBMLError also includes text messages that describe the nature of a + given problem. The messages can be accessed using + SBMLError.getShortMessage() and SBMLError.getMessage(). The former + provides a brief one-line description of the issue, while + SBMLError.getMessage() provides a more detailed text, including (if + appropriate) references to sections of the SBML specifications where + relevant topics are discussed. These text strings are suitable for + displaying to human users. + + @if clike + An SBMLError object also contains a category code; its value may be + retrieved using the method SBMLError.getCategory(). Category values + are drawn from the enumeration <a class=\'el\' + href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a> described below. + Categories are used to partition errors into distinct conceptual groups. + This is principally used by the libSBML validation system to group + classes of validation checks. For example, + @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink + is the category for tests that check identifier consistency; + @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink + is the category for MathML consistency checking; and + so on. + @endif@if java + An SBMLError object also contains a category code; its value may be + retrieved using the method SBMLError.getCategory(). Category values + are drawn from a set of static integer constants + defined in <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>, + and having names beginning with the characters + <code>LIBSBML_CAT_</code>. The list of possible codes is described in a + separate section below. Categories are used to partition errors into + distinct conceptual groups. This is principally used by the libSBML + validation system to group classes of validation checks. For example, + @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink + is the category for tests that check identifier consistency; + @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink + is the category for MathML consistency checking; and + so on. + @endif@if python + An SBMLError object also contains a category code; its value may be + retrieved using the method SBMLError.getCategory(). Category values + are drawn from a set of static integer constants + defined in @link libsbml libsbml@endlink and having names beginning with the characters + <code>LIBSBML_CAT_</code>. The list of possible codes is described in a + separate section below. Categories are used to partition errors into + distinct conceptual groups. This is principally used by the libSBML + validation system to group classes of validation checks. For example, + @link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink + is the category for tests that check identifier consistency; + @link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink + is the category for MathML consistency checking; and + so on. + @endif@~ + + In addition, SBMLError also has a severity code. Its value may be + retrieved using the method SBMLError.getSeverity(). The possible + severity values are the same as those reported by @if clike XMLError.@endif@if python XMLError.@endif@if java <code><a href=\'XMLError.html\'>XMLError</a></code>.@endif@~ + Severity levels currently range from informational + (@link libsbml.LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) + to fatal errors + (@link libsbml.LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink). + They can be + used by an application to evaluate how serious a given problem + is. + + Finally, SBMLError records the line and column near where the problem + occurred in the SBML content. The values may be retrieved using the + methods SBMLError.getLine() and SBMLError.getColumn(). We say \'near\', + because a lot of factors affect how accurate the line/column information + ultimately is. For example, different XML parsers have different + conventions for which line and column number they report for a + particular problem (which makes a difference when a problem involves an + opening XML tag on one line and a closing tag on another line). In some + situations, some parsers report invalid line and/or column numbers + altogether. If this occurs, libSBML sets the line and/or column number + in the SBMLError object to the the value of the maximum unsigned long + integer representable on the platform where libSBML is running. (This + is equal to the constant named <code>ULONG_MAX</code> in C and C++.) + The probability that a true line or column number in an SBML model would + equal this value is vanishingly small; thus, if an application + encounters these values in an XMLError object, it can assume no valid + line/column number could be provided by libSBML in that situation. + + @if clike + <h3><a class=\'anchor\' name=\'SBMLErrorCode_t\'>SBMLErrorCode_t</a></h3> + + SBMLErrorCode_t is an enumeration of all SBML-level error, warning and + informational diagnostic codes. Every SBMLError object has an error + code value that can be either a value from this enumeration, or a value + from the @link XMLError::XMLErrorCode_t XMLErrorCode_t @endlink + enumeration (see the documentation for XMLError). The latter values + apply when the error or warning signifies a basic XML issue rather than + an SBML issue per se. The values of SBMLErrorCode_t are distinguished + from those of @link XMLError::XMLErrorCode_t XMLErrorCode_t @endlink by + being numbered 10000 and higher, while the XML layer\'s codes are 9999 and + lower. The method SBMLError.getErrorId() returns the error code of a + given SBMLError object instance. + + The following is a table of the symbolic names of SBMLErrorCode_t values + and the meaning of each code. In this table, the right-hand columns + titled \'L1V1\', \'L1V2\', etc. refer to Levels and Versions of the SBML + specifications, and the entries in each column refer to whether the + severity of the condition in that particular Level+Version of SBML. + The codes stand for the following: + + @endif@if java <h3><a class=\'anchor\' + name=\'SBMLErrorCode_t\'>Error codes associated with SBMLError objects</a></h3> + + The error and warning codes returned by libSBML are listed in the table + below. The method SBMLError.getErrorId() returns the error code of a + given SBMLError object instance. In the libSBML Java language + interface, these error identifiers are currently + implemented as static integer constants defined in the interface class + <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>. This + is admittedly not an ideal approach from the standpoint of modern Java + programming, but it was necessary to work around the lack of + enumerations in Java prior to JDK 1.5. Future versions of libSBML may + use a proper Java enumeration type to define the error identifiers. + + In this table, the right-hand columns titled \'L1V1\', \'L1V2\', etc. refer + to Levels and Versions of the SBML specifications, and the entries in + each column refer to whether the severity of the condition in that + particular Level+Version of SBML. The codes stand for the following: + + @endif@if python <h3><a class=\'anchor\' + name=\'SBMLErrorCode_t\'>Error codes associated with SBMLError objects</a></h3> + + The error and warning codes returned by libSBML are listed in the table + below. The method SBMLError.getErrorId() returns the error code of a + given SBMLError object instance. In the libSBML Python language + interface, these error identifiers are currently + implemented as static integer constants defined in the interface class + @link libsbml libsbml@endlink. + + In this table, the right-hand columns titled \'L1V1\', \'L1V2\', etc. refer + to Levels and Versions of the SBML specifications, and the entries in + each column refer to whether the severity of the condition in that + particular Level+Version of SBML. The codes stand for the following: + + @endif@~ + + <table cellspacing=\'1\' cellpadding=\'2\' border=\'0\' class=\'normal-font\'> + <tr><td class=\'s-na\'>N</td><td>= Not applicable</td></tr> + <tr><td class=\'s-info\'>I</td><td>= Informational</td></tr> + <tr><td class=\'s-warning\'>W</td><td>= Warning</td></tr> + <tr><td class=\'s-error\'>E</td><td>= Error</td></tr> + <tr><td class=\'s-fatal\'>F</td><td>= Fatal</td></tr> + </table> + + The text shown in the \'Meaning\' is the text returned by the + SBMLError.getShortMessage() method on a given SBMLError object. A + longer and (hopefully) clearer explanation of the issue is returned by + SBMLError.getMessage(). + + @htmlinclude sbmlerror-table.html + + @if clike <h3><a class=\'anchor\' name=\'SBMLErrorCategory_t\'>SBMLErrorCategory_t</a></h3> + + SBMLErrorCategory_t is an enumeration of category codes for SBMLError + diagnostics. The category can be retrieved from an SBMLError object + using the method SBMLError.getCategory(). These enumeration values are + distinct from (and in addition to) the @link + XMLError::XMLErrorCategory_t XMLErrorCategory_t @endlink codes used by + the parent XMLError object. User programs receiving an SBMLError object + can use this distinction to check whether the error represents a + low-level XML problem or an SBML problem. + + The following table lists each possible value and a brief description of + its meaning. + + @endif@if python <h3><a class=\'anchor\' name=\'SBMLErrorCategory_t\'>Category codes associated with SBMLError objects</a></h3> + + As discussed above, each SBMLError object contains a value for a + category identifier, describing the type of issue that the SBMLError + object represents. The category can be retrieved from an SBMLError + object using the method SBMLError.getCategory(). The following table + lists each possible value and a brief description of its meaning. + + As is the case with the error codes, in the libSBML Python language + interface, the category identifiers are currently implemented as static + integer constants defined in the interface class + @link libsbml libsbml@endlink. + + The following table lists each possible value and a brief description of + its meaning. + + @endif@if java <h3><a class=\'anchor\' + name=\'SBMLErrorCategory_t\'>Category codes associated with SBMLError objects</a></h3> + + As discussed above, each SBMLError object contains a value for a + category identifier, describing the type of issue that the SBMLError + object represents. The category can be retrieved from an SBMLError + object using the method SBMLError.getCategory(). The following table + lists each possible value and a brief description of its meaning. + + As is the case with the error codes, in the libSBML Java language + interface, the category identifiers are currently implemented as static + integer constants defined in the interface class + {@link libsbmlConstants}. + + The following table lists each possible value and a brief description of + its meaning. + + @endif@if csharp <h3><a class=\'anchor\' + name=\'SBMLErrorCategory_t\'>Category codes associated with SBMLError objects</a></h3> + + As discussed above, each SBMLError object contains a value for a + category identifier, describing the type of issue that the SBMLError + object represents. The category can be retrieved from an SBMLError + object using the method SBMLError.getCategory(). The following table + lists each possible value and a brief description of its meaning. + + As is the case with the error codes, in the libSBML C# language + interface, the category identifiers are currently implemented as static + integer constants defined in the interface class + {@link libsbmlcs.libsbml}. + + The following table lists each possible value and a brief description of + its meaning. + + @endif@~ + + <center> + <table width=\'90%\' cellspacing=\'1\' cellpadding=\'4\' border=\'0\' class=\'text-table normal-font alt-row-colors\'> + <tr style=\'background: lightgray\' class=\'normal-font\'> + <th>Enumerator</td> + <th>Meaning</td> + </tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML LIBSBML_CAT_SBML@endlink</td><td>General error not falling into + another category below.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML_L1_COMPAT LIBSBML_CAT_SBML_L1_COMPAT@endlink</td><td>Category of errors + that can only occur during attempted translation from one Level/Version + of SBML to another. This particular category applies to errors + encountered while trying to convert a model from SBML Level 2 to SBML + Level 1.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V1_COMPAT LIBSBML_CAT_SBML_L2V1_COMPAT@endlink</td><td>Category of errors + that can only occur during attempted translation from one Level/Version + of SBML to another. This particular category applies to errors + encountered while trying to convert a model to SBML Level 2 + Version 1.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V2_COMPAT LIBSBML_CAT_SBML_L2V2_COMPAT@endlink</td><td>Category of errors + that can only occur during attempted translation from one Level/Version + of SBML to another. This particular category applies to errors + encountered while trying to convert a model to SBML Level 2 + Version 2.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink</td><td>Category of + errors that can occur while validating general SBML constructs. With + respect to the SBML specification, these concern failures in applying + the validation rules numbered 2xxxx in the Level 2 Versions 2–4 + and Level 3 Version 1 specifications.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink</td><td>Category of + errors that can occur while validating symbol identifiers in a model. + With respect to the SBML specification, these concern failures in + applying the validation rules numbered 103xx in the Level 2 Versions 2–4 + and Level 3 Version 1 specifications.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink</td><td>Category of + errors that can occur while validating the units of measurement on + quantities in a model. With respect to the SBML specification, these + concern failures in applying the validation rules numbered 105xx in the + Level 2 Versions 2–4 + and Level 3 Version 1 specifications.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink</td><td>Category of + errors that can occur while validating MathML formulas in a model. With + respect to the SBML specification, these concern failures in applying + the validation rules numbered 102xx in the Level 2 Versions 2–4 + and Level 3 Version 1 specifications.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink</td><td>Category of errors + that can occur while validating SBO identifiers in a model. With + respect to the SBML specification, these concern failures in applying + the validation rules numbered 107xx in the Level 2 Versions 2–4 + and Level 3 Version 1 specifications.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink</td><td>Error in the + system of equations in the model: the system is overdetermined, + therefore violating a tenet of proper SBML. With respect to the SBML + specification, this is validation rule #10601 in the SBML Level 2 Versions 2–4 + and Level 3 Version 1 specifications.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V3_COMPAT LIBSBML_CAT_SBML_L2V3_COMPAT@endlink</td><td>Category of errors + that can only occur during attempted translation from one Level/Version + of SBML to another. This particular category applies to errors + encountered while trying to convert a model to SBML Level 2 + Version 3.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink</td><td>Category of + warnings about recommended good practices involving SBML and + computational modeling. (These are tests performed by libSBML and do + not have equivalent SBML validation rules.)</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_INTERNAL_CONSISTENCY LIBSBML_CAT_INTERNAL_CONSISTENCY@endlink</td><td>Category of + errors that can occur while validating libSBML\'s internal representation + of SBML constructs. (These are tests performed by libSBML and do + not have equivalent SBML validation rules.)</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML_L2V4_COMPAT LIBSBML_CAT_SBML_L2V4_COMPAT@endlink</td><td>Category of errors + that can only occur during attempted translation from one Level/Version + of SBML to another. This particular category applies to errors + encountered while trying to convert a model to SBML Level 2 + Version 4.</td></tr> + <tr><td>@link libsbml.LIBSBML_CAT_SBML_L3V1_COMPAT LIBSBML_CAT_SBML_L3V1_COMPAT@endlink</td><td>Category of errors + that can only occur during attempted translation from one Level/Version + of SBML to another. This particular category applies to errors + encountered while trying to convert a model to SBML Level 3 + Version 1.</td></tr> + + </table> + </center> + + @if clike + <h3><a class=\'anchor\' name=\'SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a></h3> + + This is an enumeration of severity codes for SBMLError diagnostics. + User programs receiving an SBMLError object can use this distinction to + check whether the error represents a low-level XML problem or an SBML + problem. + + In libSBML version @htmlinclude libsbml-version.html + there are no additional severity codes in SBMLErrorSeverity_t beyond + those defined in @link XMLError::XMLErrorSeverity_t XMLErrorSeverity_t@endlink. + + <hr> + @endif@if java <h3><a class=\'anchor\' + name=\'SBMLErrorSeverity_t\'>Severity codes associated with SBMLError + objects</h3> + + In libSBML version @htmlinclude libsbml-version.html + there are no additional severity codes beyond those defined by XMLError. + They are implemented as static integer constants defined in the interface + class <code><a href=\'libsbmlConstants.html\'>libsbmlConstants</a></code>, + and have names beginning with <code>LIBSBML_SEV_</code>. + @endif@if python <h3><a class=\'anchor\' + name=\'SBMLErrorSeverity_t\'>Severity codes associated with SBMLError + objects</h3> + + In libSBML version @htmlinclude libsbml-version.html + there are no additional severity codes beyond those defined by XMLError. + They are implemented as static integer constants defined in the + interface class @link libsbml libsbml@endlink, and have names beginning + with <code>LIBSBML_SEV_</code>. + @endif@~ +"; + + +%feature("docstring") SBMLError::SBMLError " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLError(SBMLError orig)</pre> + + Copy constructor; creates a copy of this SBMLError. + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLError( const long errorId = 0 , const long level = SBML_DEFAULT_LEVEL , const long version = SBML_DEFAULT_VERSION , string details = \'\' , const long line = 0 , const long column = 0 , const long severity = LIBSBML_SEV_ERROR , const long category = LIBSBML_CAT_SBML , string package = \'core\' , const long pkgVersion = 1 )</pre> + + Creates a new SBMLError to report that something occurred during SBML + processing. + + When a libSBML operation on SBML content results in a warning, error + or other diagnostic, the issue is reported as an SBMLError object. + SBMLError objects have identification numbers to indicate the nature + of the exception. @if clike These numbers are drawn from + the enumeration <a class=\'el\' + href=\'#SBMLErrorCode_t\'> + SBMLErrorCode_t</a>. @endif@if java These numbers are + defined as longeger constants in the file + \'libsbmlConstants.html\'. See the <a class=\'el\' + href=\'#SBMLErrorCode_t\'>top of this documentation page</a> for a table + listing the possible values and their meanings. @endif@if python These + numbers are defined as longeger constants in the interface + class @link libsbml libsbml@endlink. See the <a class=\'el\' + href=\'#SBMLErrorCode_t\'>top of this documentation page</a> for a table + listing the possible values and their meanings. @endif@~ The argument + @p errorId to this constructor @em can be (but does not have to be) a + value from this @if clike enumeration. If it @em is a value + from <a class=\'el\' href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a>, the + SBMLError class assumes the error is a low-level system or SBML layer + error and <em>prepends</em> a built-in, predefined error message to + any string passed in the argument @p details to this constructor. In + addition, all <a class=\'el\' + href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a> errors have associated + values for the @p severity and @p category codes, and these fields are + filled-in as well from the enumerations <a class=\'el\' + href=\'#SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a> and <a class=\'el\' + href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a>, + respectively. @else set of constants. If it @em + is one of the predefined error identifiers, the SBMLError class + assumes the error is a low-level system or SBML layer error and + <em>prepends</em> a built-in, predefined error message to any string + passed in the argument @p details to this constructor. In addition, + all the predefined error identifiers have associated values for the + @p severity and @p category codes, and these fields are filled-in using + the libSBML defaults for each different error identifier. @endif@~ + + If the error identifier @p errorId is a number greater than 99999, the + SBMLError class assumes the error was generated from another part of + the software and does not do additional filling in of values beyond + the default in the constructor itself. This allows SBMLError to serve + as a base class for other errors, such as for user-defined validation + rules (see Validator). Callers should fill in all the parameters with + suitable values if generating errors with codes greater than 99999 to + make maximum use of the SBMLError facilities. + + @if clike As mentioned above, there are two other + enumerations, <a class=\'el\' + href=\'#SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a> and <a class=\'el\' + href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a>, used for indicating + the severity and category of error for the predefined SBMLError codes. + The values passed in @p severity and @p category override the defaults + assigned based on the error code. If the value of @p errorId is a + value from <a class=\'el\' href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a>, + callers do not need to fill in @p severity and @p category. + Conversely, if @p errorId is not a value from <a class=\'el\' + href=\'#SBMLErrorCode_t\'>SBMLErrorCode_t</a>, callers can use other + values (not just those from <a class=\'el\' + href=\'#SBMLErrorSeverity_t\'>SBMLErrorSeverity_t</a> and <a class=\'el\' + href=\'#SBMLErrorCategory_t\'>SBMLErrorCategory_t</a>, but their own + special values) for @p severity and + @p category. @else As mentioned above, + there are additional constants defined for <a class=\'el\' + href=\'#SBMLErrorSeverity_t\'>standard severity</a> and <a class=\'el\' + href=\'#SBMLErrorCategory_t\'>standard category</a> codes, and every predefined + error in libSBML has an associated value for severity and category taken + from these predefined sets. These constants have symbol names + prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>, + respectively. If the value of @p errorId is one of the standard error + codes, callers do not need to fill in @p severity and @p category in a + call to this constructor. Conversely, if @p errorId is not an existing + SBML-level error code, callers can use other values for @p severity and + @p category. @endif@~ + + Please see the top of the documentation for SBMLError for a longer + discussion of the possible error codes, their meanings, and their + applicability to different combinations of Level+Version of SBML. + + @param errorId a long integer, the identification number of the error. + + @param level the SBML Level of the SBML model + + @param version the SBML Version within the Level of the SBML model + + @param details a string containing additional details about the error. + If the error code in @p errorId is one that is recognized by SBMLError, + the given message is @em appended to a predefined message associated + with the given code. If the error code is not recognized, the message + is stored as-is as the text of the error. + + @param line a long integer, the line number at which the error occured. + + @param column a long integer, the column number at which the error occured. + + @param severity an integer indicating severity of the error. + + @param category an integer indicating the category to which the error + belongs. + + @param package the SBML Level package involved. + + @param pkgVersion the version of the @p package. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") CVTerm " + @ingroup Core + Representation of MIRIAM-compliant controlled vocabulary annotation. + + @htmlinclude not-sbml-warning.html + + The SBML Level 2 and Level 3 specifications define a simple + format for annotating models when (a) referring to controlled vocabulary + terms and database identifiers that define and describe biological and + biochemical entities, and (b) describing the creator of a model and the + model\'s modification history. This SBML format is a concrete syntax that + conforms to the guidelines of MIRIAM (<a target=\'_blank\' + href=\'miriam-2005.pdf\'>\'Minimum Information Requested in the Annotation of + biochemical Models\'</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, + Dec. 2005). The format uses a subset of W3C RDF (<a target=\'_blank\' + href=\'http://www.w3.org/RDF/\'>Resource Description Format</a>). In order + to help application developers work with annotations in this format, + libSBML provides several helper classes that provide higher-level + interfaces to the data elements; these classes include CVTerm, + ModelCreator, ModelHistory, RDFAnnotationParser, and Date. + + @section annotation-parts Components of an SBML annotation + + The SBML annotation format consists of RDF-based content placed inside + an <code><annotation></code> element attached to an SBML component + such as Species, Compartment, etc. The following template illustrates + the different parts of SBML annotations in XML form: + + <pre class=\'fragment\'> + <<span style=\'background-color: #bbb\'>SBML_ELEMENT</span> <span style=\'background-color: #d0eed0\'>+++</span> metaid="<span style=\'border-bottom: 1px solid black\'>meta id</span>" <span style=\'background-color: #d0eed0\'>+++</span>> + <span style=\'background-color: #d0eed0\'>+++</span> + <annotation> + <span style=\'background-color: #d0eed0\'>+++</span> + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterm=\'http://purl.org/dc/terms/\' + xmlns:vcard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' + xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' + xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > + <rdf:Description rdf:about="#<span style=\'border-bottom: 1px solid black\'>meta id</span>"> + <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> + <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <rdf:Bag> + <rdf:li rdf:resource="<span style=\'background-color: #d0d0ee\'>URI</span>" /> + <span style=\'background-color: #edd\'>...</span> + </rdf:Bag> + </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <span style=\'background-color: #edd\'>...</span> + </rdf:Description> + <span style=\'background-color: #d0eed0\'>+++</span> + </rdf:RDF> + <span style=\'background-color: #d0eed0\'>+++</span> + </annotation> + <span style=\'background-color: #d0eed0\'>+++</span> + </<span style=\'background-color: #bbb\'>SBML_ELEMENT</span>> + </pre> + + In the template above, the placeholder + <span class=\'code\' style=\'background-color: #bbb\'>SBML_ELEMENT</span> stands for + the XML tag name of an SBML model component (e.g., <code>model</code>, + <code>reaction</code>, etc.) and the placeholder + <span class=\'code\' style=\'border-bottom: 1px solid black\'>meta id</span> + stands for the element\'s meta identifier, which is a field available + on all SBML components derived from the SBase base object class. + The <span style=\'border-bottom: 2px dotted #888\'>dotted</span> + portions are optional, the symbol + <span class=\'code\' style=\'background-color: #d0eed0\'>+++</span> is a placeholder + for either no content or valid XML content that is not defined by + this annotation scheme, and the ellipses + <span class=\'code\' style=\'background-color: #edd\'>...</span> + are placeholders for zero or more elements of the same form as the + immediately preceding element. The optional content + <span class=\'code\' style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> + is a creation and modification history; in libSBML, this is stored + using ModelHistory objects. + + The placeholder <span class=\'code\' style=\'background-color: + #bbb\'>RELATION_ELEMENT</span> refers to a BioModels.net qualifier element + name. This is an element in either the XML namespace + <code>\'http://biomodels.net/model-qualifiers\'</code> (for model + qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> (for + biological qualifier). Note that these namespace URIs are only labels, + and not actual Web locations, which means you cannot visit an address such + as <code>\'http://biomodels.net/model-qualifiers\'</code> in your browser or + try to have your application access it. Refer instead to the enumerations + #ModelQualifierType_t and #BiolQualifierType_t for a list of the available + relationship elements that can be used for <span class=\'code\' + style=\'background-color: #bbb\'>RELATION_ELEMENT</span>. + + The <span class=\'code\' style=\'background-color: #d0d0ee\'>URI</span> is a + required data value that uniquely identifies a resource and data within + that resource to which the annotation refers. Again, being URIs, these do + not refer to physical Web locations; nevertheless, applications will often + want a means of finding the resource to which a given <span class=\'code\' + style=\'background-color: #d0d0ee\'>URI</span> refers. Providing the + facilities for this task is the purpose of MIRIAM Resources, described in + detail online at <a target=\'_blank\' + href=\'http://biomodels.net/miriam\'>http://biomodels.net/miriam</a>) and + also in the paper <a target=\'_blank\' + href=\'miriam-resources-2007.pdf\'>\'MIRIAM Resources: tools to generate and + resolve robust cross-references in Systems Biology\'</a>, <i>BMC Systems + Biology</i>, 58(1), 2007. + + The relation-resource pairs above are the \'controlled vocabulary\' terms + that which CVTerm is designed to store and manipulate. The next section + describes these parts in more detail. For more information about + SBML annotations in general, please refer to Section 6 in the + SBML Level 2 (Versions 2–4) or Level 3 specification + documents. + + + @section cvterm-parts The parts of a CVTerm + + Annotations that refer to controlled vocabularies are managed in libSBML + using CVTerm objects. A set of RDF-based annotations attached to a + given SBML <code><annotation></code> element are read by + RDFAnnotationParser and converted into a list of these CVTerm objects. + Each CVTerm object instance stores the following components of an + annotation: + + <ul> + + <li>The @em qualifier, which can be a BioModels.net \'biological + qualifier\', a BioModels.net \'model qualifier\', or an unknown qualifier + (as far as the CVTerm class is concerned). Qualifiers are used in + MIRIAM to indicate the nature of the relationship between the object + being annotated and the resource. In CVTerm, the qualifiers can be + manipulated using the methods CVTerm.getQualifierType(), + CVTerm.setQualifierType(), and related methods. + + <li>The @em resource, represented by a URI (which, we must remind + developers, is not the same as a URL). In the CVTerm class, the + resource component can be manipulated using the methods + CVTerm.addResource() and + CVTerm.removeResource(). + + </ul> + + Note that a CVTerm contains a single qualifier, but possibly more than + one resource. This corresponds to the possibility of an annotation that + points to multiple resources, all of which are qualified by the same + BioModels.net qualifier. The CVTerm object class supports this by + supporting a list of resources. + + Detailed explanations of the qualifiers defined by BioModels.net can be + found at <a target=\'_blank\' + href=\'http://biomodels.net/qualifiers\'>http://biomodels.net/qualifiers</a>. +"; + + +%feature("docstring") CVTerm::CVTerm " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>CVTerm(CVTerm orig)</pre> + + Copy constructor; creates a copy of a CVTerm object. + + @param orig the CVTerm instance to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>CVTerm(const XMLNode node)</pre> + + Creates a new CVTerm from the given XMLNode. + + The SBML Level 2 and Level 3 specifications define a simple + format for annotating models when (a) referring to controlled + vocabulary terms and database identifiers that define and describe + biological and other entities, and (b) describing the creator of a + model and the model\'s modification history. The annotation content is + stored in <code><annotation></code> elements attached to + individual SBML elements. The format for storing the content inside + SBML <code><annotation></code> elements is a subset of W3C RDF + (<a target=\'_blank\' href=\'http://www.w3.org/RDF/\'>Resource Description + Format</a>) expressed in XML. The CVTerm class provides a programming + interface for working directly with controlled vocabulary term (\'CV + term\') objects without having to deal directly with the XML form. + When libSBML reads in an SBML model containing RDF annotations, it + parses those annotations into a list of CVTerm objects, and when + writing a model, it parses the CVTerm objects back into the + appropriate SBML <code><annotation></code> structure. + + This method creates a CVTerm object from the XMLNode object @p node. + Recall that XMLNode is a node in an XML tree of elements, and each + such element can be placed in a namespace. This constructor looks for + the element to be in the XML namespaces + <code>\'http://biomodels.net/model-qualifiers\'</code> (for + model qualifiers) and + <code>\'http://biomodels.net/biology-qualifiers\'</code> (for + biological qualifier), and if they are, creates CVTerm objects for + the result. + + @param node an %XMLNode representing a CVTerm. + + @note This method assumes that the given XMLNode object @p node is of + the correct structural form. + + + <hr> + Method variant with the following signature: + <pre class='signature'>CVTerm(QualifierType_t type = UNKNOWN_QUALIFIER)</pre> + + Creates an empty CVTerm, optionally with the given + @if clike #QualifierType_t value@else qualifier@endif@~ @p type. + + The SBML Level 2 and Level 3 specifications define a simple + format for annotating models when (a) referring to controlled + vocabulary terms and database identifiers that define and describe + biological and other entities, and (b) describing the creator of a + model and the model\'s modification history. The annotation content is + stored in <code><annotation></code> elements attached to + individual SBML elements. The format for storing the content inside + SBML <code><annotation></code> elements is a subset of W3C RDF + (<a target=\'_blank\' href=\'http://www.w3.org/RDF/\'>Resource Description + Format</a>) expressed in XML. The CVTerm class provides a programming + interface for working directly with controlled vocabulary term (\'CV + term\') objects without having to deal directly with the XML form. + When libSBML reads in an SBML model containing RDF annotations, it + parses those annotations into a list of CVTerm objects, and when + writing a model, it parses the CVTerm objects back into the + appropriate SBML <code><annotation></code> structure. + + This method creates an empty CVTerm object. The possible qualifier + types usable as values of @p type are @link + libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink and @link + libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink. If + an explicit value for @p type is not given, this method defaults to + using @link libsbml.UNKNOWN_QUALIFIER + UNKNOWN_QUALIFIER@endlink. The @if clike #QualifierType_t value@else qualifier type@endif@~ + can be set later using the + CVTerm.setQualifierType() method. + + Different BioModels.net qualifier elements encode different types of + relationships. Please refer to the SBML specification or the <a + target=\'_blank\' href=\'http://biomodels.net/qualifiers/\'>BioModels.net + qualifiers web page</a> for an explanation of the meaning of these + different qualifiers. + + @param type a @if clike #QualifierType_t value@else qualifier type@endif@~ + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ +"; + + +%feature("docstring") CVTerm::clone " + Creates and returns a deep copy of this CVTerm object. + + @return a (deep) copy of this CVTerm. +"; + + +%feature("docstring") CVTerm::getQualifierType " + Returns the qualifier type of this CVTerm object. + + @htmlinclude cvterm-common-description-text.html + + The placeholder <span class=\'code\' style=\'background-color: #bbb\'> + RELATION_ELEMENT</span> refers to a BioModels.net qualifier + element name. This is an element in either the XML namespace + <code>\'http://biomodels.net/model-qualifiers\'</code> (for model + qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> + (for biological qualifier). The present method returns a code + identifying which one of these two relationship namespaces is being + used; any other qualifier in libSBML is considered unknown (as far as + the CVTerm class is concerned). Consequently, this method will return + one of the following values: + + @li @link libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink + @li @link libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink + @li @link libsbml.UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink + + The specific relationship of this CVTerm to the enclosing SBML object + can be determined using the CVTerm methods such as + getModelQualifierType() and getBiologicalQualifierType(). Callers + will typically want to use the present method to find out which one of + the @em other two methods to call to find out the specific + relationship. + + @return the @if clike #QualifierType_t value@else qualifier type@endif@~ + of this object or @link libsbml.UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink + (the default). + + @see getResources() + @see getModelQualifierType() + @see getBiologicalQualifierType() +"; + + +%feature("docstring") CVTerm::getModelQualifierType " + Returns the model qualifier type of this CVTerm object. + + @htmlinclude cvterm-common-description-text.html + + The placeholder <span class=\'code\' style=\'background-color: #bbb\'> + RELATION_ELEMENT</span> refers to a BioModels.net qualifier + element name. This is an element in either the XML namespace + <code>\'http://biomodels.net/model-qualifiers\'</code> (for model + qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> + (for biological qualifier). Callers will typically use + getQualifierType() to find out the type of qualifier relevant to this + particular CVTerm object, then if it is a @em model qualifier, use the + present method to determine the specific qualifier. + + Annotations with model qualifiers express a relationship between an + annotation resource and the <em>modeling concept</em> represented by a + given object in the model. The diagram below illustrates the + relationship in this case: + + @image html model-qualifiers.png \'Relationship expressed by model qualifiers\' + @image latex model-qualifiers.png \'Relationship expressed by model qualifiers\' + + <br> The set of known model qualifiers is, at the time of this libSBML + release, the following: + + @li @link libsbml.BQM_IS BQM_IS@endlink + @li @link libsbml.BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink + @li @link libsbml.BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM@endlink + + Any other BioModels.net qualifier found in the model is considered + unknown by libSBML and reported as + @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink. + + @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ + of this object or @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink + (the default). +"; + + +%feature("docstring") CVTerm::getBiologicalQualifierType " + Returns the biological qualifier type of this CVTerm object. + + @htmlinclude cvterm-common-description-text.html + + The placeholder <span class=\'code\' style=\'background-color: #bbb\'> + RELATION_ELEMENT</span> refers to a BioModels.net qualifier + element name. This is an element in either the XML namespace + <code>\'http://biomodels.net/model-qualifiers\'</code> (for model + qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> + (for biological qualifier). Callers will typically use + getQualifierType() to find out the type of qualifier relevant to this + particular CVTerm object, then if it is a @em biological qualifier, + use the present method to determine the specific qualifier. + + Annotations with biological qualifiers express a relationship between an + annotation resource and the <em>biological concept</em> represented by a + given object in the model. The diagram + below illustrates the relationship in this case: + + @image html biology-qualifiers.png \'Relationship expressed by biological qualifiers\' + @image latex biology-qualifiers.png \'Relationship expressed by biological qualifiers\' + + <br> The set of known biological qualifiers is, at the time of this + libSBML release, the following: + + @li @link libsbml.BQB_IS BQB_IS@endlink + @li @link libsbml.BQB_HAS_PART BQB_HAS_PART@endlink + @li @link libsbml.BQB_IS_PART_OF BQB_IS_PART_OF@endlink + @li @link libsbml.BQB_IS_VERSION_OF BQB_IS_VERSION_OF@endlink + @li @link libsbml.BQB_HAS_VERSION BQB_HAS_VERSION@endlink + @li @link libsbml.BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO@endlink + @li @link libsbml.BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY@endlink + @li @link libsbml.BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY@endlink + @li @link libsbml.BQB_ENCODES BQB_ENCODES@endlink + @li @link libsbml.BQB_OCCURS_IN BQB_OCCURS_IN@endlink + @li @link libsbml.BQB_HAS_PROPERTY BQB_HAS_PROPERTY@endlink + @li @link libsbml.BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF@endlink + + Any other BioModels.net qualifier found in the model is considered + unknown by libSBML and reported as + @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink. + + @return the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ + of this object or @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink + (the default). +"; + + +%feature("docstring") CVTerm::getResources " + Returns the resource references for this CVTerm object. + + @htmlinclude cvterm-common-description-text.html + + The <span class=\'code\' style=\'background-color: #d0d0ee\'>resource + URI</span> values shown in the template above are stored internally in + CVTerm objects using an XMLAttributes object. Each attribute stored + inside the XMLAttributes will have the same name (specifically, + "<code>rdf:resource</code>") but a different value, and the + value will be a <span class=\'code\' style=\'background-color: #d0d0ee\'> + resource URI</span> shown in the XML template above. + + A valid CVTerm entity must always have at least one resource and + a value for the relationship qualifier. + + @return the XMLAttributes that store the resources of this CVTerm. + + @see getQualifierType() + @see addResource() + @see getResourceURI() +"; + + +%feature("docstring") CVTerm::getNumResources " + Returns the number of resources for this CVTerm object. + + @htmlinclude cvterm-common-description-text.html + + The fragment above illustrates that there can be more than one + resource referenced by a given relationship annotation (i.e., the + <span class=\'code\' style=\'background-color: #d0d0ee\'>resource + URI</span> values associated with a particular <span class=\'code\' + style=\'background-color: #bbb\'>RELATION_ELEMENT</span>). The present + method returns a count of the resources stored in this CVTerm object. + + @return the number of resources in the set of XMLAttributes + of this CVTerm. + + @see getResources() + @see getResourceURI() +"; + + +%feature("docstring") CVTerm::getResourceURI " + Returns the value of the <em>n</em>th resource for this CVTerm object. + + @htmlinclude cvterm-common-description-text.html + + The fragment above illustrates that there can be more than one + resource referenced by a given relationship annotation (i.e., the + <span class=\'code\' style=\'background-color: #d0d0ee\'>resource + URI</span> values associated with a particular <span class=\'code\' + style=\'background-color: #bbb\'>RELATION_ELEMENT</span>). LibSBML + stores all resource URIs in a single CVTerm object for a given + relationship. Callers can use getNumResources() to find out how many + resources are stored in this CVTerm object, then call this method to + retrieve the <em>n</em>th resource URI. + + @param n the index of the resource to query + + @return string representing the value of the nth resource + in the set of XMLAttributes of this CVTerm. + + @see getNumResources() + @see getQualifierType() +"; + + +%feature("docstring") CVTerm::setQualifierType " + Sets the @if clike #QualifierType_t@else qualifier code@endif@~ of this + CVTerm object. + + @param type the @if clike #QualifierType_t value@else qualifier type@endif. + The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + + @see getQualifierType() +"; + + +%feature("docstring") CVTerm::setModelQualifierType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setModelQualifierType(string qualifier)</pre> + + Sets the @if clike #ModelQualifierType_t@endif@if java model qualifier type code@endif@~ value of this CVTerm object. + + @param qualifier the string representing a model qualifier + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + + @note If the Qualifier Type of this object is not + @link libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink, + then the ModelQualifierType_t value will default to + @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink. + + @see getQualifierType() + @see setQualifierType() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setModelQualifierType(ModelQualifierType_t type)</pre> + + Sets the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ + of this CVTerm object. + + @param type the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + + @note If the Qualifier Type of this object is not + @link libsbml.MODEL_QUALIFIER MODEL_QUALIFIER@endlink, + then the ModelQualifierType_t value will default to + @link libsbml.BQM_UNKNOWN BQM_UNKNOWN@endlink. + + @see getQualifierType() + @see setQualifierType() +"; + + +%feature("docstring") CVTerm::setBiologicalQualifierType " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>setBiologicalQualifierType(string qualifier)</pre> + + Sets the @if clike #BiolQualifierType_t@endif@if java biology qualifier + type code@endif@~ of this CVTerm object. + + @param qualifier the string representing a biology qualifier + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + + @note If the Qualifier Type of this object is not + @link libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink, + then the @if clike #BiolQualifierType_t@endif@if java biology qualifier type code@endif@~ value will default + to @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink. + + @see getQualifierType() + @see setQualifierType() + + + <hr> + Method variant with the following signature: + <pre class='signature'>setBiologicalQualifierType(BiolQualifierType_t type)</pre> + + Sets the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ + of this CVTerm object. + + @param type the @if clike #BiolQualifierType_t value@else biology qualifier type@endif. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + + @note If the Qualifier Type of this object is not + @link libsbml.BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink, + then the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ will default + to @link libsbml.BQB_UNKNOWN BQB_UNKNOWN@endlink. + + @see getQualifierType() + @see setQualifierType() +"; + + +%feature("docstring") CVTerm::addResource " + Adds a resource reference to this CVTerm object. + + The SBML Level 2 and Level 3 specifications define a simple + standardized format for annotating models with references to + controlled vocabulary terms and database identifiers that define and + describe biological or other entities. This annotation format + consists of RDF-based content placed inside an + <code><annotation></code> element attached to an SBML component + such as Species, Compartment, etc. + + The specific RDF element used in this SBML format for referring to + external entities is <code><rdf:Description></code>, with a + <code><rdf:Bag></code> element containing one or more + <code><rdf:li></code> elements. Each such element refers to a + data item in an external resource; the resource and data item are + together identified uniquely using a URI. The following template + illustrates the structure: + + <pre class=\'fragment\'> + <rdf:Description rdf:about="#<span style=\'border-bottom: 1px solid black\'>meta id</span>"> + <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> + <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <rdf:Bag> + <rdf:li rdf:resource="<span style=\'background-color: #d0d0ee\'>resource URI</span>" /> + <span style=\'background-color: #edd\'>...</span> + </rdf:Bag> + </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <span style=\'background-color: #edd\'>...</span> + </rdf:Description> + </pre> + + In the template above, the placeholder <span class=\'code\' + style=\'border-bottom: 1px solid black\'>meta id</span> stands for the + element\'s meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The <span + style=\'border-bottom: 2px dotted #888\'>dotted</span> portions are + optional, and the ellipses <span class=\'code\' + style=\'background-color: #edd\'>...</span> are placeholders for zero or + more elements of the same form as the immediately preceding element. + The placeholder <span class=\'code\' style=\'background-color: #bbb\'> + RELATION_ELEMENT</span> refers to a BioModels.net qualifier element + name. This is an element in either the XML namespace + <code>\'http://biomodels.net/model-qualifiers\'</code> (for model + qualifiers) or <code>\'http://biomodels.net/biology-qualifiers\'</code> + (for biological qualifier). + + The <span class=\'code\' style=\'background-color: #d0d0ee\'>resource + URI</span> is a required data value that uniquely identifies a + resource and data within that resource to which the annotation refers. + The present method allows callers to add a reference to a resource URI + with the same relationship to the enclosing SBML object. (In other + words, the argument to this method is a <span class=\'code\' + style=\'background-color: #d0d0ee\'>resource URI</span> as shown in the + XML fragment above.) Resources are stored in this CVTerm object + within an XMLAttributes object. + + The relationship of this CVTerm to the enclosing SBML object can be + determined using the CVTerm methods such as getModelQualifierType() + and getBiologicalQualifierType(). + + @param resource a string representing the URI of the resource and data + item being referenced; e.g., + <code>\'http://www.geneontology.org/#GO:0005892\'</code>. + + @return integer value indicating success/failure of the call. The + possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink + + @see getResources() + @see removeResource() + @see getQualifierType() + @see getModelQualifierType() + @see getBiologicalQualifierType() +"; + + +%feature("docstring") CVTerm::removeResource " + Removes a resource URI from the set of resources stored in this CVTerm + object. + + @param resource a string representing the resource URI to remove; + e.g., <code>\'http://www.geneontology.org/#GO:0005892\'</code>. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink + + @see addResource() +"; + + +%feature("docstring") CVTerm::hasRequiredAttributes " + Predicate returning @c True if all the required elements for this + CVTerm object have been set. + + @note The required attributes for a CVTerm are: + @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier + @li at least one resource +"; + + +%feature("docstring") CVTerm::hasBeenModified " + @internal + Predicate returning @c True if all the required elements for this + CVTerm object have been set. + + @note The required attributes for a CVTerm are: + @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier + @li at least one resource +"; + + +%feature("docstring") CVTerm::resetModifiedFlags " + @internal + Predicate returning @c True if all the required elements for this + CVTerm object have been set. + + @note The required attributes for a CVTerm are: + @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier + @li at least one resource +"; + + +%feature("docstring") Date " + @ingroup Core + Representation of MIRIAM-compliant dates used in ModelHistory. + + @htmlinclude not-sbml-warning.html + + A Date object stores a reasonably complete representation of date and + time. Its purpose is to serve as a way to store dates to be read and + written in the <a target=\'_blank\' + href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format</a> used in + RDF Dublin Core annotations within SBML. The W3C date format is a + restricted form of <a target=\'_blank\' + href=\'http://en.wikipedia.org/wiki/ISO_8601\'>ISO 8601</a>, the + international standard for the representation of dates and times. A + time and date value in this W3C format takes the form + YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., <code>1997-07-16T19:20:30+01:00</code>) + where XHH:ZZ is the time zone offset. The libSBML Date object contains + the following fields to represent these values: + <ul> + + <li> @em year: a long integer representing the year. This should be a + four-digit number such as @c 2011. + + <li> @em month: a long integer representing the month, with a range of + values of 1–12. The value @c 1 represents January, and so on. + + <li> @em day: a long integer representing the day of the month, with a + range of values of 1–31. + + <li> @em hour: a long integer representing the hour on a 24-hour clock, + with a range of values of 0–23. + + <li> @em minute: a long integer representing the minute, with a range + of 0–59. + + <li> @em second: a long integer representing the second, with a range + of 0–59. + + <li> @em sign: a long integer representing the sign of the offset (@c 0 + signifying @c + and @c 1 signifying @c -). See the paragraph below for + further explanations. + + <li> @em hours offset: a long integer representing the time zone\'s hour + offset from GMT. + + <li> @em minute offset: a long integer representing the time zone\'s + minute offset from GMT. + + </ul> + + To illustrate the time zone offset, a value of <code>-05:00</code> would + correspond to USA Eastern Standard Time. In the Date object, this would + require a value of @c 1 for the sign field, @c 5 for the hour offset and + @c 0 for the minutes offset. + + In the restricted RDF annotations used in SBML, described in + Section 6 of the SBML Level 2 and Level 3 specification + documents, date/time stamps can be used to indicate the time of + creation and modification of a model. The following SBML model fragment + illustrates this: + @verbatim + <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> + <annotation> + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterms=\'http://purl.org/dc/terms/\' + xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > + <rdf:Description rdf:about=\'#_180340\'> + <dc:creator> + <rdf:Bag> + <rdf:li rdf:parseType=\'Resource\'> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family>Shapiro</vCard:Family> + <vCard:Given>Bruce</vCard:Given> + </vCard:N> + <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> + </vCard:ORG> + </rdf:li> + </rdf:Bag> + </dc:creator> + <dcterms:created rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> + </dcterms:created> + <dcterms:modified rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> + </dcterms:modified> + </rdf:Description> + </rdf:RDF> + </annotation> + </model>@endverbatim +"; + + +%feature("docstring") Date::Date " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>Date(string date)</pre> + + Creates a Date object from a string expressing a date and time value. + + This constructor expects its argument to be in the <a target=\'_blank\' + href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format with time + zone offset</a>, used in RDF Dublin Core annotations within SBML. + This format expresses a date and time value as a string of the form + YYYY-MM-DDThh:mm:ssXHH:ZZ, where + <ul> + + <li> @em YYYY is a four-digit integer representing the year. This + should be a four-digit number such as @c 2011. + + <li> @em MM is a two-digit integer representing the month, with a range + of values of 01–12. The value @c 1 represents January, and so + on. + + <li> @em DD is a two-digit integer representing the day of the month, + with a range of values of 01–31. + + <li> @em hh is a two-digit integer representing the hour on a 24-hour + clock, with a range of values of 00–23. + + <li> @em mm is a two-digit integer representing the minute, with a + range of 00–59. + + <li> @em ss is a two-digit integer representing the second, with a + range of 0–59. + + <li> @em X is the the sign of the time zone offset, either @c + or + <code>-</code>. + + <li> @em HH is a two-digit integer representing the hour of the time + zone offset, with a range of 00–23. + + <li> @em ZZ is a two-digit integer representing the minutes of the time + zone offset, with a range of 00–59. + + </ul> + + In the string format above, it is important not to forget the literal + character @c T in the string. Here is an example date/time string: + <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, + 1997, at 19:20:30 in Central European Time (which is UTC +1:00). + + If this constructor is given a @c None argument or a string of length + zero, it constructs a Date object with the value of January 1, 2000, + at time 00:00 UTC. Otherwise, the argument @em must be in the + complete format described above, or unpredictable results will happen. + + @param date a string representing the date. + + + <hr> + Method variant with the following signature: + <pre class='signature'>Date(long year = 2000, long month = 1, long day = 1, long hour = 0, long minute = 0, long second = 0, long sign = 0, long hoursOffset = 0, long minutesOffset = 0)</pre> + + Creates a time and date representation for use in model annotations + and elsewhere. + + The following is the complete set of possible arguments to this + constructor, with default values as indicated: + + @param year a long integereger representing the year. This should be + a four-digit number such as @c 2011. (Default value used if this + argument is not given: @c 2000.) + + @param month a long integereger representing the month, with a range + of values of 1–12. The value @c 1 represents January, and so + on. (Default value used if this argument is not given: @c 1.) + + @param day a long integereger representing the day of the month, with + a range of values of 1–31. (Default value used if this argument + is not given: @c 1.) + + @param hour a long integereger representing the hour on a 24-hour + clock, with a range of values of 0–23. (Default value used if + this argument is not given: @c 0.) + + @param minute a long integereger representing the minute, with a + range of 0–59. (Default value used if this argument is not + given: @c 0.) + + @param second a long integereger representing the second, with a + range of 0–59. (Default value used if this argument is not + given: @c 0.) + + @param sign a long integereger representing the sign of the offset + (@c 0 signifying @c + and @c 1 signifying @c -). See the paragraph + below for further explanations. (Default value used if this argument + is not given: @c 0.) + + @param hoursOffset a long integereger representing the time zone\'s + hour offset from GMT. (Default value used if this argument is not + given: @c 0.) + + @param minutesOffset a long integereger representing the time zone\'s + minute offset from GMT. (Default value used if this argument is not + given: @c 0.) + + To illustrate the time zone offset, a value of <code>-05:00</code> + would correspond to USA Eastern Standard Time. In the Date object, + this would require a value of @c 1 for the sign field, @c 5 for the + hour offset and @c 0 for the minutes offset. + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>Date(Date orig)</pre> + + Copy constructor; creates a copy of this Date. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") Date::clone " + Returns a copy of this Date. + + @return a (deep) copy of this Date. +"; + + +%feature("docstring") Date::getYear " + Returns the year from this Date. + + @return the year from this Date. +"; + + +%feature("docstring") Date::getMonth " + Returns the month from this Date. + + @return the month from this Date. +"; + + +%feature("docstring") Date::getDay " + Returns the day from this Date. + + @return the day from this Date. +"; + + +%feature("docstring") Date::getHour " + Returns the hour from this Date. + + @return the hour from this Date. +"; + + +%feature("docstring") Date::getMinute " + Returns the minute from this Date. + + @return the minute from this Date. +"; + + +%feature("docstring") Date::getSecond " + Returns the seconds from this Date. + + @return the seconds from this Date. +"; + + +%feature("docstring") Date::getSignOffset " + Returns the sign of the time zone offset from this Date. + + @return the sign of the offset from this Date. +"; + + +%feature("docstring") Date::getHoursOffset " + Returns the hours of the time zone offset from this Date. + + @return the hours of the offset from this Date. +"; + + +%feature("docstring") Date::getMinutesOffset " + Returns the minutes of the time zone offset from this Date. + + @return the minutes of the offset from this Date. +"; + + +%feature("docstring") Date::getDateAsString " + Returns the current Date value in text-string form. + + The string returned will be in the <a target=\'_blank\' + href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format with time + zone offset</a>, used in RDF Dublin Core annotations within SBML. + This format expresses a date and time value as a string of the form + YYYY-MM-DDThh:mm:ssXHH:ZZ, where + <ul> + + <li> @em YYYY is a four-digit integer representing the year. This + should be a four-digit number such as @c 2011. + + <li> @em MM is a two-digit integer representing the month, with a range + of values of 01–12. The value @c 1 represents January, and so + on. + + <li> @em DD is a two-digit integer representing the day of the month, + with a range of values of 01–31. + + <li> @em hh is a two-digit integer representing the hour on a 24-hour + clock, with a range of values of 00–23. + + <li> @em mm is a two-digit integer representing the minute, with a + range of 00–59. + + <li> @em ss is a two-digit integer representing the second, with a + range of 0–59. + + <li> @em X is the the sign of the time zone offset, either @c + or + <code>-</code>. + + <li> @em HH is a two-digit integer representing the hour of the time + zone offset, with a range of 00–23. + + <li> @em ZZ is a two-digit integer representing the minutes of the time + zone offset, with a range of 00–59. + + </ul> + + An example date/time string is <code>1997-07-16T19:20:30+01:00</code>, + which represents July 16, 1997, at 19:20:30 in Central European Time + (which is UTC +1:00). + + @return the date as a string. +"; + + +%feature("docstring") Date::setYear " + Sets the value of the year of this Date object. + + The value given as argument must be between 1000 and 9999 inclusive. + (In the millennium during which this libSBML documentation is being + written, a typical value is @c 2011, but we hope that SBML will + continue to be used for a long time.) + + @param year a long integer representing the year. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setMonth " + Sets the value of the month of this Date object. + + @param month a long integer representing the month; it must be in the + range 1–12 or an error will be signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setDay " + Sets the value of the day of this Date object. + + @param day a long integer representing the day; it must be in the + range 0–31 or an error will be signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setHour " + Sets the value of the hour of this Date object. + + @param hour a long integer representing the hour to set; it must be + in the range 0–23 or an error will be signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setMinute " + Sets the value of the minute of this Date object. + + @param minute a long integer representing the minute to set; it must + be in the range 0–59 or an error will be signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setSecond " + Sets the value of the second of the Date object. + + @param second a long integer representing the seconds; it must + be in the range 0–59 or an error will be signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setSignOffset " + Sets the value of the sign of the time zone offset of this Date object. + + The only permissible values are @c 0 and @c 1. + + @param sign a long integer representing the sign of the offset, with + @c 0 signifying @c + and @c 1 signifying @c -. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setHoursOffset " + Sets the value of this Date object\'s time zone hour offset. + + @param hoursOffset a long integer representing the hours of the + offset; it must be in the range 0–23 or an error will be + signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setMinutesOffset " + Sets the value of this Date object\'s time zone minutes offset. + + @param minutesOffset a long integer representing the minutes of the + offset; it must be in the range 0–59 or an error will be + signaled. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::setDateAsString " + Sets the value of this Date object using a date and time value + expressed as a text string. + + This method expects its argument to be in the <a target=\'_blank\' + href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format with time + zone offset</a>, used in RDF Dublin Core annotations within SBML. + This format expresses a date and time value as a string of the form + YYYY-MM-DDThh:mm:ssXHH:ZZ, where <ul> + + <li> @em YYYY is a four-digit integer representing the year. This + should be a four-digit number such as @c 2011. + + <li> @em MM is a two-digit integer representing the month, with a range + of values of 01–12. The value @c 1 represents January, and so + on. + + <li> @em DD is a two-digit integer representing the day of the month, + with a range of values of 01–31. + + <li> @em hh is a two-digit integer representing the hour on a 24-hour + clock, with a range of values of 00–23. + + <li> @em mm is a two-digit integer representing the minute, with a + range of 00–59. + + <li> @em ss is a two-digit integer representing the second, with a + range of 0–59. + + <li> @em X is the the sign of the time zone offset, either @c + or + <code>-</code>. + + <li> @em HH is a two-digit integer representing the hour of the time + zone offset, with a range of 00–23. + + <li> @em ZZ is a two-digit integer representing the minutes of the time + zone offset, with a range of 00–59. + + </ul> + + In the string format above, it is important not to forget the literal + character @c T in the string. Here is an example date/time string: + <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, + 1997, at 19:20:30 in Central European Time (which is UTC +1:00). + + If this method is given a @c None argument or a string of length zero, + it constructs a Date object with the value of January 1, 2000, at time + 00:00 UTC. Otherwise, the argument @em must be in the complete format + described above, or unpredictable results will happen. + + @param date a string representing the date. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") Date::representsValidDate " + Returns true or false depending on whether this date object represents + a valid date and time value. + + This method verifies that the date/time value stored in this object is + well-formed and represents plausible values. A time and date value in + the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., + <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone + offset. This method checks such things as whether the value of the + month number is less than or equal to 12, whether the value of the + minutes number is less than or equal to 59, whether a time zone offset + is set, etc. + + @return @c True if the date is valid, @c False otherwise. +"; + + +%feature("docstring") Date::hasBeenModified " + @internal + Returns true or false depending on whether this date object represents + a valid date and time value. + + This method verifies that the date/time value stored in this object is + well-formed and represents plausible values. A time and date value in + the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., + <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone + offset. This method checks such things as whether the value of the + month number is less than or equal to 12, whether the value of the + minutes number is less than or equal to 59, whether a time zone offset + is set, etc. + + @return @c True if the date is valid, @c False otherwise. +"; + + +%feature("docstring") Date::resetModifiedFlags " + @internal + Returns true or false depending on whether this date object represents + a valid date and time value. + + This method verifies that the date/time value stored in this object is + well-formed and represents plausible values. A time and date value in + the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., + <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone + offset. This method checks such things as whether the value of the + month number is less than or equal to 12, whether the value of the + minutes number is less than or equal to 59, whether a time zone offset + is set, etc. + + @return @c True if the date is valid, @c False otherwise. +"; + + +%feature("docstring") Date::parseDateStringToNumbers " + @internal + Sets the value of the individual numbers from the date + as a string. +"; + + +%feature("docstring") Date::parseDateNumbersToString " + @internal + Sets the value of the date as a string from the individual numbers. +"; + + +%feature("docstring") ModelCreator " + @ingroup Core + Representation of MIRIAM-compliant model creator data used + in ModelHistory. + + @htmlinclude not-sbml-warning.html + + The SBML specification beginning with Level 2 Version 2 + defines a standard approach to recording model history and model creator + information in a form that complies with MIRIAM (\'Minimum Information + Requested in the Annotation of biochemical Models\', <i>Nature + Biotechnology</i>, vol. 23, no. 12, Dec. 2005). For the model creator, + this form involves the use of parts of the <a target=\'_blank\' + href=\'http://en.wikipedia.org/wiki/VCard\'>vCard</a> representation. + LibSBML provides the ModelCreator class as a convenience high-level + interface for working with model creator data. Objects of class + ModelCreator can be used to store and carry around creator data within a + program, and the various methods in this object class let callers + manipulate the different parts of the model creator representation. + + @section parts The different parts of a model creator definition + + The ModelCreator class mirrors the structure of the MIRIAM model creator + annotations in SBML. The following template illustrates these different + fields when they are written in XML form: + + <pre class=\'fragment\'> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> + <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> + </vCard:N> + ... + <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> + ... + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> + </vCard:ORG> + </pre> + + Each of the separate data values + <span class=\'code\' style=\'background-color: #bbb\'>family name</span>, + <span class=\'code\' style=\'background-color: #bbb\'>given name</span>, + <span class=\'code\' style=\'background-color: #bbb\'>email address</span>, and + <span class=\'code\' style=\'background-color: #bbb\'>organization</span> can + be set and retrieved via corresponding methods in the ModelCreator + class. These methods are documented in more detail below. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ModelCreator::ModelCreator " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ModelCreator(const XMLNode creator)</pre> + + Creates a new ModelCreator from an XMLNode. + + @param creator the XMLNode from which to create the ModelCreator. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ModelCreator()</pre> + + Creates a new ModelCreator object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ModelCreator(ModelCreator orig)</pre> + + Copy constructor; creates a copy of the ModelCreator. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. +"; + + +%feature("docstring") ModelCreator::clone " + Creates and returns a copy of this ModelCreator. + + @return a (deep) copy of this ModelCreator. +"; + + +%feature("docstring") ModelCreator::getFamilyName " + Returns the \'family name\' stored in this ModelCreator object. + + @return the \'family name\' portion of the ModelCreator object. +"; + + +%feature("docstring") ModelCreator::getGivenName " + Returns the \'given name\' stored in this ModelCreator object. + + @return the \'given name\' portion of the ModelCreator object. +"; + + +%feature("docstring") ModelCreator::getEmail " + Returns the \'email\' stored in this ModelCreator object. + + @return email from the ModelCreator. +"; + + +%feature("docstring") ModelCreator::getOrganization " + Returns the \'organization\' stored in this ModelCreator object. + + @return organization from the ModelCreator. +"; + + +%feature("docstring") ModelCreator::getOrganisation " + (Alternate spelling) Returns the \'organization\' stored in this + ModelCreator object. + + @note This function is an alias of getOrganization(). + + @return organization from the ModelCreator. + + @see getOrganization() +"; + + +%feature("docstring") ModelCreator::isSetFamilyName " + Predicate returning @c True or @c False depending on whether this + ModelCreator\'s \'family name\' part is set. + + @return @c True if the familyName of this ModelCreator is set, @c False otherwise. +"; + + +%feature("docstring") ModelCreator::isSetGivenName " + Predicate returning @c True or @c False depending on whether this + ModelCreator\'s \'given name\' part is set. + + @return @c True if the givenName of this ModelCreator is set, @c False otherwise. +"; + + +%feature("docstring") ModelCreator::isSetEmail " + Predicate returning @c True or @c False depending on whether this + ModelCreator\'s \'email\' part is set. + + @return @c True if the email of this ModelCreator is set, @c False otherwise. +"; + + +%feature("docstring") ModelCreator::isSetOrganization " + Predicate returning @c True or @c False depending on whether this + ModelCreator\'s \'organization\' part is set. + + @return @c True if the organization of this ModelCreator is set, @c False otherwise. +"; + + +%feature("docstring") ModelCreator::isSetOrganisation " + (Alternate spelling) Predicate returning @c True or @c False depending + on whether this ModelCreator\'s \'organization\' part is set. + + @note This function is an alias of isSetOrganization(). + + @return @c True if the organization of this ModelCreator is set, @c False otherwise. + + @see isSetOrganization() +"; + + +%feature("docstring") ModelCreator::setFamilyName " + Sets the \'family name\' portion of this ModelCreator object. + + @param familyName a string representing the familyName of the ModelCreator. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ModelCreator::setGivenName " + Sets the \'given name\' portion of this ModelCreator object. + + @param givenName a string representing the givenName of the ModelCreator. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ModelCreator::setEmail " + Sets the \'email\' portion of this ModelCreator object. + + @param email a string representing the email of the ModelCreator. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ModelCreator::setOrganization " + Sets the \'organization\' portion of this ModelCreator object. + + @param organization a string representing the organization of the + ModelCreator. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink +"; + + +%feature("docstring") ModelCreator::setOrganisation " + (Alternate spelling) Sets the \'organization\' portion of this + ModelCreator object. + + @param organization a string representing the organization of the + ModelCreator. + + @note This function is an alias of setOrganization(string organization). + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + + @see setOrganization() +"; + + +%feature("docstring") ModelCreator::unsetFamilyName " + Unsets the \'family name\' portion of this ModelCreator object. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ModelCreator::unsetGivenName " + Unsets the \'given name\' portion of this ModelCreator object. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ModelCreator::unsetEmail " + Unsets the \'email\' portion of this ModelCreator object. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ModelCreator::unsetOrganization " + Unsets the \'organization\' portion of this ModelCreator object. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ModelCreator::unsetOrganisation " + (Alternate spelling) Unsets the \'organization\' portion of this ModelCreator object. + + @note This function is an alias of unsetOrganization(). + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see unsetOrganization() +"; + + +%feature("docstring") ModelCreator::getAdditionalRDF " + @internal + (Alternate spelling) Unsets the \'organization\' portion of this ModelCreator object. + + @note This function is an alias of unsetOrganization(). + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + + @see unsetOrganization() +"; + + +%feature("docstring") ModelCreator::hasRequiredAttributes " + Predicate returning @c True if all the required elements for this + ModelCreator object have been set. + + The only required elements for a ModelCreator object are the \'family + name\' and \'given name\'. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") ModelCreator::hasBeenModified " + @internal + Predicate returning @c True if all the required elements for this + ModelCreator object have been set. + + The only required elements for a ModelCreator object are the \'family + name\' and \'given name\'. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") ModelCreator::resetModifiedFlags " + @internal + Predicate returning @c True if all the required elements for this + ModelCreator object have been set. + + The only required elements for a ModelCreator object are the \'family + name\' and \'given name\'. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") ModelHistory " + @ingroup Core + Representation of MIRIAM-compliant model history data. + + @htmlinclude not-sbml-warning.html + + The SBML specification beginning with Level 2 Version 2 defines + a standard approach to recording optional model history and model creator + information in a form that complies with MIRIAM (<a target=\'_blank\' + href=\'miriam-2005.pdf\'>\'Minimum Information Requested in the Annotation of + biochemical Models\'</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, + Dec. 2005). LibSBML provides the ModelHistory class as a convenient + high-level interface for working with model history data. + + Model histories in SBML consist of one or more <em>model creators</em>, + a single date of @em creation, and one or more @em modification dates. + The overall XML form of this data takes the following form: + + <pre class=\'fragment\'> + <dc:creator> + <rdf:Bag> + <rdf:li rdf:parseType=\'Resource\'> + <span style=\'background-color: #d0eed0\'>+++</span> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> + <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> + </vCard:N> + <span style=\'background-color: #d0eed0\'>+++</span> + <span style=\'border-bottom: 2px dotted #888\'><vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL></span> + <span style=\'background-color: #d0eed0\'>+++</span> + <span style=\'border-bottom: 2px dotted #888\'><vCard:ORG rdf:parseType=\'Resource\'></span> + <span style=\'border-bottom: 2px dotted #888\'><vCard:Orgname><span style=\'background-color: #bbb\'>organization name</span></vCard:Orgname></span> + <span style=\'border-bottom: 2px dotted #888\'></vCard:ORG></span> + <span style=\'background-color: #d0eed0\'>+++</span> + </rdf:li> + <span style=\'background-color: #edd\'>...</span> + </rdf:Bag> + </dc:creator> + <dcterms:created rdf:parseType=\'Resource\'> + <dcterms:W3CDTF><span style=\'background-color: #bbb\'>creation date</span></dcterms:W3CDTF> + </dcterms:created> + <dcterms:modified rdf:parseType=\'Resource\'> + <dcterms:W3CDTF><span style=\'background-color: #bbb\'>modification date</span></dcterms:W3CDTF> + </dcterms:modified> + <span style=\'background-color: #edd\'>...</span> + </pre> + + In the template above, the <span style=\'border-bottom: 2px dotted #888\'>underlined</span> + portions are optional, the symbol + <span class=\'code\' style=\'background-color: #d0eed0\'>+++</span> is a placeholder + for either no content or valid XML content that is not defined by + the annotation scheme, and the ellipses + <span class=\'code\' style=\'background-color: #edd\'>...</span> + are placeholders for zero or more elements of the same form as the + immediately preceding element. The various placeholders for content, namely + <span class=\'code\' style=\'background-color: #bbb\'>family name</span>, + <span class=\'code\' style=\'background-color: #bbb\'>given name</span>, + <span class=\'code\' style=\'background-color: #bbb\'>email address</span>, + <span class=\'code\' style=\'background-color: #bbb\'>organization</span>, + <span class=\'code\' style=\'background-color: #bbb\'>creation date</span>, and + <span class=\'code\' style=\'background-color: #bbb\'>modification date</span> + are data that can be filled in using the various methods on + the ModelHistory class described below. + + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") ModelCreator " + @ingroup Core + Representation of MIRIAM-compliant model creator data used + in ModelHistory. + + @htmlinclude not-sbml-warning.html + + The SBML specification beginning with Level 2 Version 2 + defines a standard approach to recording model history and model creator + information in a form that complies with MIRIAM (\'Minimum Information + Requested in the Annotation of biochemical Models\', <i>Nature + Biotechnology</i>, vol. 23, no. 12, Dec. 2005). For the model creator, + this form involves the use of parts of the <a target=\'_blank\' + href=\'http://en.wikipedia.org/wiki/VCard\'>vCard</a> representation. + LibSBML provides the ModelCreator class as a convenience high-level + interface for working with model creator data. Objects of class + ModelCreator can be used to store and carry around creator data within a + program, and the various methods in this object class let callers + manipulate the different parts of the model creator representation. + + @section parts The different parts of a model creator definition + + The ModelCreator class mirrors the structure of the MIRIAM model creator + annotations in SBML. The following template illustrates these different + fields when they are written in XML form: + + <pre class=\'fragment\'> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> + <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> + </vCard:N> + ... + <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> + ... + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> + </vCard:ORG> + </pre> + + Each of the separate data values + <span class=\'code\' style=\'background-color: #bbb\'>family name</span>, + <span class=\'code\' style=\'background-color: #bbb\'>given name</span>, + <span class=\'code\' style=\'background-color: #bbb\'>email address</span>, and + <span class=\'code\' style=\'background-color: #bbb\'>organization</span> can + be set and retrieved via corresponding methods in the ModelCreator + class. These methods are documented in more detail below. + + <!-- leave this next break as-is to work around some doxygen bug --> +"; + + +%feature("docstring") Date " + @ingroup Core + Representation of MIRIAM-compliant dates used in ModelHistory. + + @htmlinclude not-sbml-warning.html + + A Date object stores a reasonably complete representation of date and + time. Its purpose is to serve as a way to store dates to be read and + written in the <a target=\'_blank\' + href=\'http://www.w3.org/TR/NOTE-datetime\'>W3C date format</a> used in + RDF Dublin Core annotations within SBML. The W3C date format is a + restricted form of <a target=\'_blank\' + href=\'http://en.wikipedia.org/wiki/ISO_8601\'>ISO 8601</a>, the + international standard for the representation of dates and times. A + time and date value in this W3C format takes the form + YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., <code>1997-07-16T19:20:30+01:00</code>) + where XHH:ZZ is the time zone offset. The libSBML Date object contains + the following fields to represent these values: + <ul> + + <li> @em year: a long integer representing the year. This should be a + four-digit number such as @c 2011. + + <li> @em month: a long integer representing the month, with a range of + values of 1–12. The value @c 1 represents January, and so on. + + <li> @em day: a long integer representing the day of the month, with a + range of values of 1–31. + + <li> @em hour: a long integer representing the hour on a 24-hour clock, + with a range of values of 0–23. + + <li> @em minute: a long integer representing the minute, with a range + of 0–59. + + <li> @em second: a long integer representing the second, with a range + of 0–59. + + <li> @em sign: a long integer representing the sign of the offset (@c 0 + signifying @c + and @c 1 signifying @c -). See the paragraph below for + further explanations. + + <li> @em hours offset: a long integer representing the time zone\'s hour + offset from GMT. + + <li> @em minute offset: a long integer representing the time zone\'s + minute offset from GMT. + + </ul> + + To illustrate the time zone offset, a value of <code>-05:00</code> would + correspond to USA Eastern Standard Time. In the Date object, this would + require a value of @c 1 for the sign field, @c 5 for the hour offset and + @c 0 for the minutes offset. + + In the restricted RDF annotations used in SBML, described in + Section 6 of the SBML Level 2 and Level 3 specification + documents, date/time stamps can be used to indicate the time of + creation and modification of a model. The following SBML model fragment + illustrates this: + @verbatim + <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> + <annotation> + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterms=\'http://purl.org/dc/terms/\' + xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > + <rdf:Description rdf:about=\'#_180340\'> + <dc:creator> + <rdf:Bag> + <rdf:li rdf:parseType=\'Resource\'> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family>Shapiro</vCard:Family> + <vCard:Given>Bruce</vCard:Given> + </vCard:N> + <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> + </vCard:ORG> + </rdf:li> + </rdf:Bag> + </dc:creator> + <dcterms:created rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> + </dcterms:created> + <dcterms:modified rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> + </dcterms:modified> + </rdf:Description> + </rdf:RDF> + </annotation> + </model>@endverbatim +"; + + +%feature("docstring") ModelHistory::ModelHistory " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>ModelHistory(ModelHistory orig)</pre> + + Copy constructor; creates a copy of this ModelHistory object. + + @param orig the object to copy. + + @throws @if python ValueError @else SBMLConstructorException @endif@~ + Thrown if the argument @p orig is @c None. + + + <hr> + Method variant with the following signature: + <pre class='signature'>ModelHistory()</pre> + + Creates a new ModelHistory object. +"; + + +%feature("docstring") ModelHistory::clone " + Creates and returns a copy of this ModelHistory object + + @return a (deep) copy of this ModelHistory object. +"; + + +%feature("docstring") ModelHistory::getCreatedDate " + Returns the \'creation date\' portion of this ModelHistory object. + + @return a Date object representing the creation date stored in + this ModelHistory object. +"; + + +%feature("docstring") ModelHistory::getModifiedDate " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>getModifiedDate()</pre> + + Returns the \'modified date\' portion of this ModelHistory object. + + Note that in the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of \'modified date\' values. If this ModelHistory object + contains more than one \'modified date\' value in the list, this method + will return the first one in the list. + + @return a Date object representing the date of modification + stored in this ModelHistory object. + + + <hr> + Method variant with the following signature: + <pre class='signature'>getModifiedDate(long n)</pre> + + Get the nth Date object in the list of \'modified date\' values stored + in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of \'modified date\' values. + + @return the nth Date in the list of ModifiedDates of this + ModelHistory. +"; + + +%feature("docstring") ModelHistory::isSetCreatedDate " + Predicate returning @c True or @c False depending on whether this + ModelHistory\'s \'creation date\' is set. + + @return @c True if the creation date value of this ModelHistory is + set, @c False otherwise. +"; + + +%feature("docstring") ModelHistory::isSetModifiedDate " + Predicate returning @c True or @c False depending on whether this + ModelHistory\'s \'modified date\' is set. + + @return @c True if the modification date value of this ModelHistory + object is set, @c False otherwise. +"; + + +%feature("docstring") ModelHistory::setCreatedDate " + Sets the creation date of this ModelHistory object. + + @param date a Date object representing the date to which the \'created + date\' portion of this ModelHistory should be set. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") ModelHistory::setModifiedDate " + Sets the modification date of this ModelHistory object. + + @param date a Date object representing the date to which the \'modified + date\' portion of this ModelHistory should be set. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") ModelHistory::addModifiedDate " + Adds a copy of a Date object to the list of \'modified date\' values + stored in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of \'modified date\' values. + + @param date a Date object representing the \'modified date\' that should + be added to this ModelHistory object. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink +"; + + +%feature("docstring") ModelHistory::getListModifiedDates " + Returns the list of \'modified date\' values (as Date objects) stored in + this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of \'modified date\' values. + + @return the list of modification dates for this ModelHistory object. +"; + + +%feature("docstring") ModelHistory::getNumModifiedDates " + Get the number of Date objects in this ModelHistory object\'s list of + \'modified dates\'. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of \'modified date\' values. + + @return the number of ModifiedDates in this ModelHistory. +"; + + +%feature("docstring") ModelHistory::addCreator " + Adds a copy of a ModelCreator object to the list of \'model creator\' + values stored in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of \'model creator\' values. + + @param mc the ModelCreator to add + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") ModelHistory::getListCreators " + Returns the list of ModelCreator objects stored in this ModelHistory + object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of \'model creator\' values. + + @return the list of ModelCreator objects. +"; + + +%feature("docstring") ModelHistory::getCreator " + Get the nth ModelCreator object stored in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of \'model creator\' values. + + @return the nth ModelCreator object. +"; + + +%feature("docstring") ModelHistory::getNumCreators " + Get the number of ModelCreator objects stored in this ModelHistory + object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of \'model creator\' values. + + @return the number of ModelCreators objects. +"; + + +%feature("docstring") ModelHistory::hasRequiredAttributes " + Predicate returning @c True if all the required elements for this + ModelHistory object have been set. + + The required elements for a ModelHistory object are \'created + name\', \'modified date\', and at least one \'model creator\'. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") ModelHistory::hasBeenModified " + @internal + Predicate returning @c True if all the required elements for this + ModelHistory object have been set. + + The required elements for a ModelHistory object are \'created + name\', \'modified date\', and at least one \'model creator\'. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") ModelHistory::resetModifiedFlags " + @internal + Predicate returning @c True if all the required elements for this + ModelHistory object have been set. + + The required elements for a ModelHistory object are \'created + name\', \'modified date\', and at least one \'model creator\'. + + @return a boolean value indicating whether all the required + elements for this object have been defined. +"; + + +%feature("docstring") RDFAnnotationParser " + @ingroup Core + Read/write/manipulate RDF annotations stored in SBML + annotation elements. + + @htmlinclude not-sbml-warning.html + + RDFAnnotationParser is a libSBML construct used as part of the libSBML + support for annotations conforming to the guidelines specified by MIRIAM + (<a target=\'_blank\' href=\'miriam-2005.pdf\'>\'Minimum Information Requested + in the Annotation of biochemical Models\'</a>, <i>Nature Biotechnology</i>, + vol. 23, no. 12, Dec. 2005). Section 6 of the SBML Level 2 and + Level 3 specification documents defines a recommended way of encoding + MIRIAM information using a subset of RDF (<a target=\'_blank\' + href=\'http://www.w3.org/RDF/\'>Resource Description Format</a>). The + general scheme is as follows. A set of RDF-based annotations attached to + a given SBML <code><annotation></code> element are read by + RDFAnnotationParser and converted into a list of CVTerm objects. There + are different versions of the main method, @if clike + RDFAnnotationParser.parseRDFAnnotation() @endif@if java RDFAnnotationParser.parseRDFAnnotation() @endif@~ and + RDFAnnotationParser.parseRDFAnnotation(), used + depending on whether the annotation in question concerns the MIRIAM model + history or other MIRIAM resource annotations. A special object class, + ModelHistory, is used to make it easier to manipulate model history + annotations. + + All of the methods on RDFAnnotationParser are static; the class exists + only to encapsulate the annotation and CVTerm parsing and manipulation + functionality. +"; + + +%feature("docstring") RDFAnnotationParser::parseRDFAnnotation " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>parseRDFAnnotation(XMLNodeannotation, ListCVTerms, string metaId = None, XMLInputStream* stream = None)</pre> + + Parses an annotation (given as an XMLNode tree) into a list of + CVTerm objects. + + This is used to take an annotation that has been read into an SBML + model, identify the RDF elements within it, and create a list of + corresponding CVTerm (controlled vocabulary term) objects. + + @param annotation XMLNode containing the annotation. + + @param CVTerms list of CVTerm objects to be created. + @param stream optional XMLInputStream that facilitates error logging + @param metaId optional metaId, if set only the rdf annotation for this metaId will be returned. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_parseRDFAnnotation(). They are functionally + identical. @endif@~ + + @see @if clike parseRDFAnnotation(XMLNodeannotation) @else RDFAnnotationParser.parseRDFAnnotation() @endif@~ + + + <hr> + Method variant with the following signature: + <pre class='signature'>parseRDFAnnotation(XMLNodeannotation, string metaId = None, XMLInputStream* stream = None)</pre> + + Parses an annotation into a ModelHistory class instance. + + This is used to take an annotation that has been read into an SBML + model, identify the RDF elements representing model history + information, and create a list of corresponding CVTerm objects. + + @param annotation XMLNode containing the annotation. + @param stream optional XMLInputStream that facilitates error logging + @param metaId optional metaId, if set only the rdf annotation for this metaId will be returned. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_parseRDFAnnotation(). They are functionally + identical. @endif@~ + + @return a pointer to the ModelHistory created. +"; + + +%feature("docstring") RDFAnnotationParser::createAnnotation " + Creates a blank annotation and returns its root XMLNode object. + + This creates a completely empty SBML <code><annotation></code> + element. It is not attached to any SBML element. An example of how + this might be used is illustrated in the following code fragment. In + this example, suppose that @c content is an XMLNode object previously + created, containing MIRIAM-style annotations, and that @c sbmlObject + is an SBML object derived from SBase (e.g., a Model, or a Species, or + a Compartment, etc.). Then:@if clike + @verbatim + int success; // Status code variable, used below. + + XMLNodeRDF = createRDFAnnotation(); // Create RDF annotation XML structure. + success = RDF->addChild(...content...); // Put some content into it. + ... // Check \'success\' return code value. + + XMLNodeann = createAnnotation(); // Create <annotation> container. + success = ann->addChild(RDF); // Put the RDF annotation into it. + ... // Check \'success\' return code value. + + success = sbmlObject->setAnnotation(ann); // Set object\'s annotation to what we built. + ... // Check \'success\' return code value. + @endverbatim + @endif@if java + @verbatim + int success; // Status code variable, used below. + + XMLNode RDF = createRDFAnnotation(); // Create RDF annotation XML structure. + success = RDF.addChild(...content...); // Put some content into it. + ... // Check \'success\' return code value. + + XMLNode ann = createAnnotation(); // Create <annotation> container. + success = ann.addChild(RDF); // Put the RDF annotation into it. + ... // Check \'success\' return code value. + + success = sbmlObject.setAnnotation(ann); // Set object\'s annotation to what we built. + ... // Check \'success\' return code value. + @endverbatim + @endif@if python + @verbatim + RDF = RDFAnnotationParser.createRDFAnnotation() # Create RDF annotation XML structure. + success = RDF.addChild(...content...) # Put some content into it. + ... # Check \'success\' return code value. + + annot = RDFAnnotationParser.createAnnotation() # Create <annotation> container. + success = annot.addChild(RDF) # Put the RDF annotation into it. + ... # Check \'success\' return code value. + + success = sbmlObject.setAnnotation(annot) # Set object\'s annotation to what we built. + ... # Check \'success\' return code value. + @endverbatim + @endif@~ + The SBML specification contains more information about the format of + annotations. We urge readers to consult Section 6 of the SBML + Level 2 (Versions 2–4) and SBML Level 3 specification + documents. + + @return a pointer to an XMLNode for the annotation + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_createAnnotation(). They are functionally + identical. @endif@~ + + @see @if clike createRDFAnnotation() @else RDFAnnotationParser.createRDFAnnotation() @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::createRDFAnnotation " + Creates a blank RDF element suitable for use in SBML annotations. + + The annotation created by this method has namespace declarations for + all the relevant XML namespaces used in RDF annotations and also has + an empty RDF element. The result is the following XML: + @verbatim + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterms=\'http://purl.org/dc/terms/\' + xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' + xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' + xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > + + </rdf:RDF> + @endverbatim + + Note that this does not create the containing SBML + <code><annotation></code> element; the method + @if clike createAnnotation()@else RDFAnnotationParser.createAnnotation()@endif@~ + is available for creating the container. + + @return a pointer to an XMLNode + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_createRDFAnnotation(). They are functionally + identical. @endif@~ + + @see @if clike createAnnotation() @else RDFAnnotationParser.createAnnotation() @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::createCVTerms " + Takes a list of CVTerm objects and creates a the RDF \'Description\' + element. + + This essentially takes the given SBML object, reads out the CVTerm + objects attached to it, creates an RDF \'Description\' element to hold + the terms, and adds each term with appropriate qualifiers. + + @param obj the SBML object to start from + + @return the XMLNode tree corresponding to the Description element of + an RDF annotation. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + createRDFDescription(@if java SBase obj@endif). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::parseCVTerms " + Takes a list of CVTerm objects and creates a complete SBML annotation + around it. + + This essentially takes the given SBML object, reads out the CVTerm + objects attached to it, calls @if clike createRDFAnnotation()@else + RDFAnnotationParser.createRDFAnnotation()@endif@~ to create an RDF + annotation to hold the terms, and finally calls @if clike + createAnnotation()@else + RDFAnnotationParser.createAnnotation()@endif@~ to wrap the result as + an SBML <code><annotation></code> element. + + @param obj the SBML object to start from + + @return the XMLNode tree corresponding to the annotation. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_parseCVTerms(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::parseModelHistory " + Reads the model history and cvTerms stored in @p obj and creates the + XML structure for an SBML annotation representing that metadata if + there is a model history stored in @p obj. + + @param obj any SBase object + + @return the XMLNode corresponding to an annotation containing + MIRIAM-compliant model history and CV term information in RDF format. + + @note If the object does not have a history element stored then + @c None is returned even if CVTerms are present. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_parseModelHistory(@if java Sbase obj@endif). They + are functionally identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::parseOnlyModelHistory " + Reads the model history stored in @p obj and creates the + XML structure for an SBML annotation representing that history. + + @param obj any SBase object + + @return the XMLNode corresponding to an annotation containing + MIRIAM-compliant model history information in RDF format. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_parseOnlyModelHistory(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::deleteRDFAnnotation " + Deletes any SBML MIRIAM RDF annotation found in the given XMLNode + tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove them if they conform to the syntax + of a History or CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::deleteRDFHistoryAnnotation " + Deletes any SBML MIRIAM RDF \'History\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + History element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::deleteRDFCVTermAnnotation " + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::hasRDFAnnotation " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::hasAdditionalRDFAnnotation " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::hasCVTermRDFAnnotation " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::hasHistoryRDFAnnotation " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithCVTerms " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithHistory " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::deriveCVTermsFromAnnotation " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::deriveHistoryFromAnnotation " + @internal + Deletes any SBML MIRIAM RDF \'CVTerm\' annotation found in the given + XMLNode tree and returns + any remaining annotation content. + + The name of the XMLNode given as parameter @p annotation must be + \'annotation\', or else this method returns @c None. The method will + walk down the XML structure looking for elements that are in the + RDF XML namespace, and remove any that conform to the syntax of a + CVTerm element. + + @param annotation the XMLNode tree within which the RDF annotation is + to be found and deleted + + @return the XMLNode structure that is left after RDF annotations are + deleted. + + @if notclike @note Because this is a @em static method, the non-C++ + language interfaces for libSBML will contain two variants. One will + be a static method on the class (i.e., RDFAnnotationParser), and the + other will be a standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @endif@~ +"; + + +%feature("docstring") ISBMLExtensionNamespaces " + @ingroup Core +"; + + +%feature("docstring") SBaseExtensionPoint " + @ingroup Core + Representation of an extension point of SBML\'s package extension. + + SBaseExtensionPoint represents an element to be extended (extension point) and the + extension point is identified by a combination of a package name and a typecode of the + element. + + <p> + For example, an SBaseExtensionPoint object which represents an extension point of the model + element defined in the <em>core</em> package can be created as follows: + + @verbatim + SBaseExtensionPoint modelextp(\'core\', SBML_MODEL); + @endverbatim + + Similarly, an SBaseExtensionPoint object which represents an extension point of + the layout element defined in the layout extension can be created as follows: + + @verbatim + SBaseExtensionPoint layoutextp(\'layout\', SBML_LAYOUT_LAYOUT); + @endverbatim + + SBaseExtensionPoint object is required as one of arguments of the constructor + of SBasePluginCreatorlt;class SBasePluginType, class SBMLExtensionType> + template class to identify an extension poitnt to which the plugin object created + by the creator class is plugged in. + For example, the SBasePluginCreator class which creates a LayoutModelPlugin object + of the layout extension which is plugged in to the model element of the <em>core</em> + package can be created with the corresponding SBaseExtensionPoint object as follows: + + @verbatim + // std::vector object that contains a list of URI (package versions) supported + // by the plugin object. + std::vector<string> packageURIs; + packageURIs.push_back(getXmlnsL3V1V1()); + packageURIs.push_back(getXmlnsL2()); + + // creates an extension point (model element of the \'core\' package) + SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); + + // creates an SBasePluginCreator object + SBasePluginCreator<LayoutModelPlugin, LayoutExtension> modelPluginCreator(modelExtPoint,packageURIs); + @endverbatim + + This kind of code is implemented in init() function of each SBMLExtension derived classes. +"; + + +%feature("docstring") SBaseExtensionPoint::SBaseExtensionPoint " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBaseExtensionPoint(SBaseExtensionPoint rhs)</pre> + + copy constructor + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBaseExtensionPoint(string pkgName, int typeCode)</pre> + + constructor +"; + + +%feature("docstring") SBaseExtensionPoint::clone " + clone +"; + + +%feature("docstring") SBaseExtensionPoint::getPackageName " + Returns the package name of this extension point. +"; + + +%feature("docstring") SBaseExtensionPoint::getTypeCode " + Returns the typecode of this extension point. +"; + + +%feature("docstring") SBasePlugin " + @ingroup Core + Representation of a plug-in object of SBML\'s package extension. + + Additional attributes and/or elements of a package extension which are directly + contained by some pre-defined element are contained/accessed by <a href=\'#SBasePlugin\'> + SBasePlugin </a> class which is extended by package developers for each extension point. + The extension point, which represents an element to be extended, is identified by a + combination of a Package name and a typecode of the element, and is represented by + SBaseExtensionPoint class. + </p> + + <p> + For example, the layout extension defines <em><listOfLayouts></em> element which is + directly contained in <em><model></em> element of the core package. + In the layout package (provided as one of example packages in libSBML-5), the additional + element for the model element is implemented as ListOfLayouts class (an SBase derived class) and + the object is contained/accessed by a LayoutModelPlugin class (an SBasePlugin derived class). + </p> + + <p> + SBasePlugin class defines basic virtual functions for reading/writing/checking + additional attributes and/or top-level elements which should or must be overridden by + subclasses like SBase class and its derived classes. + </p> + + <p> + Package developers must implement an SBasePlugin exntended class for + each element to be extended (e.g. SBMLDocument, Model, ...) in which additional + attributes and/or top-level elements of the package extension are directly contained. +</p> + + To implement reading/writing functions for attributes and/or top-level + elements of the SBsaePlugin extended class, package developers should or must + override the corresponding virtual functions below provided in the SBasePlugin class: + + <ul> + <li> <p>reading elements : </p> + <ol> + <li> <code>virtual SBase createObject (XMLInputStream& stream) </code> + <p>This function must be overridden if one or more additional elements are defined.</p> + </li> + <li> <code>virtual bool readOtherXML (SBase parentObject, XMLInputStream& stream)</code> + <p>This function should be overridden if elements of annotation, notes, MathML, etc. need + to be directly parsed from the given XMLInputStream object instead of the + SBase.readAnnotation() + and/or SBase.readNotes() functions. + </p> + </li> + </ol> + </li> + <li> <p>reading attributes (must be overridden if additional attributes are defined) :</p> + <ol> + <li><code>virtual void addExpectedAttributes(ExpectedAttributes& attributes) </code></li> + <li><code>virtual void readAttributes (XMLAttributes attributes, const ExpectedAttributes& expectedAttributes)</code></li> + </ol> + </li> + <li> <p>writing elements (must be overridden if additional elements are defined) :</p> + <ol> + <li><code>virtual void writeElements (XMLOutputStream& stream) const </code></li> + </ol> + </li> + <li> <p>writing attributes : </p> + <ol> + <li><code>virtual void writeAttributes (XMLOutputStream& stream) const </code> + <p>This function must be overridden if one or more additional attributes are defined.</p> + </li> + <li><code>virtual void writeXMLNS (XMLOutputStream& stream) const </code> + <p>This function must be overridden if one or more additional xmlns attributes are defined.</p> + </li> + </ol> + </li> + + <li> <p>checking elements (should be overridden) :</p> + <ol> + <li><code>virtual bool hasRequiredElements() const </code></li> + </ol> + </li> + + <li> <p>checking attributes (should be overridden) :</p> + <ol> + <li><code>virtual bool hasRequiredAttributes() const </code></li> + </ol> + </li> + </ul> + +<p> + To implement package-specific creating/getting/manipulating functions of the + SBasePlugin derived class (e.g., getListOfLayouts(), createLyout(), getLayout(), + and etc are implemented in LayoutModelPlugin class of the layout package), package + developers must newly implement such functions (as they like) in the derived class. +</p> + +<p> + SBasePlugin class defines other virtual functions of internal implementations + such as: + + <ul> + <li><code> virtual void setSBMLDocument(SBMLDocument d) </code> + <li><code> virtual void connectToParent(SBasesbase) </code> + <li><code> virtual void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) </code> + </ul> + + These functions must be overridden by subclasses in which one or more top-level elements are defined. +</p> + +<p> + For example, the following three SBasePlugin extended classes are implemented in + the layout extension: +</p> + +<ol> + + <li> <p><a href=\'class_s_b_m_l_document_plugin.html\'> SBMLDocumentPlugin </a> class for SBMLDocument element</p> + + <ul> + <li> <em> required </em> attribute is added to SBMLDocument object. + </li> + </ul> + +<p> +(<a href=\'class_s_b_m_l_document_plugin.html\'> SBMLDocumentPlugin </a> class is a common SBasePlugin +extended class for SBMLDocument class. Package developers can use this class as-is if no additional +elements/attributes (except for <em> required </em> attribute) is needed for the SBMLDocument class +in their packages, otherwise package developers must implement a new SBMLDocumentPlugin derived class.) +</p> + + <li> <p>LayoutModelPlugin class for Model element</p> + <ul> + <li> <listOfLayouts> element is added to Model object. + </li> + + <li> <p> + The following virtual functions for reading/writing/checking + are overridden: (type of arguments and return values are omitted) + </p> + <ul> + <li> <code> createObject() </code> : (read elements) + </li> + <li> <code> readOtherXML() </code> : (read elements in annotation of SBML L2) + </li> + <li> <code> writeElements() </code> : (write elements) + </li> + </ul> + </li> + + <li> <p> + The following virtual functions of internal implementations + are overridden: (type of arguments and return values are omitted) + </p> + <ul> + <li> <code> setSBMLDocument() </code> + </li> + <li> <code> connectToParent() </code> + </li> + <li> <code> enablePackageInternal() </code> + </li> + </ul> + </li> + + + <li> <p> + The following creating/getting/manipulating functions are newly + implemented: (type of arguments and return values are omitted) + </p> + <ul> + <li> <code> getListOfLayouts() </code> + </li> + <li> <code> getLayout () </code> + </li> + <li> <code> addLayout() </code> + </li> + <li> <code> createLayout() </code> + </li> + <li> <code> removeLayout() </code> + </li> + <li> <code> getNumLayouts() </code> + </li> + </ul> + </li> + + </ul> + </li> + + <li> <p>LayoutSpeciesReferencePlugin class for SpeciesReference element (used only for SBML L2V1) </p> + + <ul> + <li> + <em> id </em> attribute is internally added to SpeciesReference object + only for SBML L2V1 + </li> + + <li> + The following virtual functions for reading/writing/checking + are overridden: (type of arguments and return values are omitted) + </li> + + <ul> + <li> + <code> readOtherXML() </code> + </li> + <li> + <code> writeAttributes() </code> + </li> + </ul> + </ul> + </li> + + </ol> +"; + + +%feature("docstring") SBasePlugin::getElementNamespace " + Returns the XML namespace (URI) of the package extension + of this plugin object. + + @return the URI of the package extension of this plugin object. +"; + + +%feature("docstring") SBasePlugin::getPrefix " + Returns the prefix of the package extension of this plugin object. + + @return the prefix of the package extension of this plugin object. +"; + + +%feature("docstring") SBasePlugin::getPackageName " + Returns the package name of this plugin object. + + @return the package name of this plugin object. +"; + + +%feature("docstring") SBasePlugin::clone " + Creates and returns a deep copy of this SBasePlugin object. + + @return a (deep) copy of this SBase object +"; + + +%feature("docstring") SBasePlugin::getElementBySId " + Returns the first child element found that has the given @p id in the model-wide SId namespace, or @c None if no such object is found. + + @param id string representing the id of objects to find + + @return pointer to the first element found with the given @p id. +"; + + +%feature("docstring") SBasePlugin::getElementByMetaId " + Returns the first child element it can find with the given @p metaid, or @c None if no such object is found. + + @param metaid string representing the metaid of objects to find + + @return pointer to the first element found with the given @p metaid. +"; + + +%feature("docstring") SBasePlugin::getAllElements " + Returns a List of all child SBase objects, including those nested to an arbitrary depth + + @return a List of pointers to all children objects. +"; + + +%feature("docstring") SBasePlugin::setSBMLDocument " + @internal + Sets the parent SBMLDocument of this plugin object. + + Subclasses which contain one or more SBase derived elements must + override this function. + + @param d the SBMLDocument object to use + + @see connectToParent + @see enablePackageInternal +"; + + +%feature("docstring") SBasePlugin::connectToParent " + @internal + Sets the parent SBML object of this plugin object to + this object and child elements (if any). + (Creates a child-parent relationship by this plugin object) + + This function is called when this object is created by + the parent element. + Subclasses must override this this function if they have one + or more child elements. Also, SBasePlugin.connectToParent() + must be called in the overridden function. + + @param sbase the SBase object to use + + @see setSBMLDocument + @see enablePackageInternal +"; + + +%feature("docstring") SBasePlugin::enablePackageInternal " + @internal + Enables/Disables the given package with child elements in this plugin + object (if any). + (This is an internal implementation invoked from + SBase.enablePackageInternal() function) + + Subclasses which contain one or more SBase derived elements should + override this function if elements defined in them can be extended by + some other package extension. + + @see setSBMLDocument + @see connectToParent +"; + + +%feature("docstring") SBasePlugin::stripPackage " + @internal + Enables/Disables the given package with child elements in this plugin + object (if any). + (This is an internal implementation invoked from + SBase.enablePackageInternal() function) + + Subclasses which contain one or more SBase derived elements should + override this function if elements defined in them can be extended by + some other package extension. + + @see setSBMLDocument + @see connectToParent +"; + + +%feature("docstring") SBasePlugin::getSBMLDocument " + Returns the parent SBMLDocument of this plugin object. + + @return the parent SBMLDocument object of this plugin object. +"; + + +%feature("docstring") SBasePlugin::getURI " + Gets the URI to which this element belongs to. + For example, all elements that belong to SBML Level 3 Version 1 Core + must would have the URI \'http://www.sbml.org/sbml/level3/version1/core\'; + all elements that belong to Layout Extension Version 1 for SBML Level 3 + Version 1 Core must would have the URI + \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' + + Unlike getElementNamespace, this function first returns the URI for this + element by looking into the SBMLNamespaces object of the document with + the its package name. if not found it will return the result of + getElementNamespace + + @return the URI this elements + + @see getPackageName + @see getElementNamespace + @see SBMLDocument::getSBMLNamespaces + @see getSBMLDocument +"; + + +%feature("docstring") SBasePlugin::getParentSBMLObject " + Returns the parent SBase object to which this plugin + object connected. + + @return the parent SBase object to which this plugin + object connected. +"; + + +%feature("docstring") SBasePlugin::setElementNamespace " + Sets the XML namespace to which this element belongs to. + For example, all elements that belong to SBML Level 3 Version 1 Core + must set the namespace to \'http://www.sbml.org/sbml/level3/version1/core\'; + all elements that belong to Layout Extension Version 1 for SBML Level 3 + Version 1 Core must set the namespace to + \'http://www.sbml.org/sbml/level3/version1/layout/version1/\' + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SBasePlugin::getLevel " + Returns the SBML level of the package extension of + this plugin object. + + @return the SBML level of the package extension of + this plugin object. +"; + + +%feature("docstring") SBasePlugin::getVersion " + Returns the SBML version of the package extension of + this plugin object. + + @return the SBML version of the package extension of + this plugin object. +"; + + +%feature("docstring") SBasePlugin::getPackageVersion " + Returns the package version of the package extension of + this plugin object. + + @return the package version of the package extension of + this plugin object. +"; + + +%feature("docstring") SBasePlugin::replaceSIDWithFunction " + @internal + If this object has a child \'math\' object (or anything with ASTNodes in general), replace all nodes with the name \'id\' with the provided function. + + @note This function does nothing itself--subclasses with ASTNode subelements must override this function. +"; + + +%feature("docstring") SBasePlugin::divideAssignmentsToSIdByFunction " + @internal + If the function of this object is to assign a value has a child \'math\' object (or anything with ASTNodes in general), replace the \'math\' object with the function (existing/function). + + @note This function does nothing itself--subclasses with ASTNode subelements must override this function. +"; + + +%feature("docstring") SBasePlugin::multiplyAssignmentsToSIdByFunction " + @internal + If this assignment assigns a value to the \'id\' element, replace the \'math\' object with the function (existing*function). +"; + + +%feature("docstring") SBasePlugin::hasIdentifierBeginningWith " + @internal + Check to see if the given prefix is used by any of the IDs defined by extension elements. A package that defines its own \'id\' attribute for a core element would check that attribute here. +"; + + +%feature("docstring") SBasePlugin::prependStringToAllIdentifiers " + @internal + Add the given string to all identifiers in the object. If the string is added to anything other than an id or a metaid, this code is responsible for tracking down and renaming all *idRefs in the package extention that identifier comes from. +"; + + +%feature("docstring") SBasePlugin::transformIdentifiers " + @internal + Add the given string to all identifiers in the object. If the string is added to anything other than an id or a metaid, this code is responsible for tracking down and renaming all *idRefs in the package extention that identifier comes from. +"; + + +%feature("docstring") SBasePlugin::getLine " + @internal + Returns the line number on which this object first appears in the XML + representation of the SBML document. + + @return the line number of the underlying SBML object. + + @note The line number for each construct in an SBML model is set upon + reading the model. The accuracy of the line number depends on the + correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real line number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100% accurate in all situations. (At this + time, libSBML supports the use of <a target=\'_blank\' + href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' + href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' + href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) + + @see getColumn() +"; + + +%feature("docstring") SBasePlugin::getColumn " + @internal + Returns the column number on which this object first appears in the XML + representation of the SBML document. + + @return the column number of the underlying SBML object. + + @note The column number for each construct in an SBML model is set + upon reading the model. The accuracy of the column number depends on + the correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real column number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100% accurate in all situations. (At this + time, libSBML supports the use of <a target=\'_blank\' + href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' + href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' + href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) + + @see getLine() +"; + + +%feature("docstring") SBasePlugin::getSBMLNamespaces " + @internal + Returns the column number on which this object first appears in the XML + representation of the SBML document. + + @return the column number of the underlying SBML object. + + @note The column number for each construct in an SBML model is set + upon reading the model. The accuracy of the column number depends on + the correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real column number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100% accurate in all situations. (At this + time, libSBML supports the use of <a target=\'_blank\' + href=\'http://xmlsoft.org\'>libxml2</a>, <a target=\'_blank\' + href=\'http://expat.sourceforge.net/\'>Expat</a> and <a target=\'_blank\' + href=\'http://xerces.apache.org/xerces-c/\'>Xerces</a>.) + + @see getLine() +"; + + +%feature("docstring") SBasePlugin::logUnknownElement " + @internal + Helper to log a common type of error for elements. +"; + + +%feature("docstring") SBasePlugin::getErrorLog " + @internal + @return the SBMLErrorLog used to log errors during while reading and + validating SBML. +"; + + +%feature("docstring") SBasePlugin::logUnknownAttribute " + @internal + Helper to log a common type of error. +"; + + +%feature("docstring") SBasePlugin::logEmptyString " + @internal + Helper to log a common type of error. +"; + + +%feature("docstring") SBMLDocumentPlugin " + @ingroup Core + Template class for the %SBMLDocument Plugin class needed by all packages. + + Plugin objects for the SBMLDocument element must be this class or + a derived class of this class. + Package developers should use this class as-is if only \'required\' + attribute is added in the SBMLDocument element by their packages. + Otherwise, developers must implement a derived class of this class + and use that class as the plugin object for the SBMLDocument element. +"; + + +%feature("docstring") SBMLDocumentPlugin::SBMLDocumentPlugin " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLDocumentPlugin(string &uri, string &prefix, SBMLNamespacessbmlns)</pre> + + Constructor + + @param uri the URI of package + @param prefix the prefix for the given package + @param sbmlns the SBMLNamespaces object for the package + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLDocumentPlugin(SBMLDocumentPlugin orig)</pre> + + Copy constructor. Creates a copy of this object. +"; + + +%feature("docstring") SBMLDocumentPlugin::clone " + Creates and returns a deep copy of this SBMLDocumentPlugin object. + + @return a (deep) copy of this object +"; + + +%feature("docstring") SBMLDocumentPlugin::setRequired " + Sets the bool value of \'required\' attribute of corresponding package + in SBMLDocument element. + + @param value the bool value of \'required\' attribute of corresponding + package in SBMLDocument element. + + @return integer value indicating success/failure of the + function. The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE @endlink +"; + + +%feature("docstring") SBMLDocumentPlugin::getRequired " + Returns the bool value of \'required\' attribute of corresponding + package in SBMLDocument element. + + @return the bool value of \'required\' attribute of corresponding + package in SBMLDocument element. +"; + + +%feature("docstring") SBMLDocumentPlugin::isSetRequired " + Predicate returning @c True or @c False depending on whether this + SBMLDocumentPlugin\'s \'required\' attribute has been set. + + @return @c True if the \'required\' attribute of this SBMLDocument has been + set, @c False otherwise. +"; + + +%feature("docstring") SBMLDocumentPlugin::unsetRequired " + Unsets the value of the \'required\' attribute of this SBMLDocumentPlugin. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBMLDocumentPlugin::isFlatteningImplemented " + @internal + Unsets the value of the \'required\' attribute of this SBMLDocumentPlugin. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBMLDocumentPlugin::checkConsistency " + @internal + Unsets the value of the \'required\' attribute of this SBMLDocumentPlugin. + + @return integer value indicating success/failure of the + function. @if clike The value is drawn from the + enumeration #OperationReturnValues_t. @endif@~ The possible values + returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink +"; + + +%feature("docstring") SBMLExtension " + @ingroup Core + The core component of SBML\'s package extension. + + SBMLExtension class (abstract class) is a core component of package extension + which needs to be extended by package developers. + The class provides functions for getting common attributes of package extension + (e.g., package name, package version, and etc.), functions for adding (registering) + each instantiated SBasePluginCreator object, and a static function (defined in each + SBMLExtension extended class) for initializing/registering the package extension + when the library of the package is loaded. + + @section howto How to implement an SBMLExtension extended class for each package extension + + Package developers must implement an SBMLExtension extended class for + their packages (e.g. GroupsExtension class is implemented for groups extension). + The extended class is implemented based on the following steps: + + (NOTE: + \'src/pacakges/groups/extension/GroupsExtension.{h,cpp}\' and + \'src/pacakges/layout/extension/LayoutExtension.{h,cpp}\' are + example files in which SBMLExtension derived classes are implemented) + + <ol> + + <li> Define the following static functions in the extended class: + (examples of groups extension are shown respectively) + <ol> + <li> <p>A string of package name (label) (The function name must be \'getPackageName\'.)</p> + + @verbatim + string GroupsExtension.getPackageName () + { + static string pkgName = \'groups\'; + return pkgName; + } + @endverbatim + </li> + + <li> <p> + Methods returning an integer of Default SBML level, version, and package version + (The method names must be \'getDefaultLevel()\', \'getDefaultVersion()\', and + \'getDefaultPackageVersion()\' respectively.) + </p> + @verbatim + long GroupsExtension.getDefaultLevel() + { + return 3; + } + long GroupsExtension.getDefaultVersion() + { + return 1; + } + long GroupsExtension.getDefaultPackageVersion() + { + return 1; + } + @endverbatim + </li> + <li> <p> Methods returning Strings that represent the URI of packages </p> + @verbatim + string GroupsExtension.getXmlnsL3V1V1 () + { + static string xmlns = \'http://www.sbml.org/sbml/level3/version1/groups/version1\'; + return xmlns; + } + @endverbatim + </li> + <li> <p>Strings that represent the other URI needed in this package (if any) </p> + </li> + </ol> + </li> + + <li> Override the following pure virtual functions + <ul> + <li> <code>virtual string getName () const =0</code>. This function returns the name of the package (e.g., \'layout\', \'groups\'). </li> + <li> <code>virtual long getLevel (string &uri) const =0</code>. This function returns the SBML level with the given URI of this package. </li> + <li> <code>virtual long getVersion (string &uri) const =0</code>. This function returns the SBML version with the given URI of this package. </li> + <li> <code>virtual long getPackageVersion (string &uri) const =0</code>. This function returns the package version with the given URI of this package.</li> + <li> <code>virtual long getURI (long sbmlLevel, long sbmlVersion, long pkgVersion) const =0</code>. + This function returns the URI (namespace) of the package corresponding to the combination of the given sbml level, sbml version, and pacakege version</li> + <li> <code>virtual SBMLExtension clone () const = 0</code>. This function creates and returns a deep copy of this derived object.</li> + </ul> + <p>For example, the above functions are overridden in the groups + package (\'src/packages/groups/extension/GroupsExtension.cpp\') as follows:</p> + @verbatim + string + GroupsExtension.getName() const + { + return getPackageName(); + } + + long + GroupsExtension.getLevel() const + { + if (uri == getXmlnsL3V1V1()) + { + return 3; + } + + return 0; + } + + long + GroupsExtension.getVersion() const + { + if (uri == getXmlnsL3V1V1()) + { + return 1; + } + + return 0; + } + + long + GroupsExtension.getPackageVersion() const + { + if (uri == getXmlnsL3V1V1()) + { + return 1; + } + + return 0; + } + + string + GroupsExtension.getURI() const + { + if (sbmlLevel == 3) + { + if (sbmlVersion == 1) + { + if (pkgVersion == 1) + { + return getXmlnsL3V1V1(); + } + } + } + + static string empty = \'\'; + + return empty; + } + + GroupsExtension* + GroupsExtension.clone () const + { + return new GroupsExtension(*this); + } + @endverbatim + + Constructor, copy Constructor, and destructor also must be overridden + if additional data members are defined in the derived class. + + </li> + + <li> <p> + Define typedef and template instantiation code for the package specific SBMLExtensionNamespaces template class + </p> + + <ol> + <li> typedef for the package specific SBMLExtensionNamespaces template class + <p> For example, the typedef for GroupsExtension (defined in the groups package) is implemented in GroupsExtension.h as follows:</p> + @verbatim + // GroupsPkgNamespaces is derived from the SBMLNamespaces class and used when creating an object of + // SBase derived classes defined in groups package. + typedef SBMLExtensionNamespaces<GroupsExtension> GroupsPkgNamespaces; + @endverbatim + </li> + + <li> template instantiation code for the above typedef definition in the implementation file (i.e., *.cpp file). + <p> For example, the template instantiation code for GroupsExtension is implemented in GroupsExtension.cpp + as follows: + </p> + + @verbatim + // Instantiate SBMLExtensionNamespaces<GroupsExtension> (GroupsPkgNamespaces) for DLL. + template class LIBSBML_EXTERN SBMLExtensionNamespaces<GroupsExtension>; + @endverbatim + + </li> + </ol> + + <p> The SBMLExtensionNamespaces template class is a derived class of + SBMLNamespaces and can be used as an argument of constructors + of SBase derived classes defined in the package extensions. + For example, a GroupsPkgNamespaces object can be used when creating a group + object as follows: + </P> + @verbatim + GroupPkgNamespaces gpns(3,1,1); // The arguments are SBML Level, SBML Version, and Groups Package Version. + + Group g = new Group(&gpns); // Creates a group object of L3V1 Groups V1. + @endverbatim + + <p> + Also, the GroupsPkgNamespaces object can be used when creating an + SBMLDocument object with the groups package as follows: + </p> + + @verbatim + GroupsPkgNamespaces gpns(3,1,1); + SBMLDocument doc; + + doc = new SBMLDocument(&gnps); // Creates an SBMLDocument of L3V1 with Groups V1. + @endverbatim + + </li> + + <li> Override the following pure virtual function which returns the SBMLNamespaces derived object + @verbatim + virtual SBMLNamespaces getSBMLExtensionNamespaces (string &uri) const =0 + @endverbatim + <p> For example, the function is overridden in GroupsExtension + class as follows:</p> + @verbatim + SBMLNamespaces + GroupsExtension.getSBMLExtensionNamespaces() const + { + GroupsPkgNamespaces* pkgns = None; + if ( uri == getXmlnsL3V1V1()) + { + pkgns = new GroupsPkgNamespaces(3,1,1); + } + return pkgns; + } + @endverbatim + </li> + + + <li> Define an enum type for representing the typecode of elements (SBase extended classes) defined in the package extension + + <p> For example, SBMLGroupsTypeCode_t for groups package is + defined in GroupsExtension.h as follows: </p> + @verbatim + typedef enum + { + SBML_GROUPS_GROUP = 200 + , SBML_GROUPS_MEMBER = 201 + } SBMLGroupsTypeCode_t; + @endverbatim + + <p> <em>SBML_GROUPS_GROUP</em> corresponds to the Group class (<group>) + and <em>SBML_GROUPS_MEMBER</em> corresponds to the Member (<member>) class, respectively. + + + <p> Similarly, SBMLLayoutTypeCode_t + for layout package is defined in LayoutExtension.h as follows: </p> + + @verbatim + typedef enum + { + SBML_LAYOUT_BOUNDINGBOX = 100 + , SBML_LAYOUT_COMPARTMENTGLYPH = 101 + , SBML_LAYOUT_CUBICBEZIER = 102 + , SBML_LAYOUT_CURVE = 103 + , SBML_LAYOUT_DIMENSIONS = 104 + , SBML_LAYOUT_GRAPHICALOBJECT = 105 + , SBML_LAYOUT_LAYOUT = 106 + , SBML_LAYOUT_LINESEGMENT = 107 + , SBML_LAYOUT_POINT = 108 + , SBML_LAYOUT_REACTIONGLYPH = 109 + , SBML_LAYOUT_SPECIESGLYPH = 110 + , SBML_LAYOUT_SPECIESREFERENCEGLYPH = 111 + , SBML_LAYOUT_TEXTGLYPH = 112 + } SBMLLayoutTypeCode_t; + @endverbatim + + <p> + These enum values are returned by corresponding getTypeCode() functions. + (e.g. SBML_GROUPS_GROUP is returned in Group.getTypeCode()) + </p> + + <p> + The value of each typecode can be duplicated between those of different + packages (In the above SBMLayoutTypeCode_t and SBMLGroupsTypeCode_t types, + unique values are assigned to enum values, but this is not mandatory.) + </p> + + <p> + Thus, to distinguish the typecodes of different packages, not only the return + value of getTypeCode() function but also that of getPackageName() + function should be checked as follows: + </p> + @verbatim + void example (SBasesb) + { + 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: + .... + } + } + else if (pkgName == \'groups\') { + switch (sb->getTypeCode()) { + case SBML_GROUPS_GROUP: + .... + break; + case SBML_GROUPS_MEMBER: + .... + } + } + ... + } + @endverbatim + + </li> + <li> Override the following pure virtual function which returns a string corresponding to the given typecode: + + @verbatim + virtual string SBMLExtension.getStringFromTypeCode() const; + @endverbatim + + <p> For example, the function for groups extension is implemented as follows: </p> + @verbatim + static + string SBML_GROUPS_TYPECODE_STRINGS[] = + { + \'Group\' + , \'Member\' + }; + + string + GroupsExtension.getStringFromTypeCode() const + { + int min = SBML_GROUPS_GROUP; + int max = SBML_GROUPS_MEMBER; + + if ( typeCode < min || typeCode > max) + { + return \'(Unknown SBML Groups Type)\'; + } + + return SBML_GROUPS_TYPECODE_STRINGS[typeCode - min]; + } + @endverbatim + + </li> + + <li> Implements a \'static void init()\' function in the derived class + + <p> In the init() function, initialization code which creates an instance of + the derived class and registering code which registers the instance to + SBMLExtensionRegistry class are implemented. + </p> + + For example, the init() function for groups package is implemented as follows: + @verbatim + void + GroupsExtension.init() + { + //------------------------------------------------------------------------- + // + // 1. Checks if the groups pacakge has already been registered. + // + //------------------------------------------------------------------------- + + if (SBMLExtensionRegistry.getInstance().isRegistered(getPackageName())) + { + // do nothing; + return; + } + + //------------------------------------------------------------------------- + // + // 2. Creates an SBMLExtension derived object. + // + //------------------------------------------------------------------------- + + GroupsExtension groupsExtension; + + //------------------------------------------------------------------------------------- + // + // 3. Creates SBasePluginCreatorBase derived objects required for this + // extension. The derived classes can be instantiated by using the following + // template class. + // + // temaplate<class SBasePluginType> class SBasePluginCreator + // + // The constructor of the creator class has two arguments: + // + // (1) SBaseExtensionPoint : extension point to which the plugin object connected + // (2) std::vector<string> : a std::vector object that contains a list of URI + // (package versions) supported by the plugin object. + // + // For example, two plugin objects (plugged in SBMLDocument and Model elements) are + // required for the groups extension. + // + // Since only \'required\' attribute is used in SBMLDocument by the groups package, and + // the \'required\' flag must always be \'false\', the existing + // SBMLDocumentPluginNotRequired class can be used as-is for the plugin. + // + // Since the lists of supported package versions (currently only L3V1-groups-V1 supported ) + // are equal in the both plugin objects, the same vector object is given to each + // constructor. + // + //--------------------------------------------------------------------------------------- + + std::vector<string> packageURIs; + packageURIs.push_back(getXmlnsL3V1V1()); + + SBaseExtensionPoint sbmldocExtPoint(\'core\',SBML_DOCUMENT); + SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); + + SBasePluginCreator<SBMLDocumentPluginNotRequired, GroupsExtension> sbmldocPluginCreator(sbmldocExtPoint,packageURIs); + SBasePluginCreator<GroupsModelPlugin, GroupsExtension> modelPluginCreator(modelExtPoint,packageURIs); + + //-------------------------------------------------------------------------------------- + // + // 3. Adds the above SBasePluginCreatorBase derived objects to the SBMLExtension derived object. + // + //-------------------------------------------------------------------------------------- + + groupsExtension.addSBasePluginCreator(&sbmldocPluginCreator); + groupsExtension.addSBasePluginCreator(&modelPluginCreator); + + //------------------------------------------------------------------------- + // + // 4. Registers the SBMLExtension derived object to SBMLExtensionRegistry + // + //------------------------------------------------------------------------- + + int result = SBMLExtensionRegistry.getInstance().addExtension(&groupsExtension); + + if (result != LIBSBML_OPERATION_SUCCESS) + { + std::cerr << \'[Error] GroupsExtension.init() failed.\' << std::endl; + } + } + @endverbatim + </p> + </li> + + <li> Instantiate a global SBMLExtensionRegister variable in appropriate + implementation file + + <p> For example, the global variable for the groups extension is instantiated in GroupsExtension.cpp as follows: </p> + @verbatim + static SBMLExtensionRegister<GroupsExtension> groupsExtensionRegister; + @endverbatim + The init() function is invoked when the global variable is instantiated, + by which initialization and registering the package extension are performed. + </li> + + + </ol> +"; + + +%feature("docstring") getNumOfSBasePlugins " + @internal + Returns the number of SBasePlugin objects stored in this object. + + @return the number of SBasePlugin objects stored in this object. +"; + + +%feature("docstring") getNumOfSupportedPackageURI " + @internal + Returns the number of supported package Namespace (package versions) of this + package extension. + + @return the number of supported package Namespace (package versions) of this + package extension. +"; + + +%feature("docstring") isSupported " + @internal + Returns a flag indicating, whether the given URI (package version) is + supported by this package extension. + + @return true if the given URI (package version) is supported by this + package extension, otherwise false is returned. +"; + + +%feature("docstring") getSupportedPackageURI " + @internal + + Returns the ith URI (the supported package version) + + @param i the index of the list of URI (the list of supporeted pacakge versions) + @return the URI of supported package version with the given index. +"; + + +%feature("docstring") clone " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + Creates and returns a deep copy of this SBMLExtension object. + + @return a (deep) copy of this SBase object +"; + + +%feature("docstring") getName " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + Returns the name of this package (e.g. \'layout\', \'multi\'). + + @return the name of package extension +"; + + +%feature("docstring") getURI " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + Returns the uri corresponding to the given SBML level, SBML version, and package version. + + @param sbmlLevel the level of SBML + @param sbmlVersion the version of SBML + @param pkgVersion the version of package + + @return a string of the package URI +"; + + +%feature("docstring") getLevel " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + Returns the SBML level associated with the given URI of this package. + + @param uri the string of URI that represents a versions of the package + @return the SBML level associated with the given URI of this package. +"; + + +%feature("docstring") getVersion " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + Returns the SBML version associated with the given URI of this package. + + @param uri the string of URI that represents a versions of the package + @return the SBML version associated with the given URI of this package. +"; + + +%feature("docstring") getPackageVersion " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + Returns the package version associated with the given URI of this package. + + @param uri the string of URI that represents a versions of this package + @return the package version associated with the given URI of this package. +"; + + +%feature("docstring") getStringFromTypeCode " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function + in their derived class. + + This method takes a type code of this package and returns a string + representing the code. +"; + + +%feature("docstring") getSBMLExtensionNamespaces " + @internal + (NOTICE) Package developers MUST OVERRIDE this pure virtual function in + their derived class. + + Returns an SBMLExtensionNamespaces<class SBMLExtensionType> object + (e.g. SBMLExtensionNamespaces<LayoutExtension> whose alias type is + LayoutPkgNamespaces) corresponding to the given uri. + Null will be returned if the given uri is not defined in the corresponding + package. + + @param uri the string of URI that represents one of versions of the package + @return an SBMLExtensionNamespaces<class SBMLExtensionType> object. None + will be returned if the given uri is not defined in the corresponding + package. +"; + + +%feature("docstring") setEnabled " + @internal + enable/disable this package. + Returned value is the result of this function. + + @param isEnabled the bool value: true (enabled) or false (disabled) + + @return true if this function call succeeded, otherwise false is returned. +"; + + +%feature("docstring") isEnabled " + @internal + Check if this package is enabled (true) or disabled (false). + + @return true if this package is enabled, otherwise false is returned. +"; + + +%feature("docstring") removeL2Namespaces " + @internal + Removes the L2 Namespaces. + + This method should be overridden by all extensions that want to serialize + to an L2 annotation. +"; + + +%feature("docstring") addL2Namespaces " + @internal + adds all L2 Extension namespaces to the namespace list. + + This method should be overridden by all extensions that want to serialize + to an L2 annotation. +"; + + +%feature("docstring") enableL2NamespaceForDocument " + @internal + Adds the L2 Namespace to the document and enables the extension. + + If the extension supports serialization to SBML L2 Annotations, this + method should be overrridden, so it will be activated. +"; + + +%feature("docstring") isInUse " + @internal + Determines whether this extension is being used by the given SBMLDocument + + The default implementation returns true. This means that when a document + had this extension enabled, it will not be possible to convert it to L2 + as we cannot make sure that the extension can be converted. + + @param doc the sbml document to test. + + @return a boolean indicating whether the extension is actually being used + byy the document. +"; + + +%feature("docstring") getErrorTableIndex " + @internal + Determines whether this extension is being used by the given SBMLDocument + + The default implementation returns true. This means that when a document + had this extension enabled, it will not be possible to convert it to L2 + as we cannot make sure that the extension can be converted. + + @param doc the sbml document to test. + + @return a boolean indicating whether the extension is actually being used + byy the document. +"; + + +%feature("docstring") SBMLExtensionException::SBMLExtensionException " + constructor +"; + + +%feature("docstring") SBMLExtensionNamespaces " + @ingroup Core + Class to store level, version and namespace information of SBML extension + package. +"; + + +%feature("docstring") SBMLExtensionNamespaces::SBMLExtensionNamespaces " + Copy constructor; creates a copy of a SBMLExtensionNamespaces. + + @param orig the SBMLExtensionNamespaces instance to copy. +"; + + +%feature("docstring") SBMLExtensionRegistry " + @ingroup Core + Registry class in which extension packages are registered. +"; + + +%feature("docstring") SBMLExtensionRegistry::getInstance " + Returns an instance (singleton) of the SBMLExtensionRegistry class. + This function needs to be invoked when manipulating the SBMLExtensionRegistry class. + + @return the instance of the SBMLExtensionRegistry object. +"; + + +%feature("docstring") SBMLExtensionRegistry::addExtension " + Add the given SBMLExtension to this SBMLExtensionRegistry. + + @param ext the SBMLExtension object to be added. + + @return integer value indicating success/failure of the + function. The possible values returned by this function are: + @li @link libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink + @li @link libsbml.LIBSBML_PKG_CONFLICT LIBSBML_PKG_CONFLICT @endlink + @li @link libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink +"; + + +%feature("docstring") SBMLExtensionRegistry::getExtension " + Returns an SBMLExtension object with the given package URI or package name (string). + + @param package the URI or name of the package extension + + @return a clone of the SBMLExtension object with the given package URI or name. The returned + extension is to be freed (i.e.: deleted) by the caller! +"; + + +%feature("docstring") SBMLExtensionRegistry::removeL2Namespaces " + Remove all L2 Extension namespaces from the namespace list. This will call all + overriden SBMLExtension::removeL2Namespaces methods. +"; + + +%feature("docstring") SBMLExtensionRegistry::addL2Namespaces " + adds all L2 Extension namespaces to the namespace list. This will call all + overriden SBMLExtension::addL2Namespaces methods. +"; + + +%feature("docstring") SBMLExtensionRegistry::enableL2NamespaceForDocument " + Enables all extensions that support serialization / deserialization with + SBML Annotations. +"; + + +%feature("docstring") SBMLExtensionRegistry::disableUnusedPackages " + Goes through all extensions in the list of plugins of the given document + and disables all plugins that are not being used. +"; + + +%feature("docstring") SBMLExtensionRegistry::disablePackage " + Disables the package with the given URI / name. +"; + + +%feature("docstring") SBMLExtensionRegistry::getNumExtension " + Returns the number of SBMLExtension with the given extension point. + + @param extPoint the SBaseExtensionPoint + + @return the number of SBMLExtension with the given extension point. +"; + + +%feature("docstring") SBMLExtensionRegistry::setEnabled " + Enable/disable the package with the given uri. + + @param uri the URI of the target package. + @param isEnabled the bool value corresponding to enabled (true) or + disabled (false) + + @return false will be returned if the given bool value is false + or the given package is not registered, otherwise true will be + returned. +"; + + +%feature("docstring") SBMLExtensionRegistry::isEnabled " + Checks if the extension with the given URI is enabled (true) or + disabled (false) + + @param uri the URI of the target package. + + @return false will be returned if the given package is disabled + or not registered, otherwise true will be returned. +"; + + +%feature("docstring") SBMLExtensionRegistry::isRegistered " + Checks if the extension with the given URI is registered (true) + or not (false) + + @param uri the URI of the target package. + + @return true will be returned if the package with the given URI + is registered, otherwise false will be returned. +"; + + +%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageNames " + Returns a list of registered packages (such as \'layout\', \'fbc\' or \'comp\') + the list contains char* strings and has to be freed by the caller. + + @return the names of the registered packages in a list +"; + + +%feature("docstring") SBMLExtensionRegistry::getNumRegisteredPackages " + Returns the number of registered packages. + + @return the number of registered packages. +"; + + +%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageName " + Returns the registered package name at the given index + + @param index zero based index of the package name to return + + @return the package name with the given index or None +"; + + +%feature("docstring") SBMLExtensionRegistry::SBMLExtensionRegistry " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLExtensionRegistry()</pre> + + Returns the registered package name at the given index + + @param index zero based index of the package name to return + + @return the package name with the given index or None + + + <hr> + Method variant with the following signature: + <pre class='signature'>SBMLExtensionRegistry(SBMLExtensionRegistry orig)</pre> + + Returns the registered package name at the given index + + @param index zero based index of the package name to return + + @return the package name with the given index or None +"; + + +%feature("docstring") OStream " + Wrapper class for the C++ standard streams <code>cout</code>, + <code>cerr</code>, and <code>clog</code>. + + A few libSBML methods accept an argument for indicating where to send + text string output. An example is the SBMLDocument.printErrors() method. However, the methods use C++ style streams and not Java + stream objects. The OStream object exists to bridge the Java and + underlying native implementation. It is a simple wrapper around the + underlying stream object and provides a few basic methods for + manipulating it. +"; + + +%feature("docstring") OFStream " + Wrapper class for the C++ standard file stream <code>ofstream</code>. + + The C++ <code>ofstream</code> (\'output file stream\') provides an + interface for writing data to files as output streams. This class, + OFStream, wraps the C++ <code>ofstream</code> and provides an OStream + interface to it. The file to be associated with the stream can be + specified as a parameter to the constructors in this class. + + This class may be useful because some libSBML methods accept an argument + for indicating where to send text string output. An example is the + SBMLDocument.printErrors() method. The methods use C++ style streams + and not Java stream objects. The OStream object exists to bridge the + Java and underlying native implementation. It is a simple wrapper + around the underlying stream object and provides a few basic methods for + manipulating it. +"; + + +%feature("docstring") OStringStream " + Wrapper class for the C++ standard stream <code>ostringstream</code>. + + The C++ <code>ostringstream</code> (\'output string stream class\') + provides an interface to manipulating strings as if they were output + streams. This class class, OStringStream, wraps the + <code>ostringstream</code> and provides an OStream interface to it. + + This class may be useful because some libSBML methods accept an argument + for indicating where to send text string output. An example is the + SBMLDocument.printErrors() method. The methods use + C++ style streams and not Java stream objects. The OStream object + exists to bridge the Java and underlying native implementation. It is a + simple wrapper around the underlying stream object and provides a few + basic methods for manipulating it. +"; + + +%feature("docstring") OStream::OStream " + Creates a new OStream object with one of standard output stream objects. + + @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) + indicating the type of stream to create. +"; + + +%feature("docstring") OStream::get_ostream " + Returns the stream object. + <p> + @return the stream object +"; + + +%feature("docstring") OStream::endl " + Writes an end-of-line character on this tream. +"; + + +%feature("docstring") OFStream::OFStream " + Creates a new OFStream object for a file. + <p> + This opens the given file @p filename with the @p is_append flag + (default is <code>false</code>), and creates an OFStream object + instance that associates the file\'s content with an OStream object. + <p> + @param filename the name of the file to open + @param is_append whether to open the file for appending (default: + <code>false</code>, meaning overwrite the content instead) + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif +"; + + +%feature("docstring") OFStream::open " + Opens a file and associates this stream object with it. + <p> + This method opens a given file @p filename with the given + @p is_append flag (whose default value is <code>false</code>), + and associates <i>this</i> stream object with the file\'s content. + <p> + @param filename the name of the file to open + @param is_append whether to open the file for appending (default: + <code>false</code>, meaning overwrite the content instead) + + @if notcpp @htmlinclude warn-default-args-in-docs.html @endif +"; + + +%feature("docstring") OFStream::close " + Closes the file currently associated with this stream object. +"; + + +%feature("docstring") OFStream::is_open " + Returns <code>true</code> if this stream object is currently + associated with a file. + <p> + @return <code>true</code> if the stream object is currently + associated with a file, <code>false</code> otherwise +"; + + +%feature("docstring") OStringStream::OStringStream " + Creates a new OStringStream object +"; + + +%feature("docstring") OStringStream::str " + This method has multiple variants that differ in the arguments + they accept. Each is described separately below. + + <hr> + Method variant with the following signature: + <pre class='signature'>str()</pre> + + Returns the copy of the string object currently assosiated + with this <code>ostringstream</code> buffer. + <p> + @return a copy of the string object for this stream + + + <hr> + Method variant with the following signature: + <pre class='signature'>str(string s)</pre> + + Sets string @p s to the string object currently assosiated with + this stream buffer. + <p> + @param s the string to write to this stream +"; + + diff --git a/bindings/python/pydoc-normal.i b/bindings/python/pydoc-normal.i index aba54ae..68f2fb2 100644 --- a/bindings/python/pydoc-normal.i +++ b/bindings/python/pydoc-normal.i @@ -1,42736 +1,42736 @@ -%feature("docstring") getLibSBMLVersion " - Returns the version number of this copy of libSBML as an integer. - - Returns the libSBML version as an integer; version 1.2.3 becomes - 10203. -"; - - -%feature("docstring") getLibSBMLDottedVersion " - Returns the version number of this copy of libSBML as a string. - - Returns the libSBML version as a string; version 1.2.3 becomes - '1.2.3'. - - See also getLibSBMLVersionString(). -"; - - -%feature("docstring") getLibSBMLVersionString " - Returns the version number of this copy of libSBML as a string - without periods. - - Returns the libSBML version as a string: version 1.2.3 becomes - '10203'. - - See also getLibSBMLDottedVersion(). -"; - - -%feature("docstring") SBMLReader " - @ingroup Core Methods for reading SBML from files and text strings. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The SBMLReader class provides the main interface for reading SBML - content from files and strings. The methods for reading SBML all - return an SBMLDocument object representing the results. - - In the case of failures (such as if the SBML contains errors or a - file cannot be read), the errors will be recorded with the - SBMLErrorLog object kept in the SBMLDocument returned by SBMLReader. - Consequently, immediately after calling a method on SBMLReader, - callers should always check for errors and warnings using the - methods for this purpose provided by SBMLDocument. - - For convenience as well as easy access from other languages besides - C++, this file also defines two global functions, - libsbml.readSBML() and libsbml.readSBMLFromString(). They are - equivalent to creating an SBMLReader object and then calling the - SBMLReader.readSBML() or SBMLReader.readSBMLFromString() methods, - respectively. - - Support for reading compressed files - ====================================================================== - - LibSBML provides support for reading (as well as writing) compressed - SBML files. The process is transparent to the calling application - -- the application does not need to do anything deliberate to invoke - the functionality. If a given SBML filename ends with an extension - for the gzip, zip or bzip2 compression formats (respectively, .gz, - .zip, or .bz2), then the methods SBMLReader.readSBML() and - SBMLWriter.writeSBML() will automatically decompress and compress - the file while writing and reading it. If the filename has no such - extension, it will be read and written uncompressed as normal. - - The compression feature requires that the zlib (for gzip and zip - formats) and/or bzip2 (for bzip2 format) be available on the system - running libSBML, and that libSBML was configured with their support - compiled-in. Please see the libSBML installation instructions @~ for - more information about this. The methods hasZlib()@~ and - hasBzip2()@~ can be used by an application to query at run-time - whether support for the compression libraries is available in the - present copy of libSBML. - - Support for compression is not mandated by the SBML standard, but - applications may find it helpful, particularly when large SBML models - are being communicated across data links of limited bandwidth. -"; - - -%feature("docstring") SBMLReader::SBMLReader " - Creates a new SBMLReader and returns it. - - The libSBML SBMLReader objects offer methods for reading SBML in XML - form from files and text strings. -"; - - -%feature("docstring") SBMLReader::readSBML " - Reads an SBML document from a file. - - This method is identical to SBMLReader.readSBMLFromFile(). - - If the file named 'filename' does not exist or its content is not - valid SBML, one or more errors will be logged with the SBMLDocument - object returned by this method. Callers can use the methods on - SBMLDocument such as SBMLDocument.getNumErrors() and - SBMLDocument.getError() to get the errors. The object returned by - SBMLDocument.getError() is an SBMLError object, and it has methods to - get the error code, category, and severity level of the problem, as - well as a textual description of the problem. The possible severity - levels range from informational messages to fatal errors; see the - documentation for SBMLError for more information. - - If the file 'filename' could not be read, the file-reading error will - appear first. The error code @~ can provide a clue about what - happened. For example, a file might be unreadable (either because - it does not actually exist or because the user does not have the - necessary access priviledges to read it) or some sort of file - operation error may have been reported by the underlying operating - system. Callers can check for these situations using a program - fragment such as the following: - - reader = SBMLReader() - doc = reader.readSBMLFromFile(filename) - - if doc.getNumErrors() > 0: - if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: - # Handle case of unreadable file here. - elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: - # Handle case of other file error here. - else: - # Handle other error cases here. - @~ - - If the given filename ends with the suffix '.gz' (for example, - 'myfile.xml.gz'), the file is assumed to be compressed in gzip - format and will be automatically decompressed upon reading. - Similarly, if the given filename ends with '.zip' or '.bz2', the - file is assumed to be compressed in zip or bzip2 format - (respectively). Files whose names lack these suffixes will be read - uncompressed. Note that if the file is in zip format but the - archive contains more than one file, only the first file in the - archive will be read and the rest ignored. - - To read a gzip/zip file, libSBML needs to be configured and linked - with the zlib library at compile time. It also needs to be linked - with the bzip2 library to read files in bzip2 format. (Both of these - are the default configurations for libSBML.) Errors about unreadable - files will be logged if a compressed filename is given and libSBML - was not linked with the corresponding required library. - - Parameter 'filename' is the name or full pathname of the file to be - read. - - Returns a pointer to the SBMLDocument created from the SBML content. - - Note: - - LibSBML versions 2.x and later versions behave differently in error - handling in several respects. One difference is how early some - errors are caught and whether libSBML continues processing a file in - the face of some early errors. In general, libSBML versions after - 2.x stop parsing SBML inputs sooner than libSBML version 2.x in the - face of XML errors, because the errors may invalidate any further - SBML content. For example, a missing XML declaration at the - beginning of the file was ignored by libSBML 2.x but in version 3.x - and later, it will cause libSBML to stop parsing the rest of the - input altogether. While this behavior may seem more severe and - intolerant, it was necessary in order to provide uniform behavior - regardless of which underlying XML parser (Expat, Xerces, libxml2) - is being used by libSBML. The XML parsers themselves behave - differently in their error reporting, and sometimes libSBML has to - resort to the lowest common denominator. - - See also SBMLError. -"; - - -%feature("docstring") SBMLReader::readSBMLFromFile " - Reads an SBML document from a file. - - This method is identical to SBMLReader.readSBML(). - - If the file named 'filename' does not exist or its content is not - valid SBML, one or more errors will be logged with the SBMLDocument - object returned by this method. Callers can use the methods on - SBMLDocument such as SBMLDocument.getNumErrors() and - SBMLDocument.getError() to get the errors. The object returned by - SBMLDocument.getError() is an SBMLError object, and it has methods to - get the error code, category, and severity level of the problem, as - well as a textual description of the problem. The possible severity - levels range from informational messages to fatal errors; see the - documentation for SBMLError for more information. - - If the file 'filename' could not be read, the file-reading error will - appear first. The error code @~ can provide a clue about what - happened. For example, a file might be unreadable (either because - it does not actually exist or because the user does not have the - necessary access priviledges to read it) or some sort of file - operation error may have been reported by the underlying operating - system. Callers can check for these situations using a program - fragment such as the following: - - reader = SBMLReader() - doc = reader.readSBMLFromFile(filename) - - if doc.getNumErrors() > 0: - if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: - # Handle case of unreadable file here. - elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: - # Handle case of other file error here. - else: - # Handle other error cases here. - @~ - - If the given filename ends with the suffix '.gz' (for example, - 'myfile.xml.gz'), the file is assumed to be compressed in gzip - format and will be automatically decompressed upon reading. - Similarly, if the given filename ends with '.zip' or '.bz2', the - file is assumed to be compressed in zip or bzip2 format - (respectively). Files whose names lack these suffixes will be read - uncompressed. Note that if the file is in zip format but the - archive contains more than one file, only the first file in the - archive will be read and the rest ignored. - - To read a gzip/zip file, libSBML needs to be configured and linked - with the zlib library at compile time. It also needs to be linked - with the bzip2 library to read files in bzip2 format. (Both of these - are the default configurations for libSBML.) Errors about unreadable - files will be logged if a compressed filename is given and libSBML - was not linked with the corresponding required library. - - Parameter 'filename' is the name or full pathname of the file to be - read. - - Returns a pointer to the SBMLDocument created from the SBML content. - - Note: - - LibSBML versions 2.x and later versions behave differently in error - handling in several respects. One difference is how early some - errors are caught and whether libSBML continues processing a file in - the face of some early errors. In general, libSBML versions after - 2.x stop parsing SBML inputs sooner than libSBML version 2.x in the - face of XML errors, because the errors may invalidate any further - SBML content. For example, a missing XML declaration at the - beginning of the file was ignored by libSBML 2.x but in version 3.x - and later, it will cause libSBML to stop parsing the rest of the - input altogether. While this behavior may seem more severe and - intolerant, it was necessary in order to provide uniform behavior - regardless of which underlying XML parser (Expat, Xerces, libxml2) - is being used by libSBML. The XML parsers themselves behave - differently in their error reporting, and sometimes libSBML has to - resort to the lowest common denominator. - - See also SBMLError, SBMLDocument. -"; - - -%feature("docstring") SBMLReader::readSBMLFromString " - Reads an SBML document from the given XML string. - - This method is flexible with respect to the presence of an XML - declaration at the beginning of the string. In particular, if the - string in 'xml' does not begin with the XML declaration <?xml - version='1.0' encoding='UTF-8'?>, then this method will - automatically prepend the declaration to 'xml'. - - This method will log a fatal error if the content given in the - parameter 'xml' is not SBML. See the method documentation for - SBMLReader.readSBML() for an example of code for testing the - returned error code. - - Parameter 'xml' is a string containing a full SBML model - - Returns a pointer to the SBMLDocument created from the SBML content. - - See also SBMLReader.readSBML(). -"; - - -%feature("docstring") SBMLReader::hasZlib " - Static method; returns True if this copy of libSBML supports - gzip</I> and zip format compression. - - Returns True if libSBML has been linked with the zlib library, False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLReader), and the other will be a standalone - top-level function with the name SBMLReader_hasZlib(). They are - functionally identical. @~ - - @see SBMLReader.hasBzip2() @~ -"; - - -%feature("docstring") SBMLReader::hasBzip2 " - Static method; returns True if this copy of libSBML supports bzip2 - format compression. - - Returns True if libSBML is linked with the bzip2 libraries, False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLReader), and the other will be a standalone - top-level function with the name SBMLReader_hasBzip2(). They are - functionally identical. @~ - - @see SBMLReader.hasZlib() @~ -"; - - -%feature("docstring") SBMLReader::readInternal " - Internal implementation method. -"; - - -%feature("docstring") readSBML " - Reads an SBML document from the given file 'filename'. - - If 'filename' does not exist, or it is not an SBML file, an error - will be logged in the error log of the SBMLDocument object returned - by this method. Calling programs can inspect this error log to - determine the nature of the problem. Please refer to the definition - of SBMLDocument for more information about the error reporting - mechanism. - - Returns a pointer to the SBMLDocument read. -"; - - -%feature("docstring") readSBMLFromFile " - Reads an SBML document from the given file 'filename'. - - If 'filename' does not exist, or it is not an SBML file, an error - will be logged in the error log of the SBMLDocument object returned - by this method. Calling programs can inspect this error log to - determine the nature of the problem. Please refer to the definition - of SBMLDocument for more information about the error reporting - mechanism. - - Returns a pointer to the SBMLDocument read. -"; - - -%feature("docstring") readSBMLFromString " - Reads an SBML document from a string assumed to be in XML format. - - If the string does not begin with XML declaration, - - <?xml version=\'1.0\' encoding=\'UTF-8\'?> - - an XML declaration string will be prepended. - - This method will report an error if the given string 'xml' is not - SBML. The error will be logged in the error log of the SBMLDocument - object returned by this method. Calling programs can inspect this - error log to determine the nature of the problem. Please refer to - the definition of SBMLDocument for more information about the error - reporting mechanism. - - Returns a pointer to the SBMLDocument read. -"; - - -%feature("docstring") SBMLWriter " - @ingroup Core Methods for writing SBML to files and text strings. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The SBMLWriter class is the converse of SBMLReader, and provides the - main interface for serializing SBML models into XML and writing the - result to an output stream or to files and text strings. The methods - for writing SBML all take an SBMLDocument object and a destination. - They return a boolean or integer value to indicate success or - failure. - - Support for writing compressed files - ====================================================================== - - LibSBML provides support for writing (as well as reading) compressed - SBML files. The process is transparent to the calling application - -- the application does not need to do anything deliberate to invoke - the functionality. If a given SBML filename ends with an extension - for the gzip, zip or bzip2 compression formats (respectively, - \".gz\", \".zip\", or \".bz2\"), then the methods - SBMLWriter.writeSBML() and SBMLReader.readSBML() will automatically - compress and decompress the file while writing and reading it. If - the filename has no such extension, it will be written and read - uncompressed as normal. - - The compression feature requires that the zlib (for gzip and zip - formats) and/or bzip2 (for bzip2 format) be available on the system - running libSBML, and that libSBML was configured with their support - compiled-in. Please see the libSBML installation instructions@~ for - more information about this. The methods SBMLWriter.hasZlib() and - SBMLWriter.hasBzip2() can be used by an application to query at run- - time whether support for the compression libraries is available in - the present copy of libSBML. - - Support for compression is not mandated by the SBML standard, but - applications may find it helpful, particularly when large SBML models - are being communicated across data links of limited bandwidth. -"; - - -%feature("docstring") SBMLWriter::SBMLWriter " - Creates a new SBMLWriter. - - The libSBML SBMLWriter objects offer methods for writing SBML in XML - form to files and text strings. -"; - - -%feature("docstring") SBMLWriter::setProgramName " - Sets the name of this program, i.e., the program that is about to - write out the SBMLDocument. - - If the program name and version are set (see - SBMLWriter.setProgramVersion()), the following XML comment, intended - for human consumption, will be written at the beginning of the XML - document: - - <!-- Created by <program name> version <program version> - on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> - - If the program name and version are not set at some point before - calling the writeSBML() methods, no such comment is written out. - - Parameter 'name' is the name of this program (where 'this program' - refers to program in which libSBML is embedded, not libSBML itself!) - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also setProgramVersion(). -"; - - -%feature("docstring") SBMLWriter::setProgramVersion " - Sets the version of this program, i.e., the program that is about to - write out the SBMLDocument. - - If the program version and name are set (see - SBMLWriter.setProgramName()), the following XML comment, intended - for human consumption, will be written at the beginning of the - document: - - <!-- Created by <program name> version <program version> - on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> - - If the program version and name are not set at some point before - calling the writeSBML() methods, no such comment is written out. - - Parameter 'version' is the version of this program (where 'this - program' refers to program in which libSBML is embedded, not libSBML - itself!) - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also setProgramName(). -"; - - -%feature("docstring") SBMLWriter::writeSBML " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - writeSBML(SBMLDocument d, string filename) - - Writes the given SBML document to filename. - - If the given filename ends with the suffix \".gz\" (for example, - \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be - written compressed in gzip format. Similarly, if the given filename - ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the - file to be compressed in zip or bzip2 format (respectively). Files - whose names lack these suffixes will be written uncompressed. - Special considerations for the zip format: If the given filename - ends with \".zip\", the file placed in the zip archive will have the - suffix \".xml\" or \".sbml\". For example, the file in the zip - archive will be named \"test.xml\" if the given filename is - \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the - archive will be \"test.sbml\" if the given filename is - \"test.sbml.zip\". - - Parameter 'd' is the SBML document to be written - - Parameter 'filename' is the name or full pathname of the file where - the SBML is to be written. - - Returns True on success and False if the filename could not be - opened for writing. - - Note: - - To write a gzip/zip file, libSBML needs to be configured and linked - with the zlib library at compile time. It also needs to be linked - with the bzip2 library to write files in bzip2 format. (Both of - these are the default configurations for libSBML.) Errors about - unreadable files will be logged and this method will return false if - a compressed filename is given and libSBML was not linked with the - corresponding required library. - - See also setProgramVersion(), setProgramName(), setProgramVersion(), - setProgramName(). -"; - - -%feature("docstring") SBMLWriter::writeToString " - Internal implementation method. -"; - - -%feature("docstring") SBMLWriter::writeSBMLToFile " - Writes the given SBML document to filename. - - If the given filename ends with the suffix \".gz\" (for example, - \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be - written compressed in gzip format. Similarly, if the given filename - ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the - file to be compressed in zip or bzip2 format (respectively). Files - whose names lack these suffixes will be written uncompressed. - Special considerations for the zip format: If the given filename - ends with \".zip\", the file placed in the zip archive will have the - suffix \".xml\" or \".sbml\". For example, the file in the zip - archive will be named \"test.xml\" if the given filename is - \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the - archive will be \"test.sbml\" if the given filename is - \"test.sbml.zip\". - - Parameter 'd' is the SBML document to be written - - Parameter 'filename' is the name or full pathname of the file where - the SBML is to be written. - - Returns True on success and False if the filename could not be - opened for writing. - - Note: - - To write a gzip/zip file, libSBML needs to be configured and linked - with the zlib library at compile time. It also needs to be linked - with the bzip2 library to write files in bzip2 format. (Both of - these are the default configurations for libSBML.) Errors about - unreadable files will be logged and this method will return false if - a compressed filename is given and libSBML was not linked with the - corresponding required library. - - See also setProgramVersion(), setProgramName(). -"; - - -%feature("docstring") SBMLWriter::writeSBMLToString " - Writes the given SBML document to an in-memory string and returns a - pointer to it. - - The string is owned by the caller and should be freed (with free()) - when no longer needed. - - Parameter 'd' is the SBML document to be written - - Returns the string on success and 0 if one of the underlying parser - components fail. - - See also setProgramVersion(), setProgramName(). -"; - - -%feature("docstring") SBMLWriter::hasZlib " - Predicate returning True if this copy of libSBML has been linked - with the zlib library. - - LibSBML supports reading and writing files compressed with either - bzip2 or zip/gzip compression. The facility depends on libSBML - having been compiled with the necessary support libraries. This - method allows a calling program to inquire whether that is the case - for the copy of libSBML it is using. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLWriter), and the other will be a standalone - top-level function with the name SBMLWriter_hasZlib(). They are - functionally identical. @~ - - Returns True if libSBML is linked with zlib, False otherwise. - - @see SBMLWriter.hasBzip2() @~ -"; - - -%feature("docstring") SBMLWriter::hasBzip2 " - Predicate returning True if this copy of libSBML has been linked - with the bzip2 library. - - LibSBML supports reading and writing files compressed with either - bzip2 or zip/gzip compression. The facility depends on libSBML - having been compiled with the necessary support libraries. This - method allows a calling program to inquire whether that is the case - for the copy of libSBML it is using. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLWriter), and the other will be a standalone - top-level function with the name SBMLWriter_hasZlib(). They are - functionally identical. @~ - - Returns True if libSBML is linked with bzip2, False otherwise. - - @see SBMLWriter.hasZlib() @~ -"; - - -%feature("docstring") writeSBML " - Writes the given SBML document 'd' to the file named by 'filename'. - - This function is identical to . - - If the given filename ends with the suffix \".gz\" (for example, - \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be - written compressed in gzip format. Similarly, if the given filename - ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the - file to be compressed in zip or bzip2 format (respectively). Files - whose names lack these suffixes will be written uncompressed. - Special considerations for the zip format: If the given filename - ends with \".zip\", the file placed in the zip archive will have the - suffix \".xml\" or \".sbml\". For example, the file in the zip - archive will be named \"test.xml\" if the given filename is - \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the - archive will be \"test.sbml\" if the given filename is - \"test.sbml.zip\". - - Parameter 'd' is the SBMLDocument object to be written out in XML - format - - Parameter 'filename' is a string giving the path to a file where the - XML content is to be written. - - Returns 1 on success and 0 (zero) if 'filename' could not be - written. Some possible reasons for failure include (a) being unable - to open the file, and (b) using a filename that indicates a - compressed SBML file (i.e., a filename ending in \".zip\" or - similar) when the compression functionality has not been enabled in - the underlying copy of libSBML. - - @~ - - See also SBMLWriter.hasZlib(), SBMLWriter.hasBzip2(). -"; - - -%feature("docstring") writeSBMLToString " - Writes the given SBML document 'd' to an in-memory string and - returns the string. - - This is a convenience function that uses the - SBMLWriter.writeSBMLToString() method internally, yet does not - require the caller to create an SBMLWriter object first. - - Parameter 'd' is an SBMLDocument object to be written out in XML - format - - Returns the string on success and None if one of the underlying - parser components fail. - - @~ -"; - - -%feature("docstring") writeSBMLToFile " - Writes the given SBML document 'd' to the file 'filename'. - - This is a convenience function that uses the - SBMLWriter.writeSBMLToFile() method internally, yet does not require - the caller to create an SBMLWriter object first. - - If the given filename ends with the suffix \".gz\" (for example, - \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be - written compressed in gzip format. Similarly, if the given filename - ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the - file to be compressed in zip or bzip2 format (respectively). Files - whose names lack these suffixes will be written uncompressed. - Special considerations for the zip format: If the given filename - ends with \".zip\", the file placed in the zip archive will have the - suffix \".xml\" or \".sbml\". For example, the file in the zip - archive will be named \"test.xml\" if the given filename is - \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the - archive will be \"test.sbml\" if the given filename is - \"test.sbml.zip\". - - Parameter 'd' is an SBMLDocument object to be written out in XML - format - - Parameter 'filename' is a string giving the path to a file where the - XML content is to be written. - - Returns 1 on success and 0 (zero) if 'filename' could not be - written. Some possible reasons for failure include (a) being unable - to open the file, and (b) using a filename that indicates a - compressed SBML file (i.e., a filename ending in \".zip\" or - similar) when the compression functionality has not been enabled in - the underlying copy of libSBML. - - @~ - - See also SBMLWriter.hasZlib(), SBMLWriter.hasBzip2(). -"; - - -%feature("docstring") SBMLTypeCode_toString " - This method takes an SBML type code and returns a string representing - the code. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns a human readable name for the given SBML type code. - - Note: - - The caller does not own the returned string and is therefore not - allowed to modify it. -"; - - -%feature("docstring") SBase " - @ingroup Core Implementation of SBase, the base class of most SBML - objects. - - Most components in SBML are derived from a single abstract base type, - SBase. In addition to serving as the parent class for most other - classes of objects in SBML, this base type is designed to allow a - modeler or a software package to attach arbitrary information to each - major element or list in an SBML model. - - SBase has an optional subelement called 'notes'. It is intended to - serve as a place for storing optional information intended to be seen - by humans. An example use of the 'notes' element would be to - contain formatted user comments about the model element in which the - 'notes' element is enclosed. There are certain conditions on the - XHTML content permitted inside the 'notes' element; please consult - the SBML specification document corresponding to the SBML Level and - Version of your model for more information about the requirements - for 'notes' content. - - SBase has another optional subelement called 'annotation'. Whereas - the 'notes' element described above is a container for content to be - shown directly to humans, the 'annotation' element is a container - for optional software-generated content not meant to be shown to - humans. The element's content type is XML type 'any', allowing - essentially arbitrary data content. SBML places only a few - restrictions on the organization of the content; these are intended - to help software tools read and write the data as well as help - reduce conflicts between annotations added by different tools. As is - the case with 'notes', it is important to refer to the SBML - specification document corresponding to the SBML Level and Version - of your model for more information about the requirements for - 'annotation' content. - - It is worth pointing out that the 'annotation' element in the - definition of SBase exists in order that software developers may - attach optional application-specific data to the elements in an SBML - model. However, it is important that this facility not be misused. - In particular, it is critical that data essential to a model - definition or that can be encoded in existing SBML elements is not - stored in 'annotation'. Parameter values, functional dependencies - between model elements, etc., should not be recorded as annotations. - It is crucial to keep in mind the fact that data placed in - annotations can be freely ignored by software applications. If such - data affects the interpretation of a model, then software - interoperability is greatly impeded. - - SBML Level 2 introduced an optional SBase attribute named 'metaid' - for supporting metadata annotations using RDF (Resource Description - Format). The attribute value has the data type XML ID, the XML - identifier type, which means each 'metaid' value must be globally - unique within an SBML file. (Importantly, this uniqueness criterion - applies across any attribute with type XML ID, not just the - 'metaid' attribute used by SBML -- something to be aware of if your - application-specific XML content inside the 'annotation' subelement - happens to use XML ID.) The 'metaid' value serves to identify a - model component for purposes such as referencing that component from - metadata placed within 'annotation' subelements. - - Beginning with SBML Level 2 Version 3, SBase also has an optional - attribute named 'sboTerm' for supporting the use of the Systems - Biology Ontology. In SBML proper, the data type of the attribute is - a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit - integer number; libSBML simplifies the representation by only - storing the 'NNNNNNN' integer portion. Thus, in libSBML, the - 'sboTerm' attribute on SBase has data type int, and SBO identifiers - are stored simply as integers. (For convenience, SBase offers - methods for returning both the integer form and a text-string form - of the SBO identifier.) SBO terms are a type of optional - annotation, and each different class of SBML object derived from - SBase imposes its own requirements about the values permitted for - 'sboTerm'. Please consult the SBML Level 2 Version 4 specification - for more information about the use of SBO and the 'sboTerm' - attribute. - - Finally, note that, in the list of methods on SBase, there is no - public constructor because SBase is an abstract class. The - constructors reside in the subclasses derived from SBase. - - Standard format for annotations linking data resources - ====================================================================== - - SBML Level 2 Versions 2, 3 and 4, and Level 3, define a proposed - regular format for encoding two particular categories of annotations: - (a) references to controlled vocabulary terms and database - identifiers which define and describe biological and biochemical - entities in a model; and (b) descriptions of the provenance of a - model, including its author(s) and modification history. -"; - - -%feature("docstring") SBase::accept " - Accepts the given SBMLVisitor for this SBase object. - - Parameter 'v' is the SBMLVisitor instance to be used - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") SBase::clone " - Creates and returns a deep copy of this SBase object. - - Returns a (deep) copy of this SBase object. -"; - - -%feature("docstring") SBase::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the 'id' attribute value of the - object to find. - - Returns pointer to the first element found with the given identifier. -"; - - -%feature("docstring") SBase::getElementByMetaId " - Returns the first child element it can find with a specific 'metaid' - attribute value, or None if no such object is found. - - The optional attribute named \"metaid\", present on every major SBML - component type, is for supporting metadata annotations using RDF - (Resource Description Format). The attribute value has the data type - XML ID, the XML identifier type, which means each \"metaid\" value - must be globally unique within an SBML file. The latter point is - important, because the uniqueness criterion applies across any - attribute with type ID anywhere in the file, not just the \"metaid\" - attribute used by SBML—something to be aware of if your - application-specific XML content inside the \"annotation\" - subelement happens to use the XML ID type. Although SBML only uses - XML ID for the \"metaid\" attribute, callers should be careful if - they use XML ID's in XML portions of a model that are not defined by - SBML, such as in the application-specific content of the - \"annotation\" subelement. - - Parameter 'metaid' is string representing the 'metaid' attribute - value of the object to find. - - Returns pointer to the first element found with the given meta- - identifier. -"; - - -%feature("docstring") SBase::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth. - - Returns a pointer to a List of pointers to all children objects. -"; - - -%feature("docstring") SBase::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML content (if such exists). - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") SBase::renameMetaIdRefs " - Renames all the meta-identifier attributes on this element. - - In SBML, object \"meta\" identifiers are of the XML data type ID; the - SBML object attribute itself is typically named metaid. All - attributes that hold values referring to values of type ID are of - the XML data type IDREF. They are also sometimes informally referred - to as \"metaid refs\", in analogy to the SBML-defined type SIdRef. - - This method works by looking at all meta-identifier attribute values, - comparing the identifiers to the value of 'oldid'. If any matches - are found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") SBase::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") SBase::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") SBase::divideAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") SBase::multiplyAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") SBase::getElementFromPluginsBySId " - Internal implementation method. -"; - - -%feature("docstring") SBase::getElementFromPluginsByMetaId " - Internal implementation method. -"; - - -%feature("docstring") SBase::hasNonstandardIdentifierBeginningWith " - Internal implementation method. -"; - - -%feature("docstring") SBase::prependStringToAllIdentifiers " - Internal implementation method. -"; - - -%feature("docstring") SBase::transformIdentifiers " - Internal implementation method. -"; - - -%feature("docstring") SBase::getAllElementsFromPlugins " - Returns a List of all child SBase objects contained in SBML package - plug-ins. - - SBML Level 3 consists of a Core definition that can be extended via - optional SBML Level 3 packages. A given model may indicate that it - uses one or more SBML packages, and likewise, a software tool may be - able to support one or more packages. LibSBML does not come - preconfigured with all possible packages included and enabled, in - part because not all package specifications have been finalized. To - support the ability for software systems to enable support for the - Level 3 packages they choose, libSBML features a plug-in mechanism. - Each SBML Level 3 package is implemented in a separate code plug-in - that can be enabled by the application to support working with that - SBML package. A given SBML model may thus contain not only objects - defined by SBML Level 3 Core, but also objects created by libSBML - plug-ins supporting additional Level 3 packages. - - This method walks down the list of all SBML Level 3 packages used by - this object and returns all child objects defined by those packages. - - Returns a pointer to a List of pointers to all children objects from - plug-ins. -"; - - -%feature("docstring") SBase::getMetaId " - Returns the value of the 'metaid' attribute of this object. - - The optional attribute named \"metaid\", present on every major SBML - component type, is for supporting metadata annotations using RDF - (Resource Description Format). The attribute value has the data type - XML ID, the XML identifier type, which means each \"metaid\" value - must be globally unique within an SBML file. The latter point is - important, because the uniqueness criterion applies across any - attribute with type ID anywhere in the file, not just the \"metaid\" - attribute used by SBML—something to be aware of if your - application-specific XML content inside the \"annotation\" - subelement happens to use the XML ID type. Although SBML only uses - XML ID for the \"metaid\" attribute, callers should be careful if - they use XML ID's in XML portions of a model that are not defined by - SBML, such as in the application-specific content of the - \"annotation\" subelement. - - Returns the meta-identifier of this SBML object. - - See also isSetMetaId(), setMetaId(). -"; - - -%feature("docstring") SBase::getId " - Internal implementation method. -"; - - -%feature("docstring") SBase::getName " - Internal implementation method. -"; - - -%feature("docstring") SBase::getNotes " - Returns the content of the 'notes' subelement of this object as a - tree of XMLNode objects. - - The optional SBML element named 'notes', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - 'notes' element would be to contain formatted user comments about the - model element in which the 'notes' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for 'notes', allowing users considerable freedom when adding - comments to their models. - - The format of 'notes' elements must be XHTML 1.0. To help verify - the formatting of 'notes' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more in-depth - explanations. The SBML Level 2 and 3 specifications have - considerable detail about how 'notes' element content must be - structured. - - The 'notes' element content returned by this method will be in XML - form, but libSBML does not provide an object model specifically for - the content of notes. Callers will need to traverse the XML tree - structure using the facilities available on XMLNode and related - objects. For an alternative method of accessing the notes, see - getNotesString(). - - Returns the content of the 'notes' subelement of this SBML object as - a tree structure composed of XMLNode objects. - - See also getNotesString(), isSetNotes(), setNotes(), setNotes(), - appendNotes(), appendNotes(), unsetNotes(), - SyntaxChecker.hasExpectedXHTMLSyntax(). -"; - - -%feature("docstring") SBase::getNotesString " - Returns the content of the 'notes' subelement of this object as a - string. - - The optional SBML element named 'notes', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - 'notes' element would be to contain formatted user comments about the - model element in which the 'notes' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for 'notes', allowing users considerable freedom when adding - comments to their models. - - The format of 'notes' elements must be XHTML 1.0. To help verify - the formatting of 'notes' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more in-depth - explanations. The SBML Level 2 and 3 specifications have - considerable detail about how 'notes' element content must be - structured. - - For an alternative method of accessing the notes, see getNotes(), - which returns the content as an XMLNode tree structure. Depending on - an application's needs, one or the other method may be more - convenient. - - Returns the content of the 'notes' subelement of this SBML object as - a string. - - See also getNotes(), isSetNotes(), setNotes(), setNotes(), - appendNotes(), appendNotes(), unsetNotes(), - SyntaxChecker.hasExpectedXHTMLSyntax(). -"; - - -%feature("docstring") SBase::getAnnotation " - Returns the content of the 'annotation' subelement of this object as - a tree of XMLNode objects. - - Whereas the SBML 'notes' subelement is a container for content to be - shown directly to humans, the 'annotation' element is a container for - optional software-generated content not meant to be shown to humans. - Every object derived from SBase can have its own value for - 'annotation'. The element's content type is XML type 'any', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - The annotations returned by this method will be in XML form. LibSBML - provides an object model and related interfaces for certain specific - kinds of annotations, namely model history information and RDF - content. See the ModelHistory, CVTerm and RDFAnnotationParser - classes for more information about the facilities available. - - Returns the annotation of this SBML object as a tree of XMLNode - objects. - - See also getAnnotationString(), isSetAnnotation(), setAnnotation(), - setAnnotation(), appendAnnotation(), appendAnnotation(), - unsetAnnotation(). -"; - - -%feature("docstring") SBase::getAnnotationString " - Returns the content of the 'annotation' subelement of this object as - a character string. - - Whereas the SBML 'notes' subelement is a container for content to be - shown directly to humans, the 'annotation' element is a container for - optional software-generated content not meant to be shown to humans. - Every object derived from SBase can have its own value for - 'annotation'. The element's content type is XML type 'any', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - The annotations returned by this method will be in string form. - - Returns the annotation of this SBML object as a character string. - - See also getAnnotation(), isSetAnnotation(), setAnnotation(), - setAnnotation(), appendAnnotation(), appendAnnotation(), - unsetAnnotation(). -"; - - -%feature("docstring") SBase::getNamespaces " - Returns a list of the XML Namespaces declared on this SBML document. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in SBML Level 3) packages used in addition to SBML Level 3 Core. - - Returns the XML Namespaces associated with this SBML object - - See also getLevel(), getVersion(). -"; - - -%feature("docstring") SBase::getSBMLDocument " - Returns the SBMLDocument object containing this object instance. - - LibSBML uses the class SBMLDocument as a top-level container for - storing SBML content and data associated with it (such as warnings - and error messages). An SBML model in libSBML is contained inside - an SBMLDocument object. SBMLDocument corresponds roughly to the - class SBML defined in the SBML Level 3 and Level 2 specifications, - but it does not have a direct correspondence in SBML Level 1. (But, - it is created by libSBML no matter whether the model is Level 1, - Level 2 or Level 3.) - - This method allows the caller to obtain the SBMLDocument for the - current object. - - Returns the parent SBMLDocument object of this SBML object. - - See also getParentSBMLObject(), getModel(). -"; - - -%feature("docstring") SBase::getParentSBMLObject " - Returns the parent SBML object containing this object. - - This returns the immediately-containing object. This method is - convenient when holding an object nested inside other objects in an - SBML model. - - Returns the parent SBML object of this SBML object. - - See also getSBMLDocument(), getModel(). -"; - - -%feature("docstring") SBase::getAncestorOfType " - Returns the first ancestor object that has the given SBML type code. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - This method searches the tree of objects that are parents of this - object, and returns the first one that has the given SBML type code. - If the optional argument 'pkgName' is given, it will cause the search - to be limited to the SBML Level 3 package given. - - Parameter 'type' is the SBML type code of the object sought - - Parameter 'pkgName' is (optional) the short name of an SBML Level 3 - package to which the sought-after object must belong - - Returns the ancestor SBML object of this SBML object that corresponds - to the given SBML object type code, or None if no ancestor exists. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") SBase::getSBOTerm " - Returns the integer portion of the value of the 'sboTerm' attribute - of this object. - - Beginning with SBML Level 2 Version 3, objects derived from SBase - have an optional attribute named 'sboTerm' for supporting the use of - the Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a - seven digit integer number; libSBML simplifies the representation by - only storing the 'NNNNNNN' integer portion. Thus, in libSBML, the - 'sboTerm' attribute on SBase has data type int, and SBO identifiers - are stored simply as integers. (For convenience, libSBML offers - methods for returning both the integer form and a text-string form of - the SBO identifier.) - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for 'sboTerm'. Please consult the SBML Level 2 - Version 4 specification for more information about the use of SBO - and the 'sboTerm' attribute. - - Returns the value of the 'sboTerm' attribute as an integer, or -1 if - the value is not set. -"; - - -%feature("docstring") SBase::getSBOTermID " - Returns the string representation of the 'sboTerm' attribute of this - object. - - Beginning with SBML Level 2 Version 3, objects derived from SBase - have an optional attribute named 'sboTerm' for supporting the use of - the Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a - seven digit integer number; libSBML simplifies the representation by - only storing the 'NNNNNNN' integer portion. Thus, in libSBML, the - 'sboTerm' attribute on SBase has data type int, and SBO identifiers - are stored simply as integers. This method returns the entire SBO - identifier as a text string in the form 'SBO:NNNNNNN'. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for 'sboTerm'. Please consult the SBML Level 2 - Version 4 specification for more information about the use of SBO - and the 'sboTerm' attribute. - - Returns the value of the 'sboTerm' attribute as a string (its value - will be of the form 'SBO:NNNNNNN'), or an empty string if the value - is not set. -"; - - -%feature("docstring") SBase::getSBOTermAsURL " - Returns the identifiers.org URL representation of the 'sboTerm' - attribute of this object. - - This method returns the entire SBO identifier as a text string in - the form 'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN'. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for 'sboTerm'. Please consult the SBML Level 2 - Version 4 specification for more information about the use of SBO - and the 'sboTerm' attribute. - - Returns the value of the 'sboTerm' attribute as an identifiers.org - URL (its value will be of the form - 'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN'), or an empty - string if the value is not set. -"; - - -%feature("docstring") SBase::getLine " - Returns the line number on which this object first appears in the XML - representation of the SBML document. - - Returns the line number of this SBML object. - - Note: - - The line number for each construct in an SBML model is set upon - reading the model. The accuracy of the line number depends on the - correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real line number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100 accurate in all situations. (At this - time, libSBML supports the use of libxml2, Expat and Xerces.) - - See also getColumn(). -"; - - -%feature("docstring") SBase::getColumn " - Returns the column number on which this object first appears in the - XML representation of the SBML document. - - Returns the column number of this SBML object. - - Note: - - The column number for each construct in an SBML model is set upon - reading the model. The accuracy of the column number depends on the - correctness of the XML representation of the model, and on the - particular XML parser library being used. The former limitation - relates to the following problem: if the model is actually invalid - XML, then the parser may not be able to interpret the data correctly - and consequently may not be able to establish the real column number. - The latter limitation is simply that different parsers seem to have - their own accuracy limitations, and out of all the parsers supported - by libSBML, none have been 100 accurate in all situations. (At this - time, libSBML supports the use of libxml2, Expat and Xerces.) - - See also getLine(). -"; - - -%feature("docstring") SBase::getModelHistory " - Returns the ModelHistory object, if any, attached to this object. - - Returns the ModelHistory object attached to this object, or None if - none exist. - - Note: - - In SBML Level 2, model history annotations were only permitted on - the Model element. In SBML Level 3, they are permitted on all SBML - components derived from SBase. -"; - - -%feature("docstring") SBase::isSetMetaId " - Predicate returning True if this object's 'metaid' attribute is set. - - The optional attribute named \"metaid\", present on every major SBML - component type, is for supporting metadata annotations using RDF - (Resource Description Format). The attribute value has the data type - XML ID, the XML identifier type, which means each \"metaid\" value - must be globally unique within an SBML file. The latter point is - important, because the uniqueness criterion applies across any - attribute with type ID anywhere in the file, not just the \"metaid\" - attribute used by SBML—something to be aware of if your - application-specific XML content inside the \"annotation\" - subelement happens to use the XML ID type. Although SBML only uses - XML ID for the \"metaid\" attribute, callers should be careful if - they use XML ID's in XML portions of a model that are not defined by - SBML, such as in the application-specific content of the - \"annotation\" subelement. - - Returns True if the 'metaid' attribute of this SBML object is set, - False otherwise. - - See also getMetaId(), setMetaId(). -"; - - -%feature("docstring") SBase::isSetId " - Internal implementation method. -"; - - -%feature("docstring") SBase::isSetName " - Internal implementation method. -"; - - -%feature("docstring") SBase::isSetNotes " - Predicate returning True if this object's 'notes' subelement exists - and has content. - - The optional SBML element named 'notes', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - 'notes' element would be to contain formatted user comments about the - model element in which the 'notes' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for 'notes', allowing users considerable freedom when adding - comments to their models. - - The format of 'notes' elements must be XHTML 1.0. To help verify - the formatting of 'notes' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more in-depth - explanations. The SBML Level 2 and 3 specifications have - considerable detail about how 'notes' element content must be - structured. - - Returns True if a 'notes' subelement exists, False otherwise. - - See also getNotes(), getNotesString(), setNotes(), setNotes(), - appendNotes(), appendNotes(), unsetNotes(), - SyntaxChecker.hasExpectedXHTMLSyntax(). -"; - - -%feature("docstring") SBase::isSetAnnotation " - Predicate returning True if this object's 'annotation' subelement - exists and has content. - - Whereas the SBase 'notes' subelement is a container for content to be - shown directly to humans, the 'annotation' element is a container for - optional software-generated content not meant to be shown to humans. - Every object derived from SBase can have its own value for - 'annotation'. The element's content type is XML type 'any', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - Returns True if a 'annotation' subelement exists, False otherwise. - - See also getAnnotation(), getAnnotationString(), setAnnotation(), - setAnnotation(), appendAnnotation(), appendAnnotation(), - unsetAnnotation(). -"; - - -%feature("docstring") SBase::isSetSBOTerm " - Predicate returning True if this object's 'sboTerm' attribute is - set. - - Returns True if the 'sboTerm' attribute of this SBML object is set, - False otherwise. -"; - - -%feature("docstring") SBase::setMetaId " - Sets the value of the meta-identifier attribute of this object. - - The optional attribute named \"metaid\", present on every major SBML - component type, is for supporting metadata annotations using RDF - (Resource Description Format). The attribute value has the data type - XML ID, the XML identifier type, which means each \"metaid\" value - must be globally unique within an SBML file. The latter point is - important, because the uniqueness criterion applies across any - attribute with type ID anywhere in the file, not just the \"metaid\" - attribute used by SBML—something to be aware of if your - application-specific XML content inside the \"annotation\" - subelement happens to use the XML ID type. Although SBML only uses - XML ID for the \"metaid\" attribute, callers should be careful if - they use XML ID's in XML portions of a model that are not defined by - SBML, such as in the application-specific content of the - \"annotation\" subelement. - - The string 'metaid' is copied. - - Parameter 'metaid' is the identifier string to use as the value of - the 'metaid' attribute - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - See also getMetaId(), isSetMetaId(). -"; - - -%feature("docstring") SBase::isSetModelHistory " - Predicate returning True if this object has a ModelHistory object - attached to it. - - Returns True if the ModelHistory of this object is set, false - otherwise. - - Note: - - In SBML Level 2, model history annotations were only permitted on - the Model element. In SBML Level 3, they are permitted on all SBML - components derived from SBase. -"; - - -%feature("docstring") SBase::setId " - Internal implementation method. -"; - - -%feature("docstring") SBase::setName " - Internal implementation method. -"; - - -%feature("docstring") SBase::setAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setAnnotation(XMLNode annotation) - - Sets the value of the 'annotation' subelement of this SBML object. - - The content of 'annotation' is copied, and any previous content of - this object's 'annotation' subelement is deleted. - - Whereas the SBase 'notes' subelement is a container for content to be - shown directly to humans, the 'annotation' element is a container for - optional software-generated content not meant to be shown to humans. - Every object derived from SBase can have its own value for - 'annotation'. The element's content type is XML type 'any', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - Call this method will result in any existing content of the - 'annotation' subelement to be discarded. Unless you have taken steps - to first copy and reconstitute any existing annotations into the - 'annotation' that is about to be assigned, it is likely that - performing such wholesale replacement is unfriendly towards other - software applications whose annotations are discarded. An - alternative may be to use SBase.appendAnnotation() or - SBase.appendAnnotation(). - - Parameter 'annotation' is an XML structure that is to be used as the - new content of the 'annotation' subelement of this object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also getAnnotationString(), isSetAnnotation(), setAnnotation(), - appendAnnotation(), appendAnnotation(), unsetAnnotation(), - getAnnotationString(), isSetAnnotation(), setAnnotation(), - appendAnnotation(), appendAnnotation(), unsetAnnotation(). -"; - - -%feature("docstring") SBase::appendAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - appendAnnotation(XMLNode annotation) - - Appends the given 'annotation' to the 'annotation' subelement of this - object. - - Whereas the SBase 'notes' subelement is a container for content to be - shown directly to humans, the 'annotation' element is a container for - optional software-generated content not meant to be shown to humans. - Every object derived from SBase can have its own value for - 'annotation'. The element's content type is XML type 'any', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - Unlike SBase.setAnnotation() or SBase.setAnnotation(), this method - allows other annotations to be preserved when an application adds its - own data. - - Parameter 'annotation' is an XML structure that is to be copied and - appended to the content of the 'annotation' subelement of this - object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also getAnnotationString(), isSetAnnotation(), setAnnotation(), - setAnnotation(), appendAnnotation(), unsetAnnotation(), - getAnnotationString(), isSetAnnotation(), setAnnotation(), - setAnnotation(), appendAnnotation(), unsetAnnotation(). -"; - - -%feature("docstring") SBase::removeTopLevelAnnotationElement " - Removes the top-level element within the 'annotation' subelement of - this SBML object with the given name and optional URI. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - Calling this method allows a particular annotation element to be - removed whilst the remaining annotations remain intact. - - Parameter 'elementName' is a string representing the name of the top - level annotation element that is to be removed Parameter - 'elementURI' is an optional string that is used to check both the - name and URI of the top level element to be removed Parameter - 'removeEmpty' is if after removing of the element, the annotation is - empty, and the removeEmpty argument is true, the annotation node will - be deleted (default). - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_ANNOTATION_NAME_NOT_FOUND - - * libsbml.LIBSBML_ANNOTATION_NS_NOT_FOUND - - See also replaceTopLevelAnnotationElement(), - replaceTopLevelAnnotationElement(). -"; - - -%feature("docstring") SBase::replaceTopLevelAnnotationElement " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - replaceTopLevelAnnotationElement(XMLNode annotation) - - Replaces the given top-level element within the 'annotation' - subelement of this SBML object and with the annotation element - supplied. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - This method determines the name of the element to be replaced from - the annotation argument. Functionally it is equivalent to calling - removeTopLevelAnnotationElement(name); - appendAnnotation(annotation_with_name); with the exception that the - placement of the annotation element remains the same. - - Parameter 'annotation' is XMLNode representing the replacement top - level annotation - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT - - See also removeTopLevelAnnotationElement(), - replaceTopLevelAnnotationElement(), - removeTopLevelAnnotationElement(), - replaceTopLevelAnnotationElement(). -"; - - -%feature("docstring") SBase::setNotes " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setNotes(string notes, bool addXHTMLMarkup = false) - - Sets the value of the 'notes' subelement of this SBML object to a - copy of the string 'notes'. - - The content of 'notes' is copied, and any existing content of this - object's 'notes' subelement is deleted. - - The optional SBML element named 'notes', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - 'notes' element would be to contain formatted user comments about the - model element in which the 'notes' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for 'notes', allowing users considerable freedom when adding - comments to their models. - - The format of 'notes' elements must be XHTML 1.0. To help verify - the formatting of 'notes' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more in-depth - explanations. The SBML Level 2 and 3 specifications have - considerable detail about how 'notes' element content must be - structured. - - The following code illustrates a very simple way of setting the notes - using this method. Here, the object being annotated is the whole - SBML document, but that is for illustration purposes only; you could - of course use this same approach to annotate any other SBML - component. @~ - - Parameter 'notes' is an XML string that is to be used as the content - of the 'notes' subelement of this object - - Parameter 'addXHTMLMarkup' is a boolean indicating whether to wrap - the contents of the 'notes' argument with XHTML paragraph - (<code></code>) tags. This is appropriate when the string in - 'notes' does not already containg the appropriate XHTML markup. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - See also getNotesString(), isSetNotes(), setNotes(), appendNotes(), - appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(), - getNotesString(), isSetNotes(), setNotes(), appendNotes(), - appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(). -"; - - -%feature("docstring") SBase::appendNotes " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - appendNotes(string notes) - - Appends the given 'notes' to the 'notes' subelement of this object. - - The content of the parameter 'notes' is copied. - - The optional SBML element named 'notes', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - 'notes' element would be to contain formatted user comments about the - model element in which the 'notes' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for 'notes', allowing users considerable freedom when adding - comments to their models. - - The format of 'notes' elements must be XHTML 1.0. To help verify - the formatting of 'notes' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more in-depth - explanations. The SBML Level 2 and 3 specifications have - considerable detail about how 'notes' element content must be - structured. - - Parameter 'notes' is an XML string that is to appended to the content - of the 'notes' subelement of this object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - See also getNotesString(), isSetNotes(), setNotes(), setNotes(), - appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(), - getNotesString(), isSetNotes(), setNotes(), setNotes(), - appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(). -"; - - -%feature("docstring") SBase::setModelHistory " - Sets the ModelHistory of this object. - - The content of 'history' is copied, and this object's existing model - history content is deleted. - - Parameter 'history' is ModelHistory of this object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - In SBML Level 2, model history annotations were only permitted on - the Model element. In SBML Level 3, they are permitted on all SBML - components derived from SBase. -"; - - -%feature("docstring") SBase::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") SBase::connectToParent " - Internal implementation method. -"; - - -%feature("docstring") SBase::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") SBase::setSBOTerm " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setSBOTerm(int value) - - Sets the value of the 'sboTerm' attribute. - - Beginning with SBML Level 2 Version 3, objects derived from SBase - have an optional attribute named 'sboTerm' for supporting the use of - the Systems Biology Ontology. In SBML proper, the data type of the - attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a - seven digit integer number; libSBML simplifies the representation by - only storing the 'NNNNNNN' integer portion. Thus, in libSBML, the - 'sboTerm' attribute on SBase has data type int, and SBO identifiers - are stored simply as integers. - - SBO terms are a type of optional annotation, and each different class - of SBML object derived from SBase imposes its own requirements about - the values permitted for 'sboTerm'. Please consult the SBML Level 2 - Version 4 specification for more information about the use of SBO - and the 'sboTerm' attribute. - - Parameter 'value' is the NNNNNNN integer portion of the SBO - identifier - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - See also setSBOTerm(), setSBOTerm(). -"; - - -%feature("docstring") SBase::setNamespaces " - Sets the namespaces relevant of this SBML object. - - The content of 'xmlns' is copied, and this object's existing - namespace content is deleted. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. - - Parameter 'xmlns' is the namespaces to set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") SBase::unsetMetaId " - Unsets the value of the 'metaid' attribute of this SBML object. - - The optional attribute named \"metaid\", present on every major SBML - component type, is for supporting metadata annotations using RDF - (Resource Description Format). The attribute value has the data type - XML ID, the XML identifier type, which means each \"metaid\" value - must be globally unique within an SBML file. The latter point is - important, because the uniqueness criterion applies across any - attribute with type ID anywhere in the file, not just the \"metaid\" - attribute used by SBML—something to be aware of if your - application-specific XML content inside the \"annotation\" - subelement happens to use the XML ID type. Although SBML only uses - XML ID for the \"metaid\" attribute, callers should be careful if - they use XML ID's in XML portions of a model that are not defined by - SBML, such as in the application-specific content of the - \"annotation\" subelement. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBase::unsetId " - Unsets the value of the 'id' attribute of this SBML object. - - Most (but not all) objects in SBML include two common attributes: - 'id' and 'name'. The identifier given by an object's 'id' attribute - value is used to identify the object within the SBML model - definition. Other objects can refer to the component using this - identifier. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBase::unsetName " - Unsets the value of the 'name' attribute of this SBML object. - - Most (but not all) objects in SBML include two common attributes: - 'id' and 'name'. In contrast to the 'id' attribute, the 'name' - attribute is optional and is not intended to be used for cross- - referencing purposes within a model. Its purpose instead is to - provide a human-readable label for the component. The data type of - 'name' is the type string defined in XML Schema. SBML imposes no - restrictions as to the content of 'name' attributes beyond those - restrictions defined by the string type in XML Schema. - - The recommended practice for handling 'name' is as follows. If a - software tool has the capability for displaying the content of 'name' - attributes, it should display this content to the user as a - component's label instead of the component's 'id'. If the user - interface does not have this capability (e.g., because it cannot - display or use special characters in symbol names), or if the 'name' - attribute is missing on a given component, then the user interface - should display the value of the 'id' attribute instead. (Script - language interpreters are especially likely to display 'id' instead - of 'name'.) - - As a consequence of the above, authors of systems that automatically - generate the values of 'id' attributes should be aware some systems - may display the 'id''s to the user. Authors therefore may wish to - take some care to have their software create 'id' values that are: - (a) reasonably easy for humans to type and read; and (b) likely to - be meaningful, for example by making the 'id' attribute be an - abbreviated form of the name attribute value. - - An additional point worth mentioning is although there are - restrictions on the uniqueness of 'id' values, there are no - restrictions on the uniqueness of 'name' values in a model. This - allows software applications leeway in assigning component - identifiers. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBase::unsetNotes " - Unsets the value of the 'notes' subelement of this SBML object. - - The optional SBML element named 'notes', present on every major SBML - component type, is intended as a place for storing optional - information intended to be seen by humans. An example use of the - 'notes' element would be to contain formatted user comments about the - model element in which the 'notes' element is enclosed. Every object - derived directly or indirectly from type SBase can have a separate - value for 'notes', allowing users considerable freedom when adding - comments to their models. - - The format of 'notes' elements must be XHTML 1.0. To help verify - the formatting of 'notes' content, libSBML provides the static - utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, - readers are urged to consult the appropriate SBML specification - document for the Level and Version of their model for more in-depth - explanations. The SBML Level 2 and 3 specifications have - considerable detail about how 'notes' element content must be - structured. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also getNotesString(), isSetNotes(), setNotes(), setNotes(), - appendNotes(), appendNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(). -"; - - -%feature("docstring") SBase::unsetAnnotation " - Unsets the value of the 'annotation' subelement of this SBML object. - - Whereas the SBase 'notes' subelement is a container for content to be - shown directly to humans, the 'annotation' element is a container for - optional software-generated content not meant to be shown to humans. - Every object derived from SBase can have its own value for - 'annotation'. The element's content type is XML type 'any', - allowing essentially arbitrary well-formed XML data content. - - SBML places a few restrictions on the organization of the content of - annotations; these are intended to help software tools read and write - the data as well as help reduce conflicts between annotations added - by different tools. Please see the SBML specifications for more - details. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also getAnnotation(), getAnnotationString(), isSetAnnotation(), - setAnnotation(), setAnnotation(), appendAnnotation(), - appendAnnotation(). -"; - - -%feature("docstring") SBase::unsetSBOTerm " - Unsets the value of the 'sboTerm' attribute of this SBML object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") SBase::addCVTerm " - Adds a copy of the given CVTerm object to this SBML object. - - Parameter 'term' is the CVTerm to assign. - - Parameter 'newBag' is if True, creates a new RDF bag with the same - identifier as a previous bag, and if False, adds the term to an - existing RDF bag with the same type of qualifier as the term being - added. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE, if this object lacks a - 'metaid' attribute - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - Since the CV Term uses the 'metaid' attribute of the object as a - reference, if the object has no 'metaid' attribute value set, then - the CVTerm will not be added. - - WARNING: - - The fact that this method copies the object passed to it means that - the caller will be left holding a physically different object - instance than the one contained in this object. Changes made to the - original object instance (such as resetting attribute values) will - not affect the instance added here. In addition, the caller should - make sure to free the original object if it is no longer being used, - or else a memory leak will result. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") SBase::getCVTerms " - Returns a list of CVTerm objects in the annotations of this SBML - object. - - Returns the list of CVTerms for this SBML object. -"; - - -%feature("docstring") SBase::getNumCVTerms " - Returns the number of CVTerm objects in the annotations of this SBML - object. - - Returns the number of CVTerms for this SBML object. -"; - - -%feature("docstring") SBase::getCVTerm " - Returns the nth CVTerm in the list of CVTerms of this SBML object. - - Parameter 'n' is long the index of the CVTerm to retrieve - - Returns the nth CVTerm in the list of CVTerms for this SBML object. -"; - - -%feature("docstring") SBase::unsetCVTerms " - Clears the list of CVTerm objects attached to this SBML object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBase::unsetModelHistory " - Unsets the ModelHistory object attached to this object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - In SBML Level 2, model history annotations were only permitted on - the Model element. In SBML Level 3, they are permitted on all SBML - components derived from SBase. -"; - - -%feature("docstring") SBase::getResourceBiologicalQualifier " - Returns the MIRIAM biological qualifier associated with the given - resource. - - In MIRIAM, qualifiers are an optional means of indicating the - relationship between a model component and its annotations. There - are two broad kinds of annotations: model and biological. The - latter kind is used to qualify the relationship between a model - component and a biological entity which it represents. Examples of - relationships include 'is' and 'has part', but many others are - possible. MIRIAM defines numerous relationship qualifiers to enable - different software tools to qualify biological annotations in the - same standardized way. In libSBML, the MIRIAM controlled-vocabulary - annotations on an SBML model element are represented using lists of - CVTerm objects, and the the MIRIAM biological qualifiers are - represented using values whose names begin with BQB_ in the - interface class libsbml.@~ - - This method searches the controlled-vocabulary annotations (i.e., - the list of CVTerm objects) on the present object, then out of those - that have biological qualifiers, looks for an annotation to the - given 'resource'. If such an annotation is found, it returns the - type of biological qualifier associated with that resource as a - value whose name begins with BQB_ from the interface class - libsbml.@~ - - Parameter 'resource' is string representing the resource; e.g., - 'http://www.geneontology.org/#GO:0005892'. - - Returns the qualifier associated with the resource, or - libsbml.BQB_UNKNOWN if the resource does not exist. - - Note: - - The set of MIRIAM biological qualifiers grows over time, although - relatively slowly. The values are up to date with MIRIAM at the - time of a given libSBML release. The set of values in list of BQB_ - constants defined in libsbml may be expanded in later libSBML - releases, to match the values defined by MIRIAM at that later time. - @~ -"; - - -%feature("docstring") SBase::getResourceModelQualifier " - Returns the MIRIAM model qualifier associated with the given - resource. - - In MIRIAM, qualifiers are an optional means of indicating the - relationship between a model component and its annotations. There - are two broad kinds of annotations: model and biological. The - former kind is used to qualify the relationship between a model - component and another modeling object. An example qualifier is - 'isDerivedFrom', to indicate that a given component of the model is - derived from the modeling object represented by the referenced - resource. MIRIAM defines numerous relationship qualifiers to enable - different software tools to qualify model annotations in the same - standardized way. In libSBML, the MIRIAM controlled-vocabulary - annotations on an SBML model element are represented using lists of - CVTerm objects, and the the MIRIAM model qualifiers are represented - using values whose names begin with BQM_ in the interface class - libsbml.@~ - - This method method searches the controlled-vocabulary annotations - (i.e., the list of CVTerm objects) on the present object, then out of - those that have model qualifiers, looks for an annotation to the - given 'resource'. If such an annotation is found, it returns the - type of type of model qualifier associated with that resource as a - value whose name begins with BQM_ from the interface class - libsbml.@~ - - Parameter 'resource' is string representing the resource; e.g., - 'http://www.geneontology.org/#GO:0005892'. - - Returns the model qualifier type@~ associated with the resource, or - libsbml.BQM_UNKNOWN if the resource does not exist. - - Note: - - The set of MIRIAM model qualifiers grows over time, although - relatively slowly. The values are up to date with MIRIAM at the - time of a given libSBML release. The set of values in list of BQM_ - constants defined in libsbml may be expanded in later libSBML - releases, to match the values defined by MIRIAM at that later time. - @~ -"; - - -%feature("docstring") SBase::getModel " - Returns the Model object in which the current object is located. - - Returns the parent Model of this SBML object. - - See also getParentSBMLObject(), getSBMLDocument(). -"; - - -%feature("docstring") SBase::getLevel " - Returns the SBML Level of the SBMLDocument object containing this - object. - - Returns the SBML level of this SBML object. - - See also getVersion(), getNamespaces(), getPackageVersion(). -"; - - -%feature("docstring") SBase::getVersion " - Returns the Version within the SBML Level of the SBMLDocument object - containing this object. - - Returns the SBML version of this SBML object. - - See also getLevel(), getNamespaces(). -"; - - -%feature("docstring") SBase::getPackageVersion " - Returns the Version of the SBML Level 3 package to which this - element belongs to. - - Returns the version of the SBML Level 3 package to which this - element belongs. The value 0 will be returned if this element - belongs to the SBML Level 3 Core package. - - See also getLevel(), getVersion(). -"; - - -%feature("docstring") SBase::getPackageName " - Returns the name of the SBML Level 3 package in which this element - is defined. - - Returns the name of the SBML package in which this element is - defined. The string \"core\" will be returned if this element is - defined in SBML Level 3 Core. The string \"unknown\" will be - returned if this element is not defined in any SBML package. -"; - - -%feature("docstring") SBase::getTypeCode " - Returns the libSBML type code for this object. - - This method may return the type code of this SBML object, or it may - return libsbml.SBML_UNKNOWN. This is because subclasses of SBase - are not required to implement this method to return a type code. - This method is meant primarily for the LibSBML C interface, in which - class and subclass information is not readily available. - - Returns the SBML object type code@~ of this SBML object or - libsbml.SBML_UNKNOWN (the default). - - See also getElementName(), getPackageName(). -"; - - -%feature("docstring") SBase::getElementName " - Returns the XML element name of this object. - - This is overridden by subclasses to return a string appropriate to - the SBML component. For example, Model defines it as returning - 'model', CompartmentType defines it as returning 'compartmentType', - and so on. -"; - - -%feature("docstring") SBase::toSBML " - Returns a string consisting of a partial SBML corresponding to just - this object. - - Returns the partial SBML that describes this SBML object. - - WARNING: - - This is primarily provided for testing and debugging purposes. It - may be removed in a future version of libSBML. -"; - - -%feature("docstring") SBase::toXMLNode " - Returns this element as an XMLNode. - - Returns this element as an XMLNode. - - WARNING: - - This operation is computationally expensive, because the element has - to be fully serialized to a string and then parsed into the XMLNode - structure. Attempting to convert a large tree structure (e.g., a - large Model) may consume significant computer memory and time. -"; - - -%feature("docstring") SBase::getPlugin " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getPlugin(long n) - - Returns the nth plug-in object (extension interface) for an SBML - Level 3 package extension. - - SBML Level 3 consists of a Core definition that can be extended via - optional SBML Level 3 packages. A given model may indicate that it - uses one or more SBML packages, and likewise, a software tool may be - able to support one or more packages. LibSBML does not come - preconfigured with all possible packages included and enabled, in - part because not all package specifications have been finalized. To - support the ability for software systems to enable support for the - Level 3 packages they choose, libSBML features a plug-in mechanism. - Each SBML Level 3 package is implemented in a separate code plug-in - that can be enabled by the application to support working with that - SBML package. A given SBML model may thus contain not only objects - defined by SBML Level 3 Core, but also objects created by libSBML - plug-ins supporting additional Level 3 packages. - - Parameter 'n' is the index of the plug-in to return - - Returns the plug-in object (the libSBML extension interface) of a - package extension with the given package name or URI. - - ______________________________________________________________________ - Method variant with the following signature: - - getPlugin(string package) - - Returns a plug-in object (extension interface) for an SBML Level 3 - package extension with the given package name or URI. - - SBML Level 3 consists of a Core definition that can be extended via - optional SBML Level 3 packages. A given model may indicate that it - uses one or more SBML packages, and likewise, a software tool may be - able to support one or more packages. LibSBML does not come - preconfigured with all possible packages included and enabled, in - part because not all package specifications have been finalized. To - support the ability for software systems to enable support for the - Level 3 packages they choose, libSBML features a plug-in mechanism. - Each SBML Level 3 package is implemented in a separate code plug-in - that can be enabled by the application to support working with that - SBML package. A given SBML model may thus contain not only objects - defined by SBML Level 3 Core, but also objects created by libSBML - plug-ins supporting additional Level 3 packages. - - Parameter 'package' is the name or URI of the package - - Returns the plug-in object (the libSBML extension interface) of a - package extension with the given package name or URI. -"; - - -%feature("docstring") SBase::getNumPlugins " - Returns the number of plug-in objects (extenstion interfaces) for - SBML Level 3 package extensions known. - - SBML Level 3 consists of a Core definition that can be extended via - optional SBML Level 3 packages. A given model may indicate that it - uses one or more SBML packages, and likewise, a software tool may be - able to support one or more packages. LibSBML does not come - preconfigured with all possible packages included and enabled, in - part because not all package specifications have been finalized. To - support the ability for software systems to enable support for the - Level 3 packages they choose, libSBML features a plug-in mechanism. - Each SBML Level 3 package is implemented in a separate code plug-in - that can be enabled by the application to support working with that - SBML package. A given SBML model may thus contain not only objects - defined by SBML Level 3 Core, but also objects created by libSBML - plug-ins supporting additional Level 3 packages. - - Returns the number of plug-in objects (extension interfaces) of - package extensions known by this instance of libSBML. -"; - - -%feature("docstring") SBase::enablePackage " - Enables or disables the given SBML Level 3 package - - This method enables or disables the specified package on this object - and other objects connected by child-parent links in the same - SBMLDocument object. - - Parameter 'pkgURI' is the URI of the package - - Parameter 'pkgPrefix' is the XML prefix of the package - - Parameter 'flag' is whether to enable (True) or disable (False) the - package - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_PKG_UNKNOWN - - * libsbml.LIBSBML_PKG_VERSION_MISMATCH - - * libsbml.LIBSBML_PKG_CONFLICTED_VERSION -"; - - -%feature("docstring") SBase::disablePackage " - Disables the given SBML Level 3 package - - This method enables or disables the specified package on this object - and other objects connected by child-parent links in the same - SBMLDocument object. - - Parameter 'pkgURI' is the URI of the package - - Parameter 'pkgPrefix' is the XML prefix of the package - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_PKG_UNKNOWN - - * libsbml.LIBSBML_PKG_VERSION_MISMATCH - - * libsbml.LIBSBML_PKG_CONFLICTED_VERSION -"; - - -%feature("docstring") SBase::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") SBase::isPackageURIEnabled " - Predicate returning True if an SBML Level 3 package with the given - URI is enabled with this object. - - Parameter 'pkgURI' is the URI of the package - - Returns True if the given package is enabled within this object, - false otherwise. - - See also isPackageEnabled(). -"; - - -%feature("docstring") SBase::isPackageEnabled " - Predicate returning True if the given SBML Level 3 package is - enabled with this object. - - The search ignores the package version. - - Parameter 'pkgName' is the name of the package - - Returns True if the given package is enabled within this object, - false otherwise. - - See also isPackageURIEnabled(). -"; - - -%feature("docstring") SBase::isPkgURIEnabled " - Predicate returning True if an SBML Level 3 package with the given - URI is enabled with this object. - - Parameter 'pkgURI' is the URI of the package - - Returns True if the given package is enabled within this object, - false otherwise. - - See also isPkgEnabled(). - - DEPRECATED. Replaced in libSBML 5.2.0 by isPackageURIEnabled() -"; - - -%feature("docstring") SBase::isPkgEnabled " - Predicate returning True if the given SBML Level 3 package is - enabled with this object. - - The search ignores the package version. - - Parameter 'pkgName' is the name of the package - - Returns True if the given package is enabled within this object, - false otherwise. - - See also isPkgURIEnabled(). - - DEPRECATED. Replaced in libSBML 5.2.0 by isPackageEnabled() -"; - - -%feature("docstring") SBase::writeExtensionElements " - Internal implementation method. -"; - - -%feature("docstring") SBase::write " - Internal implementation method. -"; - - -%feature("docstring") SBase::writeElements " - Internal implementation method. -"; - - -%feature("docstring") SBase::hasRequiredAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBase::hasRequiredElements " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkCompatibility " - Internal implementation method. -"; - - -%feature("docstring") SBase::setSBMLNamespaces " - Internal implementation method. -"; - - -%feature("docstring") SBase::setSBMLNamespacesAndOwn " - Internal implementation method. -"; - - -%feature("docstring") SBase::getSBMLNamespaces " - Internal implementation method. -"; - - -%feature("docstring") SBase::removeDuplicateAnnotations " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkMathMLNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBase::removeFromParentAndDelete " - Removes this object from its parent. - - If the parent was storing this object as a pointer, it is deleted. - If not, it is simply cleared (as in ListOf objects). This is a pure - virtual method, as every SBase element has different parents, and - therefore different methods of removing itself. Will fail (and not - delete itself) if it has no parent object. This function is designed - to be overridden, but for all objects whose parent is of the class - ListOf, the default implementation will work. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBase::matchesSBMLNamespaces " - Returns True if this object's set of XML namespaces are the same as - the given object's XML namespaces. - - Parameter 'sb' is an object to compare with respect to namespaces - - Returns boolean, True if this object's collection of namespaces is - the same as 'sb's', False otherwise. -"; - - -%feature("docstring") SBase::matchesRequiredSBMLNamespacesForAddition " - Returns True if this object's set of XML namespaces are a subset of - the given object's XML namespaces. - - Parameter 'sb' is an object to compare with respect to namespaces - - Returns boolean, True if this object's collection of namespaces is a - subset of 'sb's', False otherwise. -"; - - -%feature("docstring") SBase::setUserData " - Sets the user data of this element. - - The user data associated with an SBML object can be used by an - application developer to attach custom information to that object in - the model. In case of a deep copy, this attribute will passed as it - is. The attribute will be never interpreted by libSBML. - - Parameter 'userData' is specifies the new user data. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBase::*getUserData " - Returns the user data that has been previously set via setUserData(). - - The user data associated with an SBML object can be used by an - application developer to attach custom information to that object in - the model. In case of a deep copy, this attribute will passed as it - is. The attribute will be never interpreted by libSBML. - - Returns the user data of this node, or None if no user data has been - set. - - @~ -"; - - -%feature("docstring") SBase::getURI " - Gets the namespace URI to which this element belongs to. - - For example, all elements that belong to SBML Level 3 Version 1 Core - must would have the URI - 'http://www.sbml.org/sbml/level3/version1/core'; all elements that - belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core - must would have the URI - 'http://www.sbml.org/sbml/level3/version1/layout/version1/' - - Unlike getElementNamespace(), this function first returns the URI for - this element by looking into the SBMLNamespaces object of the - document with the its package name. if not found it will return the - result of getElementNamespace(). - - Returns the URI of this element - - See also getPackageName(), getElementNamespace(), getSBMLDocument(). -"; - - -%feature("docstring") SBase::getPrefix " - Returns the namespace prefix of this element. -"; - - -%feature("docstring") SBase::setElementText " - When overridden allows SBase elements to use the text included in - between the elements tags. The default implementation does nothing. - - Parameter 'text' is the text string found between the element tags. -"; - - -%feature("docstring") SBase::matchesCoreSBMLNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBase::createObject " - Internal implementation method. -"; - - -%feature("docstring") SBase::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") SBase::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") SBase::getErrorLog " - Internal implementation method. -"; - - -%feature("docstring") SBase::logError " - Internal implementation method. -"; - - -%feature("docstring") SBase::logUnknownAttribute " - Internal implementation method. -"; - - -%feature("docstring") SBase::logUnknownElement " - Internal implementation method. -"; - - -%feature("docstring") SBase::logEmptyString " - Internal implementation method. -"; - - -%feature("docstring") SBase::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBase::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBase::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBase::writeXMLNS " - Internal implementation method. -"; - - -%feature("docstring") SBase::syncAnnotation " - Internal implementation method. -"; - - -%feature("docstring") SBase::reconstructRDFAnnotation " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkOrderAndLogError " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkListOfPopulated " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkUnitSyntax " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkDefaultNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkAnnotation " - Internal implementation method. -"; - - -%feature("docstring") SBase::checkXHTML " - Internal implementation method. -"; - - -%feature("docstring") SBase::loadPlugins " - Internal implementation method. -"; - - -%feature("docstring") SBase::createExtensionObject " - Internal implementation method. -"; - - -%feature("docstring") SBase::setElementNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBase::getElementNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBase::readExtensionAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBase::writeExtensionAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBase::storeUnknownExtAttribute " - Internal implementation method. -"; - - -%feature("docstring") SBase::storeUnknownExtElement " - Internal implementation method. -"; - - -%feature("docstring") SBase::getSBMLPrefix " - Internal implementation method. -"; - - -%feature("docstring") SBase::getRootElement " - Internal implementation method. -"; - - -%feature("docstring") SBase::getHasBeenDeleted " - Internal implementation method. -"; - - -%feature("docstring") SBase::setSBaseFields " - Internal implementation method. -"; - - -%feature("docstring") SBase::readAnnotation " - Internal implementation method. -"; - - -%feature("docstring") SBase::removeDuplicatedResources " - Internal implementation method. -"; - - -%feature("docstring") SBase::addTermToExistingBag " - Internal implementation method. -"; - - -%feature("docstring") SBase::readNotes " - Internal implementation method. -"; - - -%feature("docstring") ListOf " - @ingroup Core Parent class for the various SBML 'ListOfXYZ' classes. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - SBML defines various ListOf___ classes that are containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the attributes and - subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The ListOf class in libSBML is a utility class that serves as the - parent class for implementing the ListOf__ classes. It provides - methods for working generically with the various SBML lists of - objects in a program. LibSBML uses this separate list class rather - than ordinary Python@~ lists, so that it can provide the methods - and features associated with SBase. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") ListOf::ListOf " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOf(SBMLNamespaces sbmlns) - - Creates a new ListOf with SBMLNamespaces object. - - Parameter 'sbmlns' is the set of namespaces that this ListOf should - contain. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOf(long level = SBML_DEFAULT_LEVEL, long version = - SBML_DEFAULT_VERSION) - - Creates a new ListOf object. - - Parameter 'level' is the SBML Level; if not assigned, defaults to the - value of SBML_DEFAULT_LEVEL. - - Parameter 'version' is the Version within the SBML Level; if not - assigned, defaults to the value of SBML_DEFAULT_VERSION. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - ListOf(ListOf orig) - - Copy constructor; creates a copy of this ListOf. - - Parameter 'orig' is the ListOf instance to copy. -"; - - -%feature("docstring") ListOf::accept " - Accepts the given SBMLVisitor. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next item in the list. -"; - - -%feature("docstring") ListOf::clone " - Creates and returns a deep copy of this ListOf. - - Returns a (deep) copy of this ListOf. -"; - - -%feature("docstring") ListOf::append " - Adds item to the end of this ListOf. - - This variant of the method makes a clone of the 'item' handed to it. - This means that when the ListOf is destroyed, the original items will - not be destroyed. - - Parameter 'item' is the item to be added to the list. - - See also appendAndOwn(). -"; - - -%feature("docstring") ListOf::appendAndOwn " - Adds item to the end of this ListOf. - - This variant of the method does not clone the 'item' handed to it; - instead, it assumes ownership of it. This means that when the ListOf - is destroyed, the item will be destroyed along with it. - - Parameter 'item' is the item to be added to the list. - - See also append(). -"; - - -%feature("docstring") ListOf::appendFrom " - Adds a clone of all items in the provided ListOf to this object. - This means that when this ListOf is destroyed, the original items - will not be destroyed. - - Parameter 'list' is A list of items to be added. - - See also append(). -"; - - -%feature("docstring") ListOf::insert " - Inserts the item at the given position of this ListOf - - This variant of the method makes a clone of the 'item' handet to it. - This means that when the ListOf is destroyed, the original items will - not be destroyed. - - Parameter 'location' is the location where to insert the item - Parameter 'item' is the item to be inserted to the list - - See also insertAndOwn(). -"; - - -%feature("docstring") ListOf::insertAndOwn " - Inserts the item at the given position of this ListOf - - This variant of the method makes a clone of the 'item' handet to it. - This means that when the ListOf is destroyed, the original items will - not be destroyed. - - Parameter 'location' is the location where to insert the item - Parameter 'item' is the item to be inserted to the list - - See also insert(). -"; - - -%feature("docstring") ListOf::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get an item from the list. - - Parameter 'n' is the index number of the item to get. - - Returns the nth item in this ListOf items. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOf::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") ListOf::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") ListOf::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") ListOf::clear " - Removes all items in this ListOf object. - - If parameter 'doDelete' is True (default), all items in this ListOf - object are deleted and cleared, and thus the caller doesn't have to - delete those items. Otherwise, all items are just cleared from this - ListOf object and the caller is responsible for deleting all items. - (In that case, pointers to all items should be stored elsewhere - before calling this function.) - - Parameter 'doDelete' is if True (default), all items are deleted and - cleared. Otherwise, all items are just cleared and not deleted. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") ListOf::removeFromParentAndDelete " - Because ListOf objects typically live as object children of their - parent object and not as pointer children, this function clears - itself, but does not attempt to do anything else. If a particular - ListOf subclass does indeed exist as a pointer only, this function - will need to be overridden. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ListOf::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOf items and returns a pointer to - it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOf items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOf::size " - Get the size of this ListOf. - - Returns the number of items in this ListOf items. -"; - - -%feature("docstring") ListOf::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") ListOf::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") ListOf::getTypeCode " - Returns the libSBML type code for this object, namely, SBML_LIST_OF. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOf::getItemTypeCode " - Get the type code of the objects contained in this ListOf. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). -"; - - -%feature("docstring") ListOf::getElementName " - Returns the XML element name of this object, which for ListOf, is - always 'listOf'. - - Returns the XML name of this element. -"; - - -%feature("docstring") ListOf::writeElements " - Internal implementation method. -"; - - -%feature("docstring") ListOf::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") ListOf::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOf::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOf::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOf::isValidTypeForList " - Internal implementation method. -"; - - -%feature("docstring") Model " - @ingroup Core Implementation of SBML's Model construct. - - In an SBML model definition, a single object of class Model serves as - the overall container for the lists of the various model components. - All of the lists are optional, but if a given list container is - present within the model, the list must not be empty; that is, it - must have length one or more. The following are the components and - lists permitted in different Levels and Versions of SBML in version - 5.8.1 of libSBML: - - * In SBML Level 1, the components are: UnitDefinition, - Compartment, Species, Parameter, Rule, and Reaction. Instances of - the classes are placed inside instances of classes - ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, - ListOfParameters, ListOfRules, and ListOfReactions. - - * In SBML Level 2 Version 1, the components are: FunctionDefinition, - UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and - Event. Instances of the classes are placed inside instances of - classes ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, - ListOfReactions, and ListOfEvents. - - * In SBML Level 2 Versions 2, 3 and 4, the components are: - FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType, - Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, - Reaction and Event. Instances of the classes are placed inside - instances of classes ListOfFunctionDefinitions, - ListOfUnitDefinitions, ListOfCompartmentTypes, ListOfSpeciesTypes, - ListOfCompartments, ListOfSpecies, ListOfParameters, - ListOfInitialAssignments, ListOfRules, ListOfConstraints, - ListOfReactions, and ListOfEvents. - - * In SBML Level 3 Version 1, the components are: FunctionDefinition, - UnitDefinition, Compartment, Species, Parameter, InitialAssignment, - Rule, Constraint, Reaction and Event. Instances of the classes are - placed inside instances of classes ListOfFunctionDefinitions, - ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, - ListOfParameters, ListOfInitialAssignments, ListOfRules, - ListOfConstraints, ListOfReactions, and ListOfEvents. - - Although all the lists are optional, there are dependencies between - SBML components such that defining some components requires defining - others. An example is that defining a species requires defining a - compartment, and defining a reaction requires defining a species. - The dependencies are explained in more detail in the SBML - specifications. - - In addition to the above lists and attributes, the Model class in - both SBML Level 2 and Level 3 has the usual two attributes of 'id' - and 'name', and both are optional. As is the case for other SBML - components with 'id' and 'name' attributes, they must be used - according to the guidelines described in the SBML specifications. - (Within the frameworks of SBML Level 2 and Level 3 Version 1 Core, a - Model object identifier has no assigned meaning, but extension - packages planned for SBML Level 3 are likely to make use of this - identifier.) - - Finally, SBML Level 3 has introduced a number of additional Model - attributes. They are discussed in a separate section below. - - Approaches to creating objects using the libSBML API - ====================================================================== - - LibSBML provides two main mechanisms for creating objects: class - constructors (e.g., Species.Species() ), and createObject() - methods (such as Model.createSpecies()) provided by certain Object - classes such as Model. These multiple mechanisms are provided by - libSBML for flexibility and to support different use-cases, but they - also have different implications for the overall model structure. - - In general, the recommended approach is to use the createObject() - methods. These methods both create an object and link it to the - parent in one step. Here is an example: - # Create an SBMLDocument object in Level 3 Version 1 format: - - sbmlDoc = SBMLDocument(3, 1) - - # Create a Model object inside the SBMLDocument object and set - # its identifier. The call to setId() returns a status code - # to indicate whether the assignment was successful. Code 0 - # means success; see the documentation for Model\'s setId() for - # more information. - - model = sbmlDoc.createModel() - model.setId(\"BestModelEver\") - - # Create a Species object inside the Model and set its identifier. - # Again, the setId() returns a status code to indicate whether the - # assignment was successful. Code 0 means success; see the - # documentation for Specie\'s setId() for more information. - - sp = model.createSpecies() - sp.setId(\"BestSpeciesEver\") - @~ - - The createObject() methods return a pointer to the object created, - but they also add the object to the relevant list of object - instances contained in the parent. (These lists become the - <listOfObjects> elements in the finished XML rendition of SBML.) In - the example above, Model.createSpecies() adds the created species - directly to the - - * list in the model. Subsequently, methods called on the species - change the species in the model (which is what is expected in most - situations). - - Consistency and adherence to SBML specifications - ====================================================================== - - To make it easier for applications to do whatever they need, libSBML - version 5.8.1 is relatively lax when it comes to enforcing - correctness and completeness of models during model construction and - editing. Essentially, libSBML will not in most cases check - automatically that a model's components have valid attribute values, - or that the overall model is consistent and free of errors -- even - obvious errors such as duplication of identifiers. This allows - applications great leeway in how they build their models, but it - means that software authors must take deliberate steps to ensure - that the model will be, in the end, valid SBML. These steps include - such things as keeping track of the identifiers used in a model, - manually performing updates in certain situations where an entity is - referenced in more than one place (e.g., a species that is - referenced by multiple SpeciesReference objects), and so on. - - That said, libSBML does provide powerful features for deliberately - performing validation of SBML when an application decides it is time - to do so. The interfaces to these facilities are on the - SBMLDocument class, in the form of - SBMLDocument.checkInternalConsistency() and - SBMLDocument.checkConsistency(). Please refer to the documentation - for SBMLDocument for more information about this. - - While applications may play fast and loose and live like free spirits - during the construction and editing of SBML models, they should - always make sure to call SBMLDocument.checkInternalConsistency() - and/or SBMLDocument.checkConsistency() before writing out the final - version of an SBML model. - - Model attributes introduced in SBML Level 3 - ====================================================================== - - As mentioned above, the Model class has a number of optional - attributes in SBML Level 3 Version 1 Core. These are - 'substanceUnits', 'timeUnits', 'volumeUnits', 'areaUnits', - 'lengthUnits', 'extentUnits', and 'conversionFactor. The following - provide more information about them. - - The 'substanceUnits' attribute - ...................................................................... - - The 'substanceUnits' attribute is used to specify the unit of - measurement associated with substance quantities of Species objects - that do not specify units explicitly. If a given Species object - definition does not specify its unit of substance quantity via the - 'substanceUnits' attribute on the Species object instance, then that - species inherits the value of the Model 'substanceUnits' attribute. - If the Model does not define a value for this attribute, then there - is no unit to inherit, and all species that do not specify - individual 'substanceUnits' attribute values then have no declared - units for their quantities. The SBML Level 3 Version 1 Core - specification provides more details. - - Note that when the identifier of a species appears in a model's - mathematical expressions, the unit of measurement associated with - that identifier is not solely determined by setting 'substanceUnits' - on Model or Species. Please see the discussion about units given in - the documentation for the Species class. - - The 'timeUnits' attribute - ...................................................................... - - The 'timeUnits' attribute on SBML Level 3's Model object is used to - specify the unit in which time is measured in the model. This - attribute on Model is the only way to specify a unit for time in a - model. It is a global attribute; time is measured in the model - everywhere in the same way. This is particularly relevant to - Reaction and RateRule objects in a model: all Reaction and RateRule - objects in SBML define per-time values, and the unit of time is - given by the 'timeUnits' attribute on the Model object instance. If - the Model 'timeUnits' attribute has no value, it means that the unit - of time is not defined for the model's reactions and rate rules. - Leaving it unspecified in an SBML model does not result in an - invalid model in SBML Level 3; however, as a matter of best - practice, we strongly recommend that all models specify units of - measurement for time. - - The 'volumeUnits', 'areaUnits', and 'lengthUnits' attributes - ...................................................................... - - The attributes 'volumeUnits', 'areaUnits' and 'lengthUnits' together - are used to set the units of measurements for the sizes of - Compartment objects in an SBML Level 3 model when those objects do - not otherwise specify units. The three attributes correspond to the - most common cases of compartment dimensions: 'volumeUnits' for - compartments having a 'spatialDimensions' attribute value of '3', - 'areaUnits' for compartments having a 'spatialDimensions' attribute - value of '2', and 'lengthUnits' for compartments having a - 'spatialDimensions' attribute value of '1'. The attributes are not - applicable to compartments whose 'spatialDimensions' attribute - values are not one of '1', '2' or '3'. - - If a given Compartment object instance does not provide a value for - its 'units' attribute, then the unit of measurement of that - compartment's size is inherited from the value specified by the - Model 'volumeUnits', 'areaUnits' or 'lengthUnits' attribute, as - appropriate based on the Compartment object's 'spatialDimensions' - attribute value. If the Model object does not define the relevant - attribute, then there are no units to inherit, and all Compartment - objects that do not set a value for their 'units' attribute then - have no units associated with their compartment sizes. - - The use of three separate attributes is a carry-over from SBML Level - 2. Note that it is entirely possible for a model to define a value - for two or more of the attributes 'volumeUnits', 'areaUnits' and - 'lengthUnits' simultaneously, because SBML models may contain - compartments with different numbers of dimensions. - - The 'extentUnits' attribute - ...................................................................... - - Reactions are processes that occur over time. These processes - involve events of some sort, where a single ``reaction event'' is - one in which some set of entities (known as reactants, products and - modifiers in SBML) interact, once. The extent of a reaction is a - measure of how many times the reaction has occurred, while the time - derivative of the extent gives the instantaneous rate at which the - reaction is occurring. Thus, what is colloquially referred to as - the 'rate of the reaction' is in fact equal to the rate of change of - reaction extent. - - In SBML Level 3, the combination of 'extentUnits' and 'timeUnits' - defines the units of kinetic laws in SBML and establishes how the - numerical value of each KineticLaw object's mathematical formula is - meant to be interpreted in a model. The units of the kinetic laws - are taken to be 'extentUnits' divided by 'timeUnits'. - - Note that this embodies an important principle in SBML Level 3 - models: all reactions in an SBML model must have the same units for - the rate of change of extent. In other words, the units of all - reaction rates in the model must be the same. There is only one - global value for 'extentUnits' and one global value for 'timeUnits'. - - The 'conversionFactor' attribute - ...................................................................... - - The attribute 'conversionFactor' in SBML Level 3's Model object - defines a global value inherited by all Species object instances that - do not define separate values for their 'conversionFactor' - attributes. The value of this attribute must refer to a Parameter - object instance defined in the model. The Parameter object in - question must be a constant; ie it must have its 'constant' - attribute value set to 'true'. - - If a given Species object definition does not specify a conversion - factor via the 'conversionFactor' attribute on Species, then the - species inherits the conversion factor specified by the Model - 'conversionFactor' attribute. If the Model does not define a value - for this attribute, then there is no conversion factor to inherit. - More information about conversion factors is provided in the SBML - Level 3 Version 1 specification. -"; - - -%feature("docstring") Model::Model " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Model(SBMLNamespaces sbmlns) - - Creates a new Model using the given SBMLNamespaces object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Model object to an SBMLDocument (e.g., using - SBMLDocument.setModel()), the SBML XML namespace of the document - overrides the value used when creating the Model object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Model is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Model(long level, long version) - - Creates a new Model using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Model - - Parameter 'version' is a long integer, the SBML Version to assign to - this Model - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Model object to an SBMLDocument (e.g., using - SBMLDocument.setModel()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - Model object via this constructor. This is necessary to ensure that - an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Model is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Model(Model orig) - - Copy constructor; creates a (deep) copy of the given Model object. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Model::accept " - Accepts the given SBMLVisitor for this instance of Constraint. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") Model::clone " - Creates and returns a deep copy of this Model object. - - Returns a (deep) copy of this Model. -"; - - -%feature("docstring") Model::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find. - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") Model::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") Model::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") Model::getId " - Returns the value of the 'id' attribute of this Model. - - Returns the id of this Model. -"; - - -%feature("docstring") Model::getName " - Returns the value of the 'name' attribute of this Model. - - Returns the name of this Model. -"; - - -%feature("docstring") Model::getSubstanceUnits " - Returns the value of the 'substanceUnits' attribute of this Model. - - Returns the substanceUnits of this Model. - - Note: - - The 'substanceUnits' attribute is available in SBML Level 3 but is - not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getTimeUnits " - Returns the value of the 'timeUnits' attribute of this Model. - - Returns the timeUnits of this Model. - - Note: - - The 'timeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getVolumeUnits " - Returns the value of the 'volumeUnits' attribute of this Model. - - Returns the volumeUnits of this Model. - - Note: - - The 'volumeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getAreaUnits " - Returns the value of the 'areaUnits' attribute of this Model. - - Returns the areaUnits of this Model. - - Note: - - The 'areaUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getLengthUnits " - Returns the value of the 'lengthUnits' attribute of this Model. - - Returns the lengthUnits of this Model. - - Note: - - The 'lengthUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getExtentUnits " - Returns the value of the 'extentUnits' attribute of this Model. - - Returns the extentUnits of this Model. - - Note: - - The 'extentUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::getConversionFactor " - Returns the value of the 'conversionFactor' attribute of this Model. - - Returns the conversionFactor of this Model. - - Note: - - The 'conversionFactor' attribute is available in SBML Level 3 but - is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetId " - Predicate returning True if this Model's 'id' attribute is set. - - Returns True if the 'id' attribute of this Model is set, False - otherwise. -"; - - -%feature("docstring") Model::isSetName " - Predicate returning True if this Model's 'name' attribute is set. - - Returns True if the 'name' attribute of this Model is set, False - otherwise. -"; - - -%feature("docstring") Model::isSetSubstanceUnits " - Predicate returning True if this Model's 'substanceUnits' attribute - is set. - - Returns True if the 'substanceUnits' attribute of this Model is set, - False otherwise. - - Note: - - The 'substanceUnits' attribute is available in SBML Level 3 but is - not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetTimeUnits " - Predicate returning True if this Model's 'timeUnits' attribute is - set. - - Returns True if the 'timeUnits' attribute of this Model is set, - False otherwise. - - Note: - - The 'substanceUnits' attribute is available in SBML Level 3 but is - not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetVolumeUnits " - Predicate returning True if this Model's 'volumeUnits' attribute is - set. - - Returns True if the 'volumeUnits' attribute of this Model is set, - False otherwise. - - Note: - - The 'volumeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetAreaUnits " - Predicate returning True if this Model's 'areaUnits' attribute is - set. - - Returns True if the 'areaUnits' attribute of this Model is set, - False otherwise. - - Note: - - The 'areaUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetLengthUnits " - Predicate returning True if this Model's 'lengthUnits' attribute is - set. - - Returns True if the 'lengthUnits' attribute of this Model is set, - False otherwise. - - Note: - - The 'lengthUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetExtentUnits " - Predicate returning True if this Model's 'extentUnits' attribute is - set. - - Returns True if the 'extentUnits' attribute of this Model is set, - False otherwise. - - Note: - - The 'extentUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::isSetConversionFactor " - Predicate returning True if this Model's 'conversionFactor' - attribute is set. - - Returns True if the 'conversionFactor' attribute of this Model is - set, False otherwise. - - Note: - - The 'conversionFactor' attribute is available in SBML Level 3 but - is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setId " - Sets the value of the 'id' attribute of this Model. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Model::setName " - Sets the value of the 'name' attribute of this Model. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Model::setSubstanceUnits " - Sets the value of the 'substanceUnits' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new substanceUnits for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'substanceUnits' attribute is available in SBML Level 3 but is - not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setTimeUnits " - Sets the value of the 'timeUnits' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new timeUnits for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'timeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setVolumeUnits " - Sets the value of the 'volumeUnits' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new volumeUnits for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'volumeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setAreaUnits " - Sets the value of the 'areaUnits' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new areaUnits for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'areaUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setLengthUnits " - Sets the value of the 'lengthUnits' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new lengthUnits for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'lengthUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setExtentUnits " - Sets the value of the 'extentUnits' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new extentUnits for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'extentUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::setConversionFactor " - Sets the value of the 'conversionFactor' attribute of this Model. - - The string in 'units' is copied. - - Parameter 'units' is the new conversionFactor for the Model - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'conversionFactor' attribute is available in SBML Level 3 but - is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetId " - Unsets the value of the 'id' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Model::unsetName " - Unsets the value of the 'name' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Model::unsetSubstanceUnits " - Unsets the value of the 'substanceUnits' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'substanceUnits' attribute is available in SBML Level 3 but is - not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetTimeUnits " - Unsets the value of the 'timeUnits' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'timeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetVolumeUnits " - Unsets the value of the 'volumeUnits' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'volumeUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetAreaUnits " - Unsets the value of the 'areaUnits' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'areaUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetLengthUnits " - Unsets the value of the 'lengthUnits' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'lengthUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetExtentUnits " - Unsets the value of the 'extentUnits' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'extentUnits' attribute is available in SBML Level 3 but is not - present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::unsetConversionFactor " - Unsets the value of the 'conversionFactor' attribute of this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'conversionFactor' attribute is available in SBML Level 3 but - is not present on Model in lower Levels of SBML. -"; - - -%feature("docstring") Model::addFunctionDefinition " - Adds a copy of the given FunctionDefinition object to this Model. - - Parameter 'fd' is the FunctionDefinition to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createFunctionDefinition() - for a method that does not lead to these issues. - - See also createFunctionDefinition(). -"; - - -%feature("docstring") Model::addUnitDefinition " - Adds a copy of the given UnitDefinition object to this Model. - - Parameter 'ud' is the UnitDefinition object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createUnitDefinition() for - a method that does not lead to these issues. - - See also createUnitDefinition(). -"; - - -%feature("docstring") Model::addCompartmentType " - Adds a copy of the given CompartmentType object to this Model. - - Parameter 'ct' is the CompartmentType object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createCompartmentType() - for a method that does not lead to these issues. - - Note: - - The CompartmentType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. - - See also createCompartmentType(). -"; - - -%feature("docstring") Model::addSpeciesType " - Adds a copy of the given SpeciesType object to this Model. - - Parameter 'st' is the SpeciesType object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createSpeciesType() for a - method that does not lead to these issues. - - Note: - - The SpeciesType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. - - See also createSpeciesType(). -"; - - -%feature("docstring") Model::addCompartment " - Adds a copy of the given Compartment object to this Model. - - Parameter 'c' is the Compartment object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createCompartment() for a - method that does not lead to these issues. - - See also createCompartment(). -"; - - -%feature("docstring") Model::addSpecies " - Adds a copy of the given Species object to this Model. - - Parameter 's' is the Species object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createSpecies() for a - method that does not lead to these issues. - - See also createSpecies(). -"; - - -%feature("docstring") Model::addParameter " - Adds a copy of the given Parameter object to this Model. - - Parameter 'p' is the Parameter object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createParameter() for a - method that does not lead to these issues. - - See also createParameter(). -"; - - -%feature("docstring") Model::addInitialAssignment " - Adds a copy of the given InitialAssignment object to this Model. - - Parameter 'ia' is the InitialAssignment object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createInitialAssignment() - for a method that does not lead to these issues. - - See also createInitialAssignment(). -"; - - -%feature("docstring") Model::addRule " - Adds a copy of the given Rule object to this Model. - - Parameter 'r' is the Rule object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see the methods - Model.createAlgebraicRule(), Model.createAssignmentRule() and - Model.createRateRule() for methods that do not lead to these issues. - - See also createAlgebraicRule(), createAssignmentRule(), - createRateRule(). -"; - - -%feature("docstring") Model::addConstraint " - Adds a copy of the given Constraint object to this Model. - - Parameter 'c' is the Constraint object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createConstraint() for a - method that does not lead to these issues. - - See also createConstraint(). -"; - - -%feature("docstring") Model::addReaction " - Adds a copy of the given Reaction object to this Model. - - Parameter 'r' is the Reaction object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createReaction() for a - method that does not lead to these issues. - - See also createReaction(). -"; - - -%feature("docstring") Model::addEvent " - Adds a copy of the given Event object to this Model. - - Parameter 'e' is the Event object to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Model. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Model. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Model.createEvent() for a method - that does not lead to these issues. - - See also createEvent(). -"; - - -%feature("docstring") Model::createFunctionDefinition " - Creates a new FunctionDefinition inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the FunctionDefinition object created - - See also addFunctionDefinition(). -"; - - -%feature("docstring") Model::createUnitDefinition " - Creates a new UnitDefinition inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the UnitDefinition object created - - See also addUnitDefinition(). -"; - - -%feature("docstring") Model::createUnit " - Creates a new Unit object within the last UnitDefinition object - created in this model and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the UnitDefinition was created is not - significant. If a UnitDefinition object does not exist in this - model, a new Unit is not created and None is returned instead. - - Returns the Unit object created - - See also addUnitDefinition(). -"; - - -%feature("docstring") Model::createCompartmentType " - Creates a new CompartmentType inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the CompartmentType object created - - Note: - - The CompartmentType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. - - See also addCompartmentType(). -"; - - -%feature("docstring") Model::createSpeciesType " - Creates a new SpeciesType inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the SpeciesType object created - - Note: - - The SpeciesType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. - - See also addSpeciesType(). -"; - - -%feature("docstring") Model::createCompartment " - Creates a new Compartment inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the Compartment object created - - See also addCompartment(). -"; - - -%feature("docstring") Model::createSpecies " - Creates a new Species inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the Species object created - - See also addSpecies(). -"; - - -%feature("docstring") Model::createParameter " - Creates a new Parameter inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the Parameter object created - - See also addParameter(). -"; - - -%feature("docstring") Model::createInitialAssignment " - Creates a new InitialAssignment inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the InitialAssignment object created - - See also addInitialAssignment(). -"; - - -%feature("docstring") Model::createAlgebraicRule " - Creates a new AlgebraicRule inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the AlgebraicRule object created - - See also addRule(). -"; - - -%feature("docstring") Model::createAssignmentRule " - Creates a new AssignmentRule inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the AssignmentRule object created - - See also addRule(). -"; - - -%feature("docstring") Model::createRateRule " - Creates a new RateRule inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the RateRule object created - - See also addRule(). -"; - - -%feature("docstring") Model::createConstraint " - Creates a new Constraint inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the Constraint object created - - See also addConstraint(). -"; - - -%feature("docstring") Model::createReaction " - Creates a new Reaction inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the Reaction object created - - See also addReaction(). -"; - - -%feature("docstring") Model::createReactant " - Creates a new SpeciesReference object for a reactant inside the last - Reaction object in this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, a new SpeciesReference is not created - and None is returned instead. - - Returns the SpeciesReference object created -"; - - -%feature("docstring") Model::createProduct " - Creates a new SpeciesReference object for a product inside the last - Reaction object in this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, a new SpeciesReference is not created - and None is returned instead. - - Returns the SpeciesReference object created -"; - - -%feature("docstring") Model::createModifier " - Creates a new ModifierSpeciesReference object for a modifier species - inside the last Reaction object in this Model, and returns a pointer - to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, a new ModifierSpeciesReference is not - created and None is returned instead. - - Returns the SpeciesReference object created -"; - - -%feature("docstring") Model::createKineticLaw " - Creates a new KineticLaw inside the last Reaction object created in - this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Reaction object was created and added - to this Model is not significant. It could have been created in a - variety of ways, for example using createReaction(). If a Reaction - does not exist for this model, or a Reaction exists but already has a - KineticLaw, a new KineticLaw is not created and None is returned - instead. - - Returns the KineticLaw object created -"; - - -%feature("docstring") Model::createKineticLawParameter " - Creates a new local Parameter inside the KineticLaw object of the - last Reaction created inside this Model, and returns a pointer to - it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The last KineticLaw object in this Model could have been created in a - variety of ways. For example, it could have been added using - createKineticLaw(), or it could be the result of using - Reaction.createKineticLaw() on the Reaction object created by a - createReaction(). If a Reaction does not exist for this model, or - the last Reaction does not contain a KineticLaw object, a new - Parameter is not created and None is returned instead. - - Returns the Parameter object created -"; - - -%feature("docstring") Model::createKineticLawLocalParameter " - Creates a new LocalParameter inside the KineticLaw object of the last - Reaction created inside this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The last KineticLaw object in this Model could have been created in a - variety of ways. For example, it could have been added using - createKineticLaw(), or it could be the result of using - Reaction.createKineticLaw() on the Reaction object created by a - createReaction(). If a Reaction does not exist for this model, or - the last Reaction does not contain a KineticLaw object, a new - Parameter is not created and None is returned instead. - - Returns the Parameter object created -"; - - -%feature("docstring") Model::createEvent " - Creates a new Event inside this Model and returns it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - Returns the Event object created -"; - - -%feature("docstring") Model::createEventAssignment " - Creates a new EventAssignment inside the last Event object created in - this Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Event object in this model was - created is not significant. It could have been created in a variety - of ways, for example by using createEvent(). If no Event object - exists in this Model object, a new EventAssignment is not created - and None is returned instead. - - Returns the EventAssignment object created -"; - - -%feature("docstring") Model::createTrigger " - Creates a new Trigger inside the last Event object created in this - Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Event object in this model was - created is not significant. It could have been created in a variety - of ways, for example by using createEvent(). If no Event object - exists in this Model object, a new Trigger is not created and None - is returned instead. - - Returns the Trigger object created -"; - - -%feature("docstring") Model::createDelay " - Creates a new Delay inside the last Event object created in this - Model, and returns a pointer to it. - - The SBML Level and Version of the enclosing Model object, as well as - any SBML package namespaces, are used to initialize this object's - corresponding attributes. - - The mechanism by which the last Event object in this model was - created is not significant. It could have been created in a variety - of ways, for example by using createEvent(). If no Event object - exists in this Model object, a new Delay is not created and None is - returned instead. - - Returns the Delay object created -"; - - -%feature("docstring") Model::setAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setAnnotation(XMLNode annotation) - - Sets the value of the 'annotation' subelement of this SBML object to - a copy of 'annotation'. - - Any existing content of the 'annotation' subelement is discarded. - Unless you have taken steps to first copy and reconstitute any - existing annotations into the 'annotation' that is about to be - assigned, it is likely that performing such wholesale replacement is - unfriendly towards other software applications whose annotations are - discarded. An alternative may be to use appendAnnotation(). - - Parameter 'annotation' is an XML structure that is to be used as the - content of the 'annotation' subelement of this object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also appendAnnotation(), appendAnnotation(). -"; - - -%feature("docstring") Model::appendAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - appendAnnotation(XMLNode annotation) - - Appends annotation content to any existing content in the - 'annotation' subelement of this object. - - The content in 'annotation' is copied. Unlike setAnnotation(), this - method allows other annotations to be preserved when an application - adds its own data. - - Parameter 'annotation' is an XML structure that is to be copied and - appended to the content of the 'annotation' subelement of this - object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also setAnnotation(), setAnnotation(). -"; - - -%feature("docstring") Model::getListOfFunctionDefinitions " - Get the ListOfFunctionDefinitions object in this Model. - - Returns the list of FunctionDefinitions for this Model. -"; - - -%feature("docstring") Model::getListOfUnitDefinitions " - Get the ListOfUnitDefinitions object in this Model. - - Returns the list of UnitDefinitions for this Model. -"; - - -%feature("docstring") Model::getListOfCompartmentTypes " - Get the ListOfCompartmentTypes object in this Model. - - Returns the list of CompartmentTypes for this Model. - - Note: - - The CompartmentType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getListOfSpeciesTypes " - Get the ListOfSpeciesTypes object in this Model. - - Returns the list of SpeciesTypes for this Model. - - Note: - - The SpeciesType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getListOfCompartments " - Get the ListOfCompartments object in this Model. - - Returns the list of Compartments for this Model. -"; - - -%feature("docstring") Model::getListOfSpecies " - Get the ListOfSpecies object in this Model. - - Returns the list of Species for this Model. -"; - - -%feature("docstring") Model::getListOfParameters " - Get the ListOfParameters object in this Model. - - Returns the list of Parameters for this Model. -"; - - -%feature("docstring") Model::getListOfInitialAssignments " - Get the ListOfInitialAssignments object in this Model. - - Returns the list of InitialAssignments for this Model. -"; - - -%feature("docstring") Model::getListOfRules " - Get the ListOfRules object in this Model. - - Returns the list of Rules for this Model. -"; - - -%feature("docstring") Model::getListOfConstraints " - Get the ListOfConstraints object in this Model. - - Returns the list of Constraints for this Model. -"; - - -%feature("docstring") Model::getListOfReactions " - Get the ListOfReactions object in this Model. - - Returns the list of Reactions for this Model. -"; - - -%feature("docstring") Model::getListOfEvents " - Get the ListOfEvents object in this Model. - - Returns the list of Events for this Model. -"; - - -%feature("docstring") Model::getFunctionDefinition " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getFunctionDefinition(long n) - - Get the nth FunctionDefinitions object in this Model. - - Returns the nth FunctionDefinition of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getFunctionDefinition(string sid) - - Get a FunctionDefinition object based on its identifier. - - Returns the FunctionDefinition in this Model with the identifier - 'sid' or None if no such FunctionDefinition exists. -"; - - -%feature("docstring") Model::getUnitDefinition " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getUnitDefinition(long n) - - Get the nth UnitDefinition object in this Model. - - Returns the nth UnitDefinition of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getUnitDefinition(string sid) - - Get a UnitDefinition based on its identifier. - - Returns the UnitDefinition in this Model with the identifier 'sid' or - None if no such UnitDefinition exists. -"; - - -%feature("docstring") Model::getCompartmentType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getCompartmentType(long n) - - Get the nth CompartmentType object in this Model. - - Returns the nth CompartmentType of this Model. - - Note: - - The CompartmentType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. - - ______________________________________________________________________ - Method variant with the following signature: - - getCompartmentType(string sid) - - Get a CompartmentType object based on its identifier. - - Returns the CompartmentType in this Model with the identifier 'sid' - or None if no such CompartmentType exists. - - Note: - - The CompartmentType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getSpeciesType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getSpeciesType(long n) - - Get the nth SpeciesType object in this Model. - - Returns the nth SpeciesType of this Model. - - Note: - - The SpeciesType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. - - ______________________________________________________________________ - Method variant with the following signature: - - getSpeciesType(string sid) - - Get a SpeciesType object based on its identifier. - - Returns the SpeciesType in this Model with the identifier 'sid' or - None if no such SpeciesType exists. - - Note: - - The SpeciesType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getCompartment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getCompartment(long n) - - Get the nth Compartment object in this Model. - - Returns the nth Compartment of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getCompartment(string sid) - - Get a Compartment object based on its identifier. - - Returns the Compartment in this Model with the identifier 'sid' or - None if no such Compartment exists. -"; - - -%feature("docstring") Model::getSpecies " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getSpecies(long n) - - Get the nth Species object in this Model. - - Returns the nth Species of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getSpecies(string sid) - - Get a Species object based on its identifier. - - Returns the Species in this Model with the identifier 'sid' or None - if no such Species exists. -"; - - -%feature("docstring") Model::getParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getParameter(long n) - - Get the nth Parameter object in this Model. - - Returns the nth Parameter of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getParameter(string sid) - - Get a Parameter object based on its identifier. - - Returns the Parameter in this Model with the identifier 'sid' or None - if no such Parameter exists. -"; - - -%feature("docstring") Model::getInitialAssignment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getInitialAssignment(string symbol) - - Get an InitialAssignment object based on the symbol to which it - assigns a value. - - Returns the InitialAssignment in this Model with the given 'symbol' - attribute value or None if no such InitialAssignment exists. - - ______________________________________________________________________ - Method variant with the following signature: - - getInitialAssignment(long n) - - Get the nth InitialAssignment object in this Model. - - Returns the nth InitialAssignment of this Model. -"; - - -%feature("docstring") Model::getRule " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getRule(string variable) - - Get a Rule object based on the variable to which it assigns a value. - - Returns the Rule in this Model with the given 'variable' attribute - value or None if no such Rule exists. - - ______________________________________________________________________ - Method variant with the following signature: - - getRule(long n) - - Get the nth Rule object in this Model. - - Returns the nth Rule of this Model. -"; - - -%feature("docstring") Model::getConstraint " - Get the nth Constraint object in this Model. - - Returns the nth Constraint of this Model. -"; - - -%feature("docstring") Model::getReaction " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getReaction(long n) - - Get the nth Reaction object in this Model. - - Returns the nth Reaction of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getReaction(string sid) - - Get a Reaction object based on its identifier. - - Returns the Reaction in this Model with the identifier 'sid' or None - if no such Reaction exists. -"; - - -%feature("docstring") Model::getSpeciesReference " - Get a SpeciesReference object based on its identifier. - - Returns the SpeciesReference in this Model with the identifier 'sid' - or None if no such SpeciesReference exists. -"; - - -%feature("docstring") Model::getModifierSpeciesReference " - Get a ModifierSpeciesReference object based on its identifier. - - Returns the ModifierSpeciesReference in this Model with the - identifier 'sid' or None if no such ModifierSpeciesReference exists. -"; - - -%feature("docstring") Model::getEvent " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getEvent(long n) - - Get the nth Event object in this Model. - - Returns the nth Event of this Model. - - ______________________________________________________________________ - Method variant with the following signature: - - getEvent(string sid) - - Get an Event object based on its identifier. - - Returns the Event in this Model with the identifier 'sid' or None if - no such Event exists. -"; - - -%feature("docstring") Model::getNumFunctionDefinitions " - Get the number of FunctionDefinition objects in this Model. - - Returns the number of FunctionDefinitions in this Model. -"; - - -%feature("docstring") Model::getNumUnitDefinitions " - Get the number of UnitDefinition objects in this Model. - - Returns the number of UnitDefinitions in this Model. -"; - - -%feature("docstring") Model::getNumCompartmentTypes " - Get the number of CompartmentType objects in this Model. - - Returns the number of CompartmentTypes in this Model. - - Note: - - The CompartmentType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getNumSpeciesTypes " - Get the number of SpeciesType objects in this Model. - - Returns the number of SpeciesTypes in this Model. - - Note: - - The SpeciesType object class is only available in SBML Level 2 - Versions 2-4. It is not available in Level 1 nor Level 3. -"; - - -%feature("docstring") Model::getNumCompartments " - Get the number of Compartment objects in this Model. - - Returns the number of Compartments in this Model. -"; - - -%feature("docstring") Model::getNumSpecies " - Get the number of Specie objects in this Model. - - Returns the number of Species in this Model. -"; - - -%feature("docstring") Model::getNumSpeciesWithBoundaryCondition " - Get the number of Species in this Model having their - 'boundaryCondition' attribute value set to True. - - Returns the number of Species in this Model with boundaryCondition - set to true. -"; - - -%feature("docstring") Model::getNumParameters " - Get the number of Parameter objects in this Model. - - Returns the number of Parameters in this Model. Parameters defined - in KineticLaws are not included. -"; - - -%feature("docstring") Model::getNumInitialAssignments " - Get the number of InitialAssignment objects in this Model. - - Returns the number of InitialAssignments in this Model. -"; - - -%feature("docstring") Model::getNumRules " - Get the number of Rule objects in this Model. - - Returns the number of Rules in this Model. -"; - - -%feature("docstring") Model::getNumConstraints " - Get the number of Constraint objects in this Model. - - Returns the number of Constraints in this Model. -"; - - -%feature("docstring") Model::getNumReactions " - Get the number of Reaction objects in this Model. - - Returns the number of Reactions in this Model. -"; - - -%feature("docstring") Model::getNumEvents " - Get the number of Event objects in this Model. - - Returns the number of Events in this Model. -"; - - -%feature("docstring") Model::removeFromParentAndDelete " - Finds this Model's parent SBMLDocument and calls setModel(None) on - it, indirectly deleting itself. Overridden from the SBase function - since the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Model::renameAllIds " - Finds this Model's parent SBMLDocument and calls setModel(None) on - it, indirectly deleting itself. Overridden from the SBase function - since the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Model::renameIDs " - Finds this Model's parent SBMLDocument and calls setModel(None) on - it, indirectly deleting itself. Overridden from the SBase function - since the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Model::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Model::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Model::isBoolean " - Internal implementation method. -"; - - -%feature("docstring") Model::convertL1ToL2 " - Internal implementation method. -"; - - -%feature("docstring") Model::convertL1ToL3 " - Internal implementation method. -"; - - -%feature("docstring") Model::convertL2ToL3 " - Internal implementation method. -"; - - -%feature("docstring") Model::convertL2ToL1 " - Internal implementation method. -"; - - -%feature("docstring") Model::convertL3ToL1 " - Internal implementation method. -"; - - -%feature("docstring") Model::convertL3ToL2 " - Internal implementation method. -"; - - -%feature("docstring") Model::addModifiers " - Internal implementation method. -"; - - -%feature("docstring") Model::addConstantAttribute " - Internal implementation method. -"; - - -%feature("docstring") Model::setSpatialDimensions " - Internal implementation method. -"; - - -%feature("docstring") Model::addDefinitionsForDefaultUnits " - Internal implementation method. -"; - - -%feature("docstring") Model::convertParametersToLocals " - Internal implementation method. -"; - - -%feature("docstring") Model::setSpeciesReferenceConstantValueAndStoichiometry " - Internal implementation method. -"; - - -%feature("docstring") Model::removeMetaId " - Internal implementation method. -"; - - -%feature("docstring") Model::removeSBOTerms " - Internal implementation method. -"; - - -%feature("docstring") Model::removeHasOnlySubstanceUnits " - Internal implementation method. -"; - - -%feature("docstring") Model::removeSBOTermsNotInL2V2 " - Internal implementation method. -"; - - -%feature("docstring") Model::removeDuplicateTopLevelAnnotations " - Internal implementation method. -"; - - -%feature("docstring") Model::removeParameterRuleUnits " - Internal implementation method. -"; - - -%feature("docstring") Model::convertStoichiometryMath " - Internal implementation method. -"; - - -%feature("docstring") Model::assignRequiredValues " - Internal implementation method. -"; - - -%feature("docstring") Model::dealWithModelUnits " - Internal implementation method. -"; - - -%feature("docstring") Model::dealWithStoichiometry " - Internal implementation method. -"; - - -%feature("docstring") Model::dealWithEvents " - Internal implementation method. -"; - - -%feature("docstring") Model::convertToL2Strict " - Internal implementation method. -"; - - -%feature("docstring") Model::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") Model::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") Model::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Model::getElementName " - Returns the XML element name of this object, which for Model, is - always 'model'. - - Returns the name of this element, i.e., 'model'. -"; - - -%feature("docstring") Model::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") Model::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Model::populateListFormulaUnitsData " - Populates the list of FormulaDataUnits with the units derived for - the model. The list contains elements of class FormulaUnitsData. - - The first element of the list refers to the default units of - 'substance per time' derived from the model and has the - unitReferenceId 'subs_per_time'. This facilitates the comparison of - units derived from mathematical formula with the expected units. - - The next elements of the list record the units of the compartments - and species established from either explicitly declared or default - units. - - The next elements record the units of any parameters. - - Subsequent elements of the list record the units derived for each - mathematical expression encountered within the model. - - Note: - - This function is utilised by the Unit Consistency Validator. The - list is populated prior to running the validation and thus the - consistency of units can be checked by accessing the members of the - list and comparing the appropriate data. -"; - - -%feature("docstring") Model::isPopulatedListFormulaUnitsData " - Predicate returning True if the list of FormulaUnitsData is - populated. - - Returns True if the list of FormulaUnitsData is populated, False - otherwise. -"; - - -%feature("docstring") Model::addFormulaUnitsData " - Internal implementation method. -"; - - -%feature("docstring") Model::createFormulaUnitsData " - Internal implementation method. -"; - - -%feature("docstring") Model::getNumFormulaUnitsData " - Internal implementation method. -"; - - -%feature("docstring") Model::getListFormulaUnitsData " - Internal implementation method. -"; - - -%feature("docstring") Model::hasRequiredElements " - Predicate returning True if all the required elements for this Model - object have been set. - - Note: - - The required elements for a Model object are: listOfCompartments (L1 - only); listOfSpecies (L1V1 only); listOfReactions(L1V1 only) - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Model::removeFunctionDefinition " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeFunctionDefinition(long n) - - Removes the nth FunctionDefinition object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the FunctionDefinition object to remove - - Returns the FunctionDefinition object removed. As mentioned above, - the caller owns the returned item. None is returned if the given - index is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeFunctionDefinition(string sid) - - Removes the FunctionDefinition object with the given identifier from - this Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the FunctionDefinition objects in this Model object - have the identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the FunctionDefinition object to - remove - - Returns the FunctionDefinition object removed. As mentioned above, - the caller owns the returned object. None is returned if no - FunctionDefinition object with the identifier exists in this Model - object. -"; - - -%feature("docstring") Model::removeUnitDefinition " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeUnitDefinition(long n) - - Removes the nth UnitDefinition object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the UnitDefinition object to remove - - Returns the UnitDefinition object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeUnitDefinition(string sid) - - Removes the UnitDefinition object with the given identifier from this - Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the UnitDefinition objects in this Model object have - the identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the UnitDefinition object to - remove - - Returns the UnitDefinition object removed. As mentioned above, the - caller owns the returned object. None is returned if no - UnitDefinition object with the identifier exists in this Model - object. -"; - - -%feature("docstring") Model::removeCompartmentType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeCompartmentType(long n) - - Removes the nth CompartmentType object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the CompartmentType object to remove - - Returns the ComapartmentType object removed. As mentioned above, - the caller owns the returned item. None is returned if the given - index is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeCompartmentType(string sid) - - Removes the CompartmentType object with the given identifier from - this Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the CompartmentType objects in this Model object have - the identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the object to remove - - Returns the CompartmentType object removed. As mentioned above, the - caller owns the returned object. None is returned if no - CompartmentType object with the identifier exists in this Model - object. -"; - - -%feature("docstring") Model::removeSpeciesType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeSpeciesType(long n) - - Removes the nth SpeciesType object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the SpeciesType object to remove - - Returns the SpeciesType object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeSpeciesType(string sid) - - Removes the SpeciesType object with the given identifier from this - Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the SpeciesType objects in this Model object have the - identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the SpeciesType object to remove - - Returns the SpeciesType object removed. As mentioned above, the - caller owns the returned object. None is returned if no SpeciesType - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeCompartment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeCompartment(long n) - - Removes the nth Compartment object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Compartment object to remove - - Returns the Compartment object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeCompartment(string sid) - - Removes the Compartment object with the given identifier from this - Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the Compartment objects in this Model object have the - identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the Compartment object to remove - - Returns the Compartment object removed. As mentioned above, the - caller owns the returned object. None is returned if no Compartment - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeSpecies " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeSpecies(long n) - - Removes the nth Species object from this Model object and returns a - pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Species object to remove - - Returns the Species object removed. As mentioned above, the caller - owns the returned item. None is returned if the given index is out - of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeSpecies(string sid) - - Removes the Species object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the Species objects in this Model object have the - identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the Species object to remove - - Returns the Species object removed. As mentioned above, the caller - owns the returned object. None is returned if no Species object with - the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeParameter(long n) - - Removes the nth Parameter object from this Model object and returns - a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Parameter object to remove - - Returns the Parameter object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeParameter(string sid) - - Removes the Parameter object with the given identifier from this - Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the Parameter objects in this Model object have the - identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the Parameter object to remove - - Returns the Parameter object removed. As mentioned above, the - caller owns the returned object. None is returned if no Parameter - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeInitialAssignment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeInitialAssignment(string symbol) - - Removes the InitialAssignment object with the given 'symbol' - attribute from this Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the InitialAssignment objects in this Model object - have the 'symbol' attribute 'symbol', then None is returned. - - Parameter 'symbol' is the 'symbol' attribute of the InitialAssignment - object to remove - - Returns the InitialAssignment object removed. As mentioned above, - the caller owns the returned object. None is returned if no - InitialAssignment object with the 'symbol' attribute exists in this - Model object. - - ______________________________________________________________________ - Method variant with the following signature: - - removeInitialAssignment(long n) - - Removes the nth InitialAssignment object from this Model object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the InitialAssignment object to remove - - Returns the InitialAssignment object removed. As mentioned above, - the caller owns the returned item. None is returned if the given - index is out of range. -"; - - -%feature("docstring") Model::removeRule " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeRule(string variable) - - Removes the Rule object with the given 'variable' attribute from this - Model object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the Rule objects in this Model object have the - 'variable' attribute 'variable', then None is returned. - - Parameter 'variable' is the 'variable' attribute of the Rule object - to remove - - Returns the Rule object removed. As mentioned above, the caller - owns the returned object. None is returned if no Rule object with - the 'variable' attribute exists in this Model object. - - ______________________________________________________________________ - Method variant with the following signature: - - removeRule(long n) - - Removes the nth Rule object from this Model object and returns a - pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Rule object to remove - - Returns the Rule object removed. As mentioned above, the caller - owns the returned item. None is returned if the given index is out - of range. -"; - - -%feature("docstring") Model::removeConstraint " - Removes the nth Constraint object from this Model object and returns - a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Constraint object to remove - - Returns the Constraint object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. -"; - - -%feature("docstring") Model::removeReaction " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeReaction(long n) - - Removes the nth Reaction object from this Model object and returns a - pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Reaction object to remove - - Returns the Reaction object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeReaction(string sid) - - Removes the Reaction object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the Reaction objects in this Model object have the - identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the Reaction object to remove - - Returns the Reaction object removed. As mentioned above, the - caller owns the returned object. None is returned if no Reaction - object with the identifier exists in this Model object. -"; - - -%feature("docstring") Model::removeEvent " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeEvent(long n) - - Removes the nth Event object from this Model object and returns a - pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Event object to remove - - Returns the Event object removed. As mentioned above, the caller - owns the returned item. None is returned if the given index is out - of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeEvent(string sid) - - Removes the Event object with the given identifier from this Model - object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the Event objects in this Model object have the - identifier 'sid', then None is returned. - - Parameter 'sid' is the identifier of the Event object to remove - - Returns the Event object removed. As mentioned above, the caller - owns the returned object. None is returned if no Event object with - the identifier exists in this Model object. -"; - - -%feature("docstring") Model::appendFrom " - Takes the contents of the passed-in Model, makes copies of - everything, and appends those copies to the appropriate places in - this Model. - - This method also calls the appendFrom method on all libSBML plug-in - objects. SBML Level 3 consists of a Core definition that can be - extended via optional SBML Level 3 packages. A given model may - indicate that it uses one or more SBML packages, and likewise, a - software tool may be able to support one or more packages. LibSBML - does not come preconfigured with all possible packages included and - enabled, in part because not all package specifications have been - finalized. To support the ability for software systems to enable - support for the Level 3 packages they choose, libSBML features a - plug-in mechanism. Each SBML Level 3 package is implemented in a - separate code plug-in that can be enabled by the application to - support working with that SBML package. A given SBML model may thus - contain not only objects defined by SBML Level 3 Core, but also - objects created by libSBML plug-ins supporting additional Level 3 - packages. - - Parameter 'model' is the Model to merge with this one. -"; - - -%feature("docstring") Model::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") Model::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") Model::createObject " - Internal implementation method. -"; - - -%feature("docstring") Model::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Model::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Model::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Model::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Model::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Model::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Model::syncAnnotation " - Internal implementation method. -"; - - -%feature("docstring") Model::checkUnitDefinition " - Internal implementation method. -"; - - -%feature("docstring") Model::checkSpeciesReference " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument " - @ingroup Core Container for an SBML document and interface for - global operations on SBML documents. - - LibSBML uses the class SBMLDocument as a top-level container for - storing SBML content and data associated with it (such as warnings - and error messages). The two primary means of reading an SBML - model, SBMLReader.readSBML() and SBMLReader.readSBMLFromString(), - both return a pointer to an SBMLDocument object. From there, - callers can inquire about any errors encountered (e.g., using - SBMLDocument.getNumErrors()), access the Model object, and perform - other actions such as consistency-checking and model translation. - @~ - - When creating fresh models programmatically, the starting point is - typically the creation of an SBMLDocument object instance. The - SBMLDocument constructor accepts arguments for the SBML Level and - Version of the model to be created. After creating the SBMLDocument - object, calling programs then typically call - SBMLDocument.createModel() almost immediately, and then proceed to - call the methods on the Model object to fill out the model's - contents. - - SBMLDocument corresponds roughly to the class Sbml defined in the - SBML Level 2 specification and SBML in the Level 3 specification. - It does not have a direct correspondence in SBML Level 1. (However, - to make matters simpler for applications, libSBML creates an - SBMLDocument no matter whether the model is Level 1, Level 2 or - Level 3.) In its barest form, when written out in XML format for - (e.g.) SBML Level 2 Version 4, the corresponding structure is the - following: - - <sbml xmlns=\'http://www.sbml.org/sbml/level2/version4\' level=\'2\' version=\'4\'> - ... - </sbml> - - SBMLDocument is derived from SBase, and therefore contains the usual - SBase attributes (in SBML Level 2 and Level 3) of 'metaid' and - 'sboTerm', as well as the subelements 'notes' and 'annotation'. It - also contains the attributes 'level' and 'version' indicating the - Level and Version of the SBML data structure. These can be accessed - using the methods defined by the SBase class for that purpose. - - Checking consistency and adherence to SBML specifications - ====================================================================== - - One of the most important features of libSBML is its ability to - perform SBML validation to ensure that a model adheres to the SBML - specification for whatever Level+Version combination the model uses. - SBMLDocument provides the methods for running consistency-checking - and validation rules on the SBML content. - - First, a brief explanation of the rationale is in order. In libSBML - versions up to and including the version 3.3.x series, the - individual methods for creating and setting attributes and other - components were quite lenient, and allowed a caller to compose SBML - entities that might not, in the end, represent valid SBML. This - allowed applications the freedom to do things such as save - incomplete models (which is useful when models are being developed - over long periods of time). In the version 4.x series, libSBML is - somewhat stricter, but still permits structures to be created - independently and the results to be combined in a separate step. In - all these cases, it means that a separate validation step is - necessary when a calling program finally wants to finish a complete - SBML document. - - The primary interface to this validation facility is SBMLDocument's - SBMLDocument.checkInternalConsistency() and - SBMLDocument.checkConsistency(). The former verifies the basic - internal consistency and syntax of an SBML document, and the latter - implements more elaborate validation rules (both those defined by the - SBML specifications, as well as additional rules offered by libSBML). - - The checks performed by SBMLDocument.checkInternalConsistency() are - hardwired and cannot be changed by calling programs, but the - validation performed by SBMLDocument.checkConsistency() is under - program control using the method - SBMLDocument.setConsistencyChecks(). Applications can selectively - disable specific kinds of checks that they may not be interested in, - by calling SBMLDocument.setConsistencyChecks() with appropriate - parameters. @~ - - These methods have slightly different relevance depending on whether - a model is created programmaticaly from scratch, or whether it is - read in from a file or data stream. The following list summarizes - the possible scenarios. - - Scenario 1: Creating a model from scratch. Before writing out the - model, - - * Call SBMLDocument.checkInternalConsistency(), then inquire about - the results by calling SBMLDocument.getNumErrors() - - * Call SBMLDocument.setConsistencyChecks() @~ to configure which - checks will be performed by SBMLDocument.checkConsistency() - - * Call SBMLDocument.checkConsistency(), then inquire about the - results by calling SBMLDocument.getNumErrors() - - Scenario 2: Reading a model from a file or data stream. After - reading the model, - - * Basic consistency checks will have been performed automatically by - libSBML upon reading the content, so you only need to inquire about - the results by using SBMLDocument.getNumErrors() - - * Call SBMLDocument.setConsistencyChecks() @~ to configure which - checks are performed by SBMLDocument.checkConsistency() - - * Call SBMLDocument.checkConsistency(), then inquire about the - results by calling SBMLDocument.getNumErrors() - - @~ - - Converting documents between Levels and Versions of SBML - ====================================================================== - - LibSBML provides facilities for limited translation of SBML between - Levels and Versions of the SBML specifications. The method for doing - is is setLevelAndVersion() . In general, models can be converted - upward without difficulty (e.g., from SBML Level 1 to Level 2, or - from an earlier Version of Level 2 to the latest Version of Level - 2). Sometimes models can be translated downward as well, if they do - not use constructs specific to more advanced Levels of SBML. - - Calling SBMLDocument.setLevelAndVersion() @~ will not necessarily - lead to a successful conversion. The method will return a boolean - value to indicate success or failure. Callers must check the error - log (see next section) attached to the SBMLDocument object after - calling SBMLDocument.setLevelAndVersion() @~ in order to assess - whether any problems arose. - - If an application is interested in translating to a lower Level - and/or Version of SBML within a Level, the following methods allow - for prior assessment of whether there is sufficient compatibility to - make a translation possible: - - * SBMLDocument.checkL1Compatibility(), - - * SBMLDocument.checkL2v1Compatibility(), - - * SBMLDocument.checkL2v2Compatibility(), - - * SBMLDocument.checkL2v3Compatibility(), - - * SBMLDocument.checkL2v4Compatibility(), and - - * SBMLDocument.checkL3v1Compatibility(). - - Some changes between Versions of SBML Level 2 may lead to unexpected - behaviors when attempting conversions in either direction. For - example, SBML Level 2 Version 4 relaxed the requirement for - consistency in units of measurement between expressions annd - quantities in a model. As a result, a model written in Version 4, - if converted to Version 3 with no other changes, may fail validation - as a Version 3 model because Version 3 imposed stricter requirements - on unit consistency. - - Other changes between SBML Level 2 and Level 3 make downward - conversions challenging. In some cases, it means that a model - converted to Level 2 from Level 3 will contain attributes that were - not explicitly given in the Level 3 model, because in Level 2 these - attributes may have been optional or have default values. - - Error handling - ====================================================================== - - Upon reading a model, SBMLDocument logs any problems encountered - while reading the model from the file or data stream. The log - contains objects that record diagnostic information about any - notable issues that arose. Whether the problems are warnings or - errors, they are both reported through a single common interface - involving the object class SBMLError. - - The methods SBMLDocument.getNumErrors(), SBMLDocument.getError() @~ - and SBMLDocument.printErrors() allow callers to interact with the - warnings or errors logged. Alternatively, callers may retrieve the - entire log as an SBMLErrorLog object using the method - SBMLDocument.getErrorLog(). The SBMLErrorLog object provides some - alternative methods for interacting with the set of errors and - warnings. In either case, applications typically should first call - SBMLDocument.getNumErrors() to find out if any issues have been - logged after specific libSBML operations such as the ones discussed - in the sections above. If they have, then an application will - should proceed to inspect the individual reports using either the - direct interfaces on SBMLDocument or using the methods on the - SBMLErrorLog object. - - @~ -"; - - -%feature("docstring") SBMLDocument::getDefaultLevel " - The default SBML Level of new SBMLDocument objects. - - This 'default Level' corresponds to the most recent SBML - specification Level available at the time libSBML version 5.8.1 was - released. For this copy of libSBML, the value is 3. The default - Level is used by SBMLDocument if no Level is explicitly specified at - the time of the construction of an SBMLDocument instance. - - Returns an integer indicating the most recent SBML specification - Level - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLDocument), and the other will be a standalone - top-level function with the name SBMLDocument_getDefaultLevel(). - They are functionally identical. @~ - - @see SBMLDocument.getDefaultVersion() @~ -"; - - -%feature("docstring") SBMLDocument::getDefaultVersion " - The default Version of new SBMLDocument objects. - - This 'default Version' corresponds to the most recent Version within - the most recent Level of SBML available at the time libSBML version - 5.8.1 was released. For this copy of libSBML, the value is 1 - (where the default Level of SBML is 3). The default Version is used - by SBMLDocument if no Version is explicitly specified at the time of - the construction of an SBMLDocument instance. - - Returns an integer indicating the most recent SBML specification - Version - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLDocument), and the other will be a standalone - top-level function with the name SBMLDocument_getDefaultVersion(). - They are functionally identical. @~ - - @see SBMLDocument.getDefaultLevel() @~ -"; - - -%feature("docstring") SBMLDocument::SBMLDocument " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLDocument(SBMLNamespaces sbmlns) - - Creates a new SBMLDocument using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLDocument(long level = 0, long version = 0) - - Creates a new SBMLDocument, optionally with given values for the SBML - Level and Version. - - If both the SBML Level and Version attributes are not specified, the - SBML document is treated as having the latest Level and Version of - SBML as determined by SBMLDocument.getDefaultLevel() and - SBMLDocument.getDefaultVersion(); however, the SBMLDocument object - is otherwise left blank. In particular, the blank SBMLDocument - object has no associated XML attributes, including (but not limited - to) an XML namespace declaration. The XML namespace declaration is - not added until the model is written out, or the method - SBMLDocument.setLevelAndVersion() is called. This may be important - to keep in mind if an application needs to add additional XML - namespace declarations on the <sbml> element. Application writers - should either provide values for 'level' and 'version' on the call - to this constructor, or else call SBMLDocument.setLevelAndVersion() - shortly after creating the SBMLDocument object. - - Parameter 'level' is an integer for the SBML Level - - Parameter 'version' is an integer for the Version within the SBML - Level - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - See also SBMLDocument.setLevelAndVersion(), getDefaultLevel(), - getDefaultVersion(). - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLDocument(SBMLDocument orig) - - Copy constructor; creates a copy of this SBMLDocument. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") SBMLDocument::accept " - Accepts the given SBMLVisitor for this instance of SBMLDocument. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") SBMLDocument::clone " - Creates and returns a deep copy of this SBMLDocument. - - Returns a (deep) copy of this SBMLDocument. -"; - - -%feature("docstring") SBMLDocument::getModel " - Returns the Model object stored in this SBMLDocument. - - It is important to note that this method does not create a Model - instance. The model in the SBMLDocument must have been created at - some prior time, for example using SBMLDocument.createModel() or - SBMLDocument.setModel(). This method returns None if a model does - not yet exist. - - Returns the Model contained in this SBMLDocument. - - See also createModel(). -"; - - -%feature("docstring") SBMLDocument::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") SBMLDocument::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or itself if it has the given 'metaid', or None if no such object is - found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") SBMLDocument::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") SBMLDocument::expandFunctionDefinitions " - Removes FunctionDefinition constructs from the document and expands - any instances of their use within <math> elements. - - For example, suppose a Model contains a FunctionDefinition with - identifier 'f' representing the math expression: f(x, y) = x * y. - Suppose further that there is a reaction in which the <math> element - of the KineticLaw object contains f(s, p), where s and p are other - identifiers defined in the model. The outcome of invoking this - method is that the <math> of the KineticLaw now represents the - expression s * p and the model no longer contains any - FunctionDefinition objects. - - Returns bool True if the transformation was successful, False, - otherwise. - - Note: - - This function will check the consistency of a model before - attemptimg the transformation. If the model is not valid SBML, the - transformation will not be performed and the function will return - false. -"; - - -%feature("docstring") SBMLDocument::expandInitialAssignments " - Removes InitialAssignment constructs from the document and replaces - them with appropriate values. - - For example, suppose a Model contains a InitialAssignment to a symbol - 'k' where 'k' is the identifier of a Parameter. The outcome of - invoking this method is that the 'value' attribute of the Parameter - definition is set to the result calculated using the - InitialAssignment object's <math> formula, and the corresponding - InitialAssignment is then removed from the Model. - - Returns bool True if the transformation was successful, False, - otherwise. - - Note: - - This function will check the consistency of a model before - attemptimg the transformation. If the model is not valid SBML, the - transformation will not be performed and the function will return - false. As part of that process, this method will check that it has - values for any components referred to by the <math> elements of - InitialAssignment objects. In cases where not all of the values - have been declared (e.g., if the mathematical expression refers to - model entities that have no declared values), the InitialAssignment - in question will not be removed and this method will return false. -"; - - -%feature("docstring") SBMLDocument::setLevelAndVersion " - Sets the SBML Level and Version of this SBMLDocument instance, - attempting to convert the model as needed. - - This method is the principal way in libSBML to convert models between - Levels and Versions of SBML. Generally, models can be converted - upward without difficulty (e.g., from SBML Level 1 to Level 2, or - from an earlier Version of Level 2 to the latest Version of Level - 2). Sometimes models can be translated downward as well, if they do - not use constructs specific to more advanced Levels of SBML. - - Before calling this method, callers may check compatibility directly - using the methods SBMLDocument.checkL1Compatibility(), - SBMLDocument.checkL2v1Compatibility(), - SBMLDocument.checkL2v2Compatibility(), - SBMLDocument.checkL2v3Compatibility(), - SBMLDocument.checkL2v4Compatibility(), and - SBMLDocument.checkL3v1Compatibility(). - - The valid combinations of SBML Level and Version as of this release - of libSBML are the following: - - * Level 1 Version 2 - - * Level 2 Version 1 - - * Level 2 Version 2 - - * Level 2 Version 3 - - * Level 2 Version 4 - - * Level 3 Version 1 - - Strict conversion applies the additional criteria that both the - source and the target model must be consistent SBML. Users can - control the consistency checks that are applied using the - SBMLDocument.setConsistencyChecksForConversion() method. If either - the source or the potential target model have validation errors, the - conversion is not performed. When a strict conversion is successful, - the underlying SBML object model is altered to reflect the new level - and version. Thus, information that cannot be converted (e.g. - sboTerms) will be lost. - - Parameter 'level' is the desired SBML Level - - Parameter 'version' is the desired Version within the SBML Level - - Parameter 'strict' is boolean indicating whether to check consistency - of both the source and target model when performing conversion - (defaults to true ) - - Returns True if the level and version of the document were - successfully set to the requested values (which may have required - conversion of the model), False otherwise. - - Note: - - Calling this method will not necessarily lead to a successful - conversion. If the conversion fails, it will be logged in the error - list associated with this SBMLDocument. Callers should consult - getNumErrors() to find out if the conversion succeeded without - problems. For conversions from Level 2 to Level 1, callers can also - check the Level of the model after calling this method to find out - whether it is Level 1. (If the conversion to Level 1 failed, the - Level of this model will be left unchanged.) - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - See also checkL1Compatibility(), checkL2v1Compatibility(), - checkL2v2Compatibility(), checkL2v3Compatibility(), - checkL2v4Compatibility(), checkL3v1Compatibility(), - checkL3v1Compatibility(). -"; - - -%feature("docstring") SBMLDocument::updateSBMLNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::setModel " - Sets the Model for this SBMLDocument to a copy of the given Model. - - Parameter 'm' is the new Model to use. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - See also createModel(), getModel(). -"; - - -%feature("docstring") SBMLDocument::createModel " - Creates a new Model inside this SBMLDocument, and returns a pointer - to it. - - In SBML Level 2, the use of an identifier on a Model object is - optional. This method takes an optional argument, 'sid', for setting - the identifier. If not supplied, the identifier attribute on the - Model instance is not set. - - Parameter 'sid' is the identifier of the new Model to create. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - See also getModel(), SBMLDocument.setModel(). -"; - - -%feature("docstring") SBMLDocument::setLocationURI " - Sets the location of this SBMLDocument. Called automatically when - readSBMLFromFile is used, but may be set manually as well. -"; - - -%feature("docstring") SBMLDocument::getLocationURI " - Get the location of this SBMLDocument. If this document was read - from a file or had its location set manually, that filename or set - location will be returned, otherwise, an empty string is returned. -"; - - -%feature("docstring") SBMLDocument::setConsistencyChecks " - Controls the consistency checks that are performed when - SBMLDocument.checkConsistency() is called. - - This method works by adding or subtracting consistency checks from - the set of all possible checks that SBMLDocument.checkConsistency() - knows how to perform. This method may need to be called multiple - times in order to achieve the desired combination of checks. The - first argument ('category') in a call to this method indicates the - category of consistency/error checks that are to be turned on or - off, and the second argument ('apply', a boolean) indicates whether - to turn it on (value of True) or off (value of False). - - The possible categories (values to the argument 'category') are the - set of constants whose names begin with the characters LIBSBML_CAT_ - in the interface class libsbml. The following are the possible - choices: @~ - - * libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and - consistency of specific SBML language constructs. Performing this - set of checks is highly recommended. With respect to the SBML - specification, these concern failures in applying the validation - rules numbered 2xxxx in the Level 2 Versions 2-4 and Level 3 Version - 1 specifications. - - * libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and - consistency of identifiers used for model entities. An example of - inconsistency would be using a species identifier in a reaction rate - formula without first having declared the species. With respect to - the SBML specification, these concern failures in applying the - validation rules numbered 103xx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement - units associated with quantities in a model. With respect to the - SBML specification, these concern failures in applying the - validation rules numbered 105xx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML - constructs. With respect to the SBML specification, these concern - failures in applying the validation rules numbered 102xx in the - Level 2 Versions 2-4 and Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of - SBO identifiers (if any) used in the model. With respect to the - SBML specification, these concern failures in applying the - validation rules numbered 107xx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of - whether the system of equations implied by a model is mathematically - overdetermined. With respect to the SBML specification, this is - validation rule #10601 in the Level 2 Versions 2-4 and Level 3 - Version 1 specifications. - - * libsbml.LIBSBML_CAT_MODELING_PRACTICE: Additional checks for - recommended good modeling practice. (These are tests performed by - libSBML and do not have equivalent SBML validation rules.) - - By default, all validation checks are applied to the model in an - SBMLDocument object unless SBMLDocument.setConsistencyChecks() is - called to indicate that only a subset should be applied. Further, - this default (i.e., performing all checks) applies separately to - each new SBMLDocument object created. In other words, each time a - model is read using SBMLReader.readSBML(), - SBMLReader.readSBMLFromString(), or the global functions readSBML() - and readSBMLFromString(), a new SBMLDocument is created and for that - document, a call to SBMLDocument.checkConsistency() will default to - applying all possible checks. Calling programs must invoke - SBMLDocument.setConsistencyChecks() for each such new model if they - wish to change the consistency checks applied. - - Parameter 'category' is a value drawn from the set of SBML error - categories@~ indicating the consistency checking/validation to be - turned on or off. - - Parameter 'apply' is a boolean indicating whether the checks - indicated by 'category' should be applied or not. - - See also SBMLDocument.checkConsistency(). -"; - - -%feature("docstring") SBMLDocument::setConsistencyChecksForConversion " - Controls the consistency checks that are performed when - SBMLDocument.setLevelAndVersion() is called. - - This method works by adding or subtracting consistency checks from - the set of all possible checks that may be performed to avoid - conversion to or from an invalid document. This method may need to - be called multiple times in order to achieve the desired - combination of checks. The first argument ('category') in a call to - this method indicates the category of consistency/error checks that - are to be turned on or off, and the second argument ('apply', a - boolean) indicates whether to turn it on (value of True) or off - (value of False). - - The possible categories (values to the argument 'category') are the - set of constants whose names begin with the characters LIBSBML_CAT_ - in the interface class libsbml. The following are the possible - choices: @~ - - * libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and - consistency of specific SBML language constructs. Performing this - set of checks is highly recommended. With respect to the SBML - specification, these concern failures in applying the validation - rules numbered 2xxxx in the Level 2 Versions 2-4 and Level 3 Version - 1 specifications. - - * libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and - consistency of identifiers used for model entities. An example of - inconsistency would be using a species identifier in a reaction rate - formula without first having declared the species. With respect to - the SBML specification, these concern failures in applying the - validation rules numbered 103xx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement - units associated with quantities in a model. With respect to the - SBML specification, these concern failures in applying the - validation rules numbered 105xx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML - constructs. With respect to the SBML specification, these concern - failures in applying the validation rules numbered 102xx in the - Level 2 Versions 2-4 and Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of - SBO identifiers (if any) used in the model. With respect to the - SBML specification, these concern failures in applying the - validation rules numbered 107xx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications. - - * libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of - whether the system of equations implied by a model is mathematically - overdetermined. With respect to the SBML specification, this is - validation rule #10601 in the Level 2 Versions 2-4 and Level 3 - Version 1 specifications. - - * libsbml.LIBSBML_CAT_MODELING_PRACTICE: Additional checks for - recommended good modeling practice. (These are tests performed by - libSBML and do not have equivalent SBML validation rules.) - - By default, all validation checks are applied to the model in an - SBMLDocument object unless SBMLDocument.setConsistencyChecks() is - called to indicate that only a subset should be applied. Further, - this default (i.e., performing all checks) applies separately to - each new SBMLDocument object created. In other words, each time a - model is read using SBMLReader.readSBML(), - SBMLReader.readSBMLFromString(), or the global functions readSBML() - and readSBMLFromString(), a new SBMLDocument is created and for that - document, a call to SBMLDocument.checkConsistency() will default to - applying all possible checks. Calling programs must invoke - SBMLDocument.setConsistencyChecks() for each such new model if they - wish to change the consistency checks applied. - - Parameter 'category' is a value drawn from the set of SBML error - categories@~ indicating the consistency checking/validation to be - turned on or off. - - Parameter 'apply' is a boolean indicating whether the checks - indicated by 'category' should be applied or not. - - See also SBMLDocument.setLevelAndVersion(). -"; - - -%feature("docstring") SBMLDocument::checkConsistency " - Performs consistency checking and validation on this SBML document. - - If this method returns a nonzero value (meaning, one or more - consistency checks have failed for SBML document), the failures may - be due to warnings or errors. Callers should inspect the severity - flag in the individual SBMLError objects returned by - SBMLDocument.getError() to determine the nature of the failures. - - Returns the number of failed checks (errors) encountered. - - See also SBMLDocument.checkInternalConsistency(). -"; - - -%feature("docstring") SBMLDocument::validateSBML " - Performs consistency checking and validation on this SBML document. - - If this method returns a nonzero value (meaning, one or more - consistency checks have failed for SBML document), the failures may - be due to warnings or errors. Callers should inspect the severity - flag in the individual SBMLError objects returned by - SBMLDocument.getError() to determine the nature of the failures. - - Note: - - unlike checkConsistency this method will write the document in - order to determine all errors for the document. This will - also clear the error log. - - Returns the number of failed checks (errors) encountered. - - See also SBMLDocument.checkConsistency(). -"; - - -%feature("docstring") SBMLDocument::checkInternalConsistency " - Performs consistency checking on libSBML's internal representation of - an SBML Model. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. - - The distinction between this method and - SBMLDocument.checkConsistency() is that this method reports on - fundamental syntactic and structural errors that violate the XML - Schema for SBML; by contrast, SBMLDocument.checkConsistency() - performs more elaborate model verifications and also validation - according to the validation rules written in the appendices of the - SBML Level 2 Versions 2-4 specification documents. - - See also SBMLDocument.checkConsistency(). -"; - - -%feature("docstring") SBMLDocument::checkL1Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 1 and can be converted to - Level 1. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v1Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 1 and can be - converted to Level 2 Version 1. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v2Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 2 and can be - converted to Level 2 Version 2. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v3Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 3 and can be - converted to Level 2 Version 3. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL2v4Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 2 Version 4 and can be - converted to Level 2 Version 4. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::checkL3v1Compatibility " - Performs a set of consistency checks on the document to establish - whether it is compatible with SBML Level 3 Version 1 and can be - converted to Level 3 Version 1. - - Callers should query the results of the consistency check by calling - SBMLDocument.getError(). - - Returns the number of failed checks (errors) encountered. -"; - - -%feature("docstring") SBMLDocument::getError " - Returns the nth error or warning encountered during parsing, - consistency checking, or attempted translation of this model. - - Callers can use method XMLError.getSeverity() on the result to assess - the severity of the problem. The possible severity levels range from - informational messages to fatal errors. - - Returns the error or warning indexed by integer 'n', or return None - if n > (getNumErrors() - 1). - - Parameter 'n' is the integer index of the error sought. - - See also SBMLDocument.getNumErrors(). -"; - - -%feature("docstring") SBMLDocument::getNumErrors " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getNumErrors(long severity) - - Returns the number of errors or warnings encountered with the given - severity during parsing, consistency checking, or attempted - translation of this model. - - Parameter 'severity' is the severity of the error sought. - - Returns the number of errors or warnings encountered - - See also SBMLDocument.getError(), SBMLDocument.getError(). -"; - - -%feature("docstring") SBMLDocument::printErrors " - Prints all the errors or warnings encountered trying to parse, - check, or translate this SBML document. - - It prints the text to the stream given by the optional parameter - 'stream'. If no parameter is given, it prints the output to the - standard error stream. - - If no errors have occurred, i.e., getNumErrors() == 0, no output - will be sent to the stream. - - The format of the output is: - - N error(s): - line NNN: (id) message - - Parameter 'stream' is the ostream or ostringstream object indicating - where the output should be printed. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - See also getNumErrors(), getErrorLog(), SBMLDocument.getError(). -"; - - -%feature("docstring") SBMLDocument::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::convert " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also SBMLDocument.getElementName(). -"; - - -%feature("docstring") SBMLDocument::getElementName " - Returns the XML element name of this object, which for SBMLDocument, - is always 'sbml'. - - Returns the name of this element, i.e., 'sbml'. -"; - - -%feature("docstring") SBMLDocument::getErrorLog " - Returns the list of errors or warnings logged during parsing, - consistency checking, or attempted translation of this model. - - Returns the SBMLErrorLog used for this SBMLDocument - - See also SBMLDocument.getNumErrors(). -"; - - -%feature("docstring") SBMLDocument::getNamespaces " - Returns a list of XML Namespaces associated with the XML content of - this SBML document. - - Returns the XML Namespaces associated with this SBML object -"; - - -%feature("docstring") SBMLDocument::enableDefaultNS " - Set/unset default namespace to each top-level element defined in the - given package extension. - - This works by adding a xmlns=\"...\" attribute. No prefix will be - written when writing elements defined in the given package extension - if True is given as second argument. - - Parameter 'package' is the name or URI of the package extension. - Parameter 'flag' is boolean value to indicate whether to write a - namespace prefix. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_PKG_UNKNOWN_VERSION -"; - - -%feature("docstring") SBMLDocument::isEnabledDefaultNS " - Returns True if a default namespace is added to each top-level - element defined in the given package extension, otherwise returns - False. - - This basically checks if the attribute xmlns=\"...\" is present. - - Parameter 'package' is the name or URI of the package extension. - - Returns a boolean -"; - - -%feature("docstring") SBMLDocument::setPackageRequired " - Sets the required attribute value of the given package extension. - - Note: - - The name of package must not be given if the package is not enabled. - - Parameter 'package' is the name or URI of the package extension. - Parameter 'flag' is Boolean value indicating whether the package is - required. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_PKG_UNKNOWN_VERSION -"; - - -%feature("docstring") SBMLDocument::getPackageRequired " - Returns the required attribute of the given package extension. - - Note: - - The name of package must not be given if the package is not enabled. - - Parameter 'package' is the name or URI of the package extension. - - Returns Boolean flag indicating whether the package is flagged as - being required. -"; - - -%feature("docstring") SBMLDocument::isSetPackageRequired " - Returns True if the required attribute of the given package extension - is defined, otherwise returns False. - - Note: - - The name of package must not be given if the package is not enabled. - - Parameter 'package' is the name or URI of the package extension. - - Returns a Boolean -"; - - -%feature("docstring") SBMLDocument::isIgnoredPackage " - Returns True if the given package extension is one of an ignored - packages, otherwise returns False. - - An ignored package is one that is defined to be used in this SBML - document, but the package is not enabled in this copy of libSBML. - - Parameter 'pkgURI' is the URI of the package extension. - - Returns a Boolean, True if the package is being ignored and False - otherwise. -"; - - -%feature("docstring") SBMLDocument::setPkgRequired " - Sets the value of the required attribute for the given package. - - Note: - - The name of package must not be given if the package is not enabled. - - Parameter 'package' is the name or URI of the package extension. - Parameter 'flag' is a Boolean value. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_PKG_UNKNOWN_VERSION - - DEPRECATED. Replaced in libSBML 5.2.0 by setPackageRequired() -"; - - -%feature("docstring") SBMLDocument::getPkgRequired " - Returns the required attribute of the given package extension. - - Note: - - The name of package must not be given if the package is not enabled. - - Parameter 'package' is the name or URI of the package extension. - - Returns a Boolean value indicating whether the package is flagged as - being required in this SBML document. - - DEPRECATED. Replaced in libSBML 5.2.0 by getPackageRequired() -"; - - -%feature("docstring") SBMLDocument::isSetPkgRequired " - Returns True if the required attribute of the given package extension - is defined, otherwise returns False. - - Note: - - The name of package must not be given if the package is not enabled. - - Parameter 'package' is the name or URI of the package extension. - - Returns a Boolean value. - - DEPRECATED. Replaced in libSBML 5.2.0 by isSetPackageRequired() -"; - - -%feature("docstring") SBMLDocument::isIgnoredPkg " - Returns True if the given package extension is one of ignored - packages, otherwise returns False. - - An ignored package is one that is defined to be used in this SBML - document, but the package is not enabled in this copy of libSBML. - - Parameter 'pkgURI' is the URI of the package extension. - - Returns a boolean - - DEPRECATED. Replaced in libSBML 5.2.0 by isIgnoredPackage() -"; - - -%feature("docstring") SBMLDocument::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::writeElements " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::getApplicableValidators " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::getConversionValidators " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::setApplicableValidators " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::setConversionValidators " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::getNumValidators " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::clearValidators " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::addValidator " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::getValidator " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::createObject " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocument::writeXMLNS " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition " - @ingroup Core Implementation of SBML's FunctionDefinition construct. - - The FunctionDefinition structure associates an identifier with a - function definition. This identifier can then be used as the - function called in subsequent MathML content elsewhere in an SBML - model. - - FunctionDefinition has one required attribute, 'id', to give the - function a unique identifier by which other parts of an SBML model - definition can refer to it. A FunctionDefinition instance can also - have an optional 'name' attribute of type string. Identifiers and - names must be used according to the guidelines described in the SBML - specification (e.g., Section 3.3 in the Level 2 Version 4 - specification). - - FunctionDefinition has a required 'math' subelement containing a - MathML expression defining the function body. The content of this - element can only be a MathML 'lambda' element. The 'lambda' element - must begin with zero or more 'bvar' elements, followed by any other - of the elements in the MathML subset allowed in SBML Level 2 except - 'lambda' (i.e., a 'lambda' element cannot contain another 'lambda' - element). This is the only place in SBML where a 'lambda' element - can be used. The function defined by a FunctionDefinition is only - available for use in other MathML elements that follow the - FunctionDefinition definition in the model. (These restrictions - prevent recursive and mutually-recursive functions from being - expressed.) - - A further restriction on the content of 'math' is that it cannot - contain references to variables other than the variables declared to - the 'lambda' itself. That is, the contents of MathML 'ci' elements - inside the body of the 'lambda' can only be the variables declared - by its 'bvar' elements, or the identifiers of other - FunctionDefinition instances in the model. This means must be - written so that all variables or parameters used in the MathML - content are passed to them via their function parameters. In SBML - Level 2, this restriction applies also to the MathML csymbol - elements for time and delay; in SBML Level 3, it additionally applies - to the csymbol element for avogadro. - - Note: - - Function definitions (also informally known as user-defined - functions) were introduced in SBML Level 2. They have purposefully - limited capabilities. A function cannot reference parameters or - other model quantities outside of itself; values must be passed as - parameters to the function. Moreover, recursive and mutually- - recursive functions are not permitted. The purpose of these - limitations is to balance power against complexity of - implementation. With the restrictions as they are, function - definitions could be implemented as textual substitutions -- they - are simply macros. Software implementations therefore do not need - the full function-definition machinery typically associated with - programming languages. - - Another important point to note is FunctionDefinition does not - have a separate attribute for defining the units of the value - returned by the function. The units associated with the function's - return value, when the function is called from within MathML - expressions elsewhere in SBML, are simply the overall units of the - expression in FunctionDefinition's 'math' subelement when applied to - the arguments supplied in the call to the function. Ascertaining - these units requires performing dimensional analysis on the - expression. (Readers may wonder why there is no attribute. The - reason is that having a separate attribute for declaring the units - would not only be redundant, but also lead to the potential for - having conflicting information. In the case of a conflict between - the declared units and those of the value actually returned by the - function, the only logical resolution rule would be to assume that - the correct units are those of the expression anyway.) -"; - - -%feature("docstring") ListOfFunctionDefinitions " - @ingroup Core Implementation of SBML's ListOfFunctionDefinitions - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") FunctionDefinition::FunctionDefinition " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - FunctionDefinition(SBMLNamespaces sbmlns) - - Creates a new FunctionDefinition using the given SBMLNamespaces - object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a FunctionDefinition object to an SBMLDocument - (e.g., using Model.addFunctionDefinition()), the SBML XML namespace - of the document overrides the value used when creating the - FunctionDefinition object via this constructor. This is necessary - to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a FunctionDefinition is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - FunctionDefinition(long level, long version) - - Creates a new FunctionDefinition using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - FunctionDefinition - - Parameter 'version' is a long integer, the SBML Version to assign to - this FunctionDefinition - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a FunctionDefinition object to an SBMLDocument - (e.g., using Model.addFunctionDefinition()), the SBML Level, SBML - Version and XML namespace of the document override the values used - when creating the FunctionDefinition object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a FunctionDefinition is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value - to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - FunctionDefinition(FunctionDefinition orig) - - Copy constructor; creates a copy of this FunctionDefinition. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") FunctionDefinition::accept " - Accepts the given SBMLVisitor for this instance of - FunctionDefinition. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next FunctionDefinition in the list - of function definitions. -"; - - -%feature("docstring") FunctionDefinition::clone " - Creates and returns a deep copy of this FunctionDefinition. - - Returns a (deep) copy of this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getId " - Returns the value of the 'id' attribute of this FunctionDefinition. - - Returns the id of this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getName " - Returns the value of the 'name' attribute of this FunctionDefinition. - - Returns the name of this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getMath " - Get the mathematical formula of this FunctionDefinition. - - Returns an ASTNode, the value of the 'math' subelement of this - FunctionDefinition -"; - - -%feature("docstring") FunctionDefinition::isSetId " - Predicate returning True if this FunctionDefinition's 'id' attribute - is set. - - Returns True if the 'id' attribute of this FunctionDefinition is - set, False otherwise. -"; - - -%feature("docstring") FunctionDefinition::isSetName " - Predicate returning True if this FunctionDefinition's 'name' - attribute is set. - - Returns True if the 'name' attribute of this FunctionDefinition is - set, False otherwise. -"; - - -%feature("docstring") FunctionDefinition::isSetMath " - Predicate returning True if this FunctionDefinition's 'math' - subelement contains a value. - - Returns True if the 'math' for this FunctionDefinition is set, False - otherwise. -"; - - -%feature("docstring") FunctionDefinition::setId " - Sets the value of the 'id' attribute of this FunctionDefinition. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - FunctionDefinition - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") FunctionDefinition::setName " - Sets the value of the 'name' attribute of this FunctionDefinition. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the FunctionDefinition - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") FunctionDefinition::setMath " - Sets the 'math' subelement of this FunctionDefinition to the Abstract - Syntax Tree given in 'math'. - - Parameter 'math' is an AST containing the mathematical expression to - be used as the formula for this FunctionDefinition. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") FunctionDefinition::unsetName " - Unsets the value of the 'name' attribute of this FunctionDefinition. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") FunctionDefinition::getArgument " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getArgument(long n) - - Get the nth argument to this function. - - Callers should first find out the number of arguments to the function - by calling getNumArguments(). - - Parameter 'n' is an integer index for the argument sought. - - Returns the nth argument (bound variable) passed to this - FunctionDefinition. - - See also getNumArguments(). - - ______________________________________________________________________ - Method variant with the following signature: - - getArgument(string name) - - Get the argument named 'name' to this FunctionDefinition. - - Parameter 'name' is the exact name (case-sensitive) of the sought- - after argument - - Returns the argument (bound variable) having the given name, or None - if no such argument exists. -"; - - -%feature("docstring") FunctionDefinition::getBody " - Get the mathematical expression that is the body of this - FunctionDefinition object. - - Returns the body of this FunctionDefinition as an Abstract Syntax - Tree, or None if no body is defined. -"; - - -%feature("docstring") FunctionDefinition::isSetBody " - Predicate returning True if the body of this FunctionDefinition has - set. - - Returns True if the body of this FunctionDefinition is set, False - otherwise. -"; - - -%feature("docstring") FunctionDefinition::getNumArguments " - Get the number of arguments (bound variables) taken by this - FunctionDefinition. - - Returns the number of arguments (bound variables) that must be passed - to this FunctionDefinition. -"; - - -%feature("docstring") FunctionDefinition::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") FunctionDefinition::getElementName " - Returns the XML element name of this object, which for - FunctionDefinition, is always 'functionDefinition'. - - Returns the name of this element, i.e., 'functionDefinition'. -"; - - -%feature("docstring") FunctionDefinition::writeElements " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - FunctionDefinition object have been set. - - Note: - - The required attributes for a FunctionDefinition object are: - - * 'id' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") FunctionDefinition::hasRequiredElements " - Predicate returning True if all the required elements for this - FunctionDefinition object have been set. - - Note: - - The required elements for a FunctionDefinition object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") FunctionDefinition::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") FunctionDefinition::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") FunctionDefinition::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfFunctionDefinitions::ListOfFunctionDefinitions " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfFunctionDefinitions(SBMLNamespaces sbmlns) - - Creates a new ListOfFunctionDefinitions object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfFunctionDefinitions - object to be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfFunctionDefinitions(long level, long version) - - Creates a new ListOfFunctionDefinitions object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfFunctionDefinitions::clone " - Creates and returns a deep copy of this ListOfFunctionDefinitions - instance. - - Returns a (deep) copy of this ListOfFunctionDefinitions. -"; - - -%feature("docstring") ListOfFunctionDefinitions::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfFunctionDefinitions::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., FunctionDefinition objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfFunctionDefinitions::getElementName " - Returns the XML element name of this object. - - For ListOfFunctionDefinitions, the XML element name is - 'listOfFunctionDefinitions'. - - Returns the name of this element, i.e., 'listOfFunctionDefinitions'. -"; - - -%feature("docstring") ListOfFunctionDefinitions::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a FunctionDefinition from the ListOfFunctionDefinitions. - - Parameter 'n' is the index number of the FunctionDefinition to get. - - Returns the nth FunctionDefinition in this ListOfFunctionDefinitions. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfFunctionDefinitions::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfFunctionDefinitions items and - returns a pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfFunctionDefinitions items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfFunctionDefinitions::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfFunctionDefinitions::createObject " - Internal implementation method. -"; - - -%feature("docstring") UnitKind_equals " - Tests for logical equality between two given UNIT_KIND_ code values. - - This function behaves exactly like C's == operator, except for the - following two cases: - - * libsbml.UNIT_KIND_LITER == libsbml.UNIT_KIND_LITRE - - * libsbml.UNIT_KIND_METER == libsbml.UNIT_KIND_METRE - - In the two cases above, C equality comparison would yield False - (because each of the above is a distinct enumeration value), but - this function returns True. - - Parameter 'uk1' is a UNIT_KIND_ value Parameter 'uk2' is a second - UNIT_KIND_ value to compare to 'uk1' - - Returns nonzero (for True) if 'uk1' is logically equivalent to 'uk2', - zero (for False) otherwise. - - Note: - - For more information about the libSBML unit codes, please refer to - the class documentation for Unit. -"; - - -%feature("docstring") UnitKind_forName " - Converts a text string naming a kind of unit to its corresponding - libSBML UNIT_KIND_ constant/enumeration value. - - Parameter 'name' is a string, the name of a predefined base unit in - SBML - - Returns a value the set of UNIT_KIND_ codes defined in class - libsbml, corresponding to the string 'name' (determined in a case- - insensitive manner).@~ - - Note: - - For more information about the libSBML unit codes, please refer to - the class documentation for Unit. -"; - - -%feature("docstring") UnitKind_toString " - Converts a unit code to a text string equivalent. - - Parameter 'uk' is a value from the set of UNIT_KIND_ codes defined - in the class libsbml @~ - - Returns the name corresponding to the given unit code. - - Note: - - For more information about the libSBML unit codes, please refer to - the class documentation for Unit. - - WARNING: - - The string returned is a static data value. The caller does not own - the returned string and is therefore not allowed to modify it. -"; - - -%feature("docstring") UnitKind_isValidUnitKindString " - Predicate for testing whether a given string corresponds to a - predefined libSBML unit code. - - Parameter 'str' is a text string naming a base unit defined by SBML - Parameter 'level' is the Level of SBML Parameter 'version' is the - Version within the Level of SBML - - Returns nonzero (for True) if string is the name of a valid - UNIT_KIND_ value, zero (for False) otherwise. - - Note: - - For more information about the libSBML unit codes, please refer to - the class documentation for Unit. -"; - - -%feature("docstring") Unit " - @ingroup Core Implementation of SBML's Unit construct. - - The SBML unit definition facility uses two classes of objects, - UnitDefinition and Unit. The approach to defining units in SBML is - compositional; for example, meter second^-2 is constructed by - combining a Unit object representing meter with another Unit object - representing second^-2. The combination is wrapped inside a - UnitDefinition, which provides for assigning an identifier and - optional name to the combination. The identifier can then be - referenced from elsewhere in a model. Thus, the UnitDefinition - class is the container, and Unit instances are placed inside - UnitDefinition instances. - - A Unit structure has four attributes named 'kind', 'exponent', - 'scale' and 'multiplier'. It represents a (possibly transformed) - reference to a base unit. The attribute 'kind' on Unit indicates - the chosen base unit. Its value must be one of the text strings - listed below; this list corresponds to SBML Level 3 Version 1 Core: - - amperefaradjouleluxradianvolt avogadrogramkatalmetresecondwatt - becquerelgraykelvinmolesiemensweber - candelahenrykilogramnewtonsievert coulombhertzlitreohmsteradian - dimensionlessitemlumenpascaltesla - - A few small differences exist between the Level 3 list of base units - and the list defined in other Level/Version combinations of SBML. - Specifically, Levels of SBML before Level 3 do not define avogadro; - conversely, Level 2 Version 1 defines Celsius, and Level 1 defines - celsius, meter, and liter, none of which are available in Level 3. - In libSBML, each of the predefined base unit names is represented by - an enumeration value whose name begins with the characters - UNIT_KIND_, discussed in a separate section below. - - The attribute named 'exponent' on Unit represents an exponent on the - unit. In SBML Level 2, the attribute is optional and has a default - value of 1 (one); in SBML Level 3, the attribute is mandatory and - there is no default value. A Unit structure also has an attribute - called 'scale'; its value must be an integer exponent for a power-of- - ten multiplier used to set the scale of the unit. For example, a - unit having a 'kind' value of gram and a 'scale' value of -3 - signifies 10^-3 * gram, or milligrams. In SBML Level 2, the - attribute is optional and has a default value of 0 (zero), because - 10^0 = 1; in SBML Level 3, the attribute is mandatory and has no - default value. Lastly, the attribute named 'multiplier' can be used - to multiply the unit by a real-numbered factor; this enables the - definition of units that are not power-of-ten multiples of SI units. - For instance, a multiplier of 0.3048 could be used to define foot as - a measure of length in terms of a metre. The 'multiplier' attribute - is optional in SBML Level 2, where it has a default value of 1 - (one); in SBML Level 3, the attribute is mandatory and has not - default value. - - <h3>Unit identification codes</h3> @~ - - As discussed above, SBML defines a set of base units which serves as - the starting point for new unit definitions. This set of base units - consists of the SI units and a small number of additional convenience - units. - - In SBML Level 2 Versions before Version 3, there existed an - enumeration of units called UnitKind. In Version 3, this enumeration - was removed and the identifier class UnitSId redefined to include - the previous UnitKind values as reserved symbols. This change has no - net effect on permissible models, their representation or their - syntax. The purpose of the change in the SBML specification was - simply to clean up an inconsistency about the contexts in which - these values were usable. However, libSBML maintains UnitKind in the - form of of a set of static integer constants whose names begin with - the characters UNIT_KIND_. These constants are defined in the class - libsbml. @~ - - As a consequence of the fact that libSBML supports models in all - Levels and Versions of SBML, libSBML's set of UNIT_KIND_ values is a - union of all the possible base unit names defined in the different - SBML specifications. However, not every base unit is allowed in - every Level+Version combination of SBML. Note in particular the - following exceptions: - - * The alternate spelling 'meter' is included in addition to the - official SI spelling 'metre'. This spelling is only permitted in - SBML Level 1 models. - - * The alternate spelling 'liter' is included in addition to the - official SI spelling 'litre'. This spelling is only permitted in - SBML Level 1 models. - - * The unit 'Celsius' is included because of its presence in - specifications of SBML prior to SBML Level 2 Version 3. - - * The unit avogadro was introduced in SBML Level 3, and is only - permitted for use in SBML Level 3 models. - - The table below lists the unit constants defined in libSBML, and - their meanings. @~ - - Enumerator Meaning - --------- --------- - UNIT_KIND_AMPERE The ampere unit. - UNIT_KIND_AVOGADRO 'dimensionless' multiplied by the value of Avogadro's constant. - UNIT_KIND_BECQUEREL The becquerel unit. - UNIT_KIND_CANDELA The candela unit. - UNIT_KIND_CELSIUS The Celsius unit. - UNIT_KIND_COULOMB The coulomb unit. - UNIT_KIND_DIMENSIONLESS A pseudo-unit indicating a dimensionless quantity. - UNIT_KIND_FARAD The farad unit. - UNIT_KIND_GRAM The gram unit. - UNIT_KIND_GRAY The gray unit. - UNIT_KIND_HENRY The henry unit. - UNIT_KIND_HERTZ The hertz unit. - UNIT_KIND_ITEM A pseudo-unit representing a single \"thing\". - UNIT_KIND_JOULE The joule unit. - UNIT_KIND_KATAL The katal unit. - UNIT_KIND_KELVIN The kelvin unit. - UNIT_KIND_KILOGRAM The kilogram unit. - UNIT_KIND_LITER Alternate spelling of litre. - UNIT_KIND_LITRE The litre unit. - UNIT_KIND_LUMEN The lumen unit. - UNIT_KIND_LUX The lux unit. - UNIT_KIND_METER Alternate spelling of metre. - UNIT_KIND_METRE The metre unit. - UNIT_KIND_MOLE The mole unit. - UNIT_KIND_NEWTON The newton unit. - UNIT_KIND_OHM The ohm unit. - UNIT_KIND_PASCAL The pascal unit. - UNIT_KIND_RADIAN The radian unit. - UNIT_KIND_SECOND The second unit. - UNIT_KIND_SIEMENS The siemens unit. - UNIT_KIND_SIEVERT The sievert unit. - UNIT_KIND_STERADIAN The steradian unit. - UNIT_KIND_TESLA The tesla unit. - UNIT_KIND_VOLT The volt unit. - UNIT_KIND_WATT The watt unit. - UNIT_KIND_WEBER The weber unit. - UNIT_KIND_INVALID Marker used by libSBML to indicate an invalid or unset unit. -"; - - -%feature("docstring") ListOfUnits " - @ingroup Core Implementation of SBML's ListOfUnits construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - ListOfUnits is entirely contained within UnitDefinition. -"; - - -%feature("docstring") Unit::Unit " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Unit(SBMLNamespaces sbmlns) - - Creates a new Unit using the given SBMLNamespaces object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Unit object to an SBMLDocument, the SBML XML - namespace of the document overrides the value used when creating the - Unit object via this constructor. This is necessary to ensure that - an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Unit is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Unit(long level, long version) - - Creates a new Unit using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Unit - - Parameter 'version' is a long integer, the SBML Version to assign to - this Unit - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Unit object to an SBMLDocument, the SBML - Level, SBML Version and XML namespace of the document override the - values used when creating the Unit object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a Unit is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Unit(Unit orig) - - Copy constructor; creates a copy of this Unit. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Unit::accept " - Accepts the given SBMLVisitor for this instance of Unit. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next Unit in the list of units - within which this Unit is embedded (i.e., in the ListOfUnits located - in the enclosing UnitDefinition instance). -"; - - -%feature("docstring") Unit::clone " - Creates and returns a deep copy of this Unit. - - Returns a (deep) copy of this Unit. -"; - - -%feature("docstring") Unit::initDefaults " - Initializes the fields of this Unit object to 'typical' default - values. - - The SBML Unit component has slightly different aspects and default - attribute values in different SBML Levels and Versions. This method - sets the values to certain common defaults, based mostly on what they - are in SBML Level 2. Specifically: - - * Sets attribute 'exponent' to 1 - - * Sets attribute 'scale' to 0 - - * Sets attribute 'multiplier' to 1.0 - - The 'kind' attribute is left unchanged. -"; - - -%feature("docstring") Unit::getKind " - Returns the 'kind' of Unit this is. - - Returns the value of the 'kind' attribute of this Unit as a value - from the set of constants whose names begin with UNIT_KIND_ defined - in the class libsbml. @~ -"; - - -%feature("docstring") Unit::getExponent " - Returns the value of the 'exponent' attribute of this unit. - - Returns the 'exponent' value of this Unit, as an integer. -"; - - -%feature("docstring") Unit::getExponentAsDouble " - Returns the value of the 'exponent' attribute of this unit. - - Returns the 'exponent' value of this Unit, as a double. -"; - - -%feature("docstring") Unit::getScale " - Returns the value of the 'scale' attribute of this unit. - - Returns the 'scale' value of this Unit, as an integer. -"; - - -%feature("docstring") Unit::getMultiplier " - Returns the value of the 'multiplier' attribute of this Unit. - - Returns the 'multiplier' value of this Unit, as a double. -"; - - -%feature("docstring") Unit::getOffset " - Returns the value of the 'offset' attribute of this Unit. - - WARNING: - - The 'offset' attribute is only available in SBML Level 2 Version 1. - This attribute is not present in SBML Level 2 Version 2 or above. - When producing SBML models using these later specifications, - modelers and software tools need to account for units with offsets - explicitly. The SBML specification document offers a number of - suggestions for how to achieve this. LibSBML methods such as this - one related to 'offset' are retained for compatibility with earlier - versions of SBML Level 2, but their use is strongly discouraged. - - Returns the 'offset' value of this Unit, as a double. -"; - - -%feature("docstring") Unit::isAmpere " - Predicate for testing whether this Unit is of the kind ampere. - - Returns True if the kind of this Unit is ampere, False otherwise. -"; - - -%feature("docstring") Unit::isAvogadro " - Predicate for testing whether this Unit is of the kind avogadro. - - Returns True if the kind of this Unit is avogadro, False otherwise. - - Note: - - The unit avogadro was introduced in SBML Level 3, and is only - permitted for use in SBML Level 3 models. -"; - - -%feature("docstring") Unit::isBecquerel " - Predicate for testing whether this Unit is of the kind becquerel - - Returns True if the kind of this Unit is becquerel, False otherwise. -"; - - -%feature("docstring") Unit::isCandela " - Predicate for testing whether this Unit is of the kind candela - - Returns True if the kind of this Unit is candela, False otherwise. -"; - - -%feature("docstring") Unit::isCelsius " - Predicate for testing whether this Unit is of the kind Celsius - - Returns True if the kind of this Unit is Celsius, False otherwise. - - WARNING: - - The predefined unit Celsius was removed from the list of predefined - units in SBML Level 2 Version 2 at the same time that the 'offset' - attribute was removed from Unit definitions. LibSBML methods such as - this one related to Celsius are retained in order to support SBML - Level 2 Version 1, but their use is strongly discouraged. -"; - - -%feature("docstring") Unit::isCoulomb " - Predicate for testing whether this Unit is of the kind coulomb - - Returns True if the kind of this Unit is coulomb, False otherwise. -"; - - -%feature("docstring") Unit::isDimensionless " - Predicate for testing whether this Unit is of the kind dimensionless. - - Returns True if the kind of this Unit is dimensionless, False - - otherwise. -"; - - -%feature("docstring") Unit::isFarad " - Predicate for testing whether this Unit is of the kind farad - - Returns True if the kind of this Unit is farad, False otherwise. -"; - - -%feature("docstring") Unit::isGram " - Predicate for testing whether this Unit is of the kind gram - - Returns True if the kind of this Unit is gram, False otherwise. -"; - - -%feature("docstring") Unit::isGray " - Predicate for testing whether this Unit is of the kind gray - - Returns True if the kind of this Unit is gray, False otherwise. -"; - - -%feature("docstring") Unit::isHenry " - Predicate for testing whether this Unit is of the kind henry - - Returns True if the kind of this Unit is henry, False otherwise. -"; - - -%feature("docstring") Unit::isHertz " - Predicate for testing whether this Unit is of the kind hertz - - Returns True if the kind of this Unit is hertz, False otherwise. -"; - - -%feature("docstring") Unit::isItem " - Predicate for testing whether this Unit is of the kind item - - Returns True if the kind of this Unit is item, False otherwise. -"; - - -%feature("docstring") Unit::isJoule " - Predicate for testing whether this Unit is of the kind joule - - Returns True if the kind of this Unit is joule, False otherwise. -"; - - -%feature("docstring") Unit::isKatal " - Predicate for testing whether this Unit is of the kind katal - - Returns True if the kind of this Unit is katal, False otherwise. -"; - - -%feature("docstring") Unit::isKelvin " - Predicate for testing whether this Unit is of the kind kelvin - - Returns True if the kind of this Unit is kelvin, False otherwise. -"; - - -%feature("docstring") Unit::isKilogram " - Predicate for testing whether this Unit is of the kind kilogram - - Returns True if the kind of this Unit is kilogram, False otherwise. -"; - - -%feature("docstring") Unit::isLitre " - Predicate for testing whether this Unit is of the kind litre - - Returns True if the kind of this Unit is litre or 'liter', false - otherwise. -"; - - -%feature("docstring") Unit::isLumen " - Predicate for testing whether this Unit is of the kind lumen - - Returns True if the kind of this Unit is lumen, False otherwise. -"; - - -%feature("docstring") Unit::isLux " - Predicate for testing whether this Unit is of the kind lux - - Returns True if the kind of this Unit is lux, False otherwise. -"; - - -%feature("docstring") Unit::isMetre " - Predicate for testing whether this Unit is of the kind metre - - Returns True if the kind of this Unit is metre or 'meter', false - otherwise. -"; - - -%feature("docstring") Unit::isMole " - Predicate for testing whether this Unit is of the kind mole - - Returns True if the kind of this Unit is mole, False otherwise. -"; - - -%feature("docstring") Unit::isNewton " - Predicate for testing whether this Unit is of the kind newton - - Returns True if the kind of this Unit is newton, False otherwise. -"; - - -%feature("docstring") Unit::isOhm " - Predicate for testing whether this Unit is of the kind ohm - - Returns True if the kind of this Unit is ohm, False otherwise. -"; - - -%feature("docstring") Unit::isPascal " - Predicate for testing whether this Unit is of the kind pascal - - Returns True if the kind of this Unit is pascal, False otherwise. -"; - - -%feature("docstring") Unit::isRadian " - Predicate for testing whether this Unit is of the kind radian - - Returns True if the kind of this Unit is radian, False otherwise. -"; - - -%feature("docstring") Unit::isSecond " - Predicate for testing whether this Unit is of the kind second - - Returns True if the kind of this Unit is second, False otherwise. -"; - - -%feature("docstring") Unit::isSiemens " - Predicate for testing whether this Unit is of the kind siemens - - Returns True if the kind of this Unit is siemens, False otherwise. -"; - - -%feature("docstring") Unit::isSievert " - Predicate for testing whether this Unit is of the kind sievert - - Returns True if the kind of this Unit is sievert, False otherwise. -"; - - -%feature("docstring") Unit::isSteradian " - Predicate for testing whether this Unit is of the kind steradian - - Returns True if the kind of this Unit is steradian, False otherwise. -"; - - -%feature("docstring") Unit::isTesla " - Predicate for testing whether this Unit is of the kind tesla - - Returns True if the kind of this Unit is tesla, False otherwise. -"; - - -%feature("docstring") Unit::isVolt " - Predicate for testing whether this Unit is of the kind volt - - Returns True if the kind of this Unit is volt, False otherwise. -"; - - -%feature("docstring") Unit::isWatt " - Predicate for testing whether this Unit is of the kind watt - - Returns True if the kind of this Unit is watt, False otherwise. -"; - - -%feature("docstring") Unit::isWeber " - Predicate for testing whether this Unit is of the kind weber - - Returns True if the kind of this Unit is weber, False otherwise. -"; - - -%feature("docstring") Unit::isSetKind " - Predicate to test whether the 'kind' attribute of this Unit is set. - - Returns True if the 'kind' attribute of this Unit is set, false - otherwise. -"; - - -%feature("docstring") Unit::isSetExponent " - Predicate to test whether the 'exponent' attribute of this Unit is - set. - - Returns True if the 'exponent' attribute of this Unit is set, False - otherwise. -"; - - -%feature("docstring") Unit::isSetScale " - Predicate to test whether the 'scale' attribute of this Unit is - set. - - Returns True if the 'scale' attribute of this Unit is set, False - otherwise. -"; - - -%feature("docstring") Unit::isSetMultiplier " - Predicate to test whether the 'multiplier' attribute of this Unit - is set. - - Returns True if the 'multiplier' attribute of this Unit is set, - False otherwise. -"; - - -%feature("docstring") Unit::setKind " - Sets the 'kind' attribute value of this Unit. - - Parameter 'kind' is a unit identifier chosen from the set of - constants whose names begin with UNIT_KIND_ in libsbml. @~ - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Unit::setExponent " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setExponent(int value) - - Sets the 'exponent' attribute value of this Unit. - - Parameter 'value' is the integer to which the attribute 'exponent' - should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - ______________________________________________________________________ - Method variant with the following signature: - - setExponent(double value) - - Sets the 'exponent' attribute value of this Unit. - - Parameter 'value' is the double to which the attribute 'exponent' - should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") Unit::setScale " - Sets the 'scale' attribute value of this Unit. - - Parameter 'value' is the integer to which the attribute 'scale' - should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") Unit::setMultiplier " - Sets the 'multipler' attribute value of this Unit. - - Parameter 'value' is the floating-point value to which the attribute - 'multiplier' should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Unit::setOffset " - Sets the 'offset' attribute value of this Unit. - - Parameter 'value' is the float-point value to which the attribute - 'offset' should set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - WARNING: - - The 'offset' attribute is only available in SBML Level 2 Version 1. - This attribute is not present in SBML Level 2 Version 2 or above. - When producing SBML models using these later specifications, - modelers and software tools need to account for units with offsets - explicitly. The SBML specification document offers a number of - suggestions for how to achieve this. LibSBML methods such as this - one related to 'offset' are retained for compatibility with earlier - versions of SBML Level 2, but their use is strongly discouraged. -"; - - -%feature("docstring") Unit::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Unit::getElementName " - Returns the XML element name of this object, which for Unit, is - always 'unit'. - - Returns the name of this element, i.e., 'unit'. -"; - - -%feature("docstring") Unit::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Unit::isBuiltIn " - Predicate to test whether a given string is the name of a predefined - SBML unit. - - Parameter 'name' is a string to be tested against the predefined unit - names - - Parameter 'level' is the Level of SBML for which the determination - should be made. This is necessary because there are a few small - differences in allowed units between SBML Level 1 and Level 2. - - Returns True if 'name' is one of the five SBML predefined unit - identifiers ('substance', 'volume', 'area', 'length' or 'time'), - False otherwise. - - Note: - - The predefined unit identifiers 'length' and 'area' were added in - Level 2 Version 1. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_isBuiltIn(). They are functionally - identical. @~ -"; - - -%feature("docstring") Unit::isUnitKind " - Predicate to test whether a given string is the name of a valid base - unit in SBML (such as 'gram' or 'mole'). - - This method exists because prior to SBML Level 2 Version 3, an - enumeration called UnitKind was defined by SBML. This enumeration - was removed in SBML Level 2 Version 3 and its values were folded - into the space of values of a type called UnitSId. This method - therefore has less significance in SBML Level 2 Version 3 and Level - 2 Version 4, but remains for backward compatibility and support for - reading models in older Versions of Level 2. - - Parameter 'name' is a string to be tested - - Parameter 'level' is a long integer representing the SBML - specification Level - - Parameter 'version' is a long integer representing the SBML - specification Version - - Returns True if name is a valid SBML UnitKind, False otherwise - - Note: - - The allowed unit names differ between SBML Levels 1 and 2 and again - slightly between Level 2 Versions 1 and 2. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_isUnitKind(). They are functionally - identical. @~ -"; - - -%feature("docstring") Unit::areIdentical " - Predicate returning True if two Unit objects are identical. - - Two Unit objects are considered to be identical if they match in all - attributes. (Contrast this to the method areEquivalent(), which - compares Unit objects only with respect to certain attributes.) - - Parameter 'unit1' is the first Unit object to compare Parameter - 'unit2' is the second Unit object to compare - - Returns True if all the attributes of unit1 are identical to the - attributes of unit2, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_areIdentical(). They are functionally - identical. @~ - - @see Unit.areEquivalent() @~ -"; - - -%feature("docstring") Unit::areEquivalent " - Predicate returning True if Unit objects are equivalent. - - Two Unit objects are considered to be equivalent either if (1) both - have a 'kind' attribute value of dimensionless, or (2) their 'kind', - 'exponent' and (for SBML Level 2 Version 1) 'offset' attribute - values are equal. (Contrast this to the method areIdentical(), which - compares Unit objects with respect to all attributes, not just the - 'kind' and 'exponent'.) - - Parameter 'unit1' is the first Unit object to compare Parameter - 'unit2' is the second Unit object to compare - - Returns True if the 'kind' and 'exponent' attributes of unit1 are - identical to the kind and exponent attributes of unit2, False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_areEquivalent(). They are functionally - identical. @~ - - @see Unit.areIdentical() @~ -"; - - -%feature("docstring") Unit::removeScale " - Manipulates the attributes of the Unit to express the unit with the - value of the scale attribute reduced to zero. - - For example, 1 millimetre can be expressed as a Unit with - kind='metre' multiplier='1' scale='-3' exponent='1'. It can also be - expressed as a Unit with kind='metre' multiplier='0.001' scale='0' - exponent='1'. - - Parameter 'unit' is the Unit object to manipulate. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_removeScale(). They are functionally - identical. @~ - - @see Unit.convertToSI() @~ @see Unit.merge() @~ -"; - - -%feature("docstring") Unit::merge " - Merges two Unit objects with the same 'kind' attribute value into a - single Unit. - - For example, the following, - - <unit kind=\'metre\' exponent=\'2\'/> - <unit kind=\'metre\' exponent=\'1\'/> - would be merged to become - - <unit kind=\'metre\' exponent=\'3\'/> - - Parameter 'unit1' is the first Unit object; the result of the - operation is left as a new version of this unit, modified in-place. - - Parameter 'unit2' is the second Unit object to merge with the first - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_merge(). They are functionally - identical. @~ - - @see Unit.convertToSI() @~ @see Unit.removeScale() @~ -"; - - -%feature("docstring") Unit::convertToSI " - Returns a UnitDefinition object containing the given 'unit' converted - to the appropriate SI unit. - - This method exists because some units can be expressed in terms of - others when the same physical dimension is involved. For example, - one hertz is identical to 1 sec^-1, one litre is equivalent to 1 - cubic decametre, and so on. - - Parameter 'unit' is the Unit object to convert to SI - - Returns a UnitDefinition object containing the SI unit. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., Unit), and the other will be a standalone top-level - function with the name Unit_convertToSI(). They are functionally - identical. @~ - - @see Unit.merge() @~ -"; - - -%feature("docstring") Unit::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Unit object have been set. - - Note: - - The required attributes for a Unit object are: - - * 'kind' - - * 'exponent' (required in SBML Level 3; optional in Level 2) - - * 'multiplier' (required in SBML Level 3; optional in Level 2) - - * 'scale' (required in SBML Level 3; optional in Level 2) - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Unit::setExponentUnitChecking " - Internal implementation method. -"; - - -%feature("docstring") Unit::getExponentUnitChecking " - Internal implementation method. -"; - - -%feature("docstring") Unit::isUnitChecking " - Internal implementation method. -"; - - -%feature("docstring") Unit::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Unit::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Unit::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Unit::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Unit::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Unit::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Unit::isL1UnitKind " - Internal implementation method. -"; - - -%feature("docstring") Unit::isL2V1UnitKind " - Internal implementation method. -"; - - -%feature("docstring") Unit::isL2UnitKind " - Internal implementation method. -"; - - -%feature("docstring") Unit::isL3UnitKind " - Internal implementation method. -"; - - -%feature("docstring") Unit::isExplicitlySetExponent " - Internal implementation method. -"; - - -%feature("docstring") Unit::isExplicitlySetMultiplier " - Internal implementation method. -"; - - -%feature("docstring") Unit::isExplicitlySetScale " - Internal implementation method. -"; - - -%feature("docstring") Unit::isExplicitlySetOffset " - Internal implementation method. -"; - - -%feature("docstring") ListOfUnits::ListOfUnits " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfUnits(SBMLNamespaces sbmlns) - - Creates a new ListOfUnits object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfUnits object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfUnits(long level, long version) - - Creates a new ListOfUnits object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfUnits::clone " - Creates and returns a deep copy of this ListOfUnits. - - Returns a (deep) copy of this ListOfUnits. -"; - - -%feature("docstring") ListOfUnits::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfUnits::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Unit objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfUnits::getElementName " - Returns the XML element name of this object. - - For ListOfUnits, the XML element name is 'listOfUnits'. - - Returns the name of this element, i.e., 'listOfUnits'. -"; - - -%feature("docstring") ListOfUnits::get " - Get a Unit from the ListOfUnits. - - Parameter 'n' is the index number of the Unit to get. - - Returns the nth Unit in this ListOfUnits. - - See also size(). -"; - - -%feature("docstring") ListOfUnits::remove " - Removes the nth item from this ListOfUnits items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). -"; - - -%feature("docstring") ListOfUnits::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfUnits::createObject " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition " - @ingroup Core Implementation of SBML's UnitDefinition construct. - - Units of measurement may be supplied in a number of contexts in an - SBML model. The SBML unit definition facility uses two classes of - objects, UnitDefinition and Unit. The approach to defining units in - SBML is compositional; for example, meter second^-2 is constructed - by combining a Unit object representing meter with another Unit - object representing second^-2. The combination is wrapped inside a - UnitDefinition, which provides for assigning an identifier and - optional name to the combination. The identifier can then be - referenced from elsewhere in a model. Thus, the UnitDefinition - class is the container, and Unit instances are placed inside - UnitDefinition instances. - - Two points are worth discussing in the context of SBML units. First, - unit declarations in SBML models are optional. The consequence of - this is that a model must be numerically self-consistent - independently of unit declarations, for the benefit of software - tools that cannot interpret or manipulate units. Unit declarations - in SBML are thus more akin to a type of annotation; they can - indicate intentions, and can be used by model readers for checking - the consistency of the model, labeling simulation output, etc., but - any transformations of values implied by different units must be - incorporated explicitly into a model. - - Second, the vast majority of situations that require new SBML unit - definitions involve simple multiplicative combinations of base units - and factors. An example is moles per litre per second. What - distinguishes these sorts of unit definitions from more complex ones - is that they may be expressed without the use of an additive offset - from a zero point. The use of offsets complicates all unit - definition systems, yet in the domain of SBML, the real-life cases - requiring offsets are few (and in fact, to the best of our - knowledge, only involve temperature). Consequently, the SBML unit - system has been consciously designed to simplify implementation of - unit support for the most common cases in systems biology. The cost - of this simplification is to require units with offsets to be - handled explicitly by the modeler. - - Summary of the UnitDefinition construct - ====================================================================== - - UnitDefinition has two attributes and one subelement. The two - attributes are 'id' and 'name', and the subelement is ListOfUnits. - - The required attribute 'id' and optional attribute 'name' are both - strings. The 'id' attribute is used to give the defined unit a - unique identifier by which other parts of an SBML model definition - can refer to it. The 'name' attribute is intended to be used for - giving the unit definition an optional human-readable name. Please - see the next section for information about the values permitted for - 'id'. - - A UnitDefinition must contain exactly one ListOfUnits, and this list - must contain one or more Unit definitions; see the definitions of - these other object classes for more information about them. The - following example illustrates a complete unit definition (when - written in XML) when they all the pieces are combined together. - This defines 'mmls' to be millimoles per litre per second. - - <listOfUnitDefinitions> - <unitDefinition id=\'mmls\'> - <listOfUnits> - <unit kind=\'mole\' scale=\'-3\'/> - <unit kind=\'litre\' exponent=\'-1\'/> - <unit kind=\'second\' exponent=\'-1\'/> - </listOfUnits> - </unitDefinition> - </listOfUnitDefinitions> - - Special considerations for Unit object identifiers - ====================================================================== - - The attribute 'id' in UnitDefinition cannot be given simply any - value, and the precise details of the values permitted differ - slightly between Levels of SBML: - - - * The 'id' of a UnitDefinition must not contain a value from the - list of SBML's predefined base unit names (i.e., the strings gram, - litre, etc.). In SBML Level 3, this list consists of the following: - - amperefaradjouleluxradianvolt avogadrogramkatalmetresecondwatt - becquerelgraykelvinmolesiemensweber - candelahenrykilogramnewtonsievert coulombhertzlitreohmsteradian - dimensionlessitemlumenpascaltesla - - This list of predefined base units is nearly identical in SBML Level - 2 Version 4, the exception being that Level 2 does not define - avogadro. SBML Level 2 Version 1 (and only this Level+Version - combination) provides an additional predefined unit name, Celsius, - not available in Level 3. Finally, SBML Level 1 Versions 2-3 - provide two more additional predefined unit names, meter and liter. - This is explained in somewhat greater detail in the description of - the Unit class. - - * In SBML Level 2 (all Versions), there is an additional set of - reserved identifiers: substance, volume, area, length, and time. - Using one of these values for the attribute 'id' of a UnitDefinition - has the effect of redefining the model-wide default units for the - corresponding quantities. The list of special unit names in SBML - Level 2 is given in the table below: - - Identifier Possible scalable units Default units substancemole, - item, gram, kilogram, dimensionlessmole volumelitre, cubic metre, - dimensionlesslitre areasquare metre, dimensionlesssquare metre - lengthmetre, dimensionlessmetre timesecond, dimensionlesssecond - - Also, SBML Level 2 imposes two limitations on redefining the - predefined unit substance, volume, area, length, and time: (1) The - UnitDefinition of a predefined SBML unit can only contain a single - Unit object within it. (2) The value of the 'kind' attribute in a - Unit instance must be drawn from one of the values in the second - column of the table above. - - The special unit names substance, volume, area, length, and time are - not defined by SBML Level 3, which uses a different approach to - setting model-wide inherited units. - - - Further comments about SBML's unit definition system - ====================================================================== - - The vast majority of modeling situations requiring new SBML unit - definitions involve simple multiplicative combinations of base units - and factors. An example of this might be moles per litre per - second. What distinguishes these sorts of simpler unit definitions - from more complex ones is that they may be expressed without the use - of an additive offset from a zero point. The use of offsets - complicates all unit definition systems, yet in the domain of SBML - the real-life cases requiring offsets are few (and in fact, to the - best of our knowledge, only involve temperature). Consequently, the - SBML unit system has been consciously designed in a way that - attempts to simplify implementation of unit support for the most - common cases in systems biology. - - As of SBML Level 2 Version 2, Unit no longer has the attribute - called 'offset' introduced in SBML Level 2 Version 1. It turned out - that the general case involving units with offsets was incorrectly - defined, and few (if any) developers even attempted to support - offset-based units in their software. In the development of Level 2 - Version 2, a consensus among SBML developers emerged that a fully - generalized unit scheme is so confusing and complicated that it - actually impedes interoperability. SBML Level 2 Version 2, Version 3 - and Version 4 acknowledge this reality by reducing and simplifying - the unit system, specifically by removing the 'offset' attribute on - Unit and Celsius as a pre-defined unit. - - The following guidelines suggest methods for handling units that do - require the use of zero offsets for their definitions: - - * Handling Celsius. A model in which certain quantities are - temperatures measured in degrees Celsius can be converted - straightforwardly to a model in which those temperatures are in - kelvin. A software tool could do this by performing a - straightforward substitution using the following relationship: T_ - kelvin = T_Celsius + 273.15. In every mathematical formula of the - model where a quantity (call it x) in degrees Celsius appears, - replace x with x_k+ 273.15, where x_k is now in kelvin. An - alternative approach would be to use a FunctionDefinition object - to define a function encapsulating this relationship above and - then using that in the rest of the model as needed. Since Celsius - is a commonly-used unit, software tools could help users by - providing users with the ability to express temperatures in - Celsius in the tools' interfaces, and making substitutions - automatically when writing out the SBML. - - * Other units requiring offsets. One approach to handling other - kinds of units is to use a FunctionDefinition to define a function - encapsulating the necessary mathematical relationship, then - substituting a call to this function wherever the original quantity - appeared in the model. For example, here is a possible definition - for converting Fahrenheit to Celsius degrees: - - <functionDefinition id=\'Fahrenheit_to_kelvin\'> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> - <lambda> - <bvar><ci> temp_in_fahrenheit </ci></bvar> - <apply> - <divide/> - <apply> - <plus/> - <ci> temp_in_fahrenheit </ci> - <cn> 459.67 </cn> - </apply> - <cn> 1.8 </cn> - </apply> - </lambda> - </math> - </functionDefinition> - - * An alternative approach not requiring the use of function - definitions is to use an AssignmentRule for each variable in - Fahrenheit units. The AssignmentRule could compute the conversion - from Fahrenheit to (say) kelvin, assign its value to a variable - (in Kelvin units), and then that variable could be used elsewhere - in the model. - - * Still another approach is to rewrite the mathematical formulas of - a model to directly incorporate the conversion formula wherever - the original quantity appeared. - - Please consult the SBML specifications for more information about - this and other issues involving units. -"; - - -%feature("docstring") ListOfUnitDefinitions " - @ingroup Core Implementation of SBML's ListOfUnitDefinitions - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") UnitDefinition::UnitDefinition " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - UnitDefinition(SBMLNamespaces sbmlns) - - Creates a new UnitDefinition using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a UnitDefinition object to an SBMLDocument - (e.g., using Model.addUnitDefinition()), the SBML XML namespace of - the document overrides the value used when creating the - UnitDefinition object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a UnitDefinition is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - UnitDefinition(long level, long version) - - Creates a new UnitDefinition using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - UnitDefinition - - Parameter 'version' is a long integer, the SBML Version to assign to - this UnitDefinition - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a UnitDefinition object to an SBMLDocument - (e.g., using Model.addUnitDefinition()), the SBML Level, SBML Version - and XML namespace of the document override the values used when - creating the UnitDefinition object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a UnitDefinition is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - UnitDefinition(UnitDefinition orig) - - Copy constructor; creates a copy of this UnitDefinition. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") UnitDefinition::accept " - Accepts the given SBMLVisitor for this instance of UnitDefinition. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next UnitDefinition in the list of - units within which this UnitDefinition is embedded (i.e., in the - ListOfUnitDefinitions located in the enclosing Model instance). -"; - - -%feature("docstring") UnitDefinition::clone " - Creates and returns a deep copy of this UnitDefinition. - - Returns a (deep) copy of this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find. - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") UnitDefinition::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") UnitDefinition::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") UnitDefinition::getId " - Returns the value of the 'id' attribute of this UnitDefinition. - - Returns the id of this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::getName " - Returns the value of the 'name' attribute of this UnitDefinition. - - Returns the name of this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::isSetId " - Predicate returning True if this UnitDefinition's 'id' attribute is - set. - - Returns True if the 'id' attribute of this UnitDefinition is set, - False otherwise. -"; - - -%feature("docstring") UnitDefinition::isSetName " - Predicate returning True if this UnitDefinition's 'name' attribute - is set. - - Returns True if the 'name' attribute of this UnitDefinition is set, - False otherwise. -"; - - -%feature("docstring") UnitDefinition::setId " - Sets the value of the 'id' attribute of this UnitDefinition. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - UnitDefinition - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") UnitDefinition::setName " - Sets the value of the 'name' attribute of this UnitDefinition. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the UnitDefinition - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") UnitDefinition::unsetName " - Unsets the value of the 'name' attribute of this UnitDefinition. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") UnitDefinition::isVariantOfArea " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier 'area'. - - Returns True if this UnitDefinition is a variant of the predefined - unit area, meaning square metres with only abritrary variations in - scale or multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfLength " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier 'length'. - - Returns True if this UnitDefinition is a variant of the predefined - unit length, meaning metres with only abritrary variations in scale - or multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfSubstance " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier 'substance'. - - Returns True if this UnitDefinition is a variant of the predefined - unit substance, meaning moles or items (and grams or kilograms from - SBML Level 2 Version 2 onwards) with only abritrary variations in - scale or multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfTime " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier 'time'. - - Returns True if this UnitDefinition is a variant of the predefined - unit time, meaning seconds with only abritrary variations in scale or - multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfVolume " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier 'volume'. - - Returns True if this UnitDefinition is a variant of the predefined - unit volume, meaning litre or cubic metre with only abritrary - variations in scale or multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfDimensionless " - Convenience function for testing if a given unit definition is a - variant of the unit 'dimensionless'. - - Returns True if this UnitDefinition is a variant of dimensionless, - meaning dimensionless with only abritrary variations in scale or - multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfMass " - Convenience function for testing if a given unit definition is a - variant of the predefined unit identifier 'mass'. - - Returns True if this UnitDefinition is a variant of mass units, - meaning gram or kilogram with only abritrary variations in scale or - multiplier values; False otherwise. -"; - - -%feature("docstring") UnitDefinition::isVariantOfSubstancePerTime " - Convenience function for testing if a given unit definition is a - variant of the predefined unit 'substance' divided by the predefined - unit 'time'. - - Returns True if this UnitDefinition is a variant of the predefined - unit substance per predefined unit time, meaning it contains two - units one of which is a variant of substance and the other is a - variant of time which an exponent of -1; False otherwise. -"; - - -%feature("docstring") UnitDefinition::addUnit " - Adds a copy of the given Unit to this UnitDefinition. - - Parameter 'u' is the Unit instance to add to this UnitDefinition. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this UnitDefinition. Changes made to the original - object instance (such as resetting attribute values) will not affect - the instance in the UnitDefinition. In addition, the caller should - make sure to free the original object if it is no longer being used, - or else a memory leak will result. Please see - UnitDefinition.createUnit() for a method that does not lead to these - issues. - - See also createUnit(). -"; - - -%feature("docstring") UnitDefinition::createUnit " - Creates a new and empty Unit, adds it to this UnitDefinition's list - of units, and returns it. - - Returns a newly constructed (and empty) Unit instance. - - Note: - - It is worth emphasizing that the attribute 'kind' value of a Unit is - a required attribute for a valid Unit definition. The createUnit() - method does not assign a valid kind to the constructed unit - (instead, it sets the 'kind' to libsbml.UNIT_KIND_INVALID). Callers - are cautioned to set the newly-constructed Unit's kind using - Unit.setKind() soon after calling this method. - - See also addUnit(). -"; - - -%feature("docstring") UnitDefinition::getListOfUnits " - Returns the list of Units for this UnitDefinition instance. Returns - the ListOfUnits value for this UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::getUnit " - Returns a specific Unit instance belonging to this UnitDefinition. - - Parameter 'n' is an integer, the index of the Unit to be returned. - - Returns the nth Unit of this UnitDefinition. - - See also getNumUnits(). -"; - - -%feature("docstring") UnitDefinition::getNumUnits " - Returns the number of Unit objects contained within this - UnitDefinition. - - Returns an integer representing the number of Units in this - UnitDefinition. -"; - - -%feature("docstring") UnitDefinition::removeUnit " - Removes the nth Unit object from this UnitDefinition object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Unit object to remove - - Returns the Unit object removed, or None if the given index is out - of range. -"; - - -%feature("docstring") UnitDefinition::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::getTypeCode " - Returns the libSBML type code for this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") UnitDefinition::getElementName " - Returns the XML element name of this object, which for - UnitDefinition, is always 'unitDefinition'. - - Returns the name of this element, i.e., 'unitDefinition'. -"; - - -%feature("docstring") UnitDefinition::simplify " - Simplifies the UnitDefinition such that any given kind of Unit object - occurs only once in the ListOfUnits. - - For example, the following definition, - - <unitDefinition> - <listOfUnits> - <unit kind=\'metre\' exponent=\'1\'/> - <unit kind=\'metre\' exponent=\'2\'/> - </listOfUnits> - <unitDefinition> - will be simplified to - - <unitDefinition> - <listOfUnits> - <unit kind=\'metre\' exponent=\'3\'/> - </listOfUnits> - <unitDefinition> - - Parameter 'ud' is the UnitDefinition object to be simplified. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_simplify(). They are - functionally identical. @~ -"; - - -%feature("docstring") UnitDefinition::reorder " - Alphabetically orders the Unit objects within the ListOfUnits of a - UnitDefinition. - - Parameter 'ud' is the UnitDefinition object whose units are to be - reordered. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_reorder(). They are - functionally identical. @~ -"; - - -%feature("docstring") UnitDefinition::convertToSI " - Convert a given UnitDefinition into a new UnitDefinition object that - uses SI units. - - Parameter 'ud' is the UnitDefinition object to convert to SI - - Returns a new UnitDefinition object representing the results of the - conversion. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_convertToSI(). They - are functionally identical. @~ -"; - - -%feature("docstring") UnitDefinition::areIdentical " - Predicate returning True if two UnitDefinition objects are - identical. - - For the purposes of performing this comparison, two UnitDefinition - objects are considered identical when they contain identical lists of - Unit objects. Pairs of Unit objects in the lists are in turn - considered identical if they satisfy the predicate - Unit.areIdentical(). The predicate compares every attribute of the - Unit objects. - - Parameter 'ud1' is the first UnitDefinition object to compare - Parameter 'ud2' is the second UnitDefinition object to compare - - Returns True if all the Unit objects in ud1 are identical to the - Unit objects of ud2, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_areIdentical(). They - are functionally identical. @~ - - See also UnitDefinition.areEquivalent(), Unit.areIdentical(). -"; - - -%feature("docstring") UnitDefinition::areEquivalent " - Predicate returning True if two UnitDefinition objects are - equivalent. - - For the purposes of performing this comparison, two UnitDefinition - objects are considered equivalent when they contain equivalent list - of Unit objects. Unit objects are in turn considered equivalent if - they satisfy the predicate Unit.areEquivalent(). The predicate - tests a subset of the objects's attributes. - - Parameter 'ud1' is the first UnitDefinition object to compare - - Parameter 'ud2' is the second UnitDefinition object to compare - - Returns True if all the Unit objects in ud1 are equivalent to the - Unit objects in ud2, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_areEquivalent(). - They are functionally identical. @~ - - See also UnitDefinition.areIdentical(), Unit.areEquivalent(). -"; - - -%feature("docstring") UnitDefinition::areIdenticalSIUnits " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::combine " - Combines two UnitDefinition objects into a single UnitDefinition. - - This takes UnitDefinition objects 'ud1' and 'ud2', and creates a - UnitDefinition object that expresses the product of the units of - 'ud1' and 'ud2'. - - Parameter 'ud1' is the first UnitDefinition object Parameter 'ud2' - is the second UnitDefinition object - - Returns a UnitDefinition which represents the product of the units - of the two argument UnitDefinitions. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_combine(). They are - functionally identical. @~ -"; - - -%feature("docstring") UnitDefinition::printUnits " - Expresses the given definition in a plain-text form. - - For example, UnitDefinition.printUnits() applied to - - <unitDefinition> - <listOfUnits> - <unit kind=\'metre\' exponent=\'1\'/> - <unit kind=\'second\' exponent=\'-2\'/> - </listOfUnits> - <unitDefinition> - will return the string 'metre (exponent = 1, multiplier = - 1, scale = 0) second (exponent = -2, multiplier = 1, scale = 0)' - or, if the optional parameter 'compact' is given the value True, the - string '(1 metre)^1 (1 second)^-2'. This method may be useful for - printing unit information to human users, or in debugging software, - or other situations. - - Parameter 'ud' is the UnitDefinition object Parameter 'compact' is - boolean indicating whether the compact form should be used (defaults - to false) - - Returns a string expressing the unit definition defined by the given - UnitDefinition object 'ud'. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., UnitDefinition), and the other will be a standalone - top-level function with the name UnitDefinition_printUnits(). They - are functionally identical. @~ -"; - - -%feature("docstring") UnitDefinition::writeElements " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - UnitDefinition object have been set. - - Note: - - The required attributes for a UnitDefinition object are: - - * 'id' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") UnitDefinition::hasRequiredElements " - Predicate returning True if all the required elements for this - UnitDefinition object have been set. - - Note: - - The required elements for a Constraint object are: - - * 'listOfUnits' (required in SBML Level 2 only, optional in Level - 3) - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") UnitDefinition::createObject " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") UnitDefinition::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfUnitDefinitions::ListOfUnitDefinitions " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfUnitDefinitions(SBMLNamespaces sbmlns) - - Creates a new ListOfUnitDefinitions object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfUnitDefinitions object to - be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfUnitDefinitions(long level, long version) - - Creates a new ListOfUnitDefinitions object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfUnitDefinitions::clone " - Creates and returns a deep copy of this ListOfUnitDefinitions - instance. - - Returns a (deep) copy of this ListOfUnitDefinitions. -"; - - -%feature("docstring") ListOfUnitDefinitions::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfUnitDefinitions::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., UnitDefinition objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfUnitDefinitions::getElementName " - Returns the XML element name of this object. - - For ListOfUnitDefinitions, the XML element name is - 'listOfUnitDefinitions'. - - Returns the name of this element, i.e., 'listOfUnitDefinitions'. -"; - - -%feature("docstring") ListOfUnitDefinitions::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a UnitDefinition from the ListOfUnitDefinitions. - - Parameter 'n' is the index number of the UnitDefinition to get. - - Returns the nth UnitDefinition in this ListOfUnitDefinitions. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfUnitDefinitions::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. Note - that UnitDefinitions themselves are in the UnitId namespace, not the - SId namespace, so no UnitDefinition object will be returned from this - function (and is the reason we override the base - ListOf::getElementBySId function here). - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") ListOfUnitDefinitions::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfUnitDefinitions items and - returns a pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfUnitDefinitions items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfUnitDefinitions::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfUnitDefinitions::createObject " - Internal implementation method. -"; - - -%feature("docstring") CompartmentType " - @ingroup Core Implementation of SBML's Level 2's CompartmentType - construct. - - SBML Level 2 Versions 2-4 provide the compartment type as a grouping - construct that can be used to establish a relationship between - multiple Compartment objects. A CompartmentType object only has an - identity, and this identity can only be used to indicate that - particular Compartment objects in the model belong to this type. - This may be useful for conveying a modeling intention, such as when - a model contains many similar compartments, either by their - biological function or the reactions they carry. Without a - compartment type construct, it would be impossible within SBML - itself to indicate that all of the compartments share an underlying - conceptual relationship because each SBML compartment must be given - a unique and separate identity. Compartment types have no - mathematical meaning in SBML -- they have no effect on a model's - mathematical interpretation. Simulators and other numerical analysis - software may ignore CompartmentType definitions and references to - them in a model. - - There is no mechanism in SBML Level 2 for representing hierarchies of - compartment types. One CompartmentType instance cannot be the - subtype of another CompartmentType instance; SBML provides no means - of defining such relationships. - - As with other major structures in SBML, CompartmentType has a - mandatory attribute, 'id', used to give the compartment type an - identifier. The identifier must be a text string conforming to the - identifer syntax permitted in SBML. CompartmentType also has an - optional 'name' attribute, of type string. The 'id' and 'name' must - be used according to the guidelines described in the SBML - specification (e.g., Section 3.3 in the Level 2 Version 4 - specification). - - CompartmentType was introduced in SBML Level 2 Version 2. It is not - available in SBML Level 1 nor in Level 3. - - See also Compartment, ListOfCompartmentTypes, SpeciesType, - ListOfSpeciesTypes. -"; - - -%feature("docstring") ListOfCompartmentTypes " - @ingroup Core Implementation of SBML's ListOfCompartmentTypes - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") CompartmentType::CompartmentType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - CompartmentType(SBMLNamespaces sbmlns) - - Creates a new CompartmentType using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the 'id' - (identifier) attribute of a CompartmentType is required to have a - value. Thus, callers are cautioned to assign a value after calling - this constructor. Setting the identifier can be accomplished using - the method setId(). - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a CompartmentType object to an SBMLDocument - (e.g., using Model.addCompartmentType()), the SBML XML namespace of - the document overrides the value used when creating the - CompartmentType object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a CompartmentType is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - CompartmentType(long level, long version) - - Creates a new CompartmentType using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - CompartmentType - - Parameter 'version' is a long integer, the SBML Version to assign to - this CompartmentType - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a CompartmentType object to an SBMLDocument - (e.g., using Model.addCompartmentType()), the SBML Level, SBML - Version and XML namespace of the document override the values used - when creating the CompartmentType object via this constructor. This - is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a CompartmentType is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - CompartmentType(CompartmentType orig) - - Copy constructor; creates a copy of this CompartmentType. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") CompartmentType::accept " - Accepts the given SBMLVisitor for this instance of CompartmentType. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next CompartmentType in the list of - compartment types. -"; - - -%feature("docstring") CompartmentType::clone " - Creates and returns a deep copy of this CompartmentType. - - Returns a (deep) copy of this CompartmentType. -"; - - -%feature("docstring") CompartmentType::getId " - Returns the value of the 'id' attribute of this CompartmentType. - - Returns the id of this CompartmentType. -"; - - -%feature("docstring") CompartmentType::getName " - Returns the value of the 'name' attribute of this CompartmentType. - - Returns the name of this CompartmentType. -"; - - -%feature("docstring") CompartmentType::isSetId " - Predicate returning True if this CompartmentType's 'id' attribute is - set. - - Returns True if the 'id' attribute of this CompartmentType is set, - False otherwise. -"; - - -%feature("docstring") CompartmentType::isSetName " - Predicate returning True if this CompartmentType's 'name' attribute - is set. - - Returns True if the 'name' attribute of this CompartmentTypeType is - set, False otherwise. -"; - - -%feature("docstring") CompartmentType::setId " - Sets the value of the 'id' attribute of this CompartmentType. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - CompartmentType - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") CompartmentType::setName " - Sets the value of the 'name' attribute of this CompartmentType. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the CompartmentType - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") CompartmentType::unsetName " - Unsets the value of the 'name' attribute of this CompartmentType. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") CompartmentType::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") CompartmentType::getElementName " - Returns the XML element name of this object, which for - CompartmentType, is always 'compartmentType'. - - Returns the name of this element, i.e., 'compartmentType'. -"; - - -%feature("docstring") CompartmentType::writeElements " - Internal implementation method. -"; - - -%feature("docstring") CompartmentType::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - CompartmentType object have been set. - - Note: - - The required attributes for a CompartmentType object are: - - * 'id' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") CompartmentType::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") CompartmentType::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") CompartmentType::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") CompartmentType::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfCompartmentTypes::ListOfCompartmentTypes " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfCompartmentTypes(SBMLNamespaces sbmlns) - - Creates a new ListOfCompartmentTypes object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfCompartmentTypes object - to be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfCompartmentTypes(long level, long version) - - Creates a new ListOfCompartmentTypes object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfCompartmentTypes::clone " - Creates and returns a deep copy of this ListOfCompartmentTypes - instance. - - Returns a (deep) copy of this ListOfCompartmentTypes. -"; - - -%feature("docstring") ListOfCompartmentTypes::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfCompartmentTypes::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., CompartmentType objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfCompartmentTypes::getElementName " - Returns the XML element name of this object. - - For ListOfCompartmentTypes, the XML element name is - 'listOfCompartmentTypes'. - - Returns the name of this element, i.e., 'listOfCompartmentTypes'. -"; - - -%feature("docstring") ListOfCompartmentTypes::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a CompartmentType from the ListOfCompartmentTypes. - - Parameter 'n' is the index number of the CompartmentType to get. - - Returns the nth CompartmentType in this ListOfCompartmentTypes. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfCompartmentTypes::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfCompartmentTypes items and - returns a pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfCompartmentTypes items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfCompartmentTypes::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfCompartmentTypes::createObject " - Internal implementation method. -"; - - -%feature("docstring") SpeciesType " - @ingroup Core Implementation of SBML Level 2's SpeciesType - construct. - - The term species type refers to reacting entities independent of - location. These include simple ions (e.g., protons, calcium), simple - molecules (e.g., glucose, ATP), large molecules (e.g., RNA, - polysaccharides, and proteins), and others. - - SBML Level 2 Versions 2-4 provide an explicit SpeciesType class of - object to enable Species objects of the same type to be related - together. SpeciesType is a conceptual construct; the existence of - SpeciesType objects in a model has no effect on the model's - numerical interpretation. Except for the requirement for uniqueness - of species/species type combinations located in compartments, - simulators and other numerical analysis software may ignore - SpeciesType definitions and references to them in a model. - - There is no mechanism in SBML Level 2 for representing hierarchies of - species types. One SpeciesType object cannot be the subtype of - another SpeciesType object; SBML provides no means of defining such - relationships. - - As with other major structures in SBML, SpeciesType has a mandatory - attribute, 'id', used to give the species type an identifier. The - identifier must be a text string conforming to the identifer syntax - permitted in SBML. SpeciesType also has an optional 'name' - attribute, of type string. The 'id' and 'name' must be used - according to the guidelines described in the SBML specification - (e.g., Section 3.3 in the Level 2 Version 4 specification). - - SpeciesType was introduced in SBML Level 2 Version 2. It is not - available in SBML Level 1 nor in Level 3. - - See also Species, ListOfSpeciesTypes, CompartmentType, - ListOfCompartmentTypes. -"; - - -%feature("docstring") ListOfSpeciesTypes " - @ingroup Core Implementation of SBML's ListOfSpeciesTypes construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") SpeciesType::SpeciesType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SpeciesType(SBMLNamespaces sbmlns) - - Creates a new SpeciesType using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the 'id' - (identifier) attribute of a SpeciesType object is required to have a - value. Thus, callers are cautioned to assign a value after calling - this constructor. Setting the identifier can be accomplished using - the method SBase.setId(). - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a SpeciesType object to an SBMLDocument (e.g., - using Model.addSpeciesType()), the SBML XML namespace of the - document overrides the value used when creating the SpeciesType - object via this constructor. This is necessary to ensure that an - SBML document is a consistent structure. Nevertheless, the ability - to supply the values at the time of creation of a SpeciesType is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - SpeciesType(long level, long version) - - Creates a new SpeciesType using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - SpeciesType - - Parameter 'version' is a long integer, the SBML Version to assign to - this SpeciesType - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a SpeciesType object to an SBMLDocument (e.g., - using Model.addSpeciesType()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - SpeciesType object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a SpeciesType is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - SpeciesType(SpeciesType orig) - - Copy constructor; creates a copy of this SpeciesType. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") SpeciesType::accept " - Accepts the given SBMLVisitor for this instance of SpeciesType. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next SpeciesType in the list of - compartment types. -"; - - -%feature("docstring") SpeciesType::clone " - Creates and returns a deep copy of this SpeciesType. - - Returns a (deep) copy of this SpeciesType. -"; - - -%feature("docstring") SpeciesType::getId " - Returns the value of the 'id' attribute of this SpeciesType. - - Returns the id of this SpeciesType. -"; - - -%feature("docstring") SpeciesType::getName " - Returns the value of the 'name' attribute of this SpeciesType. - - Returns the name of this SpeciesType. -"; - - -%feature("docstring") SpeciesType::isSetId " - Predicate returning True if this SpeciesType's 'id' attribute is - set. - - Returns True if the 'id' attribute of this SpeciesType is set, False - otherwise. -"; - - -%feature("docstring") SpeciesType::isSetName " - Predicate returning True if this SpeciesType's 'name' attribute is - set. - - Returns True if the 'name' attribute of this SpeciesType is set, - False otherwise. -"; - - -%feature("docstring") SpeciesType::setId " - Sets the value of the 'id' attribute of this SpeciesType. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - SpeciesType - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SpeciesType::setName " - Sets the value of the 'name' attribute of this SpeciesType. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the SpeciesType - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SpeciesType::unsetName " - Unsets the value of the 'name' attribute of this SpeciesType. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SpeciesType::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") SpeciesType::getElementName " - Returns the XML element name of this object, which for SpeciesType, - is always 'compartmentType'. - - Returns the name of this element, i.e., 'compartmentType'. -"; - - -%feature("docstring") SpeciesType::writeElements " - Internal implementation method. -"; - - -%feature("docstring") SpeciesType::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - SpeciesType object have been set. - - Note: - - The required attributes for a SpeciesType object are: - - * 'id' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") SpeciesType::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesType::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesType::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesType::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpeciesTypes::ListOfSpeciesTypes " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfSpeciesTypes(SBMLNamespaces sbmlns) - - Creates a new ListOfSpeciesTypes object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfSpeciesTypes object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfSpeciesTypes(long level, long version) - - Creates a new ListOfSpeciesTypes object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfSpeciesTypes::clone " - Creates and returns a deep copy of this ListOfSpeciesTypes instance. - - Returns a (deep) copy of this ListOfSpeciesTypes. -"; - - -%feature("docstring") ListOfSpeciesTypes::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfSpeciesTypes::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., SpeciesType objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfSpeciesTypes::getElementName " - Returns the XML element name of this object. - - For ListOfSpeciesTypes, the XML element name is 'listOfSpeciesTypes'. - - Returns the name of this element, i.e., 'listOfSpeciesTypes'. -"; - - -%feature("docstring") ListOfSpeciesTypes::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a SpeciesType from the ListOfSpeciesTypes. - - Parameter 'n' is the index number of the SpeciesType to get. - - Returns the nth SpeciesType in this ListOfSpeciesTypes. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfSpeciesTypes::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfSpeciesTypes items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfSpeciesTypes items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfSpeciesTypes::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpeciesTypes::createObject " - Internal implementation method. -"; - - -%feature("docstring") Compartment " - @ingroup Core Implementation of SBML's Compartment construct. - - A compartment in SBML represents a bounded space in which species are - located. Compartments do not necessarily have to correspond to - actual structures inside or outside of a biological cell. - - It is important to note that although compartments are optional in - the overall definition of Model, every species in an SBML model must - be located in a compartment. This in turn means that if a model - defines any species, the model must also define at least one - compartment. The reason is simply that species represent physical - things, and therefore must exist somewhere. Compartments represent - the somewhere. - - Compartment has one required attribute, 'id', to give the compartment - a unique identifier by which other parts of an SBML model definition - can refer to it. A compartment can also have an optional 'name' - attribute of type string. Identifiers and names must be used - according to the guidelines described in the SBML specifications. - - Compartment also has an optional attribute 'spatialDimensions' that - is used to indicate the number of spatial dimensions possessed by - the compartment. Most modeling scenarios involve compartments with - integer values of 'spatialDimensions' of 3 (i.e., a three- - dimensional compartment, which is to say, a volume), or 2 (a two- - dimensional compartment, a surface), or 1 (a one-dimensional - compartment, a line). In SBML Level 3, the type of this attribute - is double, there are no restrictions on the permitted values of the - 'spatialDimensions' attribute, and there are no default values. In - SBML Level 2, the value must be a positive integer, and the default - value is 3; the permissible values in SBML Level 2 are 3, 2, 1, and 0 - (for a point). - - Another optional attribute on Compartment is 'size', representing the - initial total size of that compartment in the model. The 'size' - attribute must be a floating-point value and may represent a volume - (if the compartment is a three-dimensional one), or an area (if the - compartment is two-dimensional), or a length (if the compartment is - one-dimensional). There is no default value of compartment size in - SBML Level 2 or Level 3. In particular, a missing 'size' value - does not imply that the compartment size is 1. (This is unlike the - definition of compartment 'volume' in SBML Level 1.) When the - compartment's 'spatialDimensions' attribute does not have a value of - 0, a missing value of 'size' for a given compartment signifies that - the value either is unknown, or to be obtained from an external - source, or determined by an InitialAssignment, AssignmentRule, - AlgebraicRule or RateRule elsewhere in the model. In SBML Level 2, - there are additional special requirements on the values of 'size'; - we discuss them in a separate section below. - - The units associated with a compartment's 'size' attribute value may - be set using the optional attribute 'units'. The rules for setting - and using compartment size units differ between SBML Level 2 and - Level 3, and are discussed separately below. - - Finally, the optional Compartment attribute named 'constant' is used - to indicate whether the compartment's size stays constant after - simulation begins. A value of True indicates the compartment's - 'size' cannot be changed by any other construct except - InitialAssignment; a value of false indicates the compartment's - 'size' can be changed by other constructs in SBML. In SBML Level 2, - there is an additional explicit restriction that if - 'spatialDimensions'='0', the value cannot be changed by - InitialAssignment either. Further, in Level 2, 'constant' has a - default value of True. In SBML Level 3, there is no default value - for the 'constant' attribute. - - Additional considerations in SBML Level 2 - ====================================================================== - - In SBML Level 2, the default units of compartment size, and the - kinds of units allowed as values of the attribute 'units', interact - with the number of spatial dimensions of the compartment. The value - of the 'units' attribute of a Compartment object must be one of the - base units (see Unit), or the predefined unit identifiers volume, - area, length or dimensionless, or a new unit defined by a - UnitDefinition object in the enclosing Model, subject to the - restrictions detailed in the following table: - - Restrictions on values permitted for compartment size and units - attributes. Value of spatialDimensions size allowed? units - allowed? Allowable kinds of units Default value of attribute units - \"3\" yes yes units of volume, or dimensionless \"volume\" \"2\" yes - yes units of area, or dimensionless \"area\" \"1\" yes yes units of - length, or dimensionless \"length\" \"0\" no no (no units allowed) - - In SBML Level 2, the units of the compartment size, as defined by the - 'units' attribute or (if 'units' is not set) the default value listed - in the table above, are used in the following ways when the - compartment has a 'spatialDimensions' value greater than 0: - - * The value of the 'units' attribute is used as the units of the - compartment identifier when the identifier appears as a numerical - quantity in a mathematical formula expressed in MathML. - - * The math element of an AssignmentRule or InitialAssignment - referring to this compartment must have identical units. - - * In RateRule objects that set the rate of change of the - compartment's size, the units of the rule's math element must be - identical to the compartment's 'units' attribute divided by the - default time units. (In other words, the units for the rate of - change of compartment size are compartment size/time units. - - * When a Species is to be treated in terms of concentrations or - density, the units of the spatial size portion of the concentration - value (i.e., the denominator in the units formula substance/size) are - those indicated by the value of the 'units' attribute on the - compartment in which the species is located. - - Compartments with 'spatialDimensions'=0 require special treatment in - this framework. As implied above, the 'size' attribute must not have - a value on an SBML Level 2 Compartment object if the - 'spatialDimensions' attribute has a value of 0. An additional - related restriction is that the 'constant' attribute must default to - or be set to True if the value of the 'spatialDimensions' attribute - is 0, because a zero-dimensional compartment cannot ever have a - size. - - If a compartment has no size or dimensional units, how should such a - compartment's identifier be interpreted when it appears in - mathematical formulas? The answer is that such a compartment's - identifier should not appear in mathematical formulas in the first - place -- it has no value, and its value cannot change. Note also - that a zero-dimensional compartment is a point, and species located - at points can only be described in terms of amounts, not spatially- - dependent measures such as concentration. Since SBML KineticLaw - formulas are already in terms of substance/time and not (say) - concentration/time, volume or other factors in principle are not - needed for species located in zero-dimensional compartments. - - Finally, in SBML Level 2 Versions 2-4, each compartment in a model - may optionally be designated as belonging to a particular - compartment type. The optional attribute 'compartmentType' is used - identify the compartment type represented by the Compartment - structure. The 'compartmentType' attribute's value must be the - identifier of a CompartmentType instance defined in the model. If - the 'compartmentType' attribute is not present on a particular - compartment definition, a unique virtual compartment type is assumed - for that compartment, and no other compartment can belong to that - compartment type. The values of 'compartmentType' attributes on - compartments have no effect on the numerical interpretation of a - model. Simulators and other numerical analysis software may ignore - 'compartmentType' attributes. The 'compartmentType' attribute and - the CompartmentType class of objects are not present in SBML Level 3 - Core nor in SBML Level 1. - - Additional considerations in SBML Level 3 - ====================================================================== - - One difference between SBML Level 3 and lower Levels of SBML is that - there are no restrictions on the permissible values of the - 'spatialDimensions' attribute, and there is no default value defined - for the attribute. The value of 'spatialDimensions' does not have - to be an integer, either; this is to allow for the possibility of - representing structures with fractal dimensions. - - The number of spatial dimensions possessed by a compartment cannot - enter into mathematical formulas, and therefore cannot directly - alter the numerical interpretation of a model. However, the value - of 'spatialDimensions' does affect the interpretation of the units - associated with a compartment's size. Specifically, the value of - 'spatialDimensions' is used to select among the Model attributes - 'volumeUnits', 'areaUnits' and 'lengthUnits' when a Compartment - object does not define a value for its 'units' attribute. - - The 'units' attribute may be left unspecified for a given compartment - in a model; in that case, the compartment inherits the unit of - measurement specified by one of the attributes on the enclosing - Model object instance. The applicable attribute on Model depends on - the value of the compartment's 'spatialDimensions' attribute; the - relationship is shown in the table below. If the Model object does - not define the relevant attribute ('volumeUnits', 'areaUnits' or - 'lengthUnits') for a given 'spatialDimensions' value, the unit - associated with that Compartment object's size is undefined. If - both 'spatialDimensions' and 'units' are left unset on a given - Compartment object instance, then no unit can be chosen from among - the Model's 'volumeUnits', 'areaUnits' or 'lengthUnits' attributes - (even if the Model instance provides values for those attributes), - because there is no basis to select between them and there is no - default value of 'spatialDimensions'. Leaving the units of - compartments' sizes undefined in an SBML model does not render the - model invalid; however, as a matter of best practice, we strongly - recommend that all models specify the units of measurement for all - compartment sizes. - - Interpretation of the Compartment \"units\" attribute. Value of - attribute \"spatialDimensions\" Attribute of Model used for - inheriting the unit Recommended candidate units \"3\" \"volumeUnits\" - units of volume, or dimensionless \"2\" \"areaUnits\" units of area, - or dimensionless \"1\" \"lengthUnits\" units of length, or - dimensionless other no units inherited no specific recommendations - - The unit of measurement associated with a compartment's size, as - defined by the 'units' attribute or (if 'units' is not set) the - inherited value from Model according to the table above, is used in - the following ways: - - - * When the identifier of the compartment appears as a numerical - quantity in a mathematical formula expressed in MathML, it represents - the size of the compartment, and the unit associated with the size is - the value of the 'units' attribute. - - * When a Species is to be treated in terms of concentrations or - density, the unit associated with the spatial size portion of the - concentration value (i.e., the denominator in the formula - amount/size) is specified by the value of the 'units' attribute on - the compartment in which the species is located. - - * The 'math' elements of AssignmentRule, InitialAssignment and - EventAssignment objects setting the value of the compartment size - should all have the same units as the unit associated with the - compartment's size. - - * In a RateRule object that defines a rate of change for a - compartment's size, the unit of the rule's 'math' element should be - identical to the compartment's 'units' attribute divided by the - model-wide unit of time. (In other words, {unit of compartment - size}/{unit of time}.) - - - Other aspects of Compartment - ====================================================================== - - In SBML Level 1 and Level 2, Compartment has an optional attribute - named 'outside', whose value can be the identifier of another - Compartment object defined in the enclosing Model object. Doing so - means that the other compartment contains it or is outside of it. - This enables the representation of simple topological relationships - between compartments, for those simulation systems that can make use - of the information (e.g., for drawing simple diagrams of - compartments). It is worth noting that in SBML, there is no - relationship between compartment sizes when compartment positioning - is expressed using the 'outside' attribute. The size of a given - compartment does not in any sense include the sizes of other - compartments having it as the value of their 'outside' attributes. - In other words, if a compartment B has the identifier of compartment - A as its 'outside' attribute value, the size of A does not include - the size of B. The compartment sizes are separate. - - In Level 2, there are two restrictions on the 'outside' attribute. - First, because a compartment with 'spatialDimensions' of 0 has no - size, such a compartment cannot act as the container of any other - compartment except compartments that also have 'spatialDimensions' - values of 0. Second, the directed graph formed by representing - Compartment structures as vertexes and the 'outside' attribute - values as edges must be acyclic. The latter condition is imposed to - prevent a compartment from being contained inside itself. In the - absence of a value for 'outside', compartment definitions in SBML - Level 2 do not have any implied spatial relationships between each - other. -"; - - -%feature("docstring") ListOfCompartments " - @ingroup Core Implementation of SBML Level 2's ListOfCompartments - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Compartment::Compartment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Compartment(SBMLNamespaces sbmlns) - - Creates a new Compartment using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the 'id' - (identifier) attribute of a Compartment is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor. Setting the identifier can be accomplished using the - method setId(). - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Compartment object to an SBMLDocument (e.g., - using Model.addCompartment()), the SBML XML namespace of the - document overrides the value used when creating the Compartment - object via this constructor. This is necessary to ensure that an - SBML document is a consistent structure. Nevertheless, the ability - to supply the values at the time of creation of a Compartment is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Compartment(long level, long version) - - Creates a new Compartment using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Compartment - - Parameter 'version' is a long integer, the SBML Version to assign to - this Compartment - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Compartment object to an SBMLDocument (e.g., - using Model.addCompartment()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - Compartment object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a Compartment is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Compartment(Compartment orig) - - Copy constructor; creates a copy of a Compartment. - - Parameter 'orig' is the Compartment instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Compartment::accept " - Accepts the given SBMLVisitor for this instance of Compartment. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next Compartment in the list of - compartments within which this Compartment is embedded (i.e., the - ListOfCompartments in the parent Model). -"; - - -%feature("docstring") Compartment::clone " - Creates and returns a deep copy of this Compartment object. - - Returns a (deep) copy of this Compartment. -"; - - -%feature("docstring") Compartment::initDefaults " - Initializes the fields of this Compartment object to 'typical' - default values. - - The SBML Compartment component has slightly different aspects and - default attribute values in different SBML Levels and Versions. This - method sets the values to certain common defaults, based mostly on - what they are in SBML Level 2. Specifically: - - * Sets attribute 'spatialDimensions' to 3 - - * Sets attribute 'constant' to True - - * (Applies to Level 1 models only) Sets attribute 'volume' to 1.0 - - * (Applies to Level 3 models only) Sets attribute 'units' to litre -"; - - -%feature("docstring") Compartment::getId " - Returns the value of the 'id' attribute of this Compartment object. - - Returns the id of this Compartment. -"; - - -%feature("docstring") Compartment::getName " - Returns the value of the 'name' attribute of this Compartment object. - - Returns the name of this Compartment. -"; - - -%feature("docstring") Compartment::getCompartmentType " - Get the value of the 'compartmentType' attribute of this Compartment - object. - - Returns the value of the 'compartmentType' attribute of this - Compartment as a string. - - Note: - - The 'compartmentType' attribute is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Compartment::getSpatialDimensions " - Get the number of spatial dimensions of this Compartment object. - - Note: - - In SBML Level 3, the data type of the 'spatialDimensions' attribute - is double, whereas in Level 2, it is integer. LibSBML provides a - separate method for obtaining the value as a double, for models - where it is relevant. - - Returns the value of the 'spatialDimensions' attribute of this - Compartment as a long integereger - - See also getSpatialDimensionsAsDouble(). -"; - - -%feature("docstring") Compartment::getSpatialDimensionsAsDouble " - Get the number of spatial dimensions of this Compartment object as a - double. - - Note: - - In SBML Level 3, the data type of the 'spatialDimensions' attribute - is double, whereas in Level 2, it is integer. To avoid backward - compatibility issues, libSBML provides a separate method for - obtaining the value as a double, for models where it is relevant. - - Returns the value of the 'spatialDimensions' attribute of this - Compartment as a double, or NaN if this model is not in SBML Level 3 - format. - - See also getSpatialDimensions(). -"; - - -%feature("docstring") Compartment::getSize " - Get the size of this Compartment. - - This method is identical to getVolume(). In SBML Level 1, - compartments are always three-dimensional constructs and only have - volumes, whereas in SBML Level 2, compartments may be other than - three-dimensional and therefore the 'volume' attribute is named - 'size' in Level 2. LibSBML provides both getSize()@~ and - getVolume()@~ for easier compatibility between SBML Levels. - - Returns the value of the 'size' attribute ('volume' in Level 1) of - this Compartment as a float-point number. - - See also isSetSize(), getVolume(). -"; - - -%feature("docstring") Compartment::getVolume " - Get the volume of this Compartment. - - This method is identical to getSize(). In SBML Level 1, - compartments are always three-dimensional constructs and only have - volumes, whereas in SBML Level 2, compartments may be other than - three-dimensional and therefore the 'volume' attribute is named - 'size' in Level 2. LibSBML provides both getSize()@~ and - getVolume()@~ for easier compatibility between SBML Levels. - - Returns the value of the 'volume' attribute ('size' in Level 2) of - this Compartment, as a floating-point number. - - Note: - - The attribute 'volume' only exists by that name in SBML Level 1. In - Level 2 and above, the equivalent attribute is named 'size'. - - See also isSetVolume(), getSize(). -"; - - -%feature("docstring") Compartment::getUnits " - Get the units of this compartment's size. - - The value of an SBML compartment's 'units' attribute establishes the - unit of measurement associated with the compartment's size. - - Returns the value of the 'units' attribute of this Compartment, as a - string. An empty string indicates that no units have been assigned - to the value of the size. - - Note: - - There is an important distinction to be made between no units - assigned, and assuming a value without units has any specific unit - such as dimensionless. In SBML, default units are never attributed - to numbers, and numbers without units are not automatically assumed - to have the unit dimensionless. Please consult the relevant SBML - specification document for a more in-depth explanation of this topic - and the SBML unit system. - - See also isSetUnits(), setUnits()@~, getSize(). -"; - - -%feature("docstring") Compartment::getOutside " - Get the identifier, if any, of the compartment that is designated as - being outside of this one. - - Returns the value of the 'outside' attribute of this Compartment. - - Note: - - The 'outside' attribute is defined in SBML Level 1 and Level 2, but - does not exist in SBML Level 3 Version 1 Core. -"; - - -%feature("docstring") Compartment::getConstant " - Get the value of the 'constant' attribute of this Compartment. - - Returns True if this Compartment's size is flagged as being - constant, False otherwise. -"; - - -%feature("docstring") Compartment::isSetId " - Predicate returning True if this Compartment's 'id' attribute is - set. - - Returns True if the 'id' attribute of this Compartment is set, - False otherwise. -"; - - -%feature("docstring") Compartment::isSetName " - Predicate returning True if this Compartment's 'name' attribute is - set. - - Returns True if the 'name' attribute of this Compartment is set, - False otherwise. -"; - - -%feature("docstring") Compartment::isSetCompartmentType " - Predicate returning True if this Compartment's 'compartmentType' - attribute is set. - - Returns True if the 'compartmentType' attribute of this Compartment - is set, False otherwise. - - Note: - - The 'compartmentType' attribute is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Compartment::isSetSize " - Predicate returning True if this Compartment's 'size' attribute is - set. - - This method is similar but not identical to isSetVolume(). The - latter should be used in the context of SBML Level 1 models instead - of isSetSize()@~ because isSetVolume()@~ performs extra processing - to take into account the difference in default values between SBML - Levels 1 and 2. - - Returns True if the 'size' attribute ('volume' in Level 2) of this - Compartment is set, False otherwise. - - See also isSetVolume(), setSize(). -"; - - -%feature("docstring") Compartment::isSetVolume " - Predicate returning True if this Compartment's 'volume' attribute is - set. - - This method is similar but not identical to isSetSize(). The latter - should not be used in the context of SBML Level 1 models because this - method performs extra processing to take into account the difference - in default values between SBML Levels 1 and 2. - - Returns True if the 'volume' attribute ('size' in Level 2 and above) - of this Compartment is set, False otherwise. - - Note: - - The attribute 'volume' only exists by that name in SBML Level 1. In - Level 2 and above, the equivalent attribute is named 'size'. In - SBML Level 1, a compartment's volume has a default value (1.0) and - therefore this method will always return true. In Level 2, a - compartment's size (the equivalent of SBML Level 1's 'volume') is - optional and has no default value, and therefore may or may not be - set. - - See also isSetSize(), setVolume()@~. -"; - - -%feature("docstring") Compartment::isSetUnits " - Predicate returning True if this Compartment's 'units' attribute is - set. - - Returns True if the 'units' attribute of this Compartment is set, - False otherwise. - - Note: - - There is an important distinction to be made between no units - assigned, and assuming a value without units has any specific unit - such as dimensionless. In SBML, default units are never attributed - to numbers, and numbers without units are not automatically assumed - to have the unit dimensionless. Please consult the relevant SBML - specification document for a more in-depth explanation of this topic - and the SBML unit system. -"; - - -%feature("docstring") Compartment::isSetOutside " - Predicate returning True if this Compartment's 'outside' attribute - is set. - - Returns True if the 'outside' attribute of this Compartment is set, - False otherwise. - - Note: - - The 'outside' attribute is defined in SBML Level 1 and Level 2, but - does not exist in SBML Level 3 Version 1 Core. -"; - - -%feature("docstring") Compartment::isSetSpatialDimensions " - Predicate returning True if this Compartment's 'spatialDimensions' - attribute is set. - - Returns True if the 'spatialDimensions' attribute of this - Compartment is set, False otherwise. -"; - - -%feature("docstring") Compartment::isSetConstant " - Predicate returning True if this Compartment's 'constant' attribute - is set. - - Returns True if the 'constant' attribute of this Compartment is set, - False otherwise. -"; - - -%feature("docstring") Compartment::setId " - Sets the value of the 'id' attribute of this Compartment. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - Compartment - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Compartment::setName " - Sets the value of the 'name' attribute of this Compartment. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the Compartment - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Compartment::setCompartmentType " - Sets the 'compartmentType' attribute of this Compartment. - - Parameter 'sid' is the identifier of a CompartmentType object defined - elsewhere in this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The 'compartmentType' attribute is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Compartment::setSpatialDimensions " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setSpatialDimensions(double value) - - Sets the 'spatialDimensions' attribute of this Compartment as a - double. - - Parameter 'value' is a double indicating the number of dimensions of - this compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - ______________________________________________________________________ - Method variant with the following signature: - - setSpatialDimensions(long value) - - Sets the 'spatialDimensions' attribute of this Compartment. - - If 'value' is not one of 0, 1, 2, or 3, this method will have no - effect (i.e., the 'spatialDimensions' attribute will not be set). - - Parameter 'value' is a long integereger indicating the number of - dimensions of this compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Compartment::setSize " - Sets the 'size' attribute (or 'volume' in SBML Level 1) of this - Compartment. - - This method is identical to setVolume()@~ and is provided for - compatibility between SBML Level 1 and Level 2. - - Parameter 'value' is a double representing the size of this - compartment instance in whatever units are in effect for the - compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - Note: - - The attribute 'volume' only exists by that name in SBML Level 1. In - Level 2 and above, the equivalent attribute is named 'size'. -"; - - -%feature("docstring") Compartment::setVolume " - Sets the 'volume' attribute (or 'size' in SBML Level 2) of this - Compartment. - - This method is identical to setVolume()@~ and is provided for - compatibility between SBML Level 1 and Level 2. - - Parameter 'value' is a double representing the volume of this - compartment instance in whatever units are in effect for the - compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - Note: - - The attribute 'volume' only exists by that name in SBML Level 1. In - Level 2 and above, the equivalent attribute is named 'size'. -"; - - -%feature("docstring") Compartment::setUnits " - Sets the 'units' attribute of this Compartment. - - Parameter 'sid' is the identifier of the defined units to use. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Compartment::setOutside " - Sets the 'outside' attribute of this Compartment. - - Parameter 'sid' is the identifier of a compartment that encloses this - one. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'outside' attribute is defined in SBML Level 1 and Level 2, but - does not exist in SBML Level 3 Version 1 Core. -"; - - -%feature("docstring") Compartment::setConstant " - Sets the value of the 'constant' attribute of this Compartment. - - Parameter 'value' is a boolean indicating whether the size/volume of - this compartment should be considered constant (True) or variable - (False) - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Compartment::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Compartment::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Compartment::unsetName " - Unsets the value of the 'name' attribute of this Compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Compartment::unsetCompartmentType " - Unsets the value of the 'compartmentType' attribute of this - Compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The 'compartmentType' attribute is only available in SBML Level 2 - Versions 2-4. - - See also setCompartmentType(), isSetCompartmentType(). -"; - - -%feature("docstring") Compartment::unsetSize " - Unsets the value of the 'size' attribute of this Compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The attribute 'volume' only exists by that name in SBML Level 1. In - Level 2 and above, the equivalent attribute is named 'size'. -"; - - -%feature("docstring") Compartment::unsetVolume " - Unsets the value of the 'volume' attribute of this Compartment. - - In SBML Level 1, a Compartment volume has a default value (1.0) and - therefore should always be set. In Level 2, 'size' is optional with - no default value and as such may or may not be set. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The attribute 'volume' only exists by that name in SBML Level 1. In - Level 2 and above, the equivalent attribute is named 'size'. -"; - - -%feature("docstring") Compartment::unsetUnits " - Unsets the value of the 'units' attribute of this Compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Compartment::unsetOutside " - Unsets the value of the 'outside' attribute of this Compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'outside' attribute is defined in SBML Level 1 and Level 2, but - does not exist in SBML Level 3 Version 1 Core. -"; - - -%feature("docstring") Compartment::unsetSpatialDimensions " - Unsets the value of the 'spatialDimensions' attribute of this - Compartment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - This function is only valid for SBML Level 3. -"; - - -%feature("docstring") Compartment::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this Compartment's designated size. - - Compartments in SBML have an attribute ('units') for declaring the - units of measurement intended for the value of the compartment's - size. In the absence of a value given for this attribute, the units - are inherited from values either defined on the enclosing Model (in - SBML Level 3) or in defaults (in SBML Level 2). This method - returns a UnitDefinition object based on how this compartment's units - are interpreted according to the relevant SBML guidelines, or it - returns None if no units have been declared and no defaults are - defined by the relevant SBML specification. - - Note that unit declarations for Compartment objects are specified in - terms of the identifier of a unit (e.g., using setUnits()), but - this method returns a UnitDefinition object, not a unit identifier. - It does this by constructing an appropriate UnitDefinition. For - SBML Level 2 models, it will do this even when the value of the - 'units' attribute is one of the special SBML Level 2 unit - identifiers 'substance', 'volume', 'area', 'length' or 'time'. - Callers may find this useful in conjunction with the helper methods - provided by the UnitDefinition class for comparing different - UnitDefinition objects. - - Returns a UnitDefinition that expresses the units of this - Compartment, or None if one cannot be constructed. - - Note: - - The libSBML system for unit analysis depends on the model as a - whole. In cases where the Compartment object has not yet been added - to a model, or the model itself is incomplete, unit analysis is not - possible, and consequently this method will return None. - - See also isSetUnits(), getUnits(). -"; - - -%feature("docstring") Compartment::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Compartment::getElementName " - Returns the XML element name of this object, which for Compartment, - is always 'compartment'. - - Returns the name of this element, i.e., 'compartment'. -"; - - -%feature("docstring") Compartment::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Compartment::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Compartment object have been set. - - Note: - - The required attributes for a Compartment object are: - - * 'id' (or 'name' in SBML Level 1) - - * 'constant' (in SBML Level 3 only) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Compartment::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Compartment::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Compartment::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Compartment::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Compartment::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Compartment::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Compartment::isExplicitlySetSpatialDimensions " - Internal implementation method. -"; - - -%feature("docstring") Compartment::isExplicitlySetConstant " - Internal implementation method. -"; - - -%feature("docstring") ListOfCompartments::ListOfCompartments " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfCompartments(SBMLNamespaces sbmlns) - - Creates a new ListOfCompartments object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfCompartments object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfCompartments(long level, long version) - - Creates a new ListOfCompartments object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfCompartments::clone " - Creates and returns a deep copy of this ListOfCompartments instance. - - Returns a (deep) copy of this ListOfCompartments. -"; - - -%feature("docstring") ListOfCompartments::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfCompartments::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Compartment objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfCompartments::getElementName " - Returns the XML element name of this object. - - For ListOfCompartments, the XML element name is 'listOfCompartments'. - - Returns the name of this element, i.e., 'listOfCompartments'. -"; - - -%feature("docstring") ListOfCompartments::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a Compartment from the ListOfCompartments. - - Parameter 'n' is the index number of the Compartment to get. - - Returns the nth Compartment in this ListOfCompartments. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfCompartments::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfCompartments items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfCompartments items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfCompartments::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfCompartments::createObject " - Internal implementation method. -"; - - -%feature("docstring") Species " - @ingroup Core Implementation of SBML's Species construct. - - A species in SBML refers to a pool of entities that (a) are - considered indistinguishable from each other for the purposes of the - model, (b) participate in reactions, and (c) are located in a - specific compartment. The SBML Species object class is intended to - represent these pools. - - As with other major constructs in SBML, Species has a mandatory - attribute, 'id', used to give the species type an identifier in the - model. The identifier must be a text string conforming to the - identifer syntax permitted in SBML. Species also has an optional - 'name' attribute, of type string. The 'id' and 'name' must be used - according to the guidelines described in the SBML specifications. - - The required attribute 'compartment' is used to identify the - compartment in which the species is located. The attribute's value - must be the identifier of an existing Compartment object. It is - important to note that there is no default value for the - 'compartment' attribute on Species; every species in an SBML model - must be assigned a compartment explicitly. (This also implies that - every model with one or more Species objects must define at least - one Compartment object.) - - The initial amount and concentration of a species - ====================================================================== - - The optional attributes 'initialAmount' and 'initialConcentration', - both having a data type of double, can be used to set the initial - quantity of the species in the compartment where the species is - located. These attributes are mutually exclusive; i.e., only one can - have a value on any given instance of a Species object. Missing - 'initialAmount' and 'initialConcentration' values implies that their - values either are unknown, or to be obtained from an external source, - or determined by an InitialAssignment or other SBML construct - elsewhere in the model. - - A species' initial quantity in SBML is set by the 'initialAmount' or - 'initialConcentration' attribute exactly once. If the 'constant' - attribute is True, then the value of the species' quantity is fixed - and cannot be changed except by an InitialAssignment. These methods - differ in that the 'initialAmount' and 'initialConcentration' - attributes can only be used to set the species quantity to a literal - floating-point number, whereas the use of an InitialAssignment - object allows the value to be set using an arbitrary mathematical - expression (which, thanks to MathML's expressiveness, may evaluate - to a rational number). If the species' 'constant' attribute is - False, the species' quantity value may be overridden by an - InitialAssignment or changed by AssignmentRule or AlgebraicRule, and - in addition, for t > 0, it may also be changed by a RateRule, Event - objects, and as a result of being a reactant or product in one or - more Reaction objects. (However, some constructs are mutually - exclusive; see the SBML specifications for the precise details.) It - is not an error to define 'initialAmount' or 'initialConcentration' - on a species and also redefine the value using an InitialAssignment, - but the 'initialAmount' or 'initialConcentration' setting in that - case is ignored. The SBML specifications provide additional - information about the semantics of assignments, rules and values for - simulation time t <= 0. - - SBML Level 2 additionally stipulates that in cases where a species' - compartment has a 'spatialDimensions' value of 0 (zero), the species - cannot have a value for 'initialConcentration' because the concepts - of concentration and density break down when a container has zero - dimensions. - - The units of a species' amount or concentration - ====================================================================== - - When the attribute 'initialAmount' is set, the unit of measurement - associated with the value of 'initialAmount' is specified by the - Species attribute 'substanceUnits'. When the 'initialConcentration' - attribute is set, the unit of measurement associated with this - concentration value is {unit of amount} divided by {unit of size}, - where the {unit of amount} is specified by the Species - 'substanceUnits' attribute, and the {unit of size} is specified by - the 'units' attribute of the Compartment object in which the species - is located. Note that in either case, a unit of amount is involved - and determined by the 'substanceUnits' attribute. Note - <strong>these two attributes alone do not determine the units of the - species when the species identifier appears in a mathematical - expression</strong>; that aspect is determined by the attribute - 'hasOnlySubstanceUnits' discussed below. - - In SBML Level 3, if the 'substanceUnits' attribute is not set on a - given Species object instance, then the unit of amount for that - species is inherited from the 'substanceUnits' attribute on the - enclosing Model object instance. If that attribute on Model is not - set either, then the unit associated with the species' quantity is - undefined. - - In SBML Level 2, if the 'substanceUnits' attribute is not set on a - given Species object instance, then the unit of amount for that - species is taken from the predefined SBML unit identifier - 'substance'. The value assigned to 'substanceUnits' must be chosen - from one of the following possibilities: one of the base unit - identifiers defined in SBML, the built-in unit identifier - 'substance', or the identifier of a new unit defined in the list of - unit definitions in the enclosing Model object. The chosen units - for 'substanceUnits' must be be 'dimensionless', 'mole', 'item', - 'kilogram', 'gram', or units derived from these. - - As noted at the beginning of this section, simply setting - 'initialAmount' or 'initialConcentration' alone does not determine - whether a species identifier represents an amount or a concentration - when it appears elsewhere in an SBML model. The role of the - attribute 'hasOnlySubstanceUnits' is to indicate whether the units - of the species, when the species identifier appears in mathematical - formulas, are intended to be concentration or amount. The attribute - takes on a boolean value. In SBML Level 3, the attribute has no - default value and must always be set in a model; in SBML Level 2, it - has a default value of False. - - The units of the species are used in the following ways: - - * When the species' identifier appears in a MathML formula, it - represents the species' quantity, and the unit of measurement - associated with the quantity is as described above. - - * The 'math' elements of AssignmentRule, InitialAssignment and - EventAssignment objects referring to this species should all have the - same units as the unit of measurement associated with the species - quantity. - - * In a RateRule object that defines the rate of change of the - species' quantity, the unit associated with the rule's 'math' element - should be equal to the unit of the species' quantity divided by the - model-wide unit of time; in other words, {unit of species - quantity}/{unit of time}. - - - The 'constant' and 'boundaryCondition' attributes - ====================================================================== - - The Species object class has two boolean attributes named 'constant' - and 'boundaryCondition', used to indicate whether and how the - quantity of that species can vary during a simulation. In SBML - Level 2 they are optional; in SBML Level 3 they are mandatory. The - following table shows how to interpret the combined values of these - attributes. - - Interpretation of species' constant and boundaryCondition attributes. - constant value boundaryCondition value Can have assignment or - rate rule? Can be reactant or product? Species' quantity can be - changed by true true no yes (never changes) false true yes yes rules - and events true false no no (never changes) false false yes yes - reactions or rules (but not both at the same time), and events - - By default, when a species is a product or reactant of one or more - reactions, its quantity is determined by those reactions. In SBML, - it is possible to indicate that a given species' quantity is not - determined by the set of reactions even when that species occurs as a - product or reactant; i.e., the species is on the boundary of the - reaction system, and its quantity is not determined by the - reactions. The boolean attribute 'boundaryCondition' can be used to - indicate this. A value of False indicates that the species is part - of the reaction system. In SBML Level 2, the attribute has a - default value of False, while in SBML Level 3, it has no default. - - The 'constant' attribute indicates whether the species' quantity can - be changed at all, regardless of whether by reactions, rules, or - constructs other than InitialAssignment. A value of False indicates - that the species' quantity can be changed. (This is also a common - value because the purpose of most simulations is precisely to - calculate changes in species quantities.) In SBML Level 2, the - attribute has a default value of False, while in SBML Level 3, it - has no default. Note that the initial quantity of a species can be - set by an InitialAssignment irrespective of the value of the - 'constant' attribute. - - In practice, a 'boundaryCondition' value of True means a differential - equation derived from the reaction definitions should not be - generated for the species. However, the species' quantity may still - be changed by AssignmentRule, RateRule, AlgebraicRule, Event, and - InitialAssignment constructs if its 'constant' attribute is False. - Conversely, if the species' 'constant' attribute is True, then its - value cannot be changed by anything except InitialAssignment. - - A species having 'boundaryCondition'=False and 'constant'=False can - appear as a product and/or reactant of one or more reactions in the - model. If the species is a reactant or product of a reaction, it - must not also appear as the target of any AssignmentRule or RateRule - object in the model. If instead the species has - 'boundaryCondition'=false and 'constant'=True, then it cannot appear - as a reactant or product, or as the target of any AssignmentRule, - RateRule or EventAssignment object in the model. - - The conversionFactor attribute in SBML Level 3 - ====================================================================== - - In SBML Level 3, Species has an additional optional attribute, - 'conversionFactor', that defines a conversion factor that applies to - a particular species. The value must be the identifier of a - Parameter object instance defined in the model. That Parameter - object must be a constant, meaning its 'constant' attribute must be - set to True. If a given Species object definition defines a value - for its 'conversionFactor' attribute, it takes precedence over any - factor defined by the Model object's 'conversionFactor' attribute. - - The unit of measurement associated with a species' quantity can be - different from the unit of extent of reactions in the model. SBML - Level 3 avoids implicit unit conversions by providing an explicit - way to indicate any unit conversion that might be required. The use - of a conversion factor in computing the effects of reactions on a - species' quantity is explained in detail in the SBML Level 3 - specification document. Because the value of the 'conversionFactor' - attribute is the identifier of a Parameter object, and because - parameters can have units attached to them, the transformation from - reaction extent units to species units can be completely specified - using this approach. - - Note that the unit conversion factor is <strong>only applied when - calculating the effect of a reaction on a species</strong>. It is - not used in any rules or other SBML constructs that affect the - species, and it is also not used when the value of the species is - referenced in a mathematical expression. - - The speciesType attribute in SBML Level 2 Versions 2-4 - ====================================================================== - - In SBML Level 2 Versions 2-4, each species in a model may optionally - be designated as belonging to a particular species type. The - optional attribute 'speciesType' is used to identify the species - type of the chemical entities that make up the pool represented by - the Species objects. The attribute's value must be the identifier - of an existing SpeciesType object in the model. If the - 'speciesType' attribute is not present on a particular species - definition, it means the pool contains chemical entities of a type - unique to that pool; in effect, a virtual species type is assumed - for that species, and no other species can belong to that species - type. The value of 'speciesType' attributes on species have no - effect on the numerical interpretation of a model; simulators and - other numerical analysis software may ignore 'speciesType' - attributes. - - There can be only one species of a given species type in any given - compartment of a model. More specifically, for all Species objects - having a value for the 'speciesType' attribute, the pair <center> - ('speciesType' attribute value, 'compartment' attribute value) - </center> - - must be unique across the set of all Species object in a model. - - The spatialSizeUnits attribute in SBML Level 2 Versions 1-2 - ====================================================================== - - In versions of SBML Level 2 before Version 3, the class Species - included an attribute called 'spatialSizeUnits', which allowed - explicitly setting the units of size for initial concentration. - LibSBML retains this attribute for compatibility with older - definitions of Level 2, but its use is strongly discouraged because - many software tools do no properly interpret this unit declaration - and it is incompatible with all SBML specifications after Level 2 - Version 3. - - Additional considerations for interpreting the numerical value of a - species - ====================================================================== - - Species are unique in SBML in that they have a kind of duality: a - species identifier may stand for either substance amount (meaning, a - count of the number of individual entities) or a concentration or - density (meaning, amount divided by a compartment size). The - previous sections explain the meaning of a species identifier when - it is referenced in a mathematical formula or in rules or other SBML - constructs; however, it remains to specify what happens to a species - when the compartment in which it is located changes in size. - - When a species definition has a 'hasOnlySubstanceUnits' attribute - value of False and the size of the compartment in which the species - is located changes, the default in SBML is to assume that it is the - concentration that must be updated to account for the size change. - This follows from the principle that, all other things held - constant, if a compartment simply changes in size, the size change - does not in itself cause an increase or decrease in the number of - entities of any species in that compartment. In a sense, the - default is that the amount of a species is preserved across - compartment size changes. Upon such size changes, the value of the - concentration or density must be recalculated from the simple - relationship concentration = amount / size if the value of the - concentration is needed (for example, if the species identifier - appears in a mathematical formula or is otherwise referenced in an - SBML construct). There is one exception: if the species' quantity - is determined by an AssignmentRule, RateRule, AlgebraicRule, or an - EventAssignment and the species has a 'hasOnlySubstanceUnits' - attribute value of False, it means that the concentration is - assigned by the rule or event; in that case, the amount must be - calculated when the compartment size changes. (Events also require - additional care in this situation, because an event with multiple - assignments could conceivably reassign both a species quantity and a - compartment size simultaneously. Please refer to the SBML - specifications for the details.) - - Note that the above only matters if a species has a - 'hasOnlySubstanceUnits' attribute value of False, meaning that the - species identifier refers to a concentration wherever the identifier - appears in a mathematical formula. If instead the attribute's value - is True, then the identifier of the species always stands for an - amount wherever it appears in a mathematical formula or is referenced - by an SBML construct. In that case, there is never a question about - whether an assignment or event is meant to affect the amount or - concentration: it is always the amount. - - A particularly confusing situation can occur when the species has - 'constant' attribute value of True in combination with a - 'hasOnlySubstanceUnits' attribute value of False. Suppose this - species is given a value for 'initialConcentration'. Does a - 'constant' value of True mean that the concentration is held - constant if the compartment size changes? No; it is still the - amount that is kept constant across a compartment size change. The - fact that the species was initialized using a concentration value is - irrelevant. -"; - - -%feature("docstring") ListOfSpecies " - @ingroup Core Implementation of SBML Level 2's ListOfSpecies - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Species::Species " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Species(SBMLNamespaces sbmlns) - - Creates a new Species using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the 'id' - (identifier) attribute of a Species is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor. Setting the identifier can be accomplished using the - method Species.setId(). - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Species object to an SBMLDocument (e.g., - using Model.addSpecies()), the SBML XML namespace of the document - overrides the value used when creating the Species object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the values - at the time of creation of a Species is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Species(long level, long version) - - Creates a new Species using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Species - - Parameter 'version' is a long integer, the SBML Version to assign to - this Species - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Species object to an SBMLDocument (e.g., - using Model.addSpecies()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - Species object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Species is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Species(Species orig) - - Copy constructor; creates a copy of this Species object. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Species::accept " - Accepts the given SBMLVisitor for this instance of Species. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") Species::clone " - Creates and returns a deep copy of this Species object. - - Returns a (deep) copy of this Species object. -"; - - -%feature("docstring") Species::initDefaults " - Initializes the fields of this Species object to 'typical' defaults - values. - - The SBML Species component has slightly different aspects and - default attribute values in different SBML Levels and Versions. This - method sets the values to certain common defaults, based mostly on - what they are in SBML Level 2. Specifically: - - * Sets 'boundaryCondition' to False - - * Sets 'constant' to False - - * sets 'hasOnlySubstanceUnits' to False - - * (Applies to Level 3 models only) Sets attribute 'substanceUnits' - to mole -"; - - -%feature("docstring") Species::getId " - Returns the value of the 'id' attribute of this Species object. - - Returns the id of this Species object. -"; - - -%feature("docstring") Species::getName " - Returns the value of the 'name' attribute of this Species object. - - Returns the name of this Species object. -"; - - -%feature("docstring") Species::getSpeciesType " - Get the type of this Species object object. - - Returns the value of the 'speciesType' attribute of this Species as - a string. - - Note: - - The 'speciesType' attribute is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Species::getCompartment " - Get the compartment in which this species is located. - - The compartment is designated by its identifier. - - Returns the value of the 'compartment' attribute of this Species - object, as a string. -"; - - -%feature("docstring") Species::getInitialAmount " - Get the value of the 'initialAmount' attribute. - - Returns the initialAmount of this Species, as a float-point number. -"; - - -%feature("docstring") Species::getInitialConcentration " - Get the value of the 'initialConcentration' attribute. - - Returns the initialConcentration of this Species,, as a float-point - number. - - Note: - - The attribute 'initialConcentration' is only available in SBML Level - 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::getSubstanceUnits " - Get the value of the 'substanceUnits' attribute. - - Returns the value of the 'substanceUnits' attribute of this Species, - as a string. An empty string indicates that no units have been - assigned. - - Note: - - There is an important distinction to be made between no units - assigned, and assuming a value without units has any specific unit - such as dimensionless. In SBML, default units are never attributed - to numbers, and numbers without units are not automatically assumed - to have the unit dimensionless. Please consult the relevant SBML - specification document for a more in-depth explanation of this topic - and the SBML unit system. - - See also isSetSubstanceUnits(), setSubstanceUnits(). -"; - - -%feature("docstring") Species::getSpatialSizeUnits " - Get the value of the 'spatialSizeUnits' attribute. - - Returns the value of the 'spatialSizeUnits' attribute of this Species - object, as a string. - - WARNING: - - In versions of SBML Level 2 before Version 3, the class Species - included an attribute called 'spatialSizeUnits', which allowed - explicitly setting the units of size for initial concentration. - This attribute was removed in SBML Level 2 Version 3. LibSBML - retains this attribute for compatibility with older definitions of - Level 2, but its use is strongly discouraged because it is - incompatible with Level 2 Version 3 and Level 2 Version 4. -"; - - -%feature("docstring") Species::getUnits " - Get the value of the 'units' attribute. - - Returns the units of this Species (L1 only). - - Note: - - The 'units' attribute is defined only in SBML Level 1. In SBML - Level 2 and Level 3, it has been replaced by a combination of - 'substanceUnits' and the units of the Compartment object in which a - species is located. In SBML Level 2 Versions 1-2, an additional - attribute 'spatialSizeUnits' helps determine the units of the - species quantity, but this attribute was removed in later versions - of SBML Level 2. -"; - - -%feature("docstring") Species::getHasOnlySubstanceUnits " - Get the value of the 'hasOnlySubstanceUnits' attribute. - - Returns True if this Species' 'hasOnlySubstanceUnits' attribute - value is nonzero, False otherwise. - - Note: - - The 'hasOnlySubstanceUnits' attribute does not exist in SBML Level - 1. -"; - - -%feature("docstring") Species::getBoundaryCondition " - Get the value of the 'boundaryCondition' attribute. - - Returns True if this Species' 'boundaryCondition' attribute value is - nonzero, False otherwise. -"; - - -%feature("docstring") Species::getCharge " - Get the value of the 'charge' attribute. - - Returns the charge of this Species object. - - Note: - - Beginning in SBML Level 2 Version 2, the 'charge' attribute on - Species is deprecated and in SBML Level 3 it does not exist at all. - Its use strongly discouraged. Its presence is considered a - misfeature in earlier definitions of SBML because its implications - for the mathematics of a model were never defined, and in any case, - no known modeling system ever used it. Instead, models take account - of charge values directly in their definitions of species by (for - example) having separate species identities for the charged and - uncharged versions of the same species. This allows the condition to - affect model mathematics directly. LibSBML retains this method for - easier compatibility with SBML Level 1. -"; - - -%feature("docstring") Species::getConstant " - Get the value of the 'constant' attribute. - - Returns True if this Species's 'constant' attribute value is - nonzero, False otherwise. - - Note: - - The attribute 'constant' is only available in SBML Levels 2 and 3. - It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::getConversionFactor " - Get the value of the 'conversionFactor' attribute. - - Returns the conversionFactor of this Species, as a string. - - Note: - - The 'conversionFactor' attribute was introduced in SBML Level 3. It - does not exist on Species in SBML Levels 1 and 2. -"; - - -%feature("docstring") Species::isSetId " - Predicate returning True if this Species object's 'id' attribute is - set. - - Returns True if the 'id' attribute of this Species is set, False - otherwise. -"; - - -%feature("docstring") Species::isSetName " - Predicate returning True if this Species object's 'name' attribute - is set. - - Returns True if the 'name' attribute of this Species is set, False - otherwise. -"; - - -%feature("docstring") Species::isSetSpeciesType " - Predicate returning True if this Species object's 'speciesType' - attribute is set. - - Returns True if the 'speciesType' attribute of this Species is set, - False otherwise. - - Note: - - The 'speciesType' attribute is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Species::isSetCompartment " - Predicate returning True if this Species object's 'compartment' - attribute is set. - - Returns True if the 'compartment' attribute of this Species is set, - False otherwise. -"; - - -%feature("docstring") Species::isSetInitialAmount " - Predicate returning True if this Species object's 'initialAmount' - attribute is set. - - Returns True if the 'initialAmount' attribute of this Species is - set, False otherwise. - - Note: - - In SBML Level 1, Species' 'initialAmount' is required and therefore - should always be set. (However, in Level 1, the attribute has no - default value either, so this method will not return True until a - value has been assigned.) In SBML Level 2, 'initialAmount' is - optional and as such may or may not be set. -"; - - -%feature("docstring") Species::isSetInitialConcentration " - Predicate returning True if this Species object's - 'initialConcentration' attribute is set. - - Returns True if the 'initialConcentration' attribute of this Species - is set, False otherwise. - - Note: - - The attribute 'initialConcentration' is only available in SBML Level - 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::isSetSubstanceUnits " - Predicate returning True if this Species object's 'substanceUnits' - attribute is set. - - Returns True if the 'substanceUnits' attribute of this Species is - set, False otherwise. -"; - - -%feature("docstring") Species::isSetSpatialSizeUnits " - Predicate returning True if this Species object's 'spatialSizeUnits' - attribute is set. - - Returns True if the 'spatialSizeUnits' attribute of this Species is - set, False otherwise. - - WARNING: - - In versions of SBML Level~2 before Version 3, the class Species - included an attribute called 'spatialSizeUnits', which allowed - explicitly setting the units of size for initial concentration. This - attribute was removed in SBML Level 2 Version 3. LibSBML retains - this attribute for compatibility with older definitions of Level 2, - but its use is strongly discouraged because it is incompatible with - Level 2 Version 3 and Level 2 Version 4. -"; - - -%feature("docstring") Species::isSetUnits " - Predicate returning True if this Species object's 'units' attribute - is set. - - Returns True if the 'units' attribute of this Species is set, False - otherwise. -"; - - -%feature("docstring") Species::isSetCharge " - Predicate returning True if this Species object's 'charge' attribute - is set. - - Returns True if the 'charge' attribute of this Species is set, False - otherwise. - - Note: - - Beginning in SBML Level 2 Version 2, the 'charge' attribute on - Species in SBML is deprecated and in SBML Level 3 it does not exist - at all. Its use strongly discouraged. Its presence is considered a - misfeature in earlier definitions of SBML because its implications - for the mathematics of a model were never defined, and in any case, - no known modeling system ever used it. Instead, models take account - of charge values directly in their definitions of species by (for - example) having separate species identities for the charged and - uncharged versions of the same species. This allows the condition to - affect model mathematics directly. LibSBML retains this method for - easier compatibility with SBML Level 1. -"; - - -%feature("docstring") Species::isSetConversionFactor " - Predicate returning True if this Species object's 'conversionFactor' - attribute is set. - - Returns True if the 'conversionFactor' attribute of this Species is - set, False otherwise. - - Note: - - The 'conversionFactor' attribute was introduced in SBML Level 3. It - does not exist on Species in SBML Levels 1 and 2. -"; - - -%feature("docstring") Species::isSetBoundaryCondition " - Predicate returning True if this Species object's - 'boundaryCondition' attribute is set. - - Returns True if the 'boundaryCondition' attribute of this Species is - set, False otherwise. -"; - - -%feature("docstring") Species::isSetHasOnlySubstanceUnits " - Predicate returning True if this Species object's - 'hasOnlySubstanceUnits' attribute is set. - - Returns True if the 'hasOnlySubstanceUnits' attribute of this Species - is set, False otherwise. - - Note: - - The 'hasOnlySubstanceUnits' attribute does not exist in SBML Level - 1. -"; - - -%feature("docstring") Species::isSetConstant " - Predicate returning True if this Species object's 'constant' - attribute is set. - - Returns True if the 'constant' attribute of this Species is set, - False otherwise. - - Note: - - The attribute 'constant' is only available in SBML Levels 2 and 3. - It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::setId " - Sets the value of the 'id' attribute of this Species object. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - Species - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Species::setName " - Sets the value of the 'name' attribute of this Species object. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the Species - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Species::setSpeciesType " - Sets the 'speciesType' attribute of this Species object. - - Parameter 'sid' is the identifier of a SpeciesType object defined - elsewhere in this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The 'speciesType' attribute is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Species::setCompartment " - Sets the 'compartment' attribute of this Species object. - - Parameter 'sid' is the identifier of a Compartment object defined - elsewhere in this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Species::setInitialAmount " - Sets the 'initialAmount' attribute of this Species and marks the - field as set. - - This method also unsets the 'initialConcentration' attribute. - - Parameter 'value' is the value to which the 'initialAmount' attribute - should be set. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") Species::setInitialConcentration " - Sets the 'initialConcentration' attribute of this Species and marks - the field as set. - - This method also unsets the 'initialAmount' attribute. - - Parameter 'value' is the value to which the 'initialConcentration' - attribute should be set. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attribute 'initialConcentration' is only available in SBML Level - 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::setSubstanceUnits " - Sets the 'substanceUnits' attribute of this Species object. - - Parameter 'sid' is the identifier of the unit to use. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Species::setSpatialSizeUnits " - (SBML Level 2 Versions 1-2) Sets the 'spatialSizeUnits' attribute of - this Species object. - - Parameter 'sid' is the identifier of the unit to use. - - WARNING: - - In versions of SBML Level~2 before Version 3, the class Species - included an attribute called 'spatialSizeUnits', which allowed - explicitly setting the units of size for initial concentration. This - attribute was removed in SBML Level 2 Version 3. LibSBML retains - this attribute for compatibility with older definitions of Level 2, - but its use is strongly discouraged because it is incompatible with - Level 2 Version 3 and Level 2 Version 4. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Species::setUnits " - (SBML Level 1 only) Sets the units of this Species object. - - Parameter 'sname' is the identifier of the unit to use. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Species::setHasOnlySubstanceUnits " - Sets the 'hasOnlySubstanceUnits' attribute of this Species object. - - Parameter 'value' is boolean value for the 'hasOnlySubstanceUnits' - attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The 'hasOnlySubstanceUnits' attribute does not exist in SBML Level - 1. -"; - - -%feature("docstring") Species::setBoundaryCondition " - Sets the 'boundaryCondition' attribute of this Species object. - - Parameter 'value' is boolean value for the 'boundaryCondition' - attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") Species::setCharge " - Sets the 'charge' attribute of this Species object. - - Parameter 'value' is an integer to which to set the 'charge' to. - - Note: - - Beginning in SBML Level 2 Version 2, the 'charge' attribute on - Species in SBML is deprecated and its use strongly discouraged, and - it does not exist in SBML Level 3 at all. Its presence is - considered a misfeature in earlier definitions of SBML because its - implications for the mathematics of a model were never defined, and - in any case, no known modeling system ever used it. Instead, models - take account of charge values directly in their definitions of - species by (for example) having separate species identities for the - charged and uncharged versions of the same species. This allows the - condition to affect model mathematics directly. LibSBML retains this - method for easier compatibility with SBML Level 1. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Species::setConstant " - Sets the 'constant' attribute of this Species object. - - Parameter 'value' is a boolean value for the 'constant' attribute - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attribute 'constant' is only available in SBML Levels 2 and 3. - It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::setConversionFactor " - Sets the value of the 'conversionFactor' attribute of this Species - object. - - The string in 'sid' is copied. - - Parameter 'sid' is the new conversionFactor for the Species - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'conversionFactor' attribute was introduced in SBML Level 3. It - does not exist on Species in SBML Levels 1 and 2. -"; - - -%feature("docstring") Species::unsetName " - Unsets the value of the 'name' attribute of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Species::unsetSpeciesType " - Unsets the 'speciesType' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The attribute 'speciesType' is only available in SBML Level 2 - Versions 2-4. -"; - - -%feature("docstring") Species::unsetInitialAmount " - Unsets the 'initialAmount' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Species::unsetInitialConcentration " - Unsets the 'initialConcentration' attribute value of this Species - object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The attribute 'initialConcentration' is only available in SBML Level - 2 and 3. It does not exist on Species in Level 1. -"; - - -%feature("docstring") Species::unsetSubstanceUnits " - Unsets the 'substanceUnits' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Species::unsetSpatialSizeUnits " - Unsets the 'spatialSizeUnits' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - WARNING: - - In versions of SBML Level~2 before Version 3, the class Species - included an attribute called 'spatialSizeUnits', which allowed - explicitly setting the units of size for initial concentration. This - attribute was removed in SBML Level 2 Version 3. LibSBML retains - this attribute for compatibility with older definitions of Level 2, - but its use is strongly discouraged because it is incompatible with - Level 2 Version 3 and Level 2 Version 4. -"; - - -%feature("docstring") Species::unsetUnits " - Unsets the 'units' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Species::unsetCharge " - Unsets the 'charge' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - Beginning in SBML Level 2 Version 2, the 'charge' attribute on - Species in SBML is deprecated and its use strongly discouraged, and - it does not exist in SBML Level 3 at all. Its presence is - considered a misfeature in earlier definitions of SBML because its - implications for the mathematics of a model were never defined, and - in any case, no known modeling system ever used it. Instead, models - take account of charge values directly in their definitions of - species by (for example) having separate species identities for the - charged and uncharged versions of the same species. This allows the - condition to affect model mathematics directly. LibSBML retains this - method for easier compatibility with SBML Level 1. -"; - - -%feature("docstring") Species::unsetConversionFactor " - Unsets the 'conversionFactor' attribute value of this Species object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'conversionFactor' attribute was introduced in SBML Level 3. It - does not exist on Species in SBML Levels 1 and 2. -"; - - -%feature("docstring") Species::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this Species' amount or concentration. - - Species in SBML have an attribute ('substanceUnits') for declaring - the units of measurement intended for the species' amount or - concentration (depending on which one applies). In the absence of a - value given for 'substanceUnits', the units are taken from the - enclosing Model's definition of 'substance' or 'substance'/(size of - the compartment) in which the species is located, or finally, if - these are not redefined by the Model, the relevant SBML default units - for those quantities. Following that procedure, the method - getDerivedUnitDefinition()@~ returns a UnitDefinition based on the - interpreted units of this species's amount or concentration. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - Note also that unit declarations for Species are in terms of the - identifier of a unit, but this method returns a UnitDefinition - object, not a unit identifier. It does this by constructing an - appropriate UnitDefinition. Callers may find this particularly - useful when used in conjunction with the helper methods on - UnitDefinition for comparing different UnitDefinition objects. - - In SBML Level 2 specifications prior to Version 3, Species includes - an additional attribute named 'spatialSizeUnits', which allows - explicitly setting the units of size for initial concentration. The - getDerivedUnitDefinition()@~ takes this into account for models - expressed in SBML Level 2 Versions 1 and 2. - - Returns a UnitDefinition that expresses the units of this Species, - or None if one cannot be constructed. - - See also getSubstanceUnits(). -"; - - -%feature("docstring") Species::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Species::getElementName " - Returns the XML element name of this object, which for Species, is - always 'species'. - - Returns the name of this element, i.e., 'species'. -"; - - -%feature("docstring") Species::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Species::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Species object have been set. - - Note: - - The required attributes for a Species object are: - - * 'id' (or 'name' in SBML Level 1) - - * 'compartment' - - * 'initialAmount' (required in SBML Level 1 only; optional - otherwise) - - * 'hasOnlySubstanceUnits' (required in SBML Level 3; optional in - SBML Level 2) - - * 'boundaryCondition' (required in SBML Level 3; optional in Levels - 1 and 2) - - * 'constant' (required in SBML Level 3; optional in SBML Level 2) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Species::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Species::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Species::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Species::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Species::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Species::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Species::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Species::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Species::isExplicitlySetBoundaryCondition " - Internal implementation method. -"; - - -%feature("docstring") Species::isExplicitlySetConstant " - Internal implementation method. -"; - - -%feature("docstring") Species::isExplicitlySetHasOnlySubsUnits " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpecies::ListOfSpecies " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfSpecies(SBMLNamespaces sbmlns) - - Creates a new ListOfSpecies object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfSpecies object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfSpecies(long level, long version) - - Creates a new ListOfSpecies object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfSpecies::clone " - Creates and returns a deep copy of this ListOfSpeciess instance. - - Returns a (deep) copy of this ListOfSpeciess. -"; - - -%feature("docstring") ListOfSpecies::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfSpecies::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Species objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfSpecies::getElementName " - Returns the XML element name of this object. - - For ListOfSpeciess, the XML element name is 'listOfSpeciess'. - - Returns the name of this element, i.e., 'listOfSpeciess'. -"; - - -%feature("docstring") ListOfSpecies::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a Species from the ListOfSpecies. - - Parameter 'n' is the index number of the Species to get. - - Returns the nth Species in this ListOfSpecies. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfSpecies::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfSpeciess items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfSpeciess items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfSpecies::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpecies::createObject " - Internal implementation method. -"; - - -%feature("docstring") Parameter " - @ingroup Core Implementation of SBML's Parameter construct. - - A Parameter is used in SBML to define a symbol associated with a - value; this symbol can then be used in mathematical formulas in a - model. By default, parameters have constant value for the duration - of a simulation, and for this reason are called parameters instead - of variables in SBML, although it is crucial to understand that SBML - parameters represent both concepts. Whether a given SBML parameter - is intended to be constant or variable is indicated by the value of - its 'constant' attribute. - - SBML's Parameter has a required attribute, 'id', that gives the - parameter a unique identifier by which other parts of an SBML model - definition can refer to it. A parameter can also have an optional - 'name' attribute of type string. Identifiers and names must be used - according to the guidelines described in the SBML specifications. - - The optional attribute 'value' determines the value (of type double) - assigned to the parameter. A missing value for 'value' implies that - the value either is unknown, or to be obtained from an external - source, or determined by an initial assignment. The unit of - measurement associated with the value of the parameter can be - specified using the optional attribute 'units'. Here we only - mention briefly some notable points about the possible unit choices, - but readers are urged to consult the SBML specification documents - for more information: - - - * In SBML Level 3, there are no constraints on the units that can - be assigned to parameters in a model; there are also no units to - inherit from the enclosing Model object (unlike the case for, e.g., - Species and Compartment). - - * In SBML Level 2, the value assigned to the parameter's 'units' - attribute must be chosen from one of the following possibilities: one - of the base unit identifiers defined in SBML; one of the built-in - unit identifiers 'substance', 'time', 'volume', 'area' or 'length'; - or the identifier of a new unit defined in the list of unit - definitions in the enclosing Model structure. There are no - constraints on the units that can be chosen from these sets. There - are no default units for parameters. - - The Parameter structure has another boolean attribute named - 'constant' that is used to indicate whether the parameter's value - can vary during a simulation. (In SBML Level 3, the attribute is - mandatory and must be given a value; in SBML Levels below Level 3, - the attribute is optional.) A value of True indicates the - parameter's value cannot be changed by any construct except - InitialAssignment. Conversely, if the value of 'constant' is False, - other constructs in SBML, such as rules and events, can change the - value of the parameter. - - SBML Level 3 uses a separate object class, LocalParameter, for - parameters that are local to a Reaction's KineticLaw. In Levels - prior to SBML Level 3, the Parameter class is used both for - definitions of global parameters, as well as reaction-local - parameters stored in a list within KineticLaw objects. Parameter - objects that are local to a reaction (that is, those defined within - the KineticLaw structure of a Reaction) cannot be changed by rules - and therefore are implicitly always constant; consequently, in SBML - Level 2, parameter definitions within Reaction structures should not - have their 'constant' attribute set to False. - - What if a global parameter has its 'constant' attribute set to False, - but the model does not contain any rules, events or other constructs - that ever change its value over time? Although the model may be - suspect, this situation is not strictly an error. A value of False - for 'constant' only indicates that a parameter can change value, not - that it must. - - As with all other major SBML components, Parameter is derived from - SBase, and the methods defined on SBase are available on Parameter. - - Note: - - The use of the term parameter in SBML sometimes leads to confusion - among readers who have a particular notion of what something called - 'parameter' should be. It has been the source of heated debate, but - despite this, no one has yet found an adequate replacement term that - does not have different connotations to different people and hence - leads to confusion among some subset of users. Perhaps it would - have been better to have two constructs, one called constants and - the other called variables. The current approach in SBML is simply - more parsimonious, using a single Parameter construct with the - boolean flag 'constant' indicating which flavor it is. In any case, - readers are implored to look past their particular definition of a - parameter and simply view SBML's Parameter as a single mechanism for - defining both constants and (additional) variables in a model. (We - write additional because the species in a model are usually - considered to be the central variables.) After all, software tools - are not required to expose to users the actual names of particular - SBML constructs, and thus tools can present to their users whatever - terms their designers feel best matches their target audience. - - See also ListOfParameters. -"; - - -%feature("docstring") ListOfParameters " - @ingroup Core Implementation of SBML's ListOfParameters construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Parameter::Parameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Parameter(SBMLNamespaces sbmlns) - - Creates a new Parameter using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the 'id' - (identifier) attribute of a Parameter is required to have a value. - Thus, callers are cautioned to assign a value after calling this - constructor if no identifier is provided as an argument. Setting the - identifier can be accomplished using the method setId(). - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Parameter object to an SBMLDocument (e.g., - using Model.addParameter()), the SBML XML namespace of the document - overrides the value used when creating the Parameter object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a Parameter is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value - to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Parameter(long level, long version) - - Creates a new Parameter using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Parameter - - Parameter 'version' is a long integer, the SBML Version to assign to - this Parameter - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Parameter object to an SBMLDocument (e.g., - using Model.addParameter()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - Parameter object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Parameter - is an important aid to producing valid SBML. Knowledge of the - intented SBML Level and Version determine whether it is valid to - assign a particular value to an attribute, or whether it is valid to - add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Parameter(Parameter orig) - - Copy constructor; creates a copy of a Parameter. - - Parameter 'orig' is the Parameter instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Parameter::accept " - Accepts the given SBMLVisitor for this instance of Parameter. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), indicating whether the - Visitor would like to visit the next Parameter object in the list of - parameters within which the present object is embedded. -"; - - -%feature("docstring") Parameter::clone " - Creates and returns a deep copy of this Parameter. - - Returns a (deep) copy of this Parameter. -"; - - -%feature("docstring") Parameter::initDefaults " - Initializes the fields of this Parameter object to 'typical' defaults - values. - - The SBML Parameter component has slightly different aspects and - default attribute values in different SBML Levels and Versions. Many - SBML object classes defined by libSBML have an initDefaults() method - to set the values to certain common defaults, based mostly on what - they are in SBML Level 2. In the case of Parameter, this method - only sets the value of the 'constant' attribute to True. - - See also getConstant(), isSetConstant(), setConstant(). -"; - - -%feature("docstring") Parameter::getId " - Returns the value of the 'id' attribute of this Parameter. - - Returns the id of this Parameter. -"; - - -%feature("docstring") Parameter::getName " - Returns the value of the 'name' attribute of this Parameter. - - Returns the name of this Parameter. -"; - - -%feature("docstring") Parameter::getValue " - Gets the numerical value of this Parameter. - - Returns the value of the 'value' attribute of this Parameter, as a - number of type double. - - Note: - - It is crucial that callers not blindly call Parameter.getValue() - without first using Parameter.isSetValue() to determine whether a - value has ever been set. Otherwise, the value return by - Parameter.getValue() may not actually represent a value assigned to - the parameter. The reason is simply that the data type double in a - program always has some value. A separate test is needed to - determine whether the value is a true model value, or uninitialized - data in a computer's memory location. - - See also isSetValue(), setValue(), getUnits(). -"; - - -%feature("docstring") Parameter::getUnits " - Gets the units defined for this Parameter. - - The value of an SBML parameter's 'units' attribute establishes the - unit of measurement associated with the parameter's value. - - Returns the value of the 'units' attribute of this Parameter, as a - string. An empty string indicates that no units have been assigned. - - Note: - - There is an important distinction to be made between no units - assigned, and assuming a value without units has any specific unit - such as dimensionless. In SBML, default units are never attributed - to numbers, and numbers without units are not automatically assumed - to have the unit dimensionless. Please consult the relevant SBML - specification document for a more in-depth explanation of this topic - and the SBML unit system. - - See also isSetUnits(), setUnits(), getValue(). -"; - - -%feature("docstring") Parameter::getConstant " - Gets the value of the 'constant' attribute of this Parameter - instance. - - Returns True if this Parameter is declared as being constant, False - otherwise. - - Note: - - Readers who view the documentation for LocalParameter may be - confused about the presence of this method. LibSBML derives - LocalParameter from Parameter; however, this does not precisely match - the object hierarchy defined by SBML Level 3, where LocalParameter - is derived directly from SBase and not Parameter. We believe this - arrangement makes it easier for libSBML users to program - applications that work with both SBML Level 2 and SBML Level 3, but - programmers should also keep in mind this difference exists. A - side-effect of libSBML's scheme is that certain methods on - LocalParameter that are inherited from Parameter do not actually have - relevance to LocalParameter objects. An example of this is the - methods pertaining to Parameter's attribute 'constant' (i.e., - isSetConstant(), setConstant(), and getConstant()). - - See also isSetConstant(), setConstant(). -"; - - -%feature("docstring") Parameter::isSetId " - Predicate returning True if this Parameter's 'id' attribute is set. - - Returns True if the 'id' attribute of this Parameter is set, False - otherwise. -"; - - -%feature("docstring") Parameter::isSetName " - Predicate returning True if this Parameter's 'name' attribute is - set. - - Returns True if the 'name' attribute of this Parameter is set, False - otherwise. -"; - - -%feature("docstring") Parameter::isSetValue " - Predicate returning True if the 'value' attribute of this Parameter - is set. - - In SBML definitions after SBML Level 1 Version 1, parameter values - are optional and have no defaults. If a model read from a file does - not contain a setting for the 'value' attribute of a parameter, its - value is considered unset; it does not default to any particular - value. Similarly, when a Parameter object is created in libSBML, it - has no value until given a value. The Parameter.isSetValue() method - allows calling applications to determine whether a given parameter's - value has ever been set. - - In SBML Level 1 Version 1, parameters are required to have values - and therefore, the value of a Parameter should always be set. In - Level 1 Version 2 and beyond, the value is optional and as such, the - 'value' attribute may or may not be set. - - Returns True if the value of this Parameter is set, False otherwise. - - See also getValue(), setValue(). -"; - - -%feature("docstring") Parameter::isSetUnits " - Predicate returning True if the 'units' attribute of this Parameter - is set. - - Returns True if the 'units' attribute of this Parameter is set, - False otherwise. - - Note: - - There is an important distinction to be made between no units - assigned, and assuming a value without units has any specific unit - such as dimensionless. In SBML, default units are never attributed - to numbers, and numbers without units are not automatically assumed - to have the unit dimensionless. Please consult the relevant SBML - specification document for a more in-depth explanation of this topic - and the SBML unit system. -"; - - -%feature("docstring") Parameter::isSetConstant " - Predicate returning True if the 'constant' attribute of this - Parameter is set. - - Returns True if the 'constant' attribute of this Parameter is set, - False otherwise. - - Note: - - Readers who view the documentation for LocalParameter may be - confused about the presence of this method. LibSBML derives - LocalParameter from Parameter; however, this does not precisely match - the object hierarchy defined by SBML Level 3, where LocalParameter - is derived directly from SBase and not Parameter. We believe this - arrangement makes it easier for libSBML users to program - applications that work with both SBML Level 2 and SBML Level 3, but - programmers should also keep in mind this difference exists. A - side-effect of libSBML's scheme is that certain methods on - LocalParameter that are inherited from Parameter do not actually have - relevance to LocalParameter objects. An example of this is the - methods pertaining to Parameter's attribute 'constant' (i.e., - isSetConstant(), setConstant(), and getConstant()). - - See also getConstant(), setConstant(). -"; - - -%feature("docstring") Parameter::setId " - Sets the value of the 'id' attribute of this Parameter. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - Parameter - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Parameter::setName " - Sets the value of the 'name' attribute of this Parameter. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the Parameter - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Parameter::setValue " - Sets the 'value' attribute of this Parameter to the given double - value and marks the attribute as set. - - Parameter 'value' is a double, the value to assign - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") Parameter::setUnits " - Sets the 'units' attribute of this Parameter to a copy of the given - units identifier 'units'. - - Parameter 'units' is a string, the identifier of the units to assign - to this Parameter instance - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Parameter::setConstant " - Sets the 'constant' attribute of this Parameter to the given boolean - 'flag'. - - Parameter 'flag' is a boolean, the value for the 'constant' attribute - of this Parameter instance - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - Readers who view the documentation for LocalParameter may be - confused about the presence of this method. LibSBML derives - LocalParameter from Parameter; however, this does not precisely match - the object hierarchy defined by SBML Level 3, where LocalParameter - is derived directly from SBase and not Parameter. We believe this - arrangement makes it easier for libSBML users to program - applications that work with both SBML Level 2 and SBML Level 3, but - programmers should also keep in mind this difference exists. A - side-effect of libSBML's scheme is that certain methods on - LocalParameter that are inherited from Parameter do not actually have - relevance to LocalParameter objects. An example of this is the - methods pertaining to Parameter's attribute 'constant' (i.e., - isSetConstant(), setConstant(), and getConstant()). - - See also getConstant(), isSetConstant(). -"; - - -%feature("docstring") Parameter::unsetName " - Unsets the value of the 'name' attribute of this Parameter. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Parameter::unsetValue " - Unsets the 'value' attribute of this Parameter instance. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - In SBML Level 1 Version 1, parameters are required to have values - and therefore, the value of a Parameter should always be set. In - SBML Level 1 Version 2 and beyond, the value is optional and as - such, the 'value' attribute may or may not be set. -"; - - -%feature("docstring") Parameter::unsetUnits " - Unsets the 'units' attribute of this Parameter instance. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Parameter::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this Parameter's value. - - Parameters in SBML have an attribute ('units') for declaring the - units of measurement intended for the parameter's value. No - defaults are defined by SBML in the absence of a definition for - 'units'. This method returns a UnitDefinition object based on the - units declared for this Parameter using its 'units' attribute, or it - returns None if no units have been declared. - - Note that unit declarations for Parameter objects are specified in - terms of the identifier of a unit (e.g., using setUnits()), but this - method returns a UnitDefinition object, not a unit identifier. It - does this by constructing an appropriate UnitDefinition.For SBML - Level 2 models, it will do this even when the value of the 'units' - attribute is one of the special SBML Level 2 unit identifiers - 'substance', 'volume', 'area', 'length' or 'time'. Callers may find - this useful in conjunction with the helper methods provided by the - UnitDefinition class for comparing different UnitDefinition objects. - - Returns a UnitDefinition that expresses the units of this - Parameter, or None if one cannot be constructed. - - Note: - - The libSBML system for unit analysis depends on the model as a - whole. In cases where the Parameter object has not yet been added to - a model, or the model itself is incomplete, unit analysis is not - possible, and consequently this method will return None. - - See also isSetUnits(). -"; - - -%feature("docstring") Parameter::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Parameter::getElementName " - Returns the XML element name of this object, which for Parameter, is - always 'parameter'. - - Returns the name of this element, i.e., 'parameter'. -"; - - -%feature("docstring") Parameter::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Parameter::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Parameter object have been set. - - Note: - - The required attributes for a Parameter object are: - - * 'id' (or 'name' in SBML Level 1) - - * 'value' (required in Level 1, optional otherwise) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Parameter::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Parameter::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Parameter::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Parameter::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Parameter::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Parameter::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Parameter::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Parameter::isExplicitlySetConstant " - Internal implementation method. -"; - - -%feature("docstring") ListOfParameters::ListOfParameters " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfParameters(SBMLNamespaces sbmlns) - - Creates a new ListOfParameters object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfParameters object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfParameters(long level, long version) - - Creates a new ListOfParameters object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfParameters::clone " - Creates and returns a deep copy of this ListOfParameters instance. - - Returns a (deep) copy of this ListOfParameters. -"; - - -%feature("docstring") ListOfParameters::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfParameters::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Parameter objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfParameters::getElementName " - Returns the XML element name of this object. - - For ListOfParameters, the XML element name is 'listOfParameters'. - - Returns the name of this element, i.e., 'listOfParameters'. -"; - - -%feature("docstring") ListOfParameters::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Returns the Parameter object located at position 'n' within this - ListOfParameters instance. - - Parameter 'n' is the index number of the Parameter to get. - - Returns the nth Parameter in this ListOfParameters. If the index 'n' - is out of bounds for the length of the list, then None is returned. - - See also size(), get(), get(), size(). -"; - - -%feature("docstring") ListOfParameters::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfParameters, and returns a - pointer to it. - - Parameter 'n' is the index of the item to remove - - Returns the item removed. The caller owns the returned object and is - responsible for deleting it. If the index number 'n' is out of - bounds for the length of the list, then None is returned. - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes the first Parameter object in this ListOfParameters matching - the given identifier, and returns a pointer to it. - - Parameter 'sid' is the identifier of the item to remove. - - Returns the item removed. The caller owns the returned object and is - responsible for deleting it. If none of the items have an identifier - matching 'sid', then None is returned. -"; - - -%feature("docstring") ListOfParameters::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfParameters::createObject " - Internal implementation method. -"; - - -%feature("docstring") LocalParameter " - @ingroup Core Implementation of SBML Level 3's LocalParameter - construct. - - LocalParameter has been introduced in SBML Level 3 to serve as the - object class for parameter definitions that are intended to be local - to a Reaction. Objects of class LocalParameter never appear at the - Model level; they are always contained within ListOfLocalParameters - lists which are in turn contained within KineticLaw objects. - - Like its global Parameter counterpart, the LocalParameter object - class is used to define a symbol associated with a value; this - symbol can then be used in a model's mathematical formulas (and - specifically, for LocalParameter, reaction rate formulas). Unlike - Parameter, the LocalParameter class does not have a 'constant' - attribute: local parameters within reactions are always constant. - - LocalParameter has one required attribute, 'id', to give the - parameter a unique identifier by which other parts of an SBML model - definition can refer to it. A parameter can also have an optional - 'name' attribute of type string. Identifiers and names must be used - according to the guidelines described in the SBML specifications. - - The optional attribute 'value' determines the value (of type double) - assigned to the parameter. A missing value for 'value' implies that - the value either is unknown, or to be obtained from an external - source, or determined by an initial assignment. The unit of - measurement associated with the value of the parameter can be - specified using the optional attribute 'units'. Here we only - mention briefly some notable points about the possible unit choices, - but readers are urged to consult the SBML specification documents - for more information: - - - * In SBML Level 3, there are no constraints on the units that can - be assigned to parameters in a model; there are also no units to - inherit from the enclosing Model object. - - * In SBML Level 2, the value assigned to the parameter's 'units' - attribute must be chosen from one of the following possibilities: one - of the base unit identifiers defined in SBML; one of the built-in - unit identifiers 'substance', 'time', 'volume', 'area' or 'length'; - or the identifier of a new unit defined in the list of unit - definitions in the enclosing Model structure. There are no - constraints on the units that can be chosen from these sets. There - are no default units for local parameters. - - As with all other major SBML components, LocalParameter is derived - from SBase, and the methods defined on SBase are available on - LocalParameter. - - WARNING: - - LibSBML derives LocalParameter from Parameter; however, this does - not precisely match the object hierarchy defined by SBML Level 3, - where LocalParameter is derived directly from SBase and not - Parameter. We believe this arrangement makes it easier for libSBML - users to program applications that work with both SBML Level 2 and - SBML Level 3, but programmers should also keep in mind this - difference exists. A side-effect of libSBML's scheme is that certain - methods on LocalParameter that are inherited from Parameter do not - actually have relevance to LocalParameter objects. An example of - this is the methods pertaining to Parameter's attribute 'constant' - (i.e., isSetConstant(), setConstant(), and getConstant()). - - See also ListOfLocalParameters, KineticLaw. -"; - - -%feature("docstring") ListOfLocalParameters " - @ingroup Core Implementation of SBML Level 3's ListOfLocalParameters - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - ListOfLocalParameters is a subsidiary object class used only within - KineticLaw in SBML Level 3. It is not defined in SBML Levels 1-2. - In Level 3, a KineticLaw object can have a single object of class - ListOfLocalParameters containing a set of local parameters used in - that kinetic law definition. - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") LocalParameter::LocalParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - LocalParameter(SBMLNamespaces sbmlns) - - Creates a new LocalParameter object with the given SBMLNamespaces - object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - It is worth emphasizing that although this constructor does not take - an identifier argument, in SBML Level 2 and beyond, the 'id' - (identifier) attribute of a LocalParameter is required to have a - value. Thus, callers are cautioned to assign a value after calling - this constructor if no identifier is provided as an argument. - Setting the identifier can be accomplished using the method - setId(). - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a LocalParameter object to an SBMLDocument - (e.g., using KineticLaw.addLocalParameter()), the SBML XML namespace - of the document overrides the value used when creating the - LocalParameter object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a LocalParameter is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - LocalParameter(long level, long version) - - Creates a new LocalParameter object with the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - LocalParameter. - - Parameter 'version' is a long integer, the SBML Version to assign to - this LocalParameter. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a LocalParameter object to an SBMLDocument - (e.g., using KineticLaw.addLocalParameter()), the SBML Level, SBML - Version and XML namespace of the document override the values used - when creating the LocalParameter object via this constructor. This - is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a LocalParameter is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - LocalParameter(LocalParameter orig) - - Copy constructor; creates a copy of a given LocalParameter object. - - Parameter 'orig' is the LocalParameter instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - LocalParameter(Parameter orig) - - Copy constructor; creates a LocalParameter object by copying the - attributes of a given Parameter object. - - Parameter 'orig' is the Parameter instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") LocalParameter::accept " - Accepts the given SBMLVisitor for this instance of LocalParameter. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next LocalParameter in the list of - parameters within which this LocalParameter is embedded (i.e., either - the list of parameters in the parent Model or the list of parameters - in the enclosing KineticLaw). -"; - - -%feature("docstring") LocalParameter::clone " - Creates and returns a deep copy of this LocalParameter. - - Returns a (deep) copy of this LocalParameter. -"; - - -%feature("docstring") LocalParameter::getDerivedUnitDefinition " - Constructs and returns a UnitDefinition that corresponds to the units - of this LocalParameter's value. - - LocalParameters in SBML have an attribute ('units') for declaring the - units of measurement intended for the parameter's value. No - defaults are defined by SBML in the absence of a definition for - 'units'. This method returns a UnitDefinition object based on the - units declared for this LocalParameter using its 'units' attribute, - or it returns None if no units have been declared. - - Note that unit declarations for LocalParameter objects are specified - in terms of the identifier of a unit (e.g., using setUnits()), but - this method returns a UnitDefinition object, not a unit identifier. - It does this by constructing an appropriate UnitDefinition. For - SBML Level 2 models, it will do this even when the value of the - 'units' attribute is one of the predefined SBML units 'substance', - 'volume', 'area', 'length' or 'time'. Callers may find this useful - in conjunction with the helper methods provided by the - UnitDefinition class for comparing different UnitDefinition objects. - - Returns a UnitDefinition that expresses the units of this - LocalParameter, or None if one cannot be constructed. - - Note: - - The libSBML system for unit analysis depends on the model as a - whole. In cases where the LocalParameter object has not yet been - added to a model, or the model itself is incomplete, unit analysis is - not possible, and consequently this method will return None. - - See also isSetUnits(). -"; - - -%feature("docstring") LocalParameter::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") LocalParameter::getElementName " - Returns the XML element name of this object, which for - LocalParameter, is always 'localParameter'. - - Returns the name of this element, i.e., 'localParameter'. -"; - - -%feature("docstring") LocalParameter::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - LocalParameter object have been set. - - Note: - - The required attributes for a LocalParameter object are: - - * 'id' - - * 'value' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") LocalParameter::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") LocalParameter::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") LocalParameter::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") LocalParameter::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfLocalParameters::ListOfLocalParameters " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfLocalParameters(SBMLNamespaces sbmlns) - - Creates a new ListOfLocalParameters object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfLocalParameters object to - be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfLocalParameters(long level, long version) - - Creates a new ListOfLocalParameters object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfLocalParameters::clone " - Creates and returns a deep copy of this ListOfLocalParameters object. - - Returns a (deep) copy of this ListOfLocalParameters. -"; - - -%feature("docstring") ListOfLocalParameters::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfLocalParameters::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., LocalParameter objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfLocalParameters::getElementName " - Returns the XML element name of this object. - - For ListOfLocalParameters, the XML element name is - 'listOfLocalParameters'. - - Returns the name of this element, i.e., 'listOfLocalParameters'. -"; - - -%feature("docstring") ListOfLocalParameters::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Returns the LocalParameter object located at position 'n' within this - ListOfLocalParameters instance. - - Parameter 'n' is the index number of the LocalParameter to get. - - Returns the item at position 'n'. The caller owns the returned - object and is responsible for deleting it. If the index number 'n' - is out of bounds for the length of the list, then None is returned. - - See also size(), get(), get(), size(). -"; - - -%feature("docstring") ListOfLocalParameters::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. Note - that LocalParameters, while they use the SId namespace, are not in - the model-wide SId namespace, so no LocalParameter object will be - returned from this function (and is the reason we override the base - ListOf::getElementBySId function here). - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") ListOfLocalParameters::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfLocalParameters, and returns a - pointer to it. - - Parameter 'n' is the index of the item to remove. - - Returns the item removed. The caller owns the returned object and is - responsible for deleting it. If the index number 'n' is out of - bounds for the length of the list, then None is returned. - - See also size(), remove(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes the first LocalParameter object in this ListOfLocalParameters - matching the given identifier, and returns a pointer to it. - - Parameter 'sid' is the identifier of the item to remove. - - Returns the item removed. The caller owns the returned object and is - responsible for deleting it. If none of the items have an identifier - matching 'sid', then None is returned. -"; - - -%feature("docstring") ListOfLocalParameters::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfLocalParameters::createObject " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment " - @ingroup Core Implementation of SBML's InitialAssignment construct. - - SBML Level 2 Versions 2-4 and SBML Level 3 provide two ways of - assigning initial values to entities in a model. The simplest and - most basic is to set the values of the appropriate attributes in the - relevant components; for example, the initial value of a model - parameter (whether it is a constant or a variable) can be assigned - by setting its 'value' attribute directly in the model definition. - However, this approach is not suitable when the value must be - calculated, because the initial value attributes on different - components such as species, compartments, and parameters are single - values and not mathematical expressions. In those situations, the - InitialAssignment construct can be used; it permits the calculation - of the value of a constant or the initial value of a variable from - the values of other quantities in a model. - - As explained below, the provision of InitialAssignment does not mean - that models necessarily must use this construct when defining initial - values of quantities in a model. If a value can be set directly - using the relevant attribute of a component in a model, then that - approach may be more efficient and more portable to other software - tools. InitialAssignment should be used when the other mechanism is - insufficient for the needs of a particular model. - - The InitialAssignment construct has some similarities to - AssignmentRule. The main differences are: (a) an InitialAssignment - can set the value of a constant whereas an AssignmentRule cannot, - and (b) unlike AssignmentRule, an InitialAssignment definition only - applies up to and including the beginning of simulation time, i.e., - t <= 0, while an AssignmentRule applies at all times. - - InitialAssignment has a required attribute, 'symbol', whose value - must follow the guidelines for identifiers described in the SBML - specification (e.g., Section 3.3 in the Level 2 Version 4 - specification). The value of this attribute in an InitialAssignment - object can be the identifier of a Compartment, Species or global - Parameter elsewhere in the model. The InitialAssignment defines the - initial value of the constant or variable referred to by the 'symbol' - attribute. (The attribute's name is 'symbol' rather than 'variable' - because it may assign values to constants as well as variables in a - model.) Note that an initial assignment cannot be made to reaction - identifiers, that is, the 'symbol' attribute value of an - InitialAssignment cannot be an identifier that is the 'id' attribute - value of a Reaction object in the model. This is identical to a - restriction placed on rules. - - InitialAssignment also has a required 'math' subelement that contains - a MathML expression used to calculate the value of the constant or - the initial value of the variable. The units of the value computed - by the formula in the 'math' subelement should (in SBML Level 2 - Version 4 and in SBML Level 3) or must (in previous Versions) be - identical to be the units associated with the identifier given in - the 'symbol' attribute. (That is, the units are the units of the - species, compartment, or parameter, as appropriate for the kind of - object identified by the value of 'symbol'.) - - InitialAssignment was introduced in SBML Level 2 Version 2. It is - not available in SBML Level 2 Version 1 nor in any version of Level - 1. - - Semantics of Initial Assignments - ====================================================================== - - The value calculated by an InitialAssignment object overrides the - value assigned to the given symbol by the object defining that - symbol. For example, if a compartment's 'size' attribute is set in - its definition, and the model also contains an InitialAssignment - having that compartment's identifier as its 'symbol' attribute - value, then the interpretation is that the 'size' assigned in the - Compartment object should be ignored and the value assigned based on - the computation defined in the InitialAssignment. Initial - assignments can take place for Compartment, Species and global - Parameter objects regardless of the value of their 'constant' - attribute. - - The actions of all InitialAssignment objects are in general terms - the same, but differ in the precise details depending on the type of - variable being set: - - * In the case of a species, an InitialAssignment sets the - referenced species' initial quantity (concentration or amount of - substance) to the value determined by the formula in the 'math' - subelement. The overall units of the formula should (in SBML - Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) - be the same as the units specified for the species. - - * In the case of a compartment, an InitialAssignment sets the - referenced compartment's initial size to the size determined by the - formula in 'math'. The overall units of the formula should (in SBML - Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) - be the same as the units specified for the size of the compartment. - - * In the case of a parameter, an InitialAssignment sets the - referenced parameter's initial value to that determined by the - formula in 'math'. The overall units of the formula should (in SBML - Level 2 Version 4 and SBML Level 3) or must (in previous Versions) be - the same as the units defined for the parameter. - - In the context of a simulation, initial assignments establish values - that are in effect prior to and including the start of simulation - time, i.e., t <= 0. Section 3.4.8 in the SBML Level 2 Version 4 - and SBML Level 3 Version 1 Core specifications provides information - about the interpretation of assignments, rules, and entity values - for simulation time up to and including the start time t = 0; this - is important for establishing the initial conditions of a simulation - if the model involves expressions containing the delay 'csymbol'. - - There cannot be two initial assignments for the same symbol in a - model; that is, a model must not contain two or more - InitialAssignment objects that both have the same identifier as - their 'symbol' attribute value. A model must also not define - initial assignments and assignment rules for the same entity. That - is, there cannot be both an InitialAssignment and an AssignmentRule - for the same symbol in a model, because both kinds of constructs - apply prior to and at the start of simulated time -- allowing both - to exist for a given symbol would result in indeterminism). - - The ordering of InitialAssignment objects is not significant. The - combined set of InitialAssignment, AssignmentRule and KineticLaw - objects form a set of assignment statements that must be considered - as a whole. The combined set of assignment statements should not - contain algebraic loops: a chain of dependency between these - statements should terminate. (More formally, consider the directed - graph of assignment statements where nodes are a model's assignment - statements and directed arcs exist for each occurrence of a symbol - in an assignment statement 'math' attribute. The directed arcs in - this graph start from the statement assigning the symbol and end at - the statement that contains the symbol in their math elements. Such - a graph must be acyclic.) - - Finally, it is worth being explicit about the expected behavior in - the following situation. Suppose (1) a given symbol has a value x - assigned to it in its definition, and (2) there is an initial - assignment having the identifier as its 'symbol' value and - reassigning the value to y, and (3) the identifier is also used in - the mathematical formula of a second initial assignment. What value - should the second initial assignment use? It is y, the value - assigned to the symbol by the first initial assignment, not whatever - value was given in the symbol's definition. This follows directly - from the behavior described above: if an InitialAssignment object - exists for a given symbol, then the symbol's value is overridden by - that initial assignment. -"; - - -%feature("docstring") ListOfInitialAssignments " - @ingroup Core Implementation of SBML's ListOfInitialAssignments - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") InitialAssignment::InitialAssignment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - InitialAssignment(SBMLNamespaces sbmlns) - - Creates a new InitialAssignment using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a InitialAssignment object to an SBMLDocument - (e.g., using Model.addInitialAssignment()), the SBML XML namespace - of the document overrides the value used when creating the - InitialAssignment object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a InitialAssignment is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - InitialAssignment(long level, long version) - - Creates a new InitialAssignment using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - InitialAssignment - - Parameter 'version' is a long integer, the SBML Version to assign to - this InitialAssignment - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a InitialAssignment object to an SBMLDocument - (e.g., using Model.addInitialAssignment()), the SBML Level, SBML - Version and XML namespace of the document override the values used - when creating the InitialAssignment object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a InitialAssignment is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value - to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - InitialAssignment(InitialAssignment orig) - - Copy constructor; creates a copy of this InitialAssignment. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") InitialAssignment::accept " - Accepts the given SBMLVisitor for this instance of InitialAssignment. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next InitialAssignment in the list - of compartment types. -"; - - -%feature("docstring") InitialAssignment::clone " - Creates and returns a deep copy of this InitialAssignment. - - Returns a (deep) copy of this InitialAssignment. -"; - - -%feature("docstring") InitialAssignment::getSymbol " - Get the value of the 'symbol' attribute of this InitialAssignment. - - Returns the identifier string stored as the 'symbol' attribute value - in this InitialAssignment. -"; - - -%feature("docstring") InitialAssignment::getMath " - Get the mathematical formula of this InitialAssignment. - - Returns an ASTNode, the value of the 'math' subelement of this - InitialAssignment -"; - - -%feature("docstring") InitialAssignment::isSetSymbol " - Predicate returning True if this InitialAssignment's 'symbol' - attribute is set. - - Returns True if the 'symbol' attribute of this InitialAssignment is - set, False otherwise. -"; - - -%feature("docstring") InitialAssignment::isSetMath " - Predicate returning True if this InitialAssignment's 'math' - subelement contains a value. - - Returns True if the 'math' for this InitialAssignment is set, False - otherwise. -"; - - -%feature("docstring") InitialAssignment::setSymbol " - Sets the 'symbol' attribute value of this InitialAssignment. - - Parameter 'sid' is the identifier of a Species, Compartment or - Parameter object defined elsewhere in this Model. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") InitialAssignment::setMath " - Sets the 'math' subelement of this InitialAssignment. - - The AST passed in 'math' is copied. - - Parameter 'math' is an AST containing the mathematical expression to - be used as the formula for this InitialAssignment. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") InitialAssignment::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units of - measurement assumed for the 'math' expression of this - InitialAssignment. - - The units are calculated based on the mathematical expression in the - InitialAssignment and the model quantities referenced by <ci> - elements used within that expression. The - getDerivedUnitDefinition()@~ method returns the calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - WARNING: - - Note that it is possible the 'math' expression in the - InitialAssignment contains pure numbers or parameters with undeclared - units. In those cases, it is not possible to calculate the units of - the overall expression without making assumptions. LibSBML does not - make assumptions about the units, and getDerivedUnitDefinition()@~ - only returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has unambiguously-defined - units and Y does not, it will return the units of X. <strong>It is - important that callers also invoke the method</strong> - containsUndeclaredUnits()@~ <strong>to determine whether this - situation holds</strong>. Callers may wish to take suitable actions - in those scenarios. - - Returns a UnitDefinition that expresses the units of the math - expression of this InitialAssignment, or None if one cannot be - constructed. - - See also containsUndeclaredUnits(). -"; - - -%feature("docstring") InitialAssignment::containsUndeclaredUnits " - Predicate returning True if the math expression of this - InitialAssignment contains parameters/numbers with undeclared units. - - Returns True if the math expression of this InitialAssignment - includes parameters/numbers with undeclared units, False otherwise. - - Note: - - A return value of True indicates that the UnitDefinition returned by - getDerivedUnitDefinition()@~ may not accurately represent the units - of the expression. - - See also getDerivedUnitDefinition(). -"; - - -%feature("docstring") InitialAssignment::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") InitialAssignment::getElementName " - Returns the XML element name of this object, which for - InitialAssignment, is always 'initialAssignment'. - - Returns the name of this element, i.e., 'initialAssignment'. -"; - - -%feature("docstring") InitialAssignment::writeElements " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - InitialAssignment object have been set. - - Note: - - The required attributes for an InitialAssignment object are: - - * 'symbol' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") InitialAssignment::hasRequiredElements " - Predicate returning True if all the required elements for this - InitialAssignment object have been set. - - Note: - - The required elements for a InitialAssignment object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") InitialAssignment::getId " - Predicate returning True if all the required elements for this - InitialAssignment object have been set. - - Note: - - The required elements for a InitialAssignment object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") InitialAssignment::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") InitialAssignment::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") InitialAssignment::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::divideAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::multiplyAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") InitialAssignment::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfInitialAssignments::ListOfInitialAssignments " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfInitialAssignments(SBMLNamespaces sbmlns) - - Creates a new ListOfInitialAssignments object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfInitialAssignments object - to be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfInitialAssignments(long level, long version) - - Creates a new ListOfInitialAssignments object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfInitialAssignments::clone " - Creates and returns a deep copy of this ListOfInitialAssignments - instance. - - Returns a (deep) copy of this ListOfInitialAssignments. -"; - - -%feature("docstring") ListOfInitialAssignments::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfInitialAssignments::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., InitialAssignment objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfInitialAssignments::getElementName " - Returns the XML element name of this object. - - For ListOfInitialAssignments, the XML element name is - 'listOfInitialAssignments'. - - Returns the name of this element, i.e., 'listOfInitialAssignments'. -"; - - -%feature("docstring") ListOfInitialAssignments::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a InitialAssignment from the ListOfInitialAssignments. - - Parameter 'n' is the index number of the InitialAssignment to get. - - Returns the nth InitialAssignment in this ListOfInitialAssignments. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfInitialAssignments::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfInitialAssignments items and - returns a pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfInitialAssignments items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfInitialAssignments::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. Note - that InitialAssignments do not actually have IDs, though the libsbml - interface pretends that they do: no initial assignment is returned - by this function. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") ListOfInitialAssignments::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfInitialAssignments::createObject " - Internal implementation method. -"; - - -%feature("docstring") Rule " - @ingroup Core Implementation of SBML's Rule construct. - - In SBML, rules provide additional ways to define the values of - variables in a model, their relationships, and the dynamical - behaviors of those variables. They enable encoding relationships - that cannot be expressed using Reaction nor InitialAssignment - objects alone. - - The libSBML implementation of rules mirrors the SBML Level 3 Version - 1 Core definition (which is in turn is very similar to the Level 2 - Version 4 definition), with Rule being the parent class of three - subclasses as explained below. The Rule class itself cannot be - instantiated by user programs and has no constructor; only the - subclasses AssignmentRule, AlgebraicRule and RateRule can be - instantiated directly. - - General summary of SBML rules - ====================================================================== - - In SBML Level 3 as well as Level 2, rules are separated into three - subclasses for the benefit of model analysis software. The three - subclasses are based on the following three different possible - functional forms (where x is a variable, f is some arbitrary function - returning a numerical result, V is a vector of variables that does - not include x, and W is a vector of variables that may include x): - - Algebraic: left-hand side is zero 0 = f(W) - Assignment: left-hand side is a scalar x = f(V) - Rate: left-hand side is a rate-of-change dx/dt = f(W) - - In their general form given above, there is little to distinguish - between assignment and algebraic rules. They are treated as separate - cases for the following reasons: - - * Assignment rules can simply be evaluated to calculate intermediate - values for use in numerical methods. They are statements of equality - that hold at all times. (For assignments that are only performed - once, see InitialAssignment.) - - * SBML needs to place restrictions on assignment rules, for example - the restriction that assignment rules cannot contain algebraic - loops. - - * Some simulators do not contain numerical solvers capable of solving - unconstrained algebraic equations, and providing more direct forms - such as assignment rules may enable those simulators to process - models they could not process if the same assignments were put in - the form of general algebraic equations; - - * Those simulators that can solve these algebraic equations make a - distinction between the different categories listed above; and - - * Some specialized numerical analyses of models may only be - applicable to models that do not contain algebraic rules. - - The approach taken to covering these cases in SBML is to define an - abstract Rule structure containing a subelement, 'math', to hold the - right-hand side expression, then to derive subtypes of Rule that add - attributes to distinguish the cases of algebraic, assignment and rate - rules. The 'math' subelement must contain a MathML expression - defining the mathematical formula of the rule. This MathML formula - must return a numerical value. The formula can be an arbitrary - expression referencing the variables and other entities in an SBML - model. - - Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, - RateRule) inherit the the 'math' subelement and other fields from - SBase. The AssignmentRule and RateRule classes add an additional - attribute, 'variable'. See the definitions of AssignmentRule, - AlgebraicRule and RateRule for details about the structure and - interpretation of each one. - - Additional restrictions on SBML rules - ====================================================================== - - An important design goal of SBML rule semantics is to ensure that a - model's simulation and analysis results will not be dependent on when - or how often rules are evaluated. To achieve this, SBML needs to - place two restrictions on rule use. The first concerns algebraic - loops in the system of assignments in a model, and the second - concerns overdetermined systems. - - A model must not contain algebraic loops - ...................................................................... - - The combined set of InitialAssignment, AssignmentRule and KineticLaw - objects in a model constitute a set of assignment statements that - should be considered as a whole. (A KineticLaw object is counted as - an assignment because it assigns a value to the symbol contained in - the \"id\" attribute of the Reaction object in which it is defined.) - This combined set of assignment statements must not contain - algebraic loops -- dependency chains between these statements must - terminate. To put this more formally, consider a directed graph in - which nodes are assignment statements and directed arcs exist for - each occurrence of an SBML species, compartment or parameter symbol - in an assignment statement's \"math\" subelement. Let the directed - arcs point from the statement assigning the symbol to the statements - that contain the symbol in their \"math\" subelement expressions. - This graph must be acyclic. - - SBML does not specify when or how often rules should be evaluated. - Eliminating algebraic loops ensures that assignment statements can be - evaluated any number of times without the result of those evaluations - changing. As an example, consider the set of equations x = x + 1, y - = z + 200 and z = y + 100. If this set of equations were - interpreted as a set of assignment statements, it would be invalid - because the rule for x refers to x (exhibiting one type of loop), - and the rule for y refers to z while the rule for z refers back to y - (exhibiting another type of loop). Conversely, the following set of - equations would constitute a valid set of assignment statements: x = - 10, y = z + 200, and z = x + 100. - - A model must not be overdetermined - ...................................................................... - - An SBML model must not be overdetermined; that is, a model must not - define more equations than there are unknowns in a model. An SBML - model that does not contain AlgebraicRule structures cannot be - overdetermined. - - LibSBML implements the static analysis procedure described in - Appendix B of the SBML Level 3 Version 1 Core specification for - assessing whether a model is overdetermined. - - (In summary, assessing whether a given continuous, deterministic, - mathematical model is overdetermined does not require dynamic - analysis; it can be done by analyzing the system of equations - created from the model. One approach is to construct a bipartite - graph in which one set of vertices represents the variables and the - other the set of vertices represents the equations. Place edges - between vertices such that variables in the system are linked to the - equations that determine them. For algebraic equations, there will - be edges between the equation and each variable occurring in the - equation. For ordinary differential equations (such as those defined - by rate rules or implied by the reaction rate definitions), there - will be a single edge between the equation and the variable - determined by that differential equation. A mathematical model is - overdetermined if the maximal matchings of the bipartite graph - contain disconnected vertexes representing equations. If one - maximal matching has this property, then all the maximal matchings - will have this property; i.e., it is only necessary to find one - maximal matching.) - - Rule types for SBML Level 1 - ====================================================================== - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 - for distinguishing rules; specifically, it uses an attribute whose - value is drawn from an enumeration of 3 values. LibSBML supports - this using methods that work with the enumeration values @~ listed - below. - - * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. - - * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. - - * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or - not yet set. -"; - - -%feature("docstring") ListOfRules " - @ingroup Core Implementation of SBML's ListOfRules construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 3 and later versions of - SBML Level 2 as well): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Rule::accept " - Accepts the given SBMLVisitor for this instance of Rule. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next Rule object in the list of - rules within which the present object is embedded. -"; - - -%feature("docstring") Rule::clone " - Creates and returns a deep copy of this Rule. - - Returns a (deep) copy of this Rule. -"; - - -%feature("docstring") Rule::getFormula " - Returns the mathematical expression of this Rule in text-string form. - - The text string is produced by SBML_formulaToString(); please - consult the documentation for that function to find out more about - the format of the text-string formula. - - Returns the formula text string for this Rule. - - Note: - - The attribute 'formula' is specific to SBML Level 1; in higher - Levels of SBML, it has been replaced with a subelement named 'math'. - However, libSBML provides a unified interface to the underlying math - expression and this method can be used for models of all Levels of - SBML. - - See also getMath(). -"; - - -%feature("docstring") Rule::getMath " - Get the mathematical formula of this Rule as an ASTNode tree. - - Returns an ASTNode, the value of the 'math' subelement of this Rule. - - Note: - - The subelement 'math' is present in SBML Levels 2 and 3. In SBML - Level 1, the equivalent construct is the attribute named 'formula'. - LibSBML provides a unified interface to the underlying math - expression and this method can be used for models of all Levels of - SBML. - - See also getFormula(). -"; - - -%feature("docstring") Rule::getVariable " - Get the value of the 'variable' attribute of this Rule object. - - In SBML Level 1, the different rule types each have a different name - for the attribute holding the reference to the object constituting - the left-hand side of the rule. (E.g., for SBML Level 1's - SpeciesConcentrationRule the attribute is 'species', for - CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 - and 3, the only two types of Rule objects with a left-hand side - object reference are AssignmentRule and RateRule, and both of them - use the same name for attribute: 'variable'. In order to make it - easier for application developers to work with all Levels of SBML, - libSBML uses a uniform name for all of such attributes, and it is - 'variable', regardless of whether Level 1 rules or Level 2-3 rules - are being used. - - Returns the identifier string stored as the 'variable' attribute - value in this Rule, or None if this object is an AlgebraicRule - object. -"; - - -%feature("docstring") Rule::getUnits " - Returns the units for the mathematical formula of this Rule. - - Returns the identifier of the units for the expression of this Rule. - - Note: - - The attribute 'units' exists on SBML Level 1 ParameterRule objects - only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::isSetFormula " - Predicate returning True if this Rule's mathematical expression is - set. - - This method is equivalent to isSetMath(). This version is present - for easier compatibility with SBML Level 1, in which mathematical - formulas were written in text-string form. - - Returns True if the mathematical formula for this Rule is set, False - otherwise. - - Note: - - The attribute 'formula' is specific to SBML Level 1; in higher - Levels of SBML, it has been replaced with a subelement named 'math'. - However, libSBML provides a unified interface to the underlying math - expression and this method can be used for models of all Levels of - SBML. - - See also isSetMath(). -"; - - -%feature("docstring") Rule::isSetMath " - Predicate returning True if this Rule's mathematical expression is - set. - - This method is equivalent to isSetFormula(). - - Returns True if the formula (or equivalently the math) for this Rule - is set, False otherwise. - - Note: - - The subelement 'math' is present in SBML Levels 2 and 3. In SBML - Level 1, the equivalent construct is the attribute named 'formula'. - LibSBML provides a unified interface to the underlying math - expression and this method can be used for models of all Levels of - SBML. - - See also isSetFormula(). -"; - - -%feature("docstring") Rule::isSetVariable " - Predicate returning True if this Rule's 'variable' attribute is set. - - In SBML Level 1, the different rule types each have a different name - for the attribute holding the reference to the object constituting - the left-hand side of the rule. (E.g., for SBML Level 1's - SpeciesConcentrationRule the attribute is 'species', for - CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 - and 3, the only two types of Rule objects with a left-hand side - object reference are AssignmentRule and RateRule, and both of them - use the same name for attribute: 'variable'. In order to make it - easier for application developers to work with all Levels of SBML, - libSBML uses a uniform name for all such attributes, and it is - 'variable', regardless of whether Level 1 rules or Level 2-3 rules - are being used. - - Returns True if the 'variable' attribute value of this Rule is set, - False otherwise. -"; - - -%feature("docstring") Rule::isSetUnits " - Predicate returning True if this Rule's 'units' attribute is set. - - Returns True if the units for this Rule is set, False otherwise - - Note: - - The attribute 'units' exists on SBML Level 1 ParameterRule objects - only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::setFormula " - Sets the 'math' subelement of this Rule to an expression in text- - string form. - - This is equivalent to setMath(ASTNode math). The provision of using - text-string formulas is retained for easier SBML Level 1 - compatibility. The formula is converted to an ASTNode internally. - - Parameter 'formula' is a mathematical formula in text-string form. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - The attribute 'formula' is specific to SBML Level 1; in higher - Levels of SBML, it has been replaced with a subelement named 'math'. - However, libSBML provides a unified interface to the underlying math - expression and this method can be used for models of all Levels of - SBML. - - See also setMath(). -"; - - -%feature("docstring") Rule::setMath " - Sets the 'math' subelement of this Rule to a copy of the given - ASTNode. - - Parameter 'math' is the ASTNode structure of the mathematical - formula. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - The subelement 'math' is present in SBML Levels 2 and 3. In SBML - Level 1, the equivalent construct is the attribute named 'formula'. - LibSBML provides a unified interface to the underlying math - expression and this method can be used for models of all Levels of - SBML. - - See also setFormula(). -"; - - -%feature("docstring") Rule::setVariable " - Sets the 'variable' attribute value of this Rule object. - - In SBML Level 1, the different rule types each have a different name - for the attribute holding the reference to the object constituting - the left-hand side of the rule. (E.g., for SBML Level 1's - SpeciesConcentrationRule the attribute is 'species', for - CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 - and 3, the only two types of Rule objects with a left-hand side - object reference are AssignmentRule and RateRule, and both of them - use the same name for attribute: 'variable'. In order to make it - easier for application developers to work with all Levels of SBML, - libSBML uses a uniform name for all such attributes, and it is - 'variable', regardless of whether Level 1 rules or Level 2-3 rules - are being used. - - Parameter 'sid' is the identifier of a Compartment, Species or - Parameter elsewhere in the enclosing Model object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Rule::setUnits " - Sets the units for this Rule. - - Parameter 'sname' is the identifier of the units - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attribute 'units' exists on SBML Level 1 ParameterRule objects - only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::unsetUnits " - Unsets the 'units' for this Rule. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attribute 'units' exists on SBML Level 1 ParameterRule objects - only. It is not present in SBML Levels 2 and 3. -"; - - -%feature("docstring") Rule::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units of - measurement assumed for the 'math' expression of this Rule. - - The units are calculated based on the mathematical expression in the - Rule and the model quantities referenced by <ci> elements used - within that expression. The getDerivedUnitDefinition() method - returns the calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - WARNING: - - Note that it is possible the 'math' expression in the Rule contains - pure numbers or parameters with undeclared units. In those cases, - it is not possible to calculate the units of the overall expression - without making assumptions. LibSBML does not make assumptions about - the units, and getDerivedUnitDefinition() only returns the units as - far as it is able to determine them. For example, in an expression - X + Y, if X has unambiguously-defined units and Y does not, it will - return the units of X. <strong>It is important that callers also - invoke the method</strong> containsUndeclaredUnits()@~ <strong>to - determine whether this situation holds</strong>. Callers may wish - to take suitable actions in those scenarios. - - Returns a UnitDefinition that expresses the units of the math - expression of this Rule, or None if one cannot be constructed. - - See also containsUndeclaredUnits(). -"; - - -%feature("docstring") Rule::containsUndeclaredUnits " - Predicate returning True if the math expression of this Rule - contains parameters/numbers with undeclared units. - - Returns True if the math expression of this Rule includes - parameters/numbers with undeclared units, False otherwise. - - Note: - - A return value of True indicates that the UnitDefinition returned by - getDerivedUnitDefinition() may not accurately represent the units of - the expression. - - See also getDerivedUnitDefinition(). -"; - - -%feature("docstring") Rule::getType " - Get the type of rule this is. - - Returns the rule type (a value drawn from the enumeration RuleType_t) - of this Rule. The value will be either libsbml.RULE_TYPE_RATE or - libsbml.RULE_TYPE_SCALAR. - - Note: - - The attribute 'type' on Rule objects is present only in SBML Level - 1. In SBML Level 2 and later, the type has been replaced by - subclassing the Rule object. -"; - - -%feature("docstring") Rule::isAlgebraic " - Predicate returning True if this Rule is an AlgebraicRule. - - Returns True if this Rule is an AlgebraicRule, False otherwise. -"; - - -%feature("docstring") Rule::isAssignment " - Predicate returning True if this Rule is an AssignmentRule. - - Returns True if this Rule is an AssignmentRule, False otherwise. -"; - - -%feature("docstring") Rule::isCompartmentVolume " - Predicate returning True if this Rule is an CompartmentVolumeRule or - equivalent. - - This libSBML method works for SBML Level 1 models (where there is - such a thing as an explicit CompartmentVolumeRule), as well as other - Levels of SBML. For Levels above Level 1, this method checks the - symbol being affected by the rule, and returns True if the symbol is - the identifier of a Compartment object defined in the model. - - Returns True if this Rule is a CompartmentVolumeRule, False - otherwise. -"; - - -%feature("docstring") Rule::isParameter " - Predicate returning True if this Rule is an ParameterRule or - equivalent. - - This libSBML method works for SBML Level 1 models (where there is - such a thing as an explicit ParameterRule), as well as other Levels - of SBML. For Levels above Level 1, this method checks the symbol - being affected by the rule, and returns True if the symbol is the - identifier of a Parameter object defined in the model. - - Returns True if this Rule is a ParameterRule, False otherwise. -"; - - -%feature("docstring") Rule::isRate " - Predicate returning True if this Rule is a RateRule (SBML Levels - 2-3) or has a 'type' attribute value of 'rate' (SBML Level 1). - - Returns True if this Rule is a RateRule (Level 2) or has type 'rate' - (Level 1), False otherwise. -"; - - -%feature("docstring") Rule::isScalar " - Predicate returning True if this Rule is an AssignmentRule (SBML - Levels 2-3) or has a 'type' attribute value of 'scalar' (SBML Level - 1). - - Returns True if this Rule is an AssignmentRule (Level 2) or has type - 'scalar' (Level 1), False otherwise. -"; - - -%feature("docstring") Rule::isSpeciesConcentration " - Predicate returning True if this Rule is a SpeciesConcentrationRule - or equivalent. - - This libSBML method works for SBML Level 1 models (where there is - such a thing as an explicit SpeciesConcentrationRule), as well as - other Levels of SBML. For Levels above Level 1, this method checks - the symbol being affected by the rule, and returns True if the - symbol is the identifier of a Species object defined in the model. - - Returns True if this Rule is a SpeciesConcentrationRule, False - otherwise. -"; - - -%feature("docstring") Rule::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Rule::getL1TypeCode " - Returns the SBML Level 1 type code for this Rule object. - - This method only applies to SBML Level 1 model objects. If this is - not an SBML Level 1 rule object, this method will return - libsbml.SBML_UNKNOWN. - - Returns the SBML Level 1 type code for this Rule (namely, - libsbml.SBML_COMPARTMENT_VOLUME_RULE, libsbml.SBML_PARAMETER_RULE, - libsbml.SBML_SPECIES_CONCENTRATION_RULE, or libsbml.SBML_UNKNOWN). -"; - - -%feature("docstring") Rule::getElementName " - Returns the XML element name of this object - - The returned value can be any of a number of different strings, - depending on the SBML Level in use and the kind of Rule object this - is. The rules as of libSBML version 5.8.1 are the following: - - * (Level 2 and 3) RateRule: returns 'rateRule' - - * (Level 2 and 3) AssignmentRule: returns 'assignmentRule' - - * (Level 2 and 3) AlgebraicRule: returns 'algebraicRule' - - * (Level 1 Version 1) SpecieConcentrationRule: returns - 'specieConcentrationRule' - - * (Level 1 Version 2) SpeciesConcentrationRule: returns - 'speciesConcentrationRule' - - * (Level 1) CompartmentVolumeRule: returns 'compartmentVolumeRule' - - * (Level 1) ParameterRule: returns 'parameterRule' - - * Unknown rule type: returns 'unknownRule' - - Beware that the last ('unknownRule') is not a valid SBML element - name. - - Returns the name of this element -"; - - -%feature("docstring") Rule::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Rule::setL1TypeCode " - Sets the SBML Level 1 type code for this Rule. - - Parameter 'type' is the SBML Level 1 type code for this Rule. The - allowable values are libsbml.SBML_COMPARTMENT_VOLUME_RULE, - libsbml.SBML_PARAMETER_RULE, and - libsbml.SBML_SPECIES_CONCENTRATION_RULE. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE if given 'type' value is - not one of the above. -"; - - -%feature("docstring") Rule::hasRequiredElements " - Predicate returning True if all the required elements for this Rule - object have been set. - - The only required element for a Rule object is the 'math' subelement. - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Rule::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Rule object have been set. - - The required attributes for a Rule object depend on the type of Rule - it is. For AssignmentRule and RateRule objects (and SBML - Level 1's SpeciesConcentrationRule, CompartmentVolumeRule, and - ParameterRule objects), the required attribute is 'variable'; for - AlgebraicRule objects, there is no required attribute. - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Rule::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Rule::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Rule::getInternalId " - Internal implementation method. -"; - - -%feature("docstring") Rule::setInternalId " - Internal implementation method. -"; - - -%feature("docstring") Rule::getId " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Rule::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") Rule::divideAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") Rule::multiplyAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") Rule::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") Rule::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Rule::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Rule::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Rule::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Rule::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Rule::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfRules::ListOfRules " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfRules(SBMLNamespaces sbmlns) - - Creates a new ListOfRules object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfRules object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfRules(long level, long version) - - Creates a new ListOfRules object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfRules::clone " - Creates and returns a deep copy of this ListOfRules instance. - - Returns a (deep) copy of this ListOfRules. -"; - - -%feature("docstring") ListOfRules::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfRules::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Rule objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfRules::getElementName " - Returns the XML element name of this object. - - For ListOfRules, the XML element name is 'listOfRules'. - - Returns the name of this element, i.e., 'listOfRules'. -"; - - -%feature("docstring") ListOfRules::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a Rule from the ListOfRules. - - Parameter 'n' is the index number of the Rule to get. - - Returns the nth Rule in this ListOfRules. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfRules::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfRules items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfRules items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfRules::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. Note - that AssignmentRules and RateRules do not actually have IDs, but the - libsbml interface pretends that they do: no assignment rule or rate - rule is returned by this function. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") ListOfRules::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfRules::createObject " - Internal implementation method. -"; - - -%feature("docstring") ListOfRules::isValidTypeForList " - Internal implementation method. -"; - - -%feature("docstring") AlgebraicRule " - @ingroup Core Implementation of SBML's AlgebraicRule construct. - - The rule type AlgebraicRule is derived from the parent class Rule. - It is used to express equations that are neither assignments of - model variables nor rates of change. AlgebraicRule does not add any - attributes to the basic Rule; its role is simply to distinguish this - case from the other cases. - - In the context of a simulation, algebraic rules are in effect at all - times, t >= 0. For purposes of evaluating expressions that involve - the delay 'csymbol' (see the SBML specification), algebraic rules - are considered to apply also at t <= 0. Please consult the relevant - SBML specification for additional information about the semantics of - assignments, rules, and entity values for simulation time t <= 0. - - An SBML model must not be overdetermined. The ability to define - arbitrary algebraic expressions in an SBML model introduces the - possibility that a model is mathematically overdetermined by the - overall system of equations constructed from its rules, reactions - and events. Therefore, if an algebraic rule is introduced in a - model, for at least one of the entities referenced in the rule's - 'math' element the value of that entity must not be completely - determined by other constructs in the model. This means that at - least this entity must not have the attribute 'constant'=True and - there must also not be a rate rule or assignment rule for it. - Furthermore, if the entity is a Species object, its value must not - be determined by reactions, which means that it must either have the - attribute 'boundaryCondition'=True or else not be involved in any - reaction at all. These restrictions are explained in more detail in - the SBML specification documents. - - In SBML Levels 2 and 3, Reaction object identifiers can be - referenced in the 'math' expression of an algebraic rule, but - reaction rates can never be determined by algebraic rules. This is - true even when a reaction does not contain a KineticLaw element. - (In such cases of missing KineticLaw elements, the model is valid - but incomplete; the rates of reactions lacking kinetic laws are - simply undefined, and not determined by the algebraic rule.) - - General summary of SBML rules - ====================================================================== - - In SBML Level 3 as well as Level 2, rules are separated into three - subclasses for the benefit of model analysis software. The three - subclasses are based on the following three different possible - functional forms (where x is a variable, f is some arbitrary function - returning a numerical result, V is a vector of variables that does - not include x, and W is a vector of variables that may include x): - - Algebraic: left-hand side is zero 0 = f(W) - Assignment: left-hand side is a scalar x = f(V) - Rate: left-hand side is a rate-of-change dx/dt = f(W) - - In their general form given above, there is little to distinguish - between assignment and algebraic rules. They are treated as separate - cases for the following reasons: - - * Assignment rules can simply be evaluated to calculate intermediate - values for use in numerical methods. They are statements of equality - that hold at all times. (For assignments that are only performed - once, see InitialAssignment.) - - * SBML needs to place restrictions on assignment rules, for example - the restriction that assignment rules cannot contain algebraic - loops. - - * Some simulators do not contain numerical solvers capable of solving - unconstrained algebraic equations, and providing more direct forms - such as assignment rules may enable those simulators to process - models they could not process if the same assignments were put in - the form of general algebraic equations; - - * Those simulators that can solve these algebraic equations make a - distinction between the different categories listed above; and - - * Some specialized numerical analyses of models may only be - applicable to models that do not contain algebraic rules. - - The approach taken to covering these cases in SBML is to define an - abstract Rule structure containing a subelement, 'math', to hold the - right-hand side expression, then to derive subtypes of Rule that add - attributes to distinguish the cases of algebraic, assignment and rate - rules. The 'math' subelement must contain a MathML expression - defining the mathematical formula of the rule. This MathML formula - must return a numerical value. The formula can be an arbitrary - expression referencing the variables and other entities in an SBML - model. - - Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, - RateRule) inherit the the 'math' subelement and other fields from - SBase. The AssignmentRule and RateRule classes add an additional - attribute, 'variable'. See the definitions of AssignmentRule, - AlgebraicRule and RateRule for details about the structure and - interpretation of each one. - - Additional restrictions on SBML rules - ====================================================================== - - An important design goal of SBML rule semantics is to ensure that a - model's simulation and analysis results will not be dependent on when - or how often rules are evaluated. To achieve this, SBML needs to - place two restrictions on rule use. The first concerns algebraic - loops in the system of assignments in a model, and the second - concerns overdetermined systems. - - A model must not contain algebraic loops - ...................................................................... - - The combined set of InitialAssignment, AssignmentRule and KineticLaw - objects in a model constitute a set of assignment statements that - should be considered as a whole. (A KineticLaw object is counted as - an assignment because it assigns a value to the symbol contained in - the \"id\" attribute of the Reaction object in which it is defined.) - This combined set of assignment statements must not contain - algebraic loops -- dependency chains between these statements must - terminate. To put this more formally, consider a directed graph in - which nodes are assignment statements and directed arcs exist for - each occurrence of an SBML species, compartment or parameter symbol - in an assignment statement's \"math\" subelement. Let the directed - arcs point from the statement assigning the symbol to the statements - that contain the symbol in their \"math\" subelement expressions. - This graph must be acyclic. - - SBML does not specify when or how often rules should be evaluated. - Eliminating algebraic loops ensures that assignment statements can be - evaluated any number of times without the result of those evaluations - changing. As an example, consider the set of equations x = x + 1, y - = z + 200 and z = y + 100. If this set of equations were - interpreted as a set of assignment statements, it would be invalid - because the rule for x refers to x (exhibiting one type of loop), - and the rule for y refers to z while the rule for z refers back to y - (exhibiting another type of loop). Conversely, the following set of - equations would constitute a valid set of assignment statements: x = - 10, y = z + 200, and z = x + 100. - - A model must not be overdetermined - ...................................................................... - - An SBML model must not be overdetermined; that is, a model must not - define more equations than there are unknowns in a model. An SBML - model that does not contain AlgebraicRule structures cannot be - overdetermined. - - LibSBML implements the static analysis procedure described in - Appendix B of the SBML Level 3 Version 1 Core specification for - assessing whether a model is overdetermined. - - (In summary, assessing whether a given continuous, deterministic, - mathematical model is overdetermined does not require dynamic - analysis; it can be done by analyzing the system of equations - created from the model. One approach is to construct a bipartite - graph in which one set of vertices represents the variables and the - other the set of vertices represents the equations. Place edges - between vertices such that variables in the system are linked to the - equations that determine them. For algebraic equations, there will - be edges between the equation and each variable occurring in the - equation. For ordinary differential equations (such as those defined - by rate rules or implied by the reaction rate definitions), there - will be a single edge between the equation and the variable - determined by that differential equation. A mathematical model is - overdetermined if the maximal matchings of the bipartite graph - contain disconnected vertexes representing equations. If one - maximal matching has this property, then all the maximal matchings - will have this property; i.e., it is only necessary to find one - maximal matching.) - - Rule types for SBML Level 1 - ====================================================================== - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 - for distinguishing rules; specifically, it uses an attribute whose - value is drawn from an enumeration of 3 values. LibSBML supports - this using methods that work with the enumeration values @~ listed - below. - - * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. - - * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. - - * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or - not yet set. -"; - - -%feature("docstring") AlgebraicRule::AlgebraicRule " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - AlgebraicRule(SBMLNamespaces sbmlns) - - Creates a new AlgebraicRule using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a AlgebraicRule object to an SBMLDocument - (e.g., using Model.addRule(), the SBML XML namespace of the - document overrides the value used when creating the AlgebraicRule - object via this constructor. This is necessary to ensure that an - SBML document is a consistent structure. Nevertheless, the ability - to supply the values at the time of creation of a AlgebraicRule is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - AlgebraicRule(long level, long version) - - Creates a new AlgebraicRule using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - AlgebraicRule - - Parameter 'version' is a long integer, the SBML Version to assign to - this AlgebraicRule - - Throws ValueError: Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of an AlgebraicRule object to an SBMLDocument - (e.g., using Model.addRule()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - AlgebraicRule object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a AlgebraicRule is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. -"; - - -%feature("docstring") AlgebraicRule::clone " - Creates and returns a deep copy of this Rule. - - Returns a (deep) copy of this Rule. -"; - - -%feature("docstring") AlgebraicRule::accept " - Accepts the given SBMLVisitor for this instance of AlgebraicRule. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next AlgebraicRule object in the - list of rules within which the present object is embedded. -"; - - -%feature("docstring") AlgebraicRule::setInternalIdOnly " - Internal implementation method. -"; - - -%feature("docstring") AlgebraicRule::getInternalIdOnly " - Internal implementation method. -"; - - -%feature("docstring") AlgebraicRule::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - AlgebraicRule object have been set. - - Note: - - In SBML Levels 2-3, there is no required attribute for an - AlgebraicRule object. For Level 1, the only required attribute is - 'formula'. - - Returns True if the required attributes have been set, False - otherwise. -"; - - -%feature("docstring") AssignmentRule " - @ingroup Core Implementation of SBML's AssignmentRule construct. - - The rule type AssignmentRule is derived from the parent class Rule. - It is used to express equations that set the values of variables. - The left-hand side (the attribute named 'variable') of an assignment - rule can refer to the identifier of a Species, SpeciesReference (in - SBML Level 3), Compartment, or Parameter object in the model (but - not a Reaction). The entity identified must have its 'constant' - attribute set to False. The effects of an AssignmentRule are in - general terms the same, but differ in the precise details depending - on the type of variable being set: - - * In the case of a species, an AssignmentRule sets the referenced - species' quantity (whether a 'concentration' or 'amount') to the - value determined by the formula in the MathML subelement 'math'. The - unit associated with the value produced by the 'math' formula should - (in SBML Level 2 Version 4 and in SBML Level 3) or must (in SBML - releases prior to Level 2 version 4) be equal to the unit associated - with the species' quantity. Restrictions: There must not be both an - AssignmentRule 'variable' attribute and a SpeciesReference 'species' - attribute having the same value, unless the referenced Species - object has its 'boundaryCondition' attribute set to True. In other - words, an assignment rule cannot be defined for a species that is - created or destroyed in a reaction unless that species is defined as - a boundary condition in the model. - - * (For SBML Level 3 only) In the case of a species reference, an - AssignmentRule sets the stoichiometry of the referenced reactant or - product to the value determined by the formula in 'math'. The unit - associated with the value produced by the 'math' formula should be - consistent with the unit 'dimensionless', because reactant and - product stoichiometries in reactions are dimensionless quantities. - - * In the case of a compartment, an AssignmentRule sets the - referenced compartment's size to the value determined by the formula - in the 'math' subelement of the AssignmentRule object. The overall - units of the formula in 'math' should (in SBML Level 2 Version 4 - and in SBML Level 3) or must (in SBML releases prior to Level 2 - version 4) be the same as the units of the size of the compartment. - - * In the case of a parameter, an AssignmentRule sets the referenced - parameter's value to that determined by the formula in the 'math' - subelement of the AssignmentRule object. The overall units of the - formula in the 'math' subelement should (in SBML Level 2 Version 4 - and in SBML Level 3) or must (in SBML releases prior to Level 2 - version 4) be the same as the units defined for the parameter. - - In the context of a simulation, assignment rules are in effect at all - times, t >= 0. For purposes of evaluating expressions that involve - the delay 'csymbol' (see the SBML Level 2 specification), assignment - rules are considered to apply also at t <= 0. Please consult the - relevant SBML specification for additional information about the - semantics of assignments, rules, and entity values for simulation - time t <= 0. - - A model must not contain more than one AssignmentRule or RateRule - object having the same value of 'variable'; in other words, in the - set of all assignment rules and rate rules in an SBML model, each - variable appearing in the left-hand sides can only appear once. - This simply follows from the fact that an indeterminate system would - result if a model contained more than one assignment rule for the - same variable or both an assignment rule and a rate rule for the - same variable. - - Similarly, a model must also not contain both an AssignmentRule and - an InitialAssignment for the same variable, because both kinds of - constructs apply prior to and at the start of simulation time, i.e., - t <= 0. If a model contained both an initial assignment and an - assignment rule for the same variable, an indeterminate system would - result. - - The value calculated by an AssignmentRule object overrides the value - assigned to the given symbol by the object defining that symbol. For - example, if a Compartment object's 'size' attribute value is set in - its definition, and the model also contains an AssignmentRule object - having that compartment's 'id' as its 'variable' value, then the - 'size' assigned in the Compartment object definition is ignored and - the value assigned based on the computation defined in the - AssignmentRule. This does not mean that a definition for a given - symbol can be omitted if there is an AssignmentRule object for it. - For example, there must be a Parameter definition for a given - parameter if there is an AssignmentRule for that parameter. It is - only a question of which value definition takes precedence. - - General summary of SBML rules - ====================================================================== - - In SBML Level 3 as well as Level 2, rules are separated into three - subclasses for the benefit of model analysis software. The three - subclasses are based on the following three different possible - functional forms (where x is a variable, f is some arbitrary function - returning a numerical result, V is a vector of variables that does - not include x, and W is a vector of variables that may include x): - - Algebraic: left-hand side is zero 0 = f(W) - Assignment: left-hand side is a scalar x = f(V) - Rate: left-hand side is a rate-of-change dx/dt = f(W) - - In their general form given above, there is little to distinguish - between assignment and algebraic rules. They are treated as separate - cases for the following reasons: - - * Assignment rules can simply be evaluated to calculate intermediate - values for use in numerical methods. They are statements of equality - that hold at all times. (For assignments that are only performed - once, see InitialAssignment.) - - * SBML needs to place restrictions on assignment rules, for example - the restriction that assignment rules cannot contain algebraic - loops. - - * Some simulators do not contain numerical solvers capable of solving - unconstrained algebraic equations, and providing more direct forms - such as assignment rules may enable those simulators to process - models they could not process if the same assignments were put in - the form of general algebraic equations; - - * Those simulators that can solve these algebraic equations make a - distinction between the different categories listed above; and - - * Some specialized numerical analyses of models may only be - applicable to models that do not contain algebraic rules. - - The approach taken to covering these cases in SBML is to define an - abstract Rule structure containing a subelement, 'math', to hold the - right-hand side expression, then to derive subtypes of Rule that add - attributes to distinguish the cases of algebraic, assignment and rate - rules. The 'math' subelement must contain a MathML expression - defining the mathematical formula of the rule. This MathML formula - must return a numerical value. The formula can be an arbitrary - expression referencing the variables and other entities in an SBML - model. - - Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, - RateRule) inherit the the 'math' subelement and other fields from - SBase. The AssignmentRule and RateRule classes add an additional - attribute, 'variable'. See the definitions of AssignmentRule, - AlgebraicRule and RateRule for details about the structure and - interpretation of each one. - - Additional restrictions on SBML rules - ====================================================================== - - An important design goal of SBML rule semantics is to ensure that a - model's simulation and analysis results will not be dependent on when - or how often rules are evaluated. To achieve this, SBML needs to - place two restrictions on rule use. The first concerns algebraic - loops in the system of assignments in a model, and the second - concerns overdetermined systems. - - A model must not contain algebraic loops - ...................................................................... - - The combined set of InitialAssignment, AssignmentRule and KineticLaw - objects in a model constitute a set of assignment statements that - should be considered as a whole. (A KineticLaw object is counted as - an assignment because it assigns a value to the symbol contained in - the \"id\" attribute of the Reaction object in which it is defined.) - This combined set of assignment statements must not contain - algebraic loops -- dependency chains between these statements must - terminate. To put this more formally, consider a directed graph in - which nodes are assignment statements and directed arcs exist for - each occurrence of an SBML species, compartment or parameter symbol - in an assignment statement's \"math\" subelement. Let the directed - arcs point from the statement assigning the symbol to the statements - that contain the symbol in their \"math\" subelement expressions. - This graph must be acyclic. - - SBML does not specify when or how often rules should be evaluated. - Eliminating algebraic loops ensures that assignment statements can be - evaluated any number of times without the result of those evaluations - changing. As an example, consider the set of equations x = x + 1, y - = z + 200 and z = y + 100. If this set of equations were - interpreted as a set of assignment statements, it would be invalid - because the rule for x refers to x (exhibiting one type of loop), - and the rule for y refers to z while the rule for z refers back to y - (exhibiting another type of loop). Conversely, the following set of - equations would constitute a valid set of assignment statements: x = - 10, y = z + 200, and z = x + 100. - - A model must not be overdetermined - ...................................................................... - - An SBML model must not be overdetermined; that is, a model must not - define more equations than there are unknowns in a model. An SBML - model that does not contain AlgebraicRule structures cannot be - overdetermined. - - LibSBML implements the static analysis procedure described in - Appendix B of the SBML Level 3 Version 1 Core specification for - assessing whether a model is overdetermined. - - (In summary, assessing whether a given continuous, deterministic, - mathematical model is overdetermined does not require dynamic - analysis; it can be done by analyzing the system of equations - created from the model. One approach is to construct a bipartite - graph in which one set of vertices represents the variables and the - other the set of vertices represents the equations. Place edges - between vertices such that variables in the system are linked to the - equations that determine them. For algebraic equations, there will - be edges between the equation and each variable occurring in the - equation. For ordinary differential equations (such as those defined - by rate rules or implied by the reaction rate definitions), there - will be a single edge between the equation and the variable - determined by that differential equation. A mathematical model is - overdetermined if the maximal matchings of the bipartite graph - contain disconnected vertexes representing equations. If one - maximal matching has this property, then all the maximal matchings - will have this property; i.e., it is only necessary to find one - maximal matching.) - - Rule types for SBML Level 1 - ====================================================================== - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 - for distinguishing rules; specifically, it uses an attribute whose - value is drawn from an enumeration of 3 values. LibSBML supports - this using methods that work with the enumeration values @~ listed - below. - - * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. - - * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. - - * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or - not yet set. -"; - - -%feature("docstring") AssignmentRule::AssignmentRule " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - AssignmentRule(SBMLNamespaces sbmlns) - - Creates a new AssignmentRule using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a AssignmentRule object to an SBMLDocument - (e.g., using Model.addRule(), the SBML XML namespace of the - document overrides the value used when creating the AssignmentRule - object via this constructor. This is necessary to ensure that an - SBML document is a consistent structure. Nevertheless, the ability - to supply the values at the time of creation of a AssignmentRule is - an important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - AssignmentRule(long level, long version) - - Creates a new AssignmentRule using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - AssignmentRule - - Parameter 'version' is a long integer, the SBML Version to assign to - this AssignmentRule - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of an AssignmentRule object to an SBMLDocument - (e.g., using Model.addRule(), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - AssignmentRule object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a AssignmentRule is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. -"; - - -%feature("docstring") AssignmentRule::clone " - Creates and returns a deep copy of this Rule. - - Returns a (deep) copy of this Rule. -"; - - -%feature("docstring") AssignmentRule::accept " - Accepts the given SBMLVisitor for this instance of AssignmentRule. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next AssignmentRule object in the - list of rules within which the present object is embedded. -"; - - -%feature("docstring") AssignmentRule::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - AssignmentRule object have been set. - - Note: - - In SBML Levels 2-3, the only required attribute for an - AssignmentRule object is 'variable'. For Level 1, where the - equivalent attribute is known by different names ('compartment', - 'species', or 'name', depending on the type of object), there is an - additional required attribute called 'formula'. - - Returns True if the required attributes have been set, False - otherwise. -"; - - -%feature("docstring") AssignmentRule::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") RateRule " - @ingroup Core Implementation of SBML's RateRule construct. - - The rule type RateRule is derived from the parent class Rule. It is - used to express equations that determine the rates of change of - variables. The left-hand side (the 'variable' attribute) can refer - to the identifier of a species, compartment, or parameter (but not a - reaction). The entity identified must have its 'constant' attribute - set to False. The effects of a RateRule are in general terms the - same, but differ in the precise details depending on which variable - is being set: - - * In the case of a species, a RateRule sets the rate of change - of the species' quantity (concentration or amount of substance) to - the value determined by the formula in the 'math' subelement of the - RateRule object. The overall units of the formula in 'math' should - (in SBML Level 2 Version 4 and in SBML Level 3) or must (in SBML - releases prior to Level 2 version 4) be equal to the unit of species - quantity divided by the model-wide unit of time. Restrictions: - There must not be both a RateRule 'variable' attribute and a - SpeciesReference 'species' attribute having the same value, unless - that species has its 'boundaryCondition' attribute is set to True. - This means a rate rule cannot be defined for a species that is - created or destroyed in a reaction, unless that species is defined - as a boundary condition in the model. - - * (For SBML Level 3 only) In the case of a species reference, a - RateRule sets the rate of change of the stoichiometry of the - referenced reactant or product to the value determined by the - formula in 'math'. The unit associated with the value produced by - the 'math' formula should be consistent with the unit - 'dimensionless' divided by the model-wide unit of time. - - * In the case of a compartment, a RateRule sets the rate of change - of the compartment's size to the value determined by the formula in - the 'math' subelement of the RateRule object. The overall units of - the formula should (in SBML Level 2 Version 4 and in SBML Level 3) - or must (in SBML releases prior to Level 2 version 4) be the units - of the compartment's size divided by the model-wide unit of time. - - * In the case of a parameter, a RateRule sets the rate of change of - the parameter's value to that determined by the formula in the - 'math' subelement of the RateRule object. The overall units of the - formula should (in SBML Level 2 Version 4 and in SBML Level 3) or - must (in SBML releases prior to Level 2 version 4) be the Parameter - object's 'unit' attribute value divided by the model-wide unit of - time. - - In the context of a simulation, rate rules are in effect for - simulation time t < 0. Please consult the relevant SBML - specification for additional information about the semantics of - assignments, rules, and entity values for simulation time t <= 0. - - As mentioned in the description of AssignmentRule, a model must not - contain more than one RateRule or AssignmentRule object having the - same value of 'variable'; in other words, in the set of all - assignment rules and rate rules in an SBML model, each variable - appearing in the left-hand sides can only appear once. This simply - follows from the fact that an indeterminate system would result if a - model contained more than one assignment rule for the same variable - or both an assignment rule and a rate rule for the same variable. - - General summary of SBML rules - ====================================================================== - - In SBML Level 3 as well as Level 2, rules are separated into three - subclasses for the benefit of model analysis software. The three - subclasses are based on the following three different possible - functional forms (where x is a variable, f is some arbitrary function - returning a numerical result, V is a vector of variables that does - not include x, and W is a vector of variables that may include x): - - Algebraic: left-hand side is zero 0 = f(W) - Assignment: left-hand side is a scalar x = f(V) - Rate: left-hand side is a rate-of-change dx/dt = f(W) - - In their general form given above, there is little to distinguish - between assignment and algebraic rules. They are treated as separate - cases for the following reasons: - - * Assignment rules can simply be evaluated to calculate intermediate - values for use in numerical methods. They are statements of equality - that hold at all times. (For assignments that are only performed - once, see InitialAssignment.) - - * SBML needs to place restrictions on assignment rules, for example - the restriction that assignment rules cannot contain algebraic - loops. - - * Some simulators do not contain numerical solvers capable of solving - unconstrained algebraic equations, and providing more direct forms - such as assignment rules may enable those simulators to process - models they could not process if the same assignments were put in - the form of general algebraic equations; - - * Those simulators that can solve these algebraic equations make a - distinction between the different categories listed above; and - - * Some specialized numerical analyses of models may only be - applicable to models that do not contain algebraic rules. - - The approach taken to covering these cases in SBML is to define an - abstract Rule structure containing a subelement, 'math', to hold the - right-hand side expression, then to derive subtypes of Rule that add - attributes to distinguish the cases of algebraic, assignment and rate - rules. The 'math' subelement must contain a MathML expression - defining the mathematical formula of the rule. This MathML formula - must return a numerical value. The formula can be an arbitrary - expression referencing the variables and other entities in an SBML - model. - - Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, - RateRule) inherit the the 'math' subelement and other fields from - SBase. The AssignmentRule and RateRule classes add an additional - attribute, 'variable'. See the definitions of AssignmentRule, - AlgebraicRule and RateRule for details about the structure and - interpretation of each one. - - Additional restrictions on SBML rules - ====================================================================== - - An important design goal of SBML rule semantics is to ensure that a - model's simulation and analysis results will not be dependent on when - or how often rules are evaluated. To achieve this, SBML needs to - place two restrictions on rule use. The first concerns algebraic - loops in the system of assignments in a model, and the second - concerns overdetermined systems. - - A model must not contain algebraic loops - ...................................................................... - - The combined set of InitialAssignment, AssignmentRule and KineticLaw - objects in a model constitute a set of assignment statements that - should be considered as a whole. (A KineticLaw object is counted as - an assignment because it assigns a value to the symbol contained in - the \"id\" attribute of the Reaction object in which it is defined.) - This combined set of assignment statements must not contain - algebraic loops -- dependency chains between these statements must - terminate. To put this more formally, consider a directed graph in - which nodes are assignment statements and directed arcs exist for - each occurrence of an SBML species, compartment or parameter symbol - in an assignment statement's \"math\" subelement. Let the directed - arcs point from the statement assigning the symbol to the statements - that contain the symbol in their \"math\" subelement expressions. - This graph must be acyclic. - - SBML does not specify when or how often rules should be evaluated. - Eliminating algebraic loops ensures that assignment statements can be - evaluated any number of times without the result of those evaluations - changing. As an example, consider the set of equations x = x + 1, y - = z + 200 and z = y + 100. If this set of equations were - interpreted as a set of assignment statements, it would be invalid - because the rule for x refers to x (exhibiting one type of loop), - and the rule for y refers to z while the rule for z refers back to y - (exhibiting another type of loop). Conversely, the following set of - equations would constitute a valid set of assignment statements: x = - 10, y = z + 200, and z = x + 100. - - A model must not be overdetermined - ...................................................................... - - An SBML model must not be overdetermined; that is, a model must not - define more equations than there are unknowns in a model. An SBML - model that does not contain AlgebraicRule structures cannot be - overdetermined. - - LibSBML implements the static analysis procedure described in - Appendix B of the SBML Level 3 Version 1 Core specification for - assessing whether a model is overdetermined. - - (In summary, assessing whether a given continuous, deterministic, - mathematical model is overdetermined does not require dynamic - analysis; it can be done by analyzing the system of equations - created from the model. One approach is to construct a bipartite - graph in which one set of vertices represents the variables and the - other the set of vertices represents the equations. Place edges - between vertices such that variables in the system are linked to the - equations that determine them. For algebraic equations, there will - be edges between the equation and each variable occurring in the - equation. For ordinary differential equations (such as those defined - by rate rules or implied by the reaction rate definitions), there - will be a single edge between the equation and the variable - determined by that differential equation. A mathematical model is - overdetermined if the maximal matchings of the bipartite graph - contain disconnected vertexes representing equations. If one - maximal matching has this property, then all the maximal matchings - will have this property; i.e., it is only necessary to find one - maximal matching.) - - Rule types for SBML Level 1 - ====================================================================== - - SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 - for distinguishing rules; specifically, it uses an attribute whose - value is drawn from an enumeration of 3 values. LibSBML supports - this using methods that work with the enumeration values @~ listed - below. - - * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. - - * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. - - * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or - not yet set. -"; - - -%feature("docstring") RateRule::RateRule " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - RateRule(SBMLNamespaces sbmlns) - - Creates a new RateRule using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a RateRule object to an SBMLDocument (e.g., - using Model.addRule(), the SBML XML namespace of the document - overrides the value used when creating the RateRule object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a RateRule is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - RateRule(long level, long version) - - Creates a new RateRule using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - RateRule - - Parameter 'version' is a long integer, the SBML Version to assign to - this RateRule - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a RateRule object to an SBMLDocument (e.g., - using Model.addRule(), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - RateRule object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a RateRule - is an important aid to producing valid SBML. Knowledge of the - intented SBML Level and Version determine whether it is valid to - assign a particular value to an attribute, or whether it is valid to - add an object to an existing SBMLDocument. -"; - - -%feature("docstring") RateRule::clone " - Creates and returns a deep copy of this Rule. - - Returns a (deep) copy of this Rule. -"; - - -%feature("docstring") RateRule::accept " - Accepts the given SBMLVisitor. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next RateRule object in the list of - rules within which the present object is embedded. -"; - - -%feature("docstring") RateRule::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - RateRule object have been set. - - Note: - - In SBML Levels 2-3, the only required attribute for a RateRule - object is 'variable'. For Level 1, where the equivalent attribute - is known by different names ('compartment', 'species', or 'name', - depending on the type of object), there is an additional required - attribute called 'formula'. - - Returns True if the required attributes have been set, False - otherwise. -"; - - -%feature("docstring") RateRule::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Constraint " - @ingroup Core Implementation of SBML's Constraint construct. - - The Constraint object class was introduced in SBML Level 2 Version 2 - as a mechanism for stating the assumptions under which a model is - designed to operate. The constraints are statements about - permissible values of different quantities in a model. Constraints - are not used to compute dynamical values for simulation or analysis, - but rather, they serve an advisory role for simulation/analysis - tools. - - SBML's Constraint object class has one required attribute, 'id', to - give the parameter a unique identifier by which other parts of an - SBML model definition can refer to it. A Constraint object can also - have an optional 'name' attribute of type string. Identifiers and - names must be used according to the guidelines described in the SBML - specification (e.g., Section 3.3 in the Level 2 Version 4 - specification). - - Constraint has one required subelement, 'math', containing a MathML - formula defining the condition of the constraint. This formula must - return a boolean value of True when the model is a valid state. The - formula can be an arbitrary expression referencing the variables and - other entities in an SBML model. The evaluation of 'math' and - behavior of constraints are described in more detail below. - - A Constraint structure also has an optional subelement called - 'message'. This can contain a message in XHTML format that may be - displayed to the user when the condition of the formula in the - 'math' subelement evaluates to a value of False. Software tools are - not required to display the message, but it is recommended that they - do so as a matter of best practice. The XHTML content within a - 'message' subelement must follow the same restrictions as for the - 'notes' element on SBase described in in the SBML Level 2 - specification; please consult the SBML specification document - corresponding to the SBML Level and Version of your model for more - information about the requirements for 'notes' content. - - Constraint was introduced in SBML Level 2 Version 2. It is not - available in earlier versions of Level 2 nor in any version of Level - 1. - - Semantics of Constraints - ====================================================================== - - In the context of a simulation, a Constraint has effect at all times - t >= 0. Each Constraint's 'math' subelement is first evaluated - after any InitialAssignment definitions in a model at t = 0 and can - conceivably trigger at that point. (In other words, a simulation - could fail a constraint immediately.) - - Constraint structures cannot and should not be used to compute the - dynamical behavior of a model as part of, for example, simulation. - Constraints may be used as input to non-dynamical analysis, for - instance by expressing flux constraints for flux balance analysis. - - The results of a simulation of a model containing a constraint are - invalid from any simulation time at and after a point when the - function given by the 'math' subelement returns a value of False. - Invalid simulation results do not make a prediction of the behavior - of the biochemical reaction network represented by the model. The - precise behavior of simulation tools is left undefined with respect - to constraints. If invalid results are detected with respect to a - given constraint, the 'message' subelement may optionally be - displayed to the user. The simulation tool may also halt the - simulation or clearly delimit in output data the simulation time - point at which the simulation results become invalid. - - SBML does not impose restrictions on duplicate Constraint definitions - or the order of evaluation of Constraint objects in a model. It is - possible for a model to define multiple constraints all with the same - mathematical expression. Since the failure of any constraint - indicates that the model simulation has entered an invalid state, a - system is not required to attempt to detect whether other - constraints in the model have failed once any one constraint has - failed. -"; - - -%feature("docstring") ListOfConstraints " - @ingroup Core Implementation of SBML's ListOfConstraints construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Constraint::Constraint " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Constraint(SBMLNamespaces sbmlns) - - Creates a new Constraint using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Constraint object to an SBMLDocument (e.g., - using Model.addConstraint()), the SBML XML namespace of the document - overrides the value used when creating the Constraint object via - this constructor. This is necessary to ensure that an SBML document - is a consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a Constraint is an important aid - to producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value - to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Constraint(long level, long version) - - Creates a new Constraint using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Constraint - - Parameter 'version' is a long integer, the SBML Version to assign to - this Constraint - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Constraint object to an SBMLDocument (e.g., - using Model.addConstraint()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - Constraint object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Constraint - is an important aid to producing valid SBML. Knowledge of the - intented SBML Level and Version determine whether it is valid to - assign a particular value to an attribute, or whether it is valid to - add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Constraint(Constraint orig) - - Copy constructor; creates a copy of this Constraint. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Constraint::accept " - Accepts the given SBMLVisitor for this instance of Constraint. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next Constraint in the list of - constraints within which this Constraint is embedded (i.e., in the - ListOfConstraints located in the enclosing Model instance). -"; - - -%feature("docstring") Constraint::clone " - Creates and returns a deep copy of this Constraint. - - Returns a (deep) copy of this Constraint. -"; - - -%feature("docstring") Constraint::getMessage " - Get the message, if any, associated with this Constraint - - Returns the message for this Constraint, as an XMLNode. -"; - - -%feature("docstring") Constraint::getMessageString " - Get the message string, if any, associated with this Constraint - - Returns the message for this Constraint, as a string. -"; - - -%feature("docstring") Constraint::getMath " - Get the mathematical expression of this Constraint - - Returns the math for this Constraint, as an ASTNode. -"; - - -%feature("docstring") Constraint::isSetMessage " - Predicate returning True if a message is defined for this - Constraint. - - Returns True if the message of this Constraint is set, False - otherwise. -"; - - -%feature("docstring") Constraint::isSetMath " - Predicate returning True if a mathematical formula is defined for - this Constraint. - - Returns True if the 'math' subelement for this Constraint is set, - False otherwise. -"; - - -%feature("docstring") Constraint::setMessage " - Sets the message of this Constraint. - - The XMLNode tree passed in 'xhtml' is copied. - - Parameter 'xhtml' is an XML tree containing XHTML content. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") Constraint::setMath " - Sets the mathematical expression of this Constraint to a copy of the - AST given as 'math'. - - Parameter 'math' is an ASTNode expression to be assigned as the - 'math' subelement of this Constraint - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") Constraint::unsetMessage " - Unsets the 'message' subelement of this Constraint. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Constraint::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Constraint::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Constraint::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") Constraint::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Constraint::getElementName " - Returns the XML element name of this object, which for Constraint, is - always 'constraint'. - - Returns the name of this element, i.e., 'constraint'. -"; - - -%feature("docstring") Constraint::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Constraint::hasRequiredElements " - Predicate returning True if all the required elements for this - Constraint object have been set. - - Note: - - The required elements for a Constraint object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Constraint::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") Constraint::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Constraint::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Constraint::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Constraint::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Constraint::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfConstraints::ListOfConstraints " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfConstraints(SBMLNamespaces sbmlns) - - Creates a new ListOfConstraints object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfConstraints object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfConstraints(long level, long version) - - Creates a new ListOfConstraints object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfConstraints::clone " - Creates and returns a deep copy of this ListOfConstraints instance. - - Returns a (deep) copy of this ListOfConstraints. -"; - - -%feature("docstring") ListOfConstraints::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfConstraints::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Constraint objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfConstraints::getElementName " - Returns the XML element name of this object. - - For ListOfConstraints, the XML element name is 'listOfConstraints'. - - Returns the name of this element, i.e., 'listOfConstraints'. -"; - - -%feature("docstring") ListOfConstraints::get " - Get a Constraint from the ListOfConstraints. - - Parameter 'n' is the index number of the Constraint to get. - - Returns the nth Constraint in this ListOfConstraints. - - See also size(). -"; - - -%feature("docstring") ListOfConstraints::remove " - Removes the nth item from this ListOfConstraints items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). -"; - - -%feature("docstring") ListOfConstraints::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfConstraints::createObject " - Internal implementation method. -"; - - -%feature("docstring") Reaction " - @ingroup Core Implementation of SBML's Reaction construct. - - A reaction represents any transformation, transport or binding - process, typically a chemical reaction, that can change the quantity - of one or more species. In SBML, a reaction is defined primarily in - terms of the participating reactants and products (and their - corresponding stoichiometries), along with optional modifier - species, an optional rate at which the reaction takes place, and - optional parameters. - - As with other major object in SBML, Reaction has a mandatory - attribute, 'id', used to give the compartment type an identifier. - The identifier must be a text string conforming to the identifer - syntax permitted in SBML. In SBML Level 2 and Level 3, the reaction - 'id' identifier can be used in mathematical formulas elsewhere in an - SBML model to represent the rate of that reaction; this usage is - explained below. Reaction also has an optional 'name' attribute, of - type string. The 'id' and 'name' must be used according to the - guidelines described in the SBML specification. - - The species participating as reactants, products, and/or modifiers in - a reaction are declared using lists of SpeciesReference and/or - ModifierSpeciesReference instances stored in subelements - 'listOfReactants', 'listOfProducts' and 'listOfModifiers'. Certain - restrictions are placed on the appearance of species in reaction - definitions: - - * The ability of a species to appear as a reactant or product of - any reaction in a model is governed by certain flags in that - species' definition; see the definition of Species for more - information. - - * Any species appearing in the mathematical formula of the - subelement 'kineticLaw' (described below) of a Reaction must be - declared in at least one of that Reaction's lists of reactants, - products, and/or modifiers. Put another way, it is an error for a - reaction's kinetic law formula to refer to species that have not - been declared for that reaction. - - * A reaction definition can contain an empty list of reactants or - an empty list of products, but it must have at least one reactant or - product; in other words, a reaction without any reactant or product - species is not permitted. (This restriction does not apply to - modifier species, which remain optional in all cases.) - - A reaction can contain up to one KineticLaw object in a subelement - named 'kineticLaw'. It defines the speed at which the process - defined by the reaction takes place. The description of KineticLaw - provides more details about its use. Note that although the - inclusion of a KineticLaw object in an instance of a Reaction - component is optional, there is no useful default that can be - substituted in place of a missing rate expression in a reaction. - Moreover, a reaction's rate cannot be defined in any other way in - SBML -- InitialAssignment, AssignmentRule, RateRule, AlgebraicRule, - Event, and other constructs in SBML cannot be used to set the - reaction rate separately. Nevertheless, for some modeling - applications, reactions without any defined rate can be perfectly - acceptable. - - Reaction also has a boolean attribute named 'reversible' for - indicating whether the reaction is reversible. This attribute is - optional in SBML Level 2, with a default of True; it is mandatory in - SBML Level 3 (with no default value). To say that a reaction is - reversible is to say it can proceed in either the forward or the - reverse direction. Although the reversibility of a reaction can - sometimes be deduced by inspecting its rate expression, this is not - always the case, especially for complicated expressions. Moreover, - the need in SBML to allow rate expressions (i.e., KineticLaw) to be - optional leads to the need for a separate flag indicating - reversibility. Note that labeling a reaction as irreversible is an - assertion that the reaction always proceeds in the given forward - direction. (Why else would it be flagged as irreversible?) This - implies the rate expression in the KineticLaw always has a non- - negative value during simulations. Software tools could provide a - means of optionally testing that this condition holds. The presence - of reversibility information in two places (i.e., the rate - expression and the 'reversible' attribute on Reaction) leaves open - the possibility that a model could contain contradictory - information, but the creation of such a model would be an error on - the part of the software generating it. - - The Reaction object class has another boolean attribute called - 'fast'. This attribute is optional in SBML Level 2, with a default - of false; it is mandatory in SBML Level 3 (with no default value). - It is used to indicate that a reaction occurs on a vastly faster - time scale than others in a system. Readers are directed to the - SBML Level 2 Version 4 specification, which provides more detail - about the conditions under which a reaction can be considered to be - fast in this sense. The attribute's default value is False. SBML - Level 1 and Level 2 Version 1 incorrectly claimed that software - tools could ignore this attribute if they did not implement support - for the corresponding concept; however, further research in SBML has - revealed that this is not true, and 'fast' cannot be ignored if it - is set to True. SBML Level 2 Versions 2-4 therefore stipulate that - if a model has any reactions with 'fast' set to True, a software - tool must be able to respect the attribute or else indicate to the - user that it does not have the capacity to do so. Analysis software - cannot ignore the value of the 'fast' attribute because doing so may - lead to different results as compared to a software system that does - make use of 'fast'. - - In SBML Level 3 Version 1, the Reaction object has an additional - optional attribute named 'compartment', whose value must be the - identifier of a compartment defined in the enclosing Model object. - The 'compartment' attribute can be used to indicate the compartment - in which the reaction is assumed to take place. If the attribute is - present, its value must be the identifier of a Compartment object - defined in the enclosing Model object. Similar to the 'reversible' - attribute, the value of the 'compartment' attribute has no direct - impact on the construction of mathematical equations for the SBML - model. When a kinetic law is given for a reaction, the compartment - location may already be implicit in the kinetic law (although this - cannot always be guaranteed). Nevertheless, software tools may find - the 'compartment' attribute value useful for such purposes as - analyzing the structure of the model, guiding the modeler in - constructing correct rate formulas, and visualization purposes. - - Readers are urged to read the SBML specification for more details - about the proper use of Reaction. -"; - - -%feature("docstring") ListOfReactions " - @ingroup Core Implementation of SBML's ListOfReactions construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Reaction::Reaction " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Reaction(SBMLNamespaces sbmlns) - - Creates a new Reaction using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Reaction object to an SBMLDocument (e.g., - using Model.addReaction()), the SBML XML namespace of the document - overrides the value used when creating the Reaction object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a Reaction is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Reaction(long level, long version) - - Creates a new Reaction using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Reaction - - Parameter 'version' is a long integer, the SBML Version to assign to - this Reaction - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Reaction object to an SBMLDocument (e.g., - using Model.addReaction()), the SBML Level, SBML Version and XML - namespace of the document override the values used when creating the - Reaction object via this constructor. This is necessary to ensure - that an SBML document is a consistent structure. Nevertheless, the - ability to supply the values at the time of creation of a Reaction - is an important aid to producing valid SBML. Knowledge of the - intented SBML Level and Version determine whether it is valid to - assign a particular value to an attribute, or whether it is valid to - add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Reaction(Reaction orig) - - Copy constructor; creates a copy of this Reaction. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Reaction::accept " - Accepts the given SBMLVisitor for this instance of Reaction. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") Reaction::clone " - Creates and returns a deep copy of this Reaction. - - Returns a (deep) copy of this Reaction. -"; - - -%feature("docstring") Reaction::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find. - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") Reaction::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") Reaction::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") Reaction::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Reaction::initDefaults " - Initializes the fields of this Reaction object to 'typical' default - values. - - The SBML Reaction component has slightly different aspects and - default attribute values in different SBML Levels and Versions. This - method sets the values to certain common defaults, based mostly on - what they are in SBML Level 2. Specifically: - - * Sets the 'reversible' attribute to True - - * Sets the 'fast' attribute to False - - * Marks the 'fast' attribute as not having been set - - WARNING: - - The 'fast' attribute must be used with care. SBML definitions - before SBML Level 2 Version 2 incorrectly indicated that software - tools could ignore this attribute if they did not implement support - for the corresponding concept; however, further research in SBML has - revealed that this is not true, and 'fast' cannot be ignored if it - is set to True. Beginning with SBML Level 2 Versions 2, the SBML - specifications therefore stipulate that if a model has any reactions - with 'fast' set to true, a software tool must be able to respect the - attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML specifications, - which provides more detail about the conditions under which a - reaction can be considered to be fast in this sense. -"; - - -%feature("docstring") Reaction::getId " - Returns the value of the 'id' attribute of this Reaction. - - Returns the id of this Reaction. -"; - - -%feature("docstring") Reaction::getName " - Returns the value of the 'name' attribute of this Reaction. - - Returns the name of this Reaction. -"; - - -%feature("docstring") Reaction::getKineticLaw " - Returns the KineticLaw object contained in this Reaction. - - Returns the KineticLaw instance. -"; - - -%feature("docstring") Reaction::getReversible " - Returns the value of the 'reversible' attribute on the Reaction as a - boolean value. - - Returns the reversibility status of this Reaction. -"; - - -%feature("docstring") Reaction::getFast " - Returns the value of the 'fast' attribute of this Reaction. - - Returns the 'fast' status of this Reaction. - - WARNING: - - SBML definitions before SBML Level 2 Version 2 incorrectly indicated - that software tools could ignore this attribute if they did not - implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and 'fast' - cannot be ignored if it is set to True. SBML Level 2 Versions 2, 3 - and 4 therefore stipulate that if a model has any reactions with - 'fast' set to True, a software tool must be able to respect the - attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML Level 2 Version - 4 specification, which provides more detail about the conditions - under which a reaction can be considered to be fast in this sense. -"; - - -%feature("docstring") Reaction::getCompartment " - (SBML Level 3 only) Returns the value of the 'compartment' attribute - on the Reaction. - - Returns the compartment of this Reaction. - - Note: - - The 'compartment' attribute is available in SBML Level 3 Version 1 - Core, but is not present on Reaction in lower Levels of SBML. -"; - - -%feature("docstring") Reaction::isSetId " - Predicate returning True if this Reaction's 'id' attribute is set. - - Returns True if the 'id' attribute of this Reaction is set, False - otherwise. -"; - - -%feature("docstring") Reaction::isSetName " - Predicate returning True if this Reaction's 'name' attribute is set. - - Returns True if the 'name' attribute of this Reaction is set, False - otherwise. -"; - - -%feature("docstring") Reaction::isSetKineticLaw " - Predicate returning True if this Reaction contains a kinetic law - object. - - Returns True if a KineticLaw is present in this Reaction,, False - otherwise. -"; - - -%feature("docstring") Reaction::isSetFast " - Predicate returning True if the value of the 'fast' attribute on - this Reaction. - - Returns True if the 'fast' attribute is true, False otherwise. - - WARNING: - - SBML definitions before SBML Level 2 Version 2 incorrectly indicated - that software tools could ignore this attribute if they did not - implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and 'fast' - cannot be ignored if it is set to True. SBML Level 2 Versions 2, 3 - and 4 therefore stipulate that if a model has any reactions with - 'fast' set to True, a software tool must be able to respect the - attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML Level 2 Version - 4 specification, which provides more detail about the conditions - under which a reaction can be considered to be fast in this sense. - Note also that in SBML Level 1, 'fast' is defined as optional with a - default of False, which means it is effectively always set. -"; - - -%feature("docstring") Reaction::isSetCompartment " - Predicate returning True if this Reaction's 'compartment' attribute - is set. - - Returns True if the 'compartment' attribute of this Reaction is set, - False otherwise. - - Note: - - The 'compartment' attribute is available in SBML Level 3 Version 1 - Core, but is not present on Reaction in lower Levels of SBML. -"; - - -%feature("docstring") Reaction::isSetReversible " - Predicate returning True if this Reaction's 'reversible' attribute - is set. - - Returns True if the 'reversible' attribute of this Reaction is set, - False otherwise. -"; - - -%feature("docstring") Reaction::setId " - Sets the value of the 'id' attribute of this Reaction. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - Reaction - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Reaction::setName " - Sets the value of the 'name' attribute of this Reaction. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the Reaction - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Reaction::setKineticLaw " - Sets the 'kineticLaw' subelement of this Reaction to a copy of the - given KineticLaw object. - - Parameter 'kl' is the KineticLaw object to use. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH -"; - - -%feature("docstring") Reaction::setReversible " - Sets the value of the 'reversible' attribute of this Reaction. - - Parameter 'value' is the value of the 'reversible' attribute. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") Reaction::setFast " - Sets the value of the 'fast' attribute of this Reaction. - - Parameter 'value' is the value of the 'fast' attribute. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - WARNING: - - SBML definitions before SBML Level 2 Version 2 incorrectly indicated - that software tools could ignore this attribute if they did not - implement support for the corresponding concept; however, further - research in SBML has revealed that this is not true, and 'fast' - cannot be ignored if it is set to True. SBML Level 2 Versions 2, 3 - and 4 therefore stipulate that if a model has any reactions with - 'fast' set to True, a software tool must be able to respect the - attribute or else indicate to the user that it does not have the - capacity to do so. Readers are directed to the SBML Level 2 Version - 4 specification, which provides more detail about the conditions - under which a reaction can be considered to be fast in this sense. -"; - - -%feature("docstring") Reaction::setCompartment " - Sets the value of the 'compartment' attribute of this Reaction. - - The string 'sid' is copied. - - Parameter 'sid' is the string to use as the compartment of this - Reaction - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The 'compartment' attribute is available in SBML Level 3 Version 1 - Core, but is not present on Reaction in lower Levels of SBML. -"; - - -%feature("docstring") Reaction::unsetName " - Unsets the value of the 'name' attribute of this Reaction. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Reaction::unsetKineticLaw " - Unsets the 'kineticLaw' subelement of this Reaction. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Reaction::unsetFast " - Unsets the value of the 'fast' attribute of this Reaction. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - WARNING: - - In SBML Level 1, 'fast' is optional with a default of false, which - means it is effectively always set (and reset to False if this - method is called). Further, SBML definitions before SBML Level 2 - Version 2 incorrectly indicated that software tools could ignore - this attribute if they did not implement support for the - corresponding concept; however, further research in SBML has revealed - that this is not true, and 'fast' cannot be ignored if it is set to - True. SBML Level 2 Versions 2, 3 and 4 therefore stipulate that if - a model has any reactions with 'fast' set to True, a software tool - must be able to respect the attribute or else indicate to the user - that it does not have the capacity to do so. Readers are directed - to the SBML Level 2 Version 4 specification, which provides more - detail about the conditions under which a reaction can be considered - to be fast in this sense. -"; - - -%feature("docstring") Reaction::unsetCompartment " - Unsets the value of the 'compartment' attribute of this Reaction. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The 'compartment' attribute is available in SBML Level 3 Version 1 - Core, but is not present on Reaction in lower Levels of SBML. -"; - - -%feature("docstring") Reaction::addReactant " - Adds a given SpeciesReference object as a reactant in this Reaction. - - The SpeciesReference instance in 'sr' is copied. - - Parameter 'sr' is a SpeciesReference object referring to a Species in - the enclosing Model - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Reaction. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Reaction. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Reaction.createReactant() for a - method that does not lead to these issues. - - See also createReactant(). -"; - - -%feature("docstring") Reaction::addProduct " - Adds a given SpeciesReference object as a product in this Reaction. - - The SpeciesReference instance in 'sr' is copied. - - Parameter 'sr' is a SpeciesReference object referring to a Species in - the enclosing Model - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Reaction. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Reaction. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Reaction.createProduct() for a - method that does not lead to these issues. - - See also createProduct(). -"; - - -%feature("docstring") Reaction::addModifier " - Adds a given ModifierSpeciesReference object as a product in this - Reaction. - - The ModifierSpeciesReference instance in 'msr' is copied. - - Parameter 'msr' is a ModifierSpeciesReference object referring to a - Species in the enclosing Model - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Reaction. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Reaction. In addition, the caller should make sure - to free the original object if it is no longer being used, or else a - memory leak will result. Please see Reaction.createModifier() for a - method that does not lead to these issues. - - See also createModifier(). -"; - - -%feature("docstring") Reaction::createReactant " - Creates a new SpeciesReference, adds it to this Reaction's list of - reactants, and returns it. - - Returns a new SpeciesReference object. -"; - - -%feature("docstring") Reaction::createProduct " - Creates a new SpeciesReference, adds it to this Reaction's list of - products, and returns it. - - Returns a new SpeciesReference object. -"; - - -%feature("docstring") Reaction::createModifier " - Creates a new ModifierSpeciesReference, adds it to this Reaction's - list of modifiers and returns it. - - Returns a new ModifierSpeciesReference object. -"; - - -%feature("docstring") Reaction::createKineticLaw " - Creates a new KineticLaw object, installs it as this Reaction's - 'kineticLaw' subelement, and returns it. - - If this Reaction had a previous KineticLaw, it will be destroyed. - - Returns the new KineticLaw object -"; - - -%feature("docstring") Reaction::getListOfReactants " - Returns the list of reactants in this Reaction object. - - Returns the ListOfSpeciesReferences containing the references to the - species acting as reactants in this reaction -"; - - -%feature("docstring") Reaction::getListOfProducts " - Returns the list of products in this Reaction object. - - Returns the ListOfSpeciesReferences containing the references to the - species acting as products in this reaction -"; - - -%feature("docstring") Reaction::getListOfModifiers " - Returns the list of modifiers in this Reaction object. - - Returns the ListOfSpeciesReferences containing the references to the - species acting as modifiers in this reaction -"; - - -%feature("docstring") Reaction::getReactant " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getReactant(string species) - - Returns the reactant species (as a SpeciesReference object) having - a specific identifier in this Reaction. - - Parameter 'species' is the identifier of the reactant Species - ('species' attribute of the reactant SpeciesReference object) - - Returns a SpeciesReference object, or None if no species with the - given identifier 'species' appears as a reactant in this Reaction. - - ______________________________________________________________________ - Method variant with the following signature: - - getReactant(long n) - - Returns the nth reactant species (as a SpeciesReference object) in - the list of reactants in this Reaction. - - Callers should first call getNumReactants() to find out how many - reactants there are, to avoid using an invalid index number. - - Parameter 'n' is the index of the reactant sought. - - Returns the nth reactant (as a SpeciesReference object) of this - Reaction. -"; - - -%feature("docstring") Reaction::getProduct " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getProduct(string species) - - Returns the product species (as a SpeciesReference object) having a - specific identifier in this Reaction. - - Parameter 'species' is the identifier of the product Species - ('species' attribute of the product SpeciesReference object) - - Returns a SpeciesReference object, or None if no species with the - given identifier 'species' appears as a product in this Reaction. - - ______________________________________________________________________ - Method variant with the following signature: - - getProduct(long n) - - Returns the nth product species (as a SpeciesReference object) in - the list of products in this Reaction. - - Callers should first call getNumProducts() to find out how many - products there are, to avoid using an invalid index number. - - Parameter 'n' is the index of the product sought. - - Returns the nth product (as a SpeciesReference object) of this - Reaction. -"; - - -%feature("docstring") Reaction::getModifier " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getModifier(string species) - - Returns the modifier species (as a ModifierSpeciesReference object) - having a specific identifier in this Reaction. - - Parameter 'species' is the identifier of the modifier Species - ('species' attribute of the ModifierSpeciesReference object) - - Returns a ModifierSpeciesReference object, or None if no species with - the given identifier 'species' appears as a modifier in this - Reaction. - - ______________________________________________________________________ - Method variant with the following signature: - - getModifier(long n) - - Returns the nth modifier species (as a ModifierSpeciesReference - object) in the list of modifiers of this Reaction. - - Callers should first call getNumModifiers() to find out how many - modifiers there are, to avoid using an invalid index number. - - Parameter 'n' is the index of the modifier species sought - - Returns the nth modifier (as a ModifierSpeciesReference object) of - this Reaction. -"; - - -%feature("docstring") Reaction::getNumReactants " - Returns the number of reactant species in this Reaction. - - Returns the number of reactants in this Reaction. -"; - - -%feature("docstring") Reaction::getNumProducts " - Returns the number of product species in this Reaction. - - Returns the number of products in this Reaction. -"; - - -%feature("docstring") Reaction::getNumModifiers " - Returns the number of modifier species in this Reaction. - - Returns the number of modifiers in this Reaction. -"; - - -%feature("docstring") Reaction::removeReactant " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeReactant(string species) - - Removes the reactant species (SpeciesReference object) having the - given 'species' attribute in this Reaction and returns a pointer - to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'species' is the 'species' attribute of the reactant - SpeciesReference object - - Returns the removed reactant SpeciesReference object, or None if no - reactant SpeciesReference object with the given 'species' attribute - 'species' exists in this Reaction. - - ______________________________________________________________________ - Method variant with the following signature: - - removeReactant(long n) - - Removes the nth reactant species (SpeciesReference object) in the - list of reactants in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. The caller should first call getNumReactants() to find out how - many reactants there are, to avoid using an invalid index number. - - Parameter 'n' is the index of the reactant SpeciesReference object to - remove - - Returns the removed reactant SpeciesReference object, or None if the - given index is out of range. -"; - - -%feature("docstring") Reaction::removeProduct " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeProduct(string species) - - Removes the product species (SpeciesReference object) having the - given 'species' attribute in this Reaction and returns a pointer - to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'species' is the 'species' attribute of the product - SpeciesReference object - - Returns the removed product SpeciesReference object, or None if no - product SpeciesReference object with the given 'species' attribute - 'species' exists in this Reaction. - - ______________________________________________________________________ - Method variant with the following signature: - - removeProduct(long n) - - Removes the nth product species (SpeciesReference object) in the list - of products in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. The caller should first call getNumProducts() to find out how - many products there are, to avoid using an invalid index number. - - Parameter 'n' is the index of the product SpeciesReference object to - remove - - Returns the removed product SpeciesReference object, or None if the - given index is out of range. -"; - - -%feature("docstring") Reaction::removeModifier " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeModifier(string species) - - Removes the modifier species (ModifierSpeciesReference object) having - the given 'species' attribute in this Reaction and returns a pointer - to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'species' is the 'species' attribute of the - ModifierSpeciesReference object - - Returns the removed ModifierSpeciesReference object, or None if no - ModifierSpeciesReference object with the given 'species' attribute - 'species' exists in this Reaction. - - ______________________________________________________________________ - Method variant with the following signature: - - removeModifier(long n) - - Removes the nth modifier species (ModifierSpeciesReference object) in - the list of modifiers in this Reaction and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. The caller should first call getNumModifiers() to find out how - many modifiers there are, to avoid using an invalid index number. - - Parameter 'n' is the index of the ModifierSpeciesReference object to - remove - - Returns the removed ModifierSpeciesReference object, or None if the - given index is out of range. -"; - - -%feature("docstring") Reaction::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") Reaction::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") Reaction::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") Reaction::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Reaction::getElementName " - Returns the XML element name of this object, which for Reaction, is - always 'reaction'. - - Returns the name of this element, i.e., 'reaction'. -"; - - -%feature("docstring") Reaction::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Reaction::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Reaction object have been set. - - Note: - - The required attributes for a Reaction object are: - - * 'id' (or 'name' in SBML Level 1) - - * 'fast' (in Level 3 only, where it is defined as a required - attribute) - - * 'reversible' (in Level 3 only, where it is defined as a required - attribute) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Reaction::createObject " - Internal implementation method. -"; - - -%feature("docstring") Reaction::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Reaction::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Reaction::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") Reaction::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Reaction::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Reaction::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Reaction::isExplicitlySetReversible " - Internal implementation method. -"; - - -%feature("docstring") Reaction::isExplicitlySetFast " - Internal implementation method. -"; - - -%feature("docstring") ListOfReactions::ListOfReactions " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfReactions(SBMLNamespaces sbmlns) - - Creates a new ListOfReactions object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfReactions object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfReactions(long level, long version) - - Creates a new ListOfReactions object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfReactions::clone " - Creates and returns a deep copy of this ListOfReactions instance. - - Returns a (deep) copy of this ListOfReactions. -"; - - -%feature("docstring") ListOfReactions::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfReactions::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Reaction objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfReactions::getElementName " - Returns the XML element name of this object - - For ListOfReactions, the XML element name is 'listOfReactions'. - - Returns the name of this element, i.e., 'listOfReactions'. -"; - - -%feature("docstring") ListOfReactions::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a Reaction from the ListOfReactions. - - Parameter 'n' is the index number of the Reaction to get. - - Returns the nth Reaction in this ListOfReactions. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfReactions::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfReactions items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfReactions items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfReactions::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfReactions::createObject " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw " - @ingroup Core Implementation of SBML's KineticLaw construct. - - An object of class KineticLaw is used to describe the rate at which - the process defined by a given Reaction takes place. KineticLaw has - subelements called 'math' (for MathML content) and 'listOfParameters' - (of class ListOfParameters), in addition to the attributes and - subelements it inherits from SBase. - - KineticLaw's 'math' subelement for holding a MathML formula defines - the rate of the reaction. The formula may refer to other entities - in a model as well as local parameter definitions within the scope - of the Reaction (see below). It is important to keep in mind, - however, that the only Species identifiers that can be used in this - formula are those declared in the lists of reactants, products and - modifiers in the Reaction structure. (In other words, before a - species can be referenced in the KineticLaw, it must be declared in - one of those lists.) - - KineticLaw provides a way to define local parameters whose - identifiers can be used in the 'math' formula of that KineticLaw - instance. Prior to SBML Level 3, these parameter definitions are - stored inside a 'listOfParameters' subelement containing Parameter - objects; in SBML Level 3, this is achieved using a specialized - object class called LocalParameter and the containing subelement is - called 'listOfLocalParameters'. In both cases, the parameters so - defined are only visible within the KineticLaw; they cannot be - accessed outside. A local parameter within one reaction is not - visible from within another reaction, nor is it visible to any other - construct outside of the KineticLaw in which it is defined. In - addition, another important feature is that if such a Parameter (or - in Level 3, LocalParameter) object has the same identifier as - another object in the scope of the enclosing Model, the definition - inside the KineticLaw takes precedence. In other words, within the - KineticLaw's 'math' formula, references to local parameter - identifiers <strong>shadow any identical global - identifiers</strong>. - - The values of local parameters defined within KineticLaw objects - cannot change. In SBML Level 3, this quality is built into the - LocalParameter construct. In Level 2, where the same kind of - Parameter object class is used as for global parameters, the - Parameter objects' 'constant' attribute must always have a value of - True (either explicitly or left to its default value). - - A warning about identifier shadowing - ====================================================================== - - A common misconception is that different classes of objects (e.g., - species, compartments, parameters) in SBML have different identifier - scopes. They do not. The implication is that if a KineticLaw's - local parameter definition uses an identifier identical to any other - identifier defined in the model outside the KineticLaw, even if the - other identifier does not belong to a parameter type of object, the - local parameter's identifier takes precedence within that - KineticLaw's 'math' formula. It is not an error in SBML for - identifiers to shadow each other this way, but can lead to confusing - and subtle errors. - - SBML Level/Version differences - ====================================================================== - - In SBML Level 2 Version 1, the SBML specification included two - additional attributes on KineticLaw called 'substanceUnits' and - 'timeUnits'. They were removed beginning with SBML Level 2 Version - 2 because further research determined they introduced many problems. - The most significant problem was that their use could easily lead to - the creation of valid models whose reactions nevertheless could not - be integrated into a system of equations without outside knowledge - for converting the quantities used. Examination of real-life models - revealed that a common reason for using 'substanceUnits' on - KineticLaw was to set the units of all reactions to the same set of - substance units, something that is better achieved by using - UnitDefinition to redefine 'substance' for the whole Model. - - As mentioned above, in SBML Level 2 Versions 2-4, local parameters - are of class Parameter. In SBML Level 3, the class of object is - LocalParameter. -"; - - -%feature("docstring") KineticLaw::KineticLaw " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - KineticLaw(SBMLNamespaces sbmlns) - - Creates a new KineticLaw using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a KineticLaw object to an SBMLDocument (e.g., - using Reaction.setKineticLaw()), the SBML XML namespace of the - document overrides the value used when creating the KineticLaw - object via this constructor. This is necessary to ensure that an - SBML document is a consistent structure. Nevertheless, the ability - to supply the values at the time of creation of a KineticLaw is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - KineticLaw(long level, long version) - - Creates a new KineticLaw using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - KineticLaw - - Parameter 'version' is a long integer, the SBML Version to assign to - this KineticLaw - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a KineticLaw object to an SBMLDocument (e.g., - using Reaction.setKineticLaw()), the SBML Level, SBML Version and - XML namespace of the document override the values used when creating - the KineticLaw object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a KineticLaw is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - KineticLaw(KineticLaw orig) - - Copy constructor; creates a copy of this KineticLaw. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") KineticLaw::accept " - Accepts the given SBMLVisitor for this instance of KineticLaw. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") KineticLaw::clone " - Creates and returns a deep copy of this KineticLaw object. - - Returns a (deep) copy of this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find. - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") KineticLaw::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") KineticLaw::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") KineticLaw::getFormula " - Returns the mathematical formula for this KineticLaw object and - return it as as a text string. - - This is fundamentally equivalent to getMath(). This variant is - provided principally for compatibility compatibility with SBML Level - 1. - - Returns a string representing the formula of this KineticLaw. - - Note: - - SBML Level 1 uses a text-string format for mathematical formulas. - SBML Level 2 uses MathML, an XML format for representing - mathematical expressions. LibSBML provides an Abstract Syntax Tree - API for working with mathematical expressions; this API is more - powerful than working with formulas directly in text form, and ASTs - can be translated into either MathML or the text-string syntax. The - libSBML methods that accept text-string formulas directly (such as - this constructor) are provided for SBML Level 1 compatibility, but - developers are encouraged to use the AST mechanisms. - - See also getMath(). -"; - - -%feature("docstring") KineticLaw::getMath " - Returns the mathematical formula for this KineticLaw object and - return it as as an AST. - - This is fundamentally equivalent to getFormula(). The latter is - provided principally for compatibility compatibility with SBML Level - 1, which represented mathematical formulas in text-string form. - - Returns the ASTNode representation of the mathematical formula. - - See also getFormula(). -"; - - -%feature("docstring") KineticLaw::getTimeUnits " - (SBML Level 2 Version 1 only) Returns the value of the 'timeUnits' - attribute of this KineticLaw object. - - Returns the 'timeUnits' attribute value. - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::getSubstanceUnits " - (SBML Level 2 Version 1 only) Returns the value of the - 'substanceUnits' attribute of this KineticLaw object. - - Returns the 'substanceUnits' attribute value. - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::isSetFormula " - Predicate returning True if this KineticLaw's 'formula' attribute is - set. - - This is functionally identical to the method isSetMath(). It is - provided in order to mirror the parallel between getFormula()@~ and - getMath(). - - Returns True if the formula (meaning the math subelement) of this - KineticLaw is set, False otherwise. - - Note: - - SBML Level 1 uses a text-string format for mathematical formulas. - SBML Level 2 uses MathML, an XML format for representing - mathematical expressions. LibSBML provides an Abstract Syntax Tree - API for working with mathematical expressions; this API is more - powerful than working with formulas directly in text form, and ASTs - can be translated into either MathML or the text-string syntax. The - libSBML methods that accept text-string formulas directly (such as - this constructor) are provided for SBML Level 1 compatibility, but - developers are encouraged to use the AST mechanisms. - - See also isSetMath(). -"; - - -%feature("docstring") KineticLaw::isSetMath " - Predicate returning True if this Kinetic's 'math' subelement is set. - - This is identical to the method isSetFormula(). It is provided in - order to mirror the parallel between getFormula()@~ and getMath(). - - Returns True if the formula (meaning the math subelement) of this - KineticLaw is set, False otherwise. - - See also isSetFormula(). -"; - - -%feature("docstring") KineticLaw::isSetTimeUnits " - (SBML Level 2 Version 1 only) Predicate returning True if this - SpeciesReference's 'timeUnits' attribute is set. - - Returns True if the 'timeUnits' attribute of this KineticLaw object - is set, False otherwise. - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::isSetSubstanceUnits " - (SBML Level 2 Version 1 only) Predicate returning True if this - SpeciesReference's 'substanceUnits' attribute is set. - - Returns True if the 'substanceUnits' attribute of this KineticLaw - object is set, False otherwise. - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::setFormula " - Sets the mathematical expression of this KineticLaw instance to the - given 'formula'. - - The given 'formula' string is copied. Internally, libSBML stores the - mathematical expression as an ASTNode. - - Parameter 'formula' is the mathematical expression to use, - represented in text-string form. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - SBML Level 1 uses a text-string format for mathematical formulas. - SBML Level 2 uses MathML, an XML format for representing - mathematical expressions. LibSBML provides an Abstract Syntax Tree - API for working with mathematical expressions; this API is more - powerful than working with formulas directly in text form, and ASTs - can be translated into either MathML or the text-string syntax. The - libSBML methods that accept text-string formulas directly (such as - this constructor) are provided for SBML Level 1 compatibility, but - developers are encouraged to use the AST mechanisms. - - See also setMath(). -"; - - -%feature("docstring") KineticLaw::setMath " - Sets the mathematical expression of this KineticLaw instance to a - copy of the given ASTNode. - - This is fundamentally identical to getFormula(). The latter is - provided principally for compatibility compatibility with SBML Level - 1, which represented mathematical formulas in text-string form. - - Parameter 'math' is an ASTNode representing a formula tree. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - See also setFormula(). -"; - - -%feature("docstring") KineticLaw::setTimeUnits " - (SBML Level 2 Version 1 only) Sets the 'timeUnits' attribute of this - KineticLaw object to a copy of the identifier in 'sid'. - - Parameter 'sid' is the identifier of the units to use. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::setSubstanceUnits " - (SBML Level 2 Version 1 only) Sets the 'substanceUnits' attribute of - this KineticLaw object to a copy of the identifier given in 'sid'. - - Parameter 'sid' is the identifier of the units to use. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::unsetTimeUnits " - (SBML Level 2 Version 1 only) Unsets the 'timeUnits' attribugte of - this KineticLaw object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::unsetSubstanceUnits " - (SBML Level 2 Version 1 only) Unsets the 'substanceUnits' attribute - of this KineticLaw object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attributes 'timeUnits' and 'substanceUnits' are present only in - SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' - and 'substanceUnits' attributes were removed. For compatibility - with new versions of SBML, users are cautioned to avoid these - attributes. -"; - - -%feature("docstring") KineticLaw::addParameter " - Adds a copy of the given Parameter object to the list of local - parameters in this KineticLaw. - - Parameter 'p' is the Parameter to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this KineticLaw. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the KineticLaw. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see createParameter()@~ for - a method that does not lead to these issues. - - See also createParameter(). -"; - - -%feature("docstring") KineticLaw::addLocalParameter " - Adds a copy of the given LocalParameter object to the list of local - parameters in this KineticLaw. - - Parameter 'p' is the LocalParameter to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this KineticLaw. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the KineticLaw. In addition, the caller should make - sure to free the original object if it is no longer being used, or - else a memory leak will result. Please see createParameter()@~ for - a method that does not lead to these issues. - - See also createLocalParameter(). -"; - - -%feature("docstring") KineticLaw::createParameter " - Creates a new Parameter object, adds it to this KineticLaw's list of - local parameters, and returns the Parameter object created. - - Returns a new Parameter object instance - - See also addParameter(). -"; - - -%feature("docstring") KineticLaw::createLocalParameter " - Creates a new LocalParameter object, adds it to this KineticLaw's - list of local parameters, and returns the LocalParameter object - created. - - Returns a new LocalParameter object instance - - See also addLocalParameter(). -"; - - -%feature("docstring") KineticLaw::getListOfParameters " - Returns the list of local parameters in this KineticLaw object. - - Returns the list of Parameters for this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getListOfLocalParameters " - Returns the list of local parameters in this KineticLaw object. - - Returns the list of LocalParameters for this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getParameter(long n) - - Returns the nth Parameter object in the list of local parameters in - this KineticLaw instance. - - Parameter 'n' is the index of the Parameter object sought - - Returns the nth Parameter of this KineticLaw. - - ______________________________________________________________________ - Method variant with the following signature: - - getParameter(string sid) - - Returns a local parameter based on its identifier. - - Parameter 'sid' is the identifier of the Parameter being sought. - - Returns the Parameter object in this KineticLaw instace having the - given 'id', or None if no such Parameter exists. -"; - - -%feature("docstring") KineticLaw::getLocalParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getLocalParameter(long n) - - Returns the nth LocalParameter object in the list of local parameters - in this KineticLaw instance. - - Parameter 'n' is the index of the LocalParameter object sought - - Returns the nth LocalParameter of this KineticLaw. - - ______________________________________________________________________ - Method variant with the following signature: - - getLocalParameter(string sid) - - Returns a local parameter based on its identifier. - - Parameter 'sid' is the identifier of the LocalParameter being sought. - - Returns the LocalParameter object in this KineticLaw instace having - the given 'id', or None if no such LocalParameter exists. -"; - - -%feature("docstring") KineticLaw::getNumParameters " - Returns the number of local parameters in this KineticLaw instance. - - Returns the number of Parameters in this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getNumLocalParameters " - Returns the number of local parameters in this KineticLaw instance. - - Returns the number of LocalParameters in this KineticLaw. -"; - - -%feature("docstring") KineticLaw::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units of - measurement assumed for the 'math' expression of this KineticLaw. - - The units are calculated based on the mathematical expression in the - KineticLaw and the model quantities referenced by <ci> elements used - within that expression. The getDerivedUnitDefinition()@~ method - returns the calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - WARNING: - - Note that it is possible the 'math' expression in the KineticLaw - contains pure numbers or parameters with undeclared units. In those - cases, it is not possible to calculate the units of the overall - expression without making assumptions. LibSBML does not make - assumptions about the units, and getDerivedUnitDefinition()@~ only - returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has unambiguously-defined - units and Y does not, it will return the units of X. <strong>It is - important that callers also invoke the method</strong> - containsUndeclaredUnits()@~ <strong>to determine whether this - situation holds</strong>. Callers may wish to take suitable actions - in those scenarios. - - Returns a UnitDefinition that expresses the units of the math - expression of this KineticLaw, or None if one cannot be constructed. - - See also containsUndeclaredUnits(). -"; - - -%feature("docstring") KineticLaw::containsUndeclaredUnits " - Predicate returning True if the math expression of this KineticLaw - contains parameters/numbers with undeclared units. - - Returns True if the math expression of this KineticLaw includes - parameters/numbers with undeclared units, False otherwise. - - Note: - - A return value of True indicates that the UnitDefinition returned by - getDerivedUnitDefinition()@~ may not accurately represent the units - of the expression. - - See also getDerivedUnitDefinition(). -"; - - -%feature("docstring") KineticLaw::removeParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeParameter(long n) - - Removes the nth Parameter object in the list of local parameters in - this KineticLaw instance and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the Parameter object to remove - - Returns the Parameter object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeParameter(string sid) - - Removes a Parameter object with the given identifier in the list of - local parameters in this KineticLaw instance and returns a pointer to - it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'sid' is the identifier of the Parameter to remove - - Returns the Parameter object removed. As mentioned above, the - caller owns the returned object. None is returned if no Parameter - object with the identifier exists in this KineticLaw instance. -"; - - -%feature("docstring") KineticLaw::removeLocalParameter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeLocalParameter(long n) - - Removes the nth LocalParameter object in the list of local parameters - in this KineticLaw instance and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the LocalParameter object to remove - - Returns the LocalParameter object removed. As mentioned above, the - caller owns the returned item. None is returned if the given index - is out of range. - - ______________________________________________________________________ - Method variant with the following signature: - - removeLocalParameter(string sid) - - Removes a LocalParameter object with the given identifier in the list - of local parameters in this KineticLaw instance and returns a - pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'sid' is the identifier of the LocalParameter to remove - - Returns the LocalParameter object removed. As mentioned above, the - caller owns the returned object. None is returned if no - LocalParameter object with the identifier exists in this KineticLaw - instance. -"; - - -%feature("docstring") KineticLaw::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") KineticLaw::getElementName " - Returns the XML element name of this object, which for Species, is - always 'kineticLaw'. - - Returns the name of this element, i.e., 'kineticLaw'. -"; - - -%feature("docstring") KineticLaw::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::writeElements " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - KineticLaw object have been set. - - Note: - - The required attributes for a KineticLaw object are: - - * 'formula' (SBML Level 1 only) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") KineticLaw::hasRequiredElements " - Predicate returning True if all the required elements for this - KineticLaw object have been set. - - Note: - - The required elements for a KineticLaw object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") KineticLaw::removeFromParentAndDelete " - Finds this KineticLaw's Reaction parent and calls unsetKineticLaw() - on it, indirectly deleting itself. Overridden from the SBase - function since the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") KineticLaw::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") KineticLaw::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") KineticLaw::getInternalId " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::setInternalId " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::divideAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::multiplyAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::createObject " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") KineticLaw::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference " - @ingroup Core Implementation of SBML's SimpleSpeciesReference - construct. - - As mentioned in the description of Reaction, every species that - enters into a given reaction must appear in that reaction's lists of - reactants, products and/or modifiers. In an SBML model, all species - that may participate in any reaction are listed in the - 'listOfSpecies' element of the top-level Model object. Lists of - products, reactants and modifiers in Reaction objects do not - introduce new species, but rather, they refer back to those listed - in the model's top-level 'listOfSpecies'. For reactants and - products, the connection is made using SpeciesReference objects; for - modifiers, it is made using ModifierSpeciesReference objects. - SimpleSpeciesReference is an abstract type that serves as the parent - class of both SpeciesReference and ModifierSpeciesReference. It is - used simply to hold the attributes and elements that are common to - the latter two structures. - - The SimpleSpeciesReference structure has a mandatory attribute, - 'species', which must be a text string conforming to the identifer - syntax permitted in SBML. This attribute is inherited by the - SpeciesReference and ModifierSpeciesReference subclasses derived from - SimpleSpeciesReference. The value of the 'species' attribute must be - the identifier of a species defined in the enclosing Model. The - species is thereby declared as participating in the reaction being - defined. The precise role of that species as a reactant, product, - or modifier in the reaction is determined by the subclass of - SimpleSpeciesReference (i.e., either SpeciesReference or - ModifierSpeciesReference) in which the identifier appears. - - SimpleSpeciesReference also contains an optional attribute, 'id', - allowing instances to be referenced from other structures. No SBML - structures currently do this; however, such structures are - anticipated in future SBML Levels. -"; - - -%feature("docstring") SimpleSpeciesReference::SimpleSpeciesReference " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SimpleSpeciesReference(long level, long version) - - Creates a new SimpleSpeciesReference using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - SimpleSpeciesReference - - Parameter 'version' is a long integer, the SBML Version to assign to - this SimpleSpeciesReference - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - ______________________________________________________________________ - Method variant with the following signature: - - SimpleSpeciesReference(SimpleSpeciesReference orig) - - Copy constructor; creates a copy of this SimpleSpeciesReference. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") SimpleSpeciesReference::accept " - Accepts the given SBMLVisitor. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") SimpleSpeciesReference::getId " - Returns the value of the 'id' attribute of this - SimpleSpeciesReference. - - Returns the id of this SimpleSpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::getName " - Returns the value of the 'name' attribute of this - SimpleSpeciesReference. - - Returns the name of this SimpleSpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::getSpecies " - Get the value of the 'species' attribute. - - Returns the value of the attribute 'species' for this - SimpleSpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::isSetId " - Predicate returning True if this SimpleSpeciesReference's 'id' - attribute is set. - - Returns True if the 'id' attribute of this SimpleSpeciesReference is - set, False otherwise. -"; - - -%feature("docstring") SimpleSpeciesReference::isSetName " - Predicate returning True if this SimpleSpeciesReference's 'name' - attribute is set. - - Returns True if the 'name' attribute of this SimpleSpeciesReference - is set, False otherwise. -"; - - -%feature("docstring") SimpleSpeciesReference::isSetSpecies " - Predicate returning True if this SimpleSpeciesReference's 'species' - attribute is set. - - Returns True if the 'species' attribute of this - SimpleSpeciesReference is set, False otherwise. -"; - - -%feature("docstring") SimpleSpeciesReference::setSpecies " - Sets the 'species' attribute of this SimpleSpeciesReference. - - The identifier string passed in 'sid' is copied. - - Parameter 'sid' is the identifier of a species defined in the - enclosing Model's ListOfSpecies. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SimpleSpeciesReference::setId " - Sets the value of the 'id' attribute of this SimpleSpeciesReference. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - SimpleSpeciesReference - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") SimpleSpeciesReference::setName " - Sets the value of the 'name' attribute of this - SimpleSpeciesReference. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the SimpleSpeciesReference - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") SimpleSpeciesReference::unsetId " - Unsets the value of the 'id' attribute of this - SimpleSpeciesReference. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SimpleSpeciesReference::unsetName " - Unsets the value of the 'name' attribute of this - SimpleSpeciesReference. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SimpleSpeciesReference::isModifier " - Predicate returning True if this is a ModifierSpeciesReference. - - Returns True if this SimpleSpeciesReference's subclass is - ModiferSpeciesReference, False if it is a plain SpeciesReference. -"; - - -%feature("docstring") SimpleSpeciesReference::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") SimpleSpeciesReference::hasRequiredAttributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") SimpleSpeciesReference::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference " - @ingroup Core Implementation of SBML's SpeciesReference construct. - - The Reaction structure provides a way to express which species act as - reactants and which species act as products in a reaction. In a - given reaction, references to those species acting as reactants - and/or products are made using instances of SpeciesReference - structures in a Reaction object's lists of reactants and products. - - A species can occur more than once in the lists of reactants and - products of a given Reaction instance. The effective stoichiometry - for a species in a reaction is the sum of the stoichiometry values - given on the SpeciesReference object in the list of products minus - the sum of stoichiometry values given on the SpeciesReference - objects in the list of reactants. A positive value indicates the - species is effectively a product and a negative value indicates the - species is effectively a reactant. SBML places no restrictions on - the effective stoichiometry of a species in a reaction; for example, - it can be zero. In the following SBML fragment, the two reactions - have the same effective stoichiometry for all their species: - - <reaction id=\'x\'> - <listOfReactants> - <speciesReference species=\'a\'/> - <speciesReference species=\'a\'/> - <speciesReference species=\'b\'/> - </listOfReactants> - <listOfProducts> - <speciesReference species=\'c\'/> - <speciesReference species=\'b\'/> - </listProducts> - </reaction> - <reaction id=\'y\'> - <listOfReactants> - <speciesReference species=\'a\' stoichiometry=\'2\'/> - </listOfReactants> - <listOfProducts> - <speciesReference species=\'c\'/> - </listProducts> - </reaction> - - The precise structure of SpeciesReference differs between SBML Level - 2 and Level 3. We discuss the two variants in separate sections - below. - - SpeciesReference in SBML Level 2 - ====================================================================== - - The mandatory 'species' attribute of SpeciesReference must have as - its value the identifier of an existing species defined in the - enclosing Model. The species is thereby designated as a reactant or - product in the reaction. Which one it is (i.e., reactant or - product) is indicated by whether the SpeciesReference appears in the - Reaction's 'reactant' or 'product' lists. - - Product and reactant stoichiometries can be specified using either - 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. - The 'stoichiometry' attribute is of type double and should contain - values greater than zero (0). The 'stoichiometryMath' element is - implemented as an element containing a MathML expression. These two - are mutually exclusive; only one of 'stoichiometry' or - 'stoichiometryMath' should be defined in a given SpeciesReference - instance. When neither the attribute nor the element is present, - the value of 'stoichiometry' in the SpeciesReference instance - defaults to 1. - - For maximum interoperability, the 'stoichiometry' attribute should be - used in preference to 'stoichiometryMath' when a species' - stoichiometry is a simple scalar number (integer or decimal). When - the stoichiometry is a rational number, or when it is a more - complicated formula, 'stoichiometryMath' must be used. The MathML - expression in 'stoichiometryMath' may also refer to identifiers of - entities in a model (except reaction identifiers). However, the - only species identifiers that can be used in 'stoichiometryMath' are - those referenced in the Reaction list of reactants, products and - modifiers. - - The following is a simple example of a species reference for species - X0, with stoichiometry 2, in a list of reactants within a reaction - having the identifier J1: - - <model> - ... - <listOfReactions> - <reaction id=\'J1\'> - <listOfReactants> - <speciesReference species=\'X0\' stoichiometry=\'2\'> - </listOfReactants> - ... - </reaction> - ... - </listOfReactions> - ... - </model> - - The following is a more complex example of a species reference for - species X0, with a stoichiometry formula consisting of the parameter - x: - - <model> - ... - <listOfReactions> - <reaction id=\'J1\'> - <listOfReactants> - <speciesReference species=\'X0\'> - <stoichiometryMath> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> - <ci>x</ci> - </math> - </stoichiometryMath> - </speciesReference> - </listOfReactants> - ... - </reaction> - ... - </listOfReactions> - ... - </model> - - SpeciesReference in SBML Level 3 - ====================================================================== - - In Level 2's definition of a reaction, the stoichiometry attribute of - a SpeciesReference is actually a combination of two factors, the - standard biochemical stoichiometry and a conversion factor that may - be needed to translate the units of the species quantity to the - units of the reaction rate. Unfortunately, Level 2 offers no direct - way of decoupling these two factors, or for explicitly indicating - the units. The only way to do it in Level 2 is to use the - StoichiometryMath object associated with SpeciesReferences, and to - reference SBML Parameter objects from within the StoichiometryMath - formula. This works because Parameter offers a way to attach units - to a numerical value, but the solution is indirect and awkward for - something that should be a simple matter. Moreover, the question of - how to properly encode stoichiometries in SBML reactions has caused - much confusion among implementors of SBML software. - - SBML Level 3 approaches this problem differently. It (1) extends - the the use of the SpeciesReference identifier to represent the value - of the 'stoichiometry' attribute, (2) makes the 'stoichiometry' - attribute optional, (3) removes StoichiometryMath, and (4) adds a - new 'constant' boolean attribute on SpeciesReference. - - As in Level 2, the 'stoichiometry' attribute is of type double and - should contain values greater than zero (0). A missing - 'stoichiometry' implies that the stoichiometry is either unknown, or - to be obtained from an external source, or determined by an - InitialAssignment object or other SBML construct elsewhere in the - model. - - A species reference's stoichiometry is set by its 'stoichiometry' - attribute exactly once. If the SpeciesReference object's 'constant' - attribute has the value True, then the stoichiometry is fixed and - cannot be changed except by an InitialAssignment object. These two - methods of setting the stoichiometry (i.e., using 'stoichiometry' - directly, or using InitialAssignment) differ in that the - 'stoichiometry' attribute can only be set to a literal floating- - point number, whereas InitialAssignment allows the value to be set - using an arbitrary mathematical expression. (As an example, the - approach could be used to set the stoichiometry to a rational number - of the form p/q, where p and q are integers, something that is - occasionally useful in the context of biochemical reaction - networks.) If the species reference's 'constant' attribute has the - value False, the species reference's value may be overridden by an - InitialAssignment or changed by AssignmentRule or AlgebraicRule, and - in addition, for simulation time t > 0, it may also be changed by a - RateRule or Event objects. (However, some of these constructs are - mutually exclusive; see the SBML Level 3 Version 1 Core specifiation - for more details.) It is not an error to define 'stoichiometry' on - a species reference and also redefine the stoichiometry using an - InitialAssignment, but the 'stoichiometry' attribute in that case is - ignored. - - The value of the 'id' attribute of a SpeciesReference can be used as - the content of a <ci> element in MathML formulas elsewhere in the - model. When the identifier appears in a MathML <ci> element, it - represents the stoichiometry of the corresponding species in the - reaction where the SpeciesReference object instance appears. More - specifically, it represents the value of the 'stoichiometry' - attribute on the SpeciesReference object. - - In SBML Level 3, the unit of measurement associated with the value of - a species' stoichiometry is always considered to be dimensionless. - This has the following implications: - - - * When a species reference's identifier appears in mathematical - formulas elsewhere in the model, the unit associated with that value - is dimensionless. - - * The units of the 'math' elements of AssignmentRule, - InitialAssignment and EventAssignment objects setting the - stoichiometry of the species reference should be dimensionless. - - * If a species reference's identifier is the subject of a RateRule, - the unit associated with the RateRule object's value should be - dimensionless/time, where time is the model-wide unit of time set on - the Model object. -"; - - -%feature("docstring") ListOfSpeciesReferences " - @ingroup Core Implementation of SBML's ListOfSpeciesReferences - construct. - - The ListOfSpeciesReferences class is used to store lists of reactants - and products in a Reaction object. - - As with the various other ListOf___ classes in SBML, the - ListOfSpeciesReferences is merely a container used for organizing - instances of other objects, in this case SpeciesReference objects. - ListOfSpeciesReferences is derived from the abstract class SBase, and - inherit the various attributes and subelements of SBase, such as - 'metaid' as and 'annotation'. The ListOf___ classes do not add any - attributes of their own. -"; - - -%feature("docstring") SpeciesReference::SpeciesReference " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SpeciesReference(SBMLNamespaces sbmlns) - - Creates a new SpeciesReference using the given SBMLNamespaces object - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Note: - - Upon the addition of a SpeciesReference object to a Model (e.g., - using Reaction.addReactant() or Reaction.addProduct()), the SBML - Level, SBML Version and XML namespace of the document override the - values used when creating the SpeciesReference object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a SpeciesReference is an important - aid to producing valid SBML. Knowledge of the intented SBML Level - and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - SpeciesReference(long level, long version) - - Creates a new SpeciesReference using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - SpeciesReference - - Parameter 'version' is a long integer, the SBML Version to assign to - this SpeciesReference - - Note: - - Upon the addition of a SpeciesReference object to a Model (e.g., - using Reaction.addReactant() or Reaction.addProduct()), the SBML - Level, SBML Version and XML namespace of the document override the - values used when creating the SpeciesReference object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a SpeciesReference is an important - aid to producing valid SBML. Knowledge of the intented SBML Level - and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add an object to an - existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - SpeciesReference(SpeciesReference orig) - - Copy constructor; creates a copy of this SpeciesReference. - - Parameter 'orig' is the SpeciesReference instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") SpeciesReference::accept " - Accepts the given SBMLVisitor. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") SpeciesReference::clone " - Creates and returns a deep copy of this SpeciesReference instance. - - Returns a (deep) copy of this SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::initDefaults " - Initializes the fields of this SpeciesReference object to 'typical' - default values. - - The SBML SpeciesReference component has slightly different aspects - and default attribute values in different SBML Levels and Versions. - This method sets the values to certain common defaults, based mostly - on what they are in SBML Level 2. Specifically: - - * Sets attribute 'stoichiometry' to 1.0 - - * (Applies to Level 1 models only) Sets attribute 'denominator' to - 1 - - See also getDenominator(), setDenominator(), getStoichiometry(), - setStoichiometry(), getStoichiometryMath(), setStoichiometryMath(). -"; - - -%feature("docstring") SpeciesReference::getStoichiometry " - Get the value of the 'stoichiometry' attribute. - - In SBML Level 2, product and reactant stoichiometries can be - specified using either 'stoichiometry' or 'stoichiometryMath' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The 'stoichiometry' - attribute is of type double and should contain values greater than - zero (0). The 'stoichiometryMath' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of 'stoichiometry' in - the SpeciesReference instance defaults to 1. For maximum - interoperability between different software tools, the - 'stoichiometry' attribute should be used in preference to - 'stoichiometryMath' when a species' stoichiometry is a simple scalar - number (integer or decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the 'stoichiometry' attribute. - - Returns the value of the (scalar) 'stoichiometry' attribute of this - SpeciesReference. - - See also getStoichiometryMath(). -"; - - -%feature("docstring") SpeciesReference::getStoichiometryMath " - Get the content of the 'stoichiometryMath' subelement as an ASTNode - tree. - - The 'stoichiometryMath' element exists only in SBML Level 2. There, - product and reactant stoichiometries can be specified using either - 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. - The former is to be used when a stoichiometry is simply a scalar - number, while the latter is for occasions when it needs to be a - rational number or it needs to reference other mathematical - expressions. The 'stoichiometry' attribute is of type double and - should contain values greater than zero (0). The - 'stoichiometryMath' element is implemented as an element containing - a MathML expression. These two are mutually exclusive; only one of - 'stoichiometry' or 'stoichiometryMath' should be defined in a given - SpeciesReference instance. When neither the attribute nor the - element is present, the value of 'stoichiometry' in the - SpeciesReference instance defaults to 1. For maximum - interoperability between different software tools, the - 'stoichiometry' attribute should be used in preference to - 'stoichiometryMath' when a species' stoichiometry is a simple scalar - number (integer or decimal). - - Returns the content of the 'stoichiometryMath' subelement of this - SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::getDenominator " - Get the value of the 'denominator' attribute, for the case of a - rational-numbered stoichiometry or a model in SBML Level 1. - - The 'denominator' attribute is only actually written out in the case - of an SBML Level 1 model. In SBML Level 2, rational-number - stoichiometries are written as MathML elements in the - 'stoichiometryMath' subelement. However, as a convenience to users, - libSBML allows the creation and manipulation of rational-number - stoichiometries by supplying the numerator and denominator directly - rather than having to manually create an ASTNode structure. LibSBML - will write out the appropriate constructs (either a combination of - 'stoichiometry' and 'denominator' in the case of SBML Level 1, or a - 'stoichiometryMath' subelement in the case of SBML Level 2). - - Returns the value of the 'denominator' attribute of this - SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::getConstant " - Get the value of the 'constant' attribute. - - Returns the value of the 'constant' attribute of this - SpeciesReference. -"; - - -%feature("docstring") SpeciesReference::isSetStoichiometryMath " - Predicate returning True if this SpeciesReference's - 'stoichiometryMath' subelement is set - - Returns True if the 'stoichiometryMath' subelement of this - SpeciesReference is set, False otherwise. -"; - - -%feature("docstring") SpeciesReference::isSetConstant " - Predicate returning True if this SpeciesReference's 'constant' - attribute is set - - Returns True if the 'constant' attribute of this SpeciesReference is - set, False otherwise. -"; - - -%feature("docstring") SpeciesReference::isSetStoichiometry " - Predicate returning True if this SpeciesReference's 'stoichiometry' - attribute is set. - - Returns True if the 'stoichiometry' attribute of this - SpeciesReference is set, False otherwise. -"; - - -%feature("docstring") SpeciesReference::setStoichiometry " - Sets the value of the 'stoichiometry' attribute of this - SpeciesReference. - - In SBML Level 2, product and reactant stoichiometries can be - specified using either 'stoichiometry' or 'stoichiometryMath' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The 'stoichiometry' - attribute is of type double and should contain values greater than - zero (0). The 'stoichiometryMath' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of 'stoichiometry' in - the SpeciesReference instance defaults to 1. For maximum - interoperability between different software tools, the - 'stoichiometry' attribute should be used in preference to - 'stoichiometryMath' when a species' stoichiometry is a simple scalar - number (integer or decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the 'stoichiometry' attribute. - - Parameter 'value' is the new value of the 'stoichiometry' attribute - - Note: - - In SBML Level 2, the 'stoichiometryMath' subelement of this - SpeciesReference object will be unset because the 'stoichiometry' - attribute and the stoichiometryMath' subelement are mutually - exclusive. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") SpeciesReference::setStoichiometryMath " - Sets the 'stoichiometryMath' subelement of this SpeciesReference. - - The Abstract Syntax Tree in 'math' is copied. - - In SBML Level 2, product and reactant stoichiometries can be - specified using either 'stoichiometry' or 'stoichiometryMath' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The 'stoichiometry' - attribute is of type double and should contain values greater than - zero (0). The 'stoichiometryMath' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of 'stoichiometry' in - the SpeciesReference instance defaults to 1. For maximum - interoperability between different software tools, the - 'stoichiometry' attribute should be used in preference to - 'stoichiometryMath' when a species' stoichiometry is a simple scalar - number (integer or decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the 'stoichiometry' attribute. - - Parameter 'math' is the StoichiometryMath expression that is to be - copied as the content of the 'stoichiometryMath' subelement. - - Note: - - In SBML Level 2, the 'stoichiometry' attribute of this - SpeciesReference object will be unset (isSetStoichiometry() will - return False although getStoichiometry() will return 1.0) if the - given math is not null because the 'stoichiometry' attribute and the - stoichiometryMath' subelement are mutually exclusive. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH -"; - - -%feature("docstring") SpeciesReference::setDenominator " - Set the value of the 'denominator' attribute, for the case of a - rational-numbered stoichiometry or a model in SBML Level 1. - - The 'denominator' attribute is only actually written out in the case - of an SBML Level 1 model. In SBML Level 2, rational-number - stoichiometries are written as MathML elements in the - 'stoichiometryMath' subelement. However, as a convenience to users, - libSBML allows the creation and manipulation of rational-number - stoichiometries by supplying the numerator and denominator directly - rather than having to manually create an ASTNode structure. LibSBML - will write out the appropriate constructs (either a combination of - 'stoichiometry' and 'denominator' in the case of SBML Level 1, or a - 'stoichiometryMath' subelement in the case of SBML Level 2). - - Parameter 'value' is the scalar value - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") SpeciesReference::setConstant " - Sets the 'constant' attribute of this SpeciesReference to the given - boolean 'flag'. - - Parameter 'flag' is a boolean, the value for the 'constant' attribute - of this SpeciesReference instance - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") SpeciesReference::unsetStoichiometryMath " - Unsets the 'stoichiometryMath' subelement of this SpeciesReference. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - In SBML Level 2, product and reactant stoichiometries can be - specified using either 'stoichiometry' or 'stoichiometryMath' in a - SpeciesReference object. The former is to be used when a - stoichiometry is simply a scalar number, while the latter is for - occasions when it needs to be a rational number or it needs to - reference other mathematical expressions. The 'stoichiometry' - attribute is of type double and should contain values greater than - zero (0). The 'stoichiometryMath' element is implemented as an - element containing a MathML expression. These two are mutually - exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should - be defined in a given SpeciesReference instance. When neither the - attribute nor the element is present, the value of 'stoichiometry' in - the SpeciesReference instance defaults to 1. For maximum - interoperability between different software tools, the - 'stoichiometry' attribute should be used in preference to - 'stoichiometryMath' when a species' stoichiometry is a simple scalar - number (integer or decimal). - - In SBML Level 3, there is no StoichiometryMath, and SpeciesReference - objects have only the 'stoichiometry' attribute. - - Note: - - In SBML Level 2, the 'stoichiometry' attribute of this - SpeciesReference object will be reset to a default value (1.0) if - the 'stoichiometry' attribute has not been set. -"; - - -%feature("docstring") SpeciesReference::unsetStoichiometry " - Unsets the 'stoichiometry' attribute of this SpeciesReference. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - In SBML Level 1, the 'stoichiometry' attribute of this - SpeciesReference object will be just reset to a default value (1.0) - and isSetStoichiometry() will still return True. In SBML Level 2, - the 'stoichiometry' attribute of this object will be unset (which - will result in isSetStoichiometry() returning False, although - getStoichiometry() will return 1.0) if the 'stoichiometryMath' - subelement is set, otherwise the attribute will be just reset to the - default value (1.0) (and isSetStoichiometry() will still return - True). In SBML Level 3, the 'stoichiometry' attribute of this - object will be set to NaN and isSetStoichiometry() will return - False. -"; - - -%feature("docstring") SpeciesReference::createStoichiometryMath " - Creates a new, empty StoichiometryMath object, adds it to this - SpeciesReference, and returns it. - - Returns the newly created StoichiometryMath object instance - - See also Reaction.addReactant(), Reaction.addProduct(). -"; - - -%feature("docstring") SpeciesReference::setAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setAnnotation(XMLNode annotation) - - Sets the value of the 'annotation' subelement of this SBML object to - a copy of 'annotation'. - - Any existing content of the 'annotation' subelement is discarded. - Unless you have taken steps to first copy and reconstitute any - existing annotations into the 'annotation' that is about to be - assigned, it is likely that performing such wholesale replacement is - unfriendly towards other software applications whose annotations are - discarded. An alternative may be to use appendAnnotation(). - - Parameter 'annotation' is an XML structure that is to be used as the - content of the 'annotation' subelement of this object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also appendAnnotation(), appendAnnotation(), appendAnnotation(), - appendAnnotation(). -"; - - -%feature("docstring") SpeciesReference::appendAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - appendAnnotation(XMLNode annotation) - - Appends annotation content to any existing content in the - 'annotation' subelement of this object. - - The content in 'annotation' is copied. Unlike - SpeciesReference.setAnnotation(), this method allows other - annotations to be preserved when an application adds its own data. - - Parameter 'annotation' is an XML structure that is to be copied and - appended to the content of the 'annotation' subelement of this - object - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also setAnnotation(), setAnnotation(), setAnnotation(), - setAnnotation(). -"; - - -%feature("docstring") SpeciesReference::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") SpeciesReference::getElementName " - Returns the XML element name of this object, which for - SpeciesReference, is always 'speciesReference'. - - Returns the name of this element, i.e., 'speciesReference'. -"; - - -%feature("docstring") SpeciesReference::writeElements " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::sortMath " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - SpeciesReference object have been set. - - Note: - - The required attributes for a SpeciesReference object are: - - * 'species' - - * 'constant' (only available SBML Level 3) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") SpeciesReference::createObject " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::readL1Attributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::syncAnnotation " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::isExplicitlySetStoichiometry " - Internal implementation method. -"; - - -%feature("docstring") SpeciesReference::isExplicitlySetDenominator " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpeciesReferences::ListOfSpeciesReferences " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfSpeciesReferences(SBMLNamespaces sbmlns) - - Creates a new ListOfSpeciesReferences object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfSpeciesReferences object - to be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfSpeciesReferences(long level, long version) - - Creates a new, empty ListOfSpeciesReferences object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfSpeciesReferences::clone " - Creates and returns a deep copy of this ListOfSpeciesReferences - instance. - - Returns a (deep) copy of this ListOfSpeciesReferences. -"; - - -%feature("docstring") ListOfSpeciesReferences::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfSpeciesReferences::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., SpeciesReference objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfSpeciesReferences::getElementName " - Returns the XML element name of this object. - - For ListOfSpeciesReferences, the XML element name is - 'listOfSpeciesReferences'. - - Returns the name of this element, i.e., 'listOfSpeciesReferences'. -"; - - -%feature("docstring") ListOfSpeciesReferences::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a SpeciesReference from the ListOfSpeciesReferences. - - Parameter 'n' is the index number of the SpeciesReference to get. - - Returns the nth SpeciesReference in this ListOfSpeciesReferences. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfSpeciesReferences::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfSpeciesReferences items and - returns a pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfSpeciesReferences items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfSpeciesReferences::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpeciesReferences::setType " - Internal implementation method. -"; - - -%feature("docstring") ListOfSpeciesReferences::createObject " - Internal implementation method. -"; - - -%feature("docstring") ModifierSpeciesReference " - @ingroup Core Implementation of SBML's ModifierSpeciesReference - construct. - - Sometimes a species appears in the kinetic rate formula of a reaction - but is itself neither created nor destroyed in that reaction (for - example, because it acts as a catalyst or inhibitor). In SBML, all - such species are simply called modifiers without regard to the - detailed role of those species in the model. The Reaction structure - provides a way to express which species act as modifiers in a given - reaction. This is the purpose of the list of modifiers available in - Reaction. The list contains instances of ModifierSpeciesReference - structures. - - The ModifierSpeciesReference structure inherits the mandatory - attribute 'species' and optional attributes 'id' and 'name' from the - parent class SimpleSpeciesReference. See the description of - SimpleSpeciesReference for more information about these. - - The value of the 'species' attribute must be the identifier of a - species defined in the enclosing Model; this species is designated - as a modifier for the current reaction. A reaction may have any - number of modifiers. It is permissible for a modifier species to - appear simultaneously in the list of reactants and products of the - same reaction where it is designated as a modifier, as well as to - appear in the list of reactants, products and modifiers of other - reactions in the model. -"; - - -%feature("docstring") ModifierSpeciesReference::ModifierSpeciesReference " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ModifierSpeciesReference(SBMLNamespaces sbmlns) - - Creates a new ModifierSpeciesReference using the given SBMLNamespaces - object 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Note: - - Upon the addition of a ModifierSpeciesReference object to an - SBMLDocument (e.g., using Reaction.addModifier()), the SBML XML - namespace of the document overrides the value used when creating the - ModifierSpeciesReference object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a ModifierSpeciesReference is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - ModifierSpeciesReference(long level, long version) - - Creates a new ModifierSpeciesReference using the given SBML 'level' - and 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - ModifierSpeciesReference - - Parameter 'version' is a long integer, the SBML Version to assign to - this ModifierSpeciesReference - - Note: - - Upon the addition of a ModifierSpeciesReference object to an - SBMLDocument (e.g., using Reaction.addModifier()), the SBML Level, - SBML Version and XML namespace of the document override the values - used when creating the ModifierSpeciesReference object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a ModifierSpeciesReference is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. -"; - - -%feature("docstring") ModifierSpeciesReference::accept " - Accepts the given SBMLVisitor. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") ModifierSpeciesReference::clone " - Creates and returns a deep copy of this ModifierSpeciesReference - instance. - - Returns a (deep) copy of this ModifierSpeciesReference. -"; - - -%feature("docstring") ModifierSpeciesReference::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ModifierSpeciesReference::getElementName " - Returns the XML element name of this object, which for Species, is - always 'modifierSpeciesReference'. - - Returns the name of this element, i.e., 'modifierSpeciesReference'. -"; - - -%feature("docstring") ModifierSpeciesReference::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - ModifierSpeciesReference object have been set. - - Note: - - The required attributes for a ModifierSpeciesReference object are: - species -"; - - -%feature("docstring") Event " - @ingroup Core Implementation of SBML's Event construct. - - An SBML Event object defines when the event can occur, the variables - that are affected by it, how the variables are affected, and the - event's relationship to other events. The effect of the event can - optionally be delayed after the occurrence of the condition which - invokes it. - - The operation of Event is divided into two phases (even when the - event is not delayed): one when the event is triggered, and the - other when the event is executed. Trigger objects define the - conditions for triggering an event, Delay objects define when the - event is actually executed, EventAssignment objects define the - effects of executing the event, and (in SBML Level 3) Priority - objects influence the order of EventAssignment performance in cases - of simultaneous events. Please consult the descriptions of Trigger, - Delay, EventAssignment and Priority for more information. - - SBML Level/Version differences - ====================================================================== - - SBML Level 3 - ...................................................................... - - SBML Level 3 introduces several changes to the structure and - components of Events compared to SBML Level 2. These changes fall - into two main categories: changes to what is optional or required, - and additions of new attributes and elements. - - * The attribute 'useValuesFromTriggerTime' on Event is mandatory - (it was optional in Level 2); - - * Event's 'listOfEventAssignments' element (of class - ListOfEventAssignments) is optional (it was mandatory in Level 2); - - * Event's 'priority' element (of class Priority) is new in Level - 3; and - - * The Trigger object gains new mandatory attributes (described as - part of the definition of Trigger). - - The changes to the attributes of Event are described below; the - changes to Trigger and Priority are described in their respective - sections. - - SBML Level 2 - ...................................................................... - - In SBML Level 2 versions before Version 4, the semantics of Event - time delays were defined such that the expressions in the event's - assignments were always evaluated at the time the event was - triggered. This definition made it difficult to define an event - whose assignment formulas were meant to be evaluated at the time the - event was executed (i.e., after the time period defined by the value - of the Delay element). In SBML Level 2 Version 4 and in Level 3, - the attribute 'useValuesFromTriggerTime' on Event allows a model to - indicate the time at which the event's assignments are intended the - values of the assignment formulas are computed at the moment the - event is triggered, not after the delay. If - 'useValuesFromTriggerTime'=false, it means that the formulas in the - event's assignments are to be computed after the delay, at the time - the event is executed. - - The definition of Event in SBML Level 2 Versions 1 and 2 includes an - additional attribute called 'timeUnits', which allowed the time units - of the Delay to be set explicitly. Later Versions of SBML Level 2 - as well as SBML Level 3 do not define this attribute. LibSBML - supports this attribute for compatibility with previous versions of - SBML Level 2; however, if a model in SBML Level 3 or Level 2 - Versions 3-4 format sets the attribute, the consistency-checking - method SBMLDocument.checkConsistency() will report an error. - - The attribute 'useValuesFromTriggerTime' was introduced in SBML - Level 2 Version 4. Models defined in prior Versions of SBML Level 2 - cannot use this attribute, and SBMLDocument.checkConsistency() will - report an error if they do. - - Semantics of events in SBML Level 3 Version 1 - ====================================================================== - - The detailed semantics of events are described in the specification - documents for each SBML Level/Version. Here we include the - description from the SBML Level 1 Version 1. Any transition of a - Trigger object's 'math' formula from the value false to True will - cause the enclosing Event object to trigger. Such a transition is - not possible at the very start of a simulation (i.e., at time t = 0) - unless the Trigger object's 'initialValue' attribute has a value of - False; this defines the value of the trigger formula to be False - immediately prior to the start of simulation, thereby giving it the - potential to change in value from False to True when the formula is - evaluated at t = 0. If 'initialValue'=True, then the trigger - expression cannot transition from False to True at t = 0 but may do - so at some time t > 0. - - Consider an Event object definition <EM>E</EM> with delay d in which - the Trigger object's 'math' formula makes a transition in value from - False to True at times t_1 and t_2. The EventAssignment within the - Event object will have effect at t_1 + d and t_2 + d irrespective - of the relative times of t_1 and t_2. For example, events can - 'overlap' so that t_1 < t_2 < t_1 + d still causes an event - assignments to occur at t_1 + d and t_2 + d. - - It is entirely possible for two events to be executed simultaneously, - and it is possible for events to trigger other events (i.e., an event - assignment can cause an event to trigger). This leads to several - points: - - - * A software package should retest all event triggers after - executing an event assignment in order to account for the - possibility that the assignment causes another event trigger to - transition from False to True. This check should be made after each - individual Event object's execution, even when several events are to - be executed simultaneously. - - * Any Event object whose Trigger 'persistent' attribute has the - value False must have its trigger expression reevaluated - continuously between when the event is triggered and when it is - executed. If its trigger expression ever evaluates to False, it - must be removed from the queue of events pending execution and - treated as any other event whose trigger expression evaluates to - False. - - * Although the precise time at which events are executed is not - resolved beyond the given execution point in simulated time, it is - assumed that the order in which the events occur is resolved. This - order can be significant in determining the overall outcome of a - given simulation. When an event <EM>X</EM> triggers another event - <EM>Y</EM> and event <EM>Y</EM> has zero delay, then event - <EM>Y</EM> is added to the existing set of simultaneous events that - are pending execution. Events <EM>X</EM> and <EM>Y</EM> form a - cascade of events at the same point in simulation time. An event - such as <EM>Y</EM> may have a special priority if it contains a - Priority subobject. - - * All events in a model are open to being in a cascade. The - position of an event in the event queue does not affect whether it - can be in the cascade: event <EM>Y</EM> can be triggered whether it - is before or after <EM>X</EM> in the queue of events pending - execution. A cascade of events can be potentially infinite (never - terminate); when this occurs a simulator should indicate this has - occurred -- it is incorrect for a simulator to break a cascade - arbitrarily and continue the simulation without at least indicating - that the infinite cascade occurred. - - * Simultaneous events having no defined priorities are executed in - an undefined order. This does not mean that the behavior of the - simulation is completely undefined; merely that the order of - execution of these particular events is undefined. A given - simulator may use any algorithm to choose an order as long as every - event is executed exactly once. - - * Events with defined priorities are executed in the order implied - by their Priority 'math' formula values, with events having higher - priorities being executed ahead of events with lower priorities, and - events with identical priorities being executed in a random order - with respect to one another (as determined at run-time by some - random algorithm equivalent to coin-flipping). Newly-triggered - events that are to be executed immediately (i.e., if they define no - delays) should be inserted into the queue of events pending - execution according to their priorities: events with higher priority - values value must be inserted ahead of events with lower priority - values and after any pending events with even higher priorities, and - inserted randomly among pending events with the same priority - values. Events without Priority objects must be inserted into the - queue in some fashion, but the algorithm used to place it in the - queue is undefined. Similarly, there is no restriction on the order - of a newly-inserted event with a defined Priority with respect to - any other pending Event without a defined Priority. - - * A model variable that is the target of one or more event - assignments can change more than once when simultaneous events are - processed at some time point t. The model's behavior (output) for - such a variable is the value of the variable at the end of - processing all the simultaneous events at time t. - - See also Trigger, Priority, Delay, EventAssignment. -"; - - -%feature("docstring") ListOfEvents " - @ingroup Core Implementation of SBML's ListOfEvents construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - The relationship between the lists and the rest of an SBML model is - illustrated by the following (for SBML Level 2 Version 4): - - <?xml version=\"1.0\" encoding=\"UTF-8\"?> - <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" - level=\"3\" version=\"1\"> - <model id=\"My_Model\"> - <listOfFunctionDefinitions> - <functionDefinition> ... </functionDefinition> - </listOfFunctionDefinitions> - <listOfUnitDefinitions> - <unitDefinition> ... </unitDefinition> - </listOfUnitDefinitions> - <listOfCompartments> - <compartment> ... </compartment> - </listOfCompartments> - <listOfSpecies> - <species> ... </species> - </listOfSpecies> - <listOfParameters> - <parameter> ... </parameter> - </listOfParameters> - <listOfInitialAssignments> - <initialAssignment> ... </initialAssignment> - </listOfInitialAssignments> - <listOfRules> - ... elements of subclasses of Rule ... - </listOfRules> - <listOfConstraints> - <constraint> ... </constraint> - </listOfConstraints> - <listOfReactions> - <reaction> ... </reaction> - </listOfReactions> - <listOfEvents> - <event> ... </event> - </listOfEvents> - </model> - </sbml> - - Readers may wonder about the motivations for using the ListOf___ - containers. A simpler approach in XML might be to place the - components all directly at the top level of the model definition. - The choice made in SBML is to group them within XML elements named - after ListOfClassname, in part because it helps organize the - components. More importantly, the fact that the container classes - are derived from SBase means that software tools can add information - about the lists themselves into each list container's 'annotation'. - - See also ListOfFunctionDefinitions, ListOfUnitDefinitions, - ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, - ListOfSpecies, ListOfParameters, ListOfInitialAssignments, - ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. -"; - - -%feature("docstring") Event::Event " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Event(SBMLNamespaces sbmlns) - - Creates a new Event using the given SBMLNamespaces object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of an Event object to an SBMLDocument (e.g., using - Model.addEvent()), the SBML XML namespace of the document overrides - the value used when creating the Event object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a Event is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Event(long level, long version) - - Creates a new Event using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Event - - Parameter 'version' is a long integer, the SBML Version to assign to - this Event - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of an Event object to an SBMLDocument (e.g., using - Model.addEvent()), the SBML Level, SBML Version and XML namespace of - the document override the values used when creating the Event object - via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of an Event is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - Event(Event orig) - - Copy constructor; creates a copy of this Event. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Event::accept " - Accepts the given SBMLVisitor for this instance of Event. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next Event in the list of events - within which this Event is embedded. -"; - - -%feature("docstring") Event::clone " - Creates and returns a deep copy of this Event. - - Returns a (deep) copy of this Event. -"; - - -%feature("docstring") Event::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") Event::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") Event::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth. - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") Event::getId " - Returns the value of the 'id' attribute of this Event. - - Returns the id of this Event. -"; - - -%feature("docstring") Event::getName " - Returns the value of the 'name' attribute of this Event. - - Returns the name of this Event. -"; - - -%feature("docstring") Event::getTrigger " - Get the event trigger portion of this Event. - - Returns the Trigger object of this Event. -"; - - -%feature("docstring") Event::getDelay " - Get the assignment delay portion of this Event, if there is one. - - Returns the delay of this Event if one is defined, or None if none - is defined. -"; - - -%feature("docstring") Event::getPriority " - (SBML Level 3 only) Get the event priority portion of this Event. - - Returns the Priority object of this Event. - - Note: - - The element 'priority' is available in SBML Level 3 Version 1 Core, - but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::getTimeUnits " - Get the value of the 'timeUnits' attribute of this Event, if it has - one. - - Returns the value of the attribute 'timeUnits' as a string. - - WARNING: - - Definitions of Event in SBML Level 2 Versions 1 and 2 included the - additional attribute called 'timeUnits', but it was removed in SBML - Level 2 Version 3. LibSBML supports this attribute for - compatibility with previous versions of SBML Level 2, but its use is - discouraged since models in Level 2 Versions 3 and 4 cannot contain - it. If a Version 3 or 4 model sets the attribute, the consistency- - checking method SBMLDocument.checkConsistency() will report an - error. -"; - - -%feature("docstring") Event::getUseValuesFromTriggerTime " - Get the value of the 'useValuesFromTriggerTime' attribute of this - Event. - - The optional Delay on Event means there are two times to consider - when computing the results of an event: the time at which the event - is triggered, and the time at which assignments are executed. It - is also possible to distinguish between the time at which the - EventAssignment's expression is calculated, and the time at which - the assignment is made: the expression could be evaluated at the - same time the assignments are performed, i.e., when the event is - executed, but it could also be defined to be evaluated at the time - the event is triggered. - - In SBML Level 2 versions prior to Version 4, the semantics of Event - time delays were defined such that the expressions in the event's - assignments were always evaluated at the time the event was - triggered. This definition made it difficult to define an event - whose assignment formulas were meant to be evaluated at the time the - event was executed (i.e., after the time period defined by the value - of the Delay element). In SBML Level 2 Version 4, the attribute - 'useValuesFromTriggerTime' on Event allows a model to indicate the - time at which the event's assignments are intended to be evaluated. - In SBML Level 2, the attribute has a default value of True, which - corresponds to the interpretation of event assignments prior to - Version 4: the values of the assignment formulas are computed at the - moment the event is triggered, not after the delay. If - 'useValuesFromTriggerTime'=False, it means that the formulas in the - event's assignments are to be computed after the delay, at the time - the event is executed. In SBML Level 3, the attribute is mandatory, - not optional, and all events must specify a value for it. - - Returns the value of the attribute 'useValuesFromTriggerTime' as a - boolean. - - WARNING: - - The attribute 'useValuesFromTriggerTime' was introduced in SBML - Level 2 Version 4. It is not valid in models defined using SBML - Level 2 versions prior to Version 4. If a Level 2 Version 1-3 model - sets the attribute, the consistency-checking method - SBMLDocument.checkConsistency() will report an error. -"; - - -%feature("docstring") Event::isSetId " - Predicate returning True if this Event's 'id' attribute is set. - - Returns True if the 'id' attribute of this Event is set, False - otherwise. -"; - - -%feature("docstring") Event::isSetName " - Predicate returning True if this Event's 'name' attribute is set. - - Returns True if the 'name' attribute of this Event is set, False - otherwise. -"; - - -%feature("docstring") Event::isSetTrigger " - Predicate for testing whether the trigger for this Event is set. - - Returns True if the trigger of this Event is set, False otherwise. -"; - - -%feature("docstring") Event::isSetDelay " - Predicate for testing whether the delay for this Event is set. - - Returns True if the delay of this Event is set, False otherwise. -"; - - -%feature("docstring") Event::isSetPriority " - (SBML Level 3 only) Predicate for testing whether the priority for - this Event is set. - - Returns True if the priority of this Event is set, False otherwise. - - Note: - - The element 'priority' is available in SBML Level 3 Version 1 Core, - but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::isSetTimeUnits " - Predicate for testing whether the 'timeUnits' attribute of this Event - is set. - - Returns True if the 'timeUnits' attribute of this Event is set, - False otherwise. - - WARNING: - - Definitions of Event in SBML Level 2 Versions 1 and 2 included the - additional attribute called 'timeUnits', but it was removed in SBML - Level 2 Version 3. LibSBML supports this attribute for - compatibility with previous versions of SBML Level 2, but its use is - discouraged since models in Level 2 Versions 3 and 4 cannot contain - it. If a Version 3 or 4 model sets the attribute, the consistency- - checking method SBMLDocument.checkConsistency() will report an - error. -"; - - -%feature("docstring") Event::isSetUseValuesFromTriggerTime " - Predicate for testing whether the 'useValuesFromTriggerTime' - attribute of this Event is set. - - Returns True if the 'useValuesFromTriggerTime' attribute of this - Event is set, False otherwise. - - Note: - - In SBML Level 2, this attribute is optional and has a default value - of True, whereas in Level 3 Version 1, this optional is mandatory - and has no default value. -"; - - -%feature("docstring") Event::setId " - Sets the value of the 'id' attribute of this Event. - - The string 'sid' is copied. Note that SBML has strict requirements - for the syntax of identifiers. The following is a summary of the - definition of the SBML identifier type SId, which defines the - permitted syntax of identifiers. We express the syntax using an - extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Parameter 'sid' is the string to use as the identifier of this - Event - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Event::setName " - Sets the value of the 'name' attribute of this Event. - - The string in 'name' is copied. - - Parameter 'name' is the new name for the Event - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Event::setTrigger " - Sets the trigger definition of this Event to a copy of the given - Trigger object instance. - - Parameter 'trigger' is the Trigger object instance to use. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH -"; - - -%feature("docstring") Event::setDelay " - Sets the delay definition of this Event to a copy of the given Delay - object instance. - - Parameter 'delay' is the Delay object instance to use - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH -"; - - -%feature("docstring") Event::setPriority " - (SBML Level 3 only) Sets the priority definition of this Event to a - copy of the given Priority object instance. - - Parameter 'priority' is the Priority object instance to use - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The element 'priority' is available in SBML Level 3 Version 1 Core, - but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::setTimeUnits " - Sets the 'timeUnits' attribute of this Event to a copy of 'sid'. - - Parameter 'sid' is the identifier of the time units to use. - - WARNING: - - Definitions of Event in SBML Level 2 Versions 1 and 2 included the - additional attribute called 'timeUnits', but it was removed in SBML - Level 2 Version 3. LibSBML supports this attribute for - compatibility with previous versions of SBML Level 2, but its use is - discouraged since models in Level 2 Versions 3 and 4 cannot contain - it. If a Version 3 or 4 model sets the attribute, the consistency- - checking method SBMLDocument.checkConsistency() will report an - error. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") Event::setUseValuesFromTriggerTime " - Sets the 'useValuesFromTriggerTime' attribute of this Event to a - 'value'. - - The optional Delay on Event means there are two times to consider - when computing the results of an event: the time at which the event - is triggered, and the time at which assignments are executed. It - is also possible to distinguish between the time at which the - EventAssignment's expression is calculated, and the time at which - the assignment is made: the expression could be evaluated at the - same time the assignments are performed, i.e., when the event is - executed, but it could also be defined to be evaluated at the time - the event is triggered. - - In SBML Level 2 versions prior to Version 4, the semantics of Event - time delays were defined such that the expressions in the event's - assignments were always evaluated at the time the event was - triggered. This definition made it difficult to define an event - whose assignment formulas were meant to be evaluated at the time the - event was executed (i.e., after the time period defined by the value - of the Delay element). In SBML Level 2 Version 4, the attribute - 'useValuesFromTriggerTime' on Event allows a model to indicate the - time at which the event's assignments are intended to be evaluated. - In SBML Level 2, the attribute has a default value of True, which - corresponds to the interpretation of event assignments prior to - Version 4: the values of the assignment formulas are computed at the - moment the event is triggered, not after the delay. If - 'useValuesFromTriggerTime'=False, it means that the formulas in the - event's assignments are to be computed after the delay, at the time - the event is executed. In SBML Level 3, the attribute is mandatory, - not optional, and all events must specify a value for it. - - Parameter 'value' is the value of useValuesFromTriggerTime to use. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - WARNING: - - The attribute 'useValuesFromTriggerTime' was introduced in SBML - Level 2 Version 4. It is not valid in models defined using SBML - Level 2 versions prior to Version 4. If a Version 1- 3 model sets - the attribute, the consistency-checking method - SBMLDocument.checkConsistency() will report an error. -"; - - -%feature("docstring") Event::unsetId " - Unsets the value of the 'id' attribute of this Event. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Event::unsetName " - Unsets the value of the 'name' attribute of this Event. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Event::unsetDelay " - Unsets the Delay of this Event. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Event::unsetPriority " - (SBML Level 3 only) Unsets the Priority of this Event. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The element 'priority' is available in SBML Level 3 Version 1 Core, - but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::unsetTrigger " - Unsets the Trigger of this Event. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - The element 'priority' is available in SBML Level 3 Version 1 Core, - but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::unsetTimeUnits " - Unsets the 'timeUnits' attribute of this Event. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED - - WARNING: - - Definitions of Event in SBML Level 2 Versions 1 and 2 included the - attribute called 'timeUnits', but it was removed in SBML Level 2 - Version 3. LibSBML supports this attribute for compatibility with - previous versions of SBML Level 2, but its use is discouraged since - models in Level 2 Version 3 and Version 4 cannot contain it. If a - Version 3 or 4 model sets this attribute, the consistency-checking - method SBMLDocument.checkConsistency() will report an error. -"; - - -%feature("docstring") Event::addEventAssignment " - Appends a copy of the given EventAssignment to this Event. - - Parameter 'ea' is the EventAssignment object to add. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_LEVEL_MISMATCH - - * libsbml.LIBSBML_VERSION_MISMATCH - - * libsbml.LIBSBML_DUPLICATE_OBJECT_ID - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - This method should be used with some caution. The fact that this - method copies the object passed to it means that the caller will be - left holding a physically different object instance than the one - contained in this Event. Changes made to the original object - instance (such as resetting attribute values) will not affect the - instance in the Event. In addition, the caller should make sure to - free the original object if it is no longer being used, or else a - memory leak will result. Please see Event.createEventAssignment() - for a method that does not lead to these issues. - - See also createEventAssignment(). -"; - - -%feature("docstring") Event::createEventAssignment " - Creates a new, empty EventAssignment, adds it to this Event's list of - event assignments and returns the EventAssignment. - - Returns the newly created EventAssignment object instance - - See also addEventAssignment(). -"; - - -%feature("docstring") Event::createTrigger " - Creates a new, empty Trigger, adds it to this Event and returns the - Trigger. - - Returns the newly created Trigger object instance -"; - - -%feature("docstring") Event::createDelay " - Creates a new, empty Delay, adds it to this Event and returns the - Delay. - - Returns the newly created Delay object instance -"; - - -%feature("docstring") Event::createPriority " - (SBML Level 3 only) Creates a new, empty Priority, adds it to this - Event and returns the Priority. - - Returns the newly created Priority object instance - - Note: - - The element 'priority' is available in SBML Level 3 Version 1 Core, - but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Event::getListOfEventAssignments " - Returns the list of event assignments for this Event. - - Returns the list of EventAssignments for this Event. -"; - - -%feature("docstring") Event::getEventAssignment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getEventAssignment(string variable) - - Return the event assignment indicated by the given 'variable'. - - Parameter 'variable' is a string, the identifier of the variable - whose EventAssignment is being sought. - - Returns the EventAssignment for the given 'variable', or None if no - such EventAssignment exits. - - ______________________________________________________________________ - Method variant with the following signature: - - getEventAssignment(long n) - - Return a specific EventAssignment object of this Event. - - Parameter 'n' is an integer, the index of the EventAssignment object - to return - - Returns the nth EventAssignment of this Event. -"; - - -%feature("docstring") Event::getNumEventAssignments " - Returns the number of EventAssignment objects attached to this - Event. - - Returns the number of EventAssignments in this Event. -"; - - -%feature("docstring") Event::removeEventAssignment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeEventAssignment(string variable) - - Removes the EventAssignment object with the given 'variable' - attribute from this Event object and returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. If none of the EventAssignment objects in this Event object have - the 'variable' attribute 'variable', then None is returned. - - Parameter 'variable' is the 'variable' attribute of the - EventAssignment object to remove - - Returns the EventAssignment object removed. As mentioned above, the - caller owns the returned object. None is returned if no - EventAssignment object with the 'variable' attribute exists in this - Event object. - - ______________________________________________________________________ - Method variant with the following signature: - - removeEventAssignment(long n) - - Removes the nth EventAssignment object from this Event object and - returns a pointer to it. - - The caller owns the returned object and is responsible for deleting - it. - - Parameter 'n' is the index of the EventAssignment object to remove - - Returns the EventAssignment object removed. As mentioned above, - the caller owns the returned item. None is returned if the given - index is out of range. -"; - - -%feature("docstring") Event::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") Event::connectToChild " - Internal implementation method. -"; - - -%feature("docstring") Event::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") Event::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Event::getElementName " - Returns the XML element name of this object, which for Event, is - always 'event'. - - Returns the name of this element, i.e., 'event'. -"; - - -%feature("docstring") Event::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Event::setInternalIdOnly " - Internal implementation method. -"; - - -%feature("docstring") Event::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Event object have been set. - - Note: - - The required attributes for a Event object are: - - * 'useValuesfromTriggerTime' (required in SBML Level 3) -"; - - -%feature("docstring") Event::hasRequiredElements " - Predicate returning True if all the required elements for this Event - object have been set. - - Note: - - The required elements for a Event object are: - - * 'trigger' - - * 'listOfEventAssignments' (required in SBML Level 2, optional in - Level 3) -"; - - -%feature("docstring") Event::createObject " - Internal implementation method. -"; - - -%feature("docstring") Event::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Event::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Event::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Event::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Event::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Event::isExplicitlySetUVFTT " - Internal implementation method. -"; - - -%feature("docstring") ListOfEvents::ListOfEvents " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfEvents(SBMLNamespaces sbmlns) - - Creates a new ListOfEvents object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfEvents object to be - created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfEvents(long level, long version) - - Creates a new ListOfEvents object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfEvents::clone " - Creates and returns a deep copy of this ListOfEvents. - - Returns a (deep) copy of this ListOfEvents. -"; - - -%feature("docstring") ListOfEvents::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfEvents::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., Event objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfEvents::getElementName " - Returns the XML element name of this object. - - For ListOfEvents, the XML element name is 'listOfEvents'. - - Returns the name of this element, i.e., 'listOfEvents'. -"; - - -%feature("docstring") ListOfEvents::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a Event from the ListOfEvents. - - Parameter 'n' is the index number of the Event to get. - - Returns the nth Event in this ListOfEvents. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfEvents::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfEvents items and returns a - pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfEvents items with the given identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfEvents::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfEvents::createObject " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment " - @ingroup Core Implementation of SBML's EventAssignment construct for - Event. - - Event contains an optional element called 'listOfEventAssignments', - of class ListOfEventAssignments. In every instance of an event - definition in a model, the object's 'listOfEventAssignments' element - must have a non-empty list of one or more 'eventAssignment' elements - of class EventAssignment. The object class EventAssignment has one - required attribute, 'variable', and a required element, 'math'. - Being derived from SBase, it also has all the usual attributes and - elements of its parent class. - - An Event object defines when the event can occur, the variables that - are affected by the event, and how the variables are affected. The - purpose of the EventAssignment object class is to define how - variables are affected by an Event. In SBML Level 2, every Event - object instance must have a nonempty list of event assignments; in - SBML Level 3, the list of assignments is optional. - - The operation of an Event is divided into two phases (regardless of - whether a delay is involved): one phase when the event is triggered, - and the other when the event is executed. EventAssignment objects - are interpreted when an event is executed. The effects are described - below. - - The attribute 'variable' - ====================================================================== - - The EventAssignment attribute 'variable' must be the identifier of an - existing Compartment, Species, SpeciesReference, or Parameter - instance defined in the model. When the event is executed, the value - of the model component identified by 'variable' is changed by the - EventAssignment to the value computed by the 'math' element; that is, - a species' quantity, species reference's stoichiometry, - compartment's size or parameter's value are reset to the value - computed by 'math'. - - Certain restrictions are placed on what can appear in 'variable': - - * The object identified by the value of the EventAssignment - attribute 'variable' must not have its 'constant' attribute set to - or default to True. (Constants cannot be affected by events.) - - * The 'variable' attribute must not contain the identifier of a - reaction; only species, species references, compartment and parameter - values may be set by an Event. - - * The value of every 'variable' attribute must be unique among the - set of EventAssignment structures within a given Event structure. - In other words, a single event cannot have multiple EventAssignment - objects assigning the same variable. (All of them would be - performed at the same time when that particular Event triggers, - resulting in indeterminacy.) However, separate Event instances can - refer to the same variable. - - * A variable cannot be assigned a value in an EventAssignment object - instance and also be assigned a value by an AssignmentRule; i.e., the - value of an EventAssignment's 'variable' attribute cannot be the same - as the value of a AssignmentRule' 'variable' attribute. (Assignment - rules hold at all times, therefore it would be inconsistent to also - define an event that reassigns the value of the same variable.) - - Note that the time of assignment of the object identified by the - value of the 'variable' attribute is always the time at which the - Event is executed, not when it is triggered. The timing is - controlled by the optional Delay in an Event. The time of - assignment is not affected by the 'useValuesFromTriggerTime' - attribute on Eventmdash;that attribute affects the time at which the - EventAssignment's 'math' expression is evaluated. In other words, - SBML allows decoupling the time at which the 'variable' is assigned - from the time at which its value expression is calculated. - - The 'math' subelement in an EventAssignment - ====================================================================== - - The MathML expression contained in an EventAssignment defines the new - value of the variable being assigned by the Event. - - As mentioned above, the time at which the expression in 'math' is - evaluated is determined by the attribute 'useValuesFromTriggerTime' - on Event. If the attribute value is True, the expression must be - evaluated when the event is triggered; more precisely, the values of - identifiers occurring in MathML <ci> elements in the - EventAssignment's 'math' expression are the values they have at the - point when the event triggered. If, instead, - 'useValuesFromTriggerTime''s value is False, it means the values at - execution time should be used; that is, the values of identifiers - occurring in MathML <ci> elements in the EventAssignment's 'math' - expression are the values they have at the point when the event - executed. - - SBML Level/Version differences - ====================================================================== - - Between Version 4 and previous versions of SBML Level 2, the - requirements regarding the matching of units between an - EvengAssignment's formula and the units of the object identified by - the 'variable' attribute changed. Previous versions required - consistency, but in SBML Level 2 Version 4 and in SBML Level 3, unit - consistency is only recommended. More precisely: - - - * In the case of a species, an EventAssignment sets the referenced - species' quantity (concentration or amount of substance) to the value - determined by the formula in the EventAssignment's 'math' subelement. - The units of the 'math' formula should (in SBML Level 2 Version 4 - and in Level 3) or must (in previous Versions of Level 2) be - identical to the units of the species. - - * (SBML Level 3 only.) In the case of a species reference, an - EventAssignment sets the stoichiometry of the reactant or product - referenced by the SpeciesReference object to the value determined by - the formula in the 'math' element. The unit associated with the - value produced by the 'math' formula should be dimensionless, - because reactant and product stoichiometries in reactions are - dimensionless quantities. - - * In the case of a compartment, an EventAssignment sets the - referenced compartment's size to the size determined by the formula - in the 'math' subelement of the EventAssignment. The overall units - of the formula should (in SBML Level 2 Version 4 and in Level 3) or - must (in previous Versions of Level 2) be identical to the units - specified for the size of the compartment identified by the - EventAssignment's 'variable' attribute. - - * In the case of a parameter, an EventAssignment sets the referenced - parameter's value to that determined by the formula in 'math'. The - overall units of the formula should (in SBML Level 2 Version 4 and - Level 3) or must (in previous Versions of Level 2) be identical to - the units defined for the parameter. - - Note that the formula placed in the 'math' element has no assumed - units. The consistency of the units of the formula, and the units - of the entity which the assignment affects, must be explicitly - established just as in the case of the value of the Delay subelement. - An approach similar to the one discussed in the context of Delay may - be used for the formula of an EventAssignment. - - See also Event. -"; - - -%feature("docstring") ListOfEventAssignments " - @ingroup Core Implementation of SBML's ListOfEventAssignments - construct. - - The various ListOf___ classes in SBML are merely containers used for - organizing the main components of an SBML model. All are derived - from the abstract class SBase, and inherit the various attributes - and subelements of SBase, such as 'metaid' as and 'annotation'. The - ListOf___ classes do not add any attributes of their own. - - ListOfEventAssignments is entirely contained within Event. -"; - - -%feature("docstring") EventAssignment::EventAssignment " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - EventAssignment(SBMLNamespaces sbmlns) - - Creates a new EventAssignment using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a EventAssignment object to an SBMLDocument - (e.g., using Event.addEventAssignment()), the SBML XML namespace of - the document overrides the value used when creating the - EventAssignment object via this constructor. This is necessary to - ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a EventAssignment is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add an object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - EventAssignment(long level, long version) - - Creates a new EventAssignment using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - EventAssignment - - Parameter 'version' is a long integer, the SBML Version to assign to - this EventAssignment - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a EventAssignment object to an SBMLDocument - (e.g., using Event.addEventAssignment()), the SBML Level, SBML - Version and XML namespace of the document override the values used - when creating the EventAssignment object via this constructor. This - is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a EventAssignment is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - EventAssignment(EventAssignment orig) - - Copy constructor; creates a copy of this EventAssignment. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") EventAssignment::accept " - Accepts the given SBMLVisitor for this instance of EventAssignment. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(), which indicates whether the - Visitor would like to visit the next EventAssignment in the list - within which this EventAssignment is embedded (i.e., in the - ListOfEventAssignments located in the enclosing Event instance). -"; - - -%feature("docstring") EventAssignment::clone " - Creates and returns a deep copy of this EventAssignment. - - Returns a (deep) copy of this EventAssignment. -"; - - -%feature("docstring") EventAssignment::getVariable " - Get the value of this EventAssignment's 'variable' attribute. - - Returns the identifier stored in the 'variable' attribute of this - EventAssignment. -"; - - -%feature("docstring") EventAssignment::getMath " - Get the mathematical expression in this EventAssignment's 'math' - subelement. - - Returns the top ASTNode of an abstract syntax tree representing the - mathematical formula in this EventAssignment. -"; - - -%feature("docstring") EventAssignment::isSetVariable " - Predicate for testing whether the attribute 'variable' of this - EventAssignment is set. - - Returns True if the 'variable' attribute of this EventAssignment is - set, False otherwise. -"; - - -%feature("docstring") EventAssignment::isSetMath " - Predicate for testing whether the 'math' subelement of this - EventAssignment is set. - - Returns True if this EventAssignment has a 'math' subelement, False - otherwise. -"; - - -%feature("docstring") EventAssignment::setVariable " - Sets the attribute 'variable' of this EventAssignment to a copy of - the given identifier string. - - Parameter 'sid' is the identifier of a Compartment, Species or - (global) Parameter defined in this model. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") EventAssignment::setMath " - Sets the 'math' subelement of this EventAssignment to a copy of the - given ASTNode. - - Parameter 'math' is an ASTNode that will be copied and stored as the - mathematical formula for this EventAssignment. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") EventAssignment::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units of - measurement assumed for the 'math' expression of this - EventAssignment. - - The units are calculated based on the mathematical expression in the - EventAssignment and the model quantities referenced by <ci> elements - used within that expression. The - EventAssignment.getDerivedUnitDefinition() method returns the - calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - WARNING: - - Note that it is possible the 'math' expression in the - EventAssignment contains literal numbers or parameters with - undeclared units. In those cases, it is not possible to calculate - the units of the overall expression without making assumptions. - LibSBML does not make assumptions about the units, and - EventAssignment.getDerivedUnitDefinition() only returns the units as - far as it is able to determine them. For example, in an expression - X + Y, if X has unambiguously-defined units and Y does not, it will - return the units of X. When using this method, <strong>it is - critical that callers also invoke the method</strong> - EventAssignment.containsUndeclaredUnits() <strong>to determine - whether this situation holds</strong>. Callers should take suitable - action in those situations. - - Returns a UnitDefinition that expresses the units of the math - expression of this EventAssignment, or None if one cannot be - constructed. - - See also containsUndeclaredUnits(). -"; - - -%feature("docstring") EventAssignment::containsUndeclaredUnits " - Predicate returning True if the math expression of this - EventAssignment contains literal numbers or parameters with - undeclared units. - - The EventAssignment.getDerivedUnitDefinition() method returns what - libSBML computes to be the units of the 'math', to the extent that - libSBML can compute them. However, if the expression contains - literal numbers or parameters with undeclared units, libSBML may not - be able to compute the full units of the expression and will only - return what it can compute. Callers should always use - EventAssignment.containsUndeclaredUnits() when using - EventAssignment.getDerivedUnitDefinition() to decide whether the - returned units may be incomplete. - - Returns True if the math expression of this EventAssignment includes - parameters/numbers with undeclared units, False otherwise. - - Note: - - A return value of True indicates that the UnitDefinition returned by - EventAssignment.getDerivedUnitDefinition() may not accurately - represent the units of the expression. - - See also getDerivedUnitDefinition(). -"; - - -%feature("docstring") EventAssignment::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") EventAssignment::getElementName " - Returns the XML element name of this object, which for - EventAssignment, is always 'eventAssignment'. - - Returns the name of this element, i.e., 'eventAssignment'. -"; - - -%feature("docstring") EventAssignment::writeElements " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - EventAssignment object have been set. - - Note: - - The required attributes for a EventAssignment object are: - - * 'variable' - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") EventAssignment::hasRequiredElements " - Predicate returning True if all the required elements for this - EventAssignment object have been set. - - Note: - - The required elements for a EventAssignment object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") EventAssignment::getId " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") EventAssignment::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") EventAssignment::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::divideAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::multiplyAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") EventAssignment::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") ListOfEventAssignments::ListOfEventAssignments " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfEventAssignments(SBMLNamespaces sbmlns) - - Creates a new ListOfEventAssignments object. - - The object is constructed such that it is valid for the SBML Level - and Version combination determined by the SBMLNamespaces object in - 'sbmlns'. - - Parameter 'sbmlns' is an SBMLNamespaces object that is used to - determine the characteristics of the ListOfEventAssignments object - to be created. - - ______________________________________________________________________ - Method variant with the following signature: - - ListOfEventAssignments(long level, long version) - - Creates a new ListOfEventAssignments object. - - The object is constructed such that it is valid for the given SBML - Level and Version combination. - - Parameter 'level' is the SBML Level - - Parameter 'version' is the Version within the SBML Level -"; - - -%feature("docstring") ListOfEventAssignments::clone " - Creates and returns a deep copy of this ListOfEventAssignments. - - Returns a (deep) copy of this ListOfEventAssignments. -"; - - -%feature("docstring") ListOfEventAssignments::getTypeCode " - Returns the libSBML type code for this SBML object. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfEventAssignments::getItemTypeCode " - Returns the libSBML type code for the objects contained in this - ListOf (i.e., EventAssignment objects, if the list is non-empty). - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for the objects contained in this ListOf - instance, or libsbml.SBML_UNKNOWN (default). - - See also getElementName(). -"; - - -%feature("docstring") ListOfEventAssignments::getElementName " - Returns the XML element name of this object. - - For ListOfEventAssignments, the XML element name is - 'listOfEventAssignments'. - - Returns the name of this element, i.e., 'listOfEventAssignments'. -"; - - -%feature("docstring") ListOfEventAssignments::get " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - get(long n) - - Get a EventAssignment from the ListOfEventAssignments. - - Parameter 'n' is the index number of the EventAssignment to get. - - Returns the nth EventAssignment in this ListOfEventAssignments. - - See also size(), get(), size(). -"; - - -%feature("docstring") ListOfEventAssignments::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(long n) - - Removes the nth item from this ListOfEventAssignments items and - returns a pointer to it. - - The caller owns the returned item and is responsible for deleting it. - - Parameter 'n' is the index of the item to remove - - See also size(). - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string sid) - - Removes item in this ListOfEventAssignments items with the given - identifier. - - The caller owns the returned item and is responsible for deleting it. - If none of the items in this list have the identifier 'sid', then - None is returned. - - Parameter 'sid' is the identifier of the item to remove - - Returns the item removed. As mentioned above, the caller owns the - returned item. -"; - - -%feature("docstring") ListOfEventAssignments::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. Note - that EventAssignments do not actually have IDs, but the libsbml - interface pretends that they do: no event assignment is returned by - this function. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") ListOfEventAssignments::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") ListOfEventAssignments::createObject " - Internal implementation method. -"; - - -%feature("docstring") Trigger " - @ingroup Core Implementation of SBML's Trigger construct for Event. - - An Event object defines when the event can occur, the variables that - are affected by the event, and how the variables are affected. The - Trigger construct in SBML is used to define a mathematical - expression that determines when an Event is triggered. - - A Trigger object in SBML Level 2 and Level 3 contains one subelement - named 'math' containing a MathML expression. The expression must - evaluate to a value of type boolean. The exact moment at which the - expression evaluates to True is the time point when the Event is - triggered. In SBML Level 3, Trigger has additional attributes that - must be assigned values; they are discussed in a separate section - below. - - An event only triggers when its Trigger expression makes the - transition in value from False to True. The event will also trigger - at any subsequent time points when the trigger makes this - transition; in other words, an event can be triggered multiple times - during a simulation if its trigger condition makes the transition - from False to True more than once. In SBML Level 3, the behavior - at the very start of simulation (i.e., at t = 0, where t stands for - time) is determined in part by the boolean flag 'initialValue'. - This and other additional features introduced in SBML Level 3 are - discussed further below. - - Version differences - ====================================================================== - - SBML Level 3 Version 1 introduces two required attributes on the - Trigger object: 'persistent' and 'initialValue'. The rest of this - introduction describes these two attributes. - - The 'persistent' attribute on Trigger - ...................................................................... - - In the interval between when an Event object triggers (i.e., its - Trigger object expression transitions in value from False to True) - and when its assignments are to be executed, conditions in the model - may change such that the trigger expression transitions back from - True to False. Should the event's assignments still be made if this - happens? Answering this question is the purpose of the 'persistent' - attribute on Trigger. - - If the boolean attribute 'persistent' has a value of True, then once - the event is triggered, all of its assignments are always performed - when the time of execution is reached. The name persistent is meant - to evoke the idea that the trigger expression does not have to be - re-checked after it triggers if 'persistent'=True. Conversely, if - the attribute value is False, then the trigger expression is not - assumed to persist: if the expression transitions in value back to - false at any time between when the event triggered and when it is to - be executed, the event is no longer considered to have triggered and - its assignments are not executed. (If the trigger expression - transitions once more to True after that point, then the event is - triggered, but this then constitutes a whole new event trigger-and- - execute sequence.) - - The 'persistent' attribute can be especially useful when Event - objects contain Delay objects, but it is relevant even in a model - without delays if the model contains two or more events. As - explained in the introduction to this section, the operation of all - events in SBML (delayed or not) is conceptually divided into two - phases, triggering and execution; however, unless events have - priorities associated with them, SBML does not mandate a particular - ordering of event execution in the case of simultaneous events. - Models with multiple events can lead to situations where the - execution of one event affects another event's trigger expression - value. If that other event has 'persistent'=False, and its trigger - expression evaluates to False before it is to be executed, the event - must not be executed after all. - - The 'initialValue' attribute on Trigger - ...................................................................... - - As mentioned above, an event triggers when the mathematical - expression in its Trigger object transitions in value from False to - True. An unanswered question concerns what happens at the start of a - simulation: can event triggers make this transition at t = 0, where - t stands for time? - - In order to determine whether an event may trigger at t = 0, it is - necessary to know what value the Trigger object's 'math' expression - had immediately prior to t = 0. This starting value of the trigger - expression is determined by the value of the boolean attribute - 'initialValue'. A value of True means the trigger expression is - taken to have the value True immediately prior to t = 0. In that - case, the trigger cannot transition in value from False to true at - the moment simulation begins (because it has the value True both - before and after t = 0), and can only make the transition from False - to True sometime after t = 0. (To do that, it would also first have - to transition to False before it could make the transition from - False back to True.) Conversely, if 'initialValue'=False, then the - trigger expression is assumed to start with the value False, and - therefore may trigger at t = 0 if the expression evaluates to True - at that moment. - - See also Event, Delay, EventAssignment. -"; - - -%feature("docstring") Trigger::Trigger " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Trigger(SBMLNamespaces sbmlns) - - Creates a new Trigger using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - ______________________________________________________________________ - Method variant with the following signature: - - Trigger(long level, long version) - - Creates a new Trigger using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Trigger - - Parameter 'version' is a long integer, the SBML Version to assign to - this Trigger - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - ______________________________________________________________________ - Method variant with the following signature: - - Trigger(Trigger orig) - - Copy constructor; creates a copy of this Trigger. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Trigger::accept " - Accepts the given SBMLVisitor for this instance of Trigger. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") Trigger::clone " - Creates and returns a deep copy of this Trigger. - - Returns a (deep) copy of this Trigger. -"; - - -%feature("docstring") Trigger::getMath " - Get the mathematical formula for the trigger and return it as an - AST. - - Returns the math of this Trigger. -"; - - -%feature("docstring") Trigger::getInitialValue " - (SBML Level 3 only) Get the value of the 'initialValue' attribute of - this Trigger. - - Returns the boolean value stored as the 'initialValue' attribute - value in this Trigger. - - Note: - - The attribute 'initialValue' is available in SBML Level 3 Version 1 - Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::getPersistent " - (SBML Level 3 only) Get the value of the 'persistent' attribute of - this Trigger. - - Returns the boolean value stored as the 'persistent' attribute value - in this Trigger. - - Note: - - The attribute 'persistent' is available in SBML Level 3 Version 1 - Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::isSetMath " - Predicate to test whether the math for this trigger is set. - - Returns True if the formula (meaning the 'math' subelement) of this - Trigger is set, False otherwise. -"; - - -%feature("docstring") Trigger::isSetInitialValue " - (SBML Level 3 only) Predicate to test whether the 'initialValue' - attribute for this trigger is set. - - Returns True if the initialValue attribute of this Trigger is set, - False otherwise. - - Note: - - The attribute 'initialValue' is available in SBML Level 3 Version 1 - Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::isSetPersistent " - (SBML Level 3 only) Predicate to test whether the 'persistent' - attribute for this trigger is set. - - Returns True if the persistent attribute of this Trigger is set, - False otherwise. - - Note: - - The attribute 'persistent' is available in SBML Level 3 Version 1 - Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::setMath " - Sets the trigger expression of this Trigger instance to a copy of the - given ASTNode. - - Parameter 'math' is an ASTNode representing a formula tree. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") Trigger::setInitialValue " - (SBML Level 3 only) Sets the 'initialValue' attribute of this Trigger - instance. - - Parameter 'initialValue' is a boolean representing the initialValue - to be set. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attribute 'initialValue' is available in SBML Level 3 Version 1 - Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::setPersistent " - (SBML Level 3 only) Sets the 'persistent' attribute of this Trigger - instance. - - Parameter 'persistent' is a boolean representing the persistent value - to be set. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - Note: - - The attribute 'persistent' is available in SBML Level 3 Version 1 - Core, but is not present in lower Levels of SBML. -"; - - -%feature("docstring") Trigger::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") Trigger::setParentSBMLObject " - Internal implementation method. -"; - - -%feature("docstring") Trigger::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Trigger::getElementName " - Returns the XML element name of this object, which for Trigger, is - always 'trigger'. - - Returns the name of this element, i.e., 'trigger'. -"; - - -%feature("docstring") Trigger::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Trigger::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Trigger::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") Trigger::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") Trigger::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Trigger::hasRequiredElements " - Predicate returning True if all the required elements for this - Trigger object have been set. - - Note: - - The required elements for a Trigger object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Trigger::hasRequiredAttributes " - Predicate returning True if all the required attributes for this - Trigger object have been set. - - Note: - - The required attributes for a Trigger object are: - - * 'persistent' (required in SBML Level 3) - - * 'initialValue' (required in SBML Level 3) - - Returns a boolean value indicating whether all the required - attributes for this object have been defined. -"; - - -%feature("docstring") Trigger::removeFromParentAndDelete " - Finds this Trigger's Event parent and calls unsetTrigger() on it, - indirectly deleting itself. Overridden from the SBase function since - the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Trigger::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") Trigger::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Trigger::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Trigger::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Trigger::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Trigger::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Delay " - @ingroup Core Implementation of SBML's Delay construct for Event. - - An Event object defines when the event can occur, the variables that - are affected by the event, and how the variables are affected. The - effect of the event can optionally be delayed after the occurrence of - the condition which invokes it. An event delay is defined using an - object of class Delay. - - The object class Delay is derived from SBase and adds a single - subelement called 'math'. This subelement is used to hold MathML - content. The mathematical formula represented by 'math' must - evaluate to a numerical value. It is used as the length of time - between when the event is triggered and when the event's assignments - are actually executed. If no delay is present on a given Event, a - time delay of zero is assumed. - - The expression in 'math' must be evaluated at the time the event is - triggered. The expression must always evaluate to a nonnegative - number (otherwise, a nonsensical situation could arise where an - event is defined to execute before it is triggered!). - - The units of the mathematical expression in a Delay - ====================================================================== - - In SBML Level 2 versions before Version 4, the units of the - numerical value computed by the Delay's 'math' expression are - required to be in units of time, or the model is considered to have a - unit consistency error. In Level 2 Version 4 as well as SBML Level - 3 Version 1 Core, this requirement is relaxed; these specifications - only stipulate that the units of the numerical value computed by a - Delay instance's 'math' expression should match the model's units of - time (meaning the definition of the time units in the model). - LibSBML respects these requirements, and depending on whether an - earlier Version of SBML Level 2 is in use, libSBML may or may not - flag unit inconsistencies as errors or merely warnings. - - Note that units are not predefined or assumed for the contents of - 'math' in a Delay object; rather, they must be defined explicitly for - each instance of a Delay object in a model. This is an important - point to bear in mind when literal numbers are used in delay - expressions. For example, the following Event instance would result - in a warning logged by SBMLDocument.checkConsistency() about the - fact that libSBML cannot verify the consistency of the units of the - expression. The reason is that the formula inside the 'math' - element does not have any declared units, whereas what is expected - in this context is units of time: - - <model> - ... - <listOfEvents> - <event useValuesFromTriggerTime=\'true\'> - ... - <delay> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> - <cn> 1 </cn> - </math> - </delay> - ... - </event> - </listOfEvents> - ... - </model> - - The <cn> 1 </cn> within the mathematical formula of the delay above - has no units declared. To make the expression have the needed units - of time, literal numbers should be avoided in favor of defining - Parameter objects for each quantity, and declaring units for the - Parameter values. The following fragment of SBML illustrates this - approach: - - <model> - ... - <listOfParameters> - <parameter id=\'transcriptionDelay\' value=\'10\' units=\'second\'/> - </listOfParameters> - ... - <listOfEvents> - <event useValuesFromTriggerTime=\'true\'> - ... - <delay> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> - <ci> transcriptionDelay </ci> - </math> - </delay> - ... - </event> - </listOfEvents> - ... - </model> - - In SBML Level 3, an alternative approach is available in the form of - the units attribute, which SBML Level 3 allows to appear on MathML - cn elements. The value of this attribute can be used to indicate - the unit of measurement to be associated with the number in the - content of a cn element. The attribute is named units but, because - it appears inside MathML element (which is in the XML namespace for - MathML and not the namespace for SBML), it must always be prefixed - with an XML namespace prefix for the SBML Level 3 Version 1 - namespace. The following is an example of this approach: - - <model timeUnits=\'second\' ...> - ... - <listOfEvents> - <event useValuesFromTriggerTime=\'true\'> - ... - <delay> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\' - xmlns:sbml=\'http://www.sbml.org/sbml/level3/version1/core\'> - <cn sbml:units=\'second\'> 10 </cn> - </math> - </delay> - ... - </event> - </listOfEvents> - ... - </model> -"; - - -%feature("docstring") Delay::Delay " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Delay(SBMLNamespaces sbmlns) - - Creates a new Delay using the given SBMLNamespaces object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Delay object to an Event (e.g., using - Event.setDelay()), the SBML XML namespace of the document overrides - the value used when creating the Delay object via this constructor. - This is necessary to ensure that an SBML document is a consistent - structure. Nevertheless, the ability to supply the values at the - time of creation of a Delay is an important aid to producing valid - SBML. Knowledge of the intented SBML Level and Version determine - whether it is valid to assign a particular value to an attribute, or - whether it is valid to add a particular Delay object to an existing - Event. - - ______________________________________________________________________ - Method variant with the following signature: - - Delay(long level, long version) - - Creates a new Delay using the given SBML 'level' and 'version' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Delay - - Parameter 'version' is a long integer, the SBML Version to assign to - this Delay - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Delay object to an Event (e.g., using - Event.setDelay()), the SBML Level, SBML Version and XML namespace of - the document override the values used when creating the Delay object - via this constructor. This is necessary to ensure that an SBML - document is a consistent structure. Nevertheless, the ability to - supply the values at the time of creation of a Delay is an important - aid to producing valid SBML. Knowledge of the intented SBML Level - and Version determine whether it is valid to assign a particular - value to an attribute, or whether it is valid to add a particular - Delay object to an existing Event. - - ______________________________________________________________________ - Method variant with the following signature: - - Delay(Delay orig) - - Copy constructor; creates a copy of this Delay. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Delay::accept " - Accepts the given SBMLVisitor for this instance of Delay. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") Delay::clone " - Creates and returns a deep copy of this Delay. - - Returns a (deep) copy of this Delay. -"; - - -%feature("docstring") Delay::getMath " - Get the mathematical formula for the delay and return it as an AST. - - Returns the math of this Delay. -"; - - -%feature("docstring") Delay::isSetMath " - Predicate to test whether the formula for this delay is set. - - Returns True if the formula (meaning the math subelement) of this - Delay is set, False otherwise. -"; - - -%feature("docstring") Delay::setMath " - Sets the delay expression of this Delay instance to a copy of the - given ASTNode. - - Parameter 'math' is an ASTNode representing a formula tree. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") Delay::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition that expresses the units of - measurement assumed for the 'math' expression of this Delay. - - Delay elements in SBML express a time delay for an Event. Beginning - with SBML Level 2 Version 2, the units of that time are calculated - based on the mathematical expression and the model quantities - referenced by <ci> elements used within that expression. The - Delay.getDerivedUnitDefinition() method returns what libSBML - computes the units to be, to the extent that libSBML can compute - them. - - (Prior to SBML Level 2 Version 2, there existed an attribute on - Event called 'timeUnits'. This attribute could be used to set the - intended units of the delay expression. For such models, this will - return a UnitDefinition object that corresponds to the declared - 'timeUnits' units.) - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - WARNING: - - Note that it is possible the 'math' expression in the Delay contains - literal numbers or parameters with undeclared units. In those - cases, it is not possible to calculate the units of the overall - expression without making assumptions. LibSBML does not make - assumptions about the units, and Delay.getDerivedUnitDefinition() - only returns the units as far as it is able to determine them. For - example, in an expression X + Y, if X has unambiguously-defined - units and Y does not, it will return the units of X. When using - this method, <strong>it is critical that callers also invoke the - method</strong> Delay.containsUndeclaredUnits() <strong>to determine - whether this situation holds</strong>. Callers should take suitable - action in those situations. - - Returns a UnitDefinition that expresses the units of the math - expression of this Delay, or None if one cannot be constructed. - - See also containsUndeclaredUnits(). -"; - - -%feature("docstring") Delay::containsUndeclaredUnits " - Predicate returning True if the 'math' expression in this Delay - instance contains parameters with undeclared units or literal - numbers. - - Delay elements in SBML express a time delay for an Event. Beginning - with SBML Level 2 Version 2, the units of that time are calculated - based on the mathematical expression and the model quantities - referenced by <ci> elements used within that expression. The - Delay.getDerivedUnitDefinition() method returns what libSBML - computes the units to be, to the extent that libSBML can compute - them. However, if the expression contains literal numbers or - parameters with undeclared units, libSBML may not be able to compute - the full units of the expression and will only return what it can - compute. Callers should always use Delay.containsUndeclaredUnits() - when using Delay.getDerivedUnitDefinition() to decide whether the - returned units may be incomplete. - - Returns True if the math expression of this Delay includes - numbers/parameters with undeclared units, False otherwise. - - Note: - - A return value of True indicates that the UnitDefinition returned by - Delay.getDerivedUnitDefinition() may not accurately represent the - units of the expression. - - See also getDerivedUnitDefinition(). -"; - - -%feature("docstring") Delay::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Delay::getElementName " - Returns the XML element name of this object, which for Delay, is - always 'delay'. - - Returns the name of this element, i.e., 'delay'. - - See also getTypeCode(). -"; - - -%feature("docstring") Delay::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") Delay::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Delay::hasRequiredElements " - Predicate returning True if all the required elements for this Delay - object have been set. - - Note: - - The required elements for a Delay object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Delay::removeFromParentAndDelete " - Finds this Delay's Event parent and calls unsetDelay() on it, - indirectly deleting itself. - - Overridden from the SBase function since the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Delay::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Delay::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Delay::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") Delay::getInternalId " - Internal implementation method. -"; - - -%feature("docstring") Delay::setInternalId " - Internal implementation method. -"; - - -%feature("docstring") Delay::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") Delay::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Delay::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Delay::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") Delay::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Delay::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") Priority " - @ingroup Core Implementation of SBML Level 3's Priority construct - for Event. - - The Priority object class (which was introduced in SBML Level 3 - Version 1), like Delay, is derived from SBase and contains a MathML - formula stored in the element 'math'. This formula is used to - compute a dimensionless numerical value that influences the order in - which a simulator is to perform the assignments of two or more - events that happen to be executed simultaneously. The formula may - evaluate to any double value (and thus may be a positive or negative - number, or zero), with positive numbers taken to signifying a higher - priority than zero or negative numbers. If no Priority object is - present on a given Event object, no priority is defined for that - event. - - The interpretation of priorities on events in a model - ====================================================================== - - For the purposes of SBML, simultaneous event execution is defined as - the situation in which multiple events have identical times of - execution. The time of execution is calculated as the sum of the - time at which a given event's Trigger is triggered plus its Delay - duration, if any. Here, identical times means mathematically equal - instants in time. (In practice, simulation software adhering to - this specification may have to rely on numerical equality instead of - strict mathematical equality; robust models will ensure that this - difference will not cause significant discrepancies from expected - behavior.) - - If no Priority subobjects are defined for two or more Event objects, - then those events are still executed simultaneously but their order - of execution is undefined by the SBML Level 3 Version 1 - specification. A software implementation may choose to execute such - simultaneous events in any order, as long as each event is executed - only once and the requirements of checking the 'persistent' attribute - (and acting accordingly) are satisfied. - - If Priority subobjects are defined for two or more simultaneously- - triggered events, the order in which those particular events must be - executed is dictated by their Priority objects, as follows. If the - values calculated using the two Priority objects' 'math' expressions - differ, then the event having the higher priority value must be - executed before the event with the lower value. If, instead, the - two priority values are mathematically equal, then the two events - must be triggered in a random order. It is important to note that a - random order is not the same as an undefined order: given multiple - runs of the same model with identical conditions, an undefined - ordering would permit a system to execute the events in (for - example) the same order every time (according to whatever scheme may - have been implemented by the system), whereas the explicit - requirement for random ordering means that the order of execution in - different simulation runs depends on random chance. In other words, - given two events A and B, a randomly-determined order must lead to - an equal chance of executing A first or B first, every time those - two events are executed simultaneously. - - A model may contain a mixture of events, some of which have Priority - subobjects and some do not. Should a combination of simultaneous - events arise in which some events have priorities defined and others - do not, the set of events with defined priorities must trigger in - the order determined by their Priority objects, and the set of - events without Priority objects must be executed in an undefined - order with respect to each other and with respect to the events with - Priority subobjects. (Note that undefined order does not - necessarily mean random order, although a random ordering would be a - valid implementation of this requirement.) - - The following example may help further clarify these points. Suppose - a model contains four events that should be executed simultaneously, - with two of the events having Priority objects with the same value - and the other two events having Priority objects with the same, but - different, value. The two events with the higher priorities must be - executed first, in a random order with respect to each other, and - the remaining two events must be executed after them, again in a - random order, for a total of four possible and equally-likely event - executions: A-B-C-D, A-B-D-C, B-A-C-D, and B-A-D-C. If, instead, - the model contains four events all having the same Priority values, - there are 4! or 24 possible orderings, each of which must be equally - likely to be chosen. Finally, if none of the four events has a - Priority subobject defined, or even if exactly one of the four - events has a defined Priority, there are again 24 possible - orderings, but the likelihood of choosing any particular ordering is - undefined; the simulator can choose between events as it wishes. - (The SBML specification only defines the effects of priorities on - Event objects with respect to other Event objects with priorities. - Putting a priority on a single Event object in a model does not - cause it to fall within that scope.) - - Evaluation of Priority expressions - ====================================================================== - - An event's Priority object 'math' expression must be evaluated at - the time the Event is to be executed. During a simulation, all - simultaneous events have their Priority values calculated, and the - event with the highest priority is selected for next execution. - Note that it is possible for the execution of one Event object to - cause the Priority value of another simultaneously-executing Event - object to change (as well as to trigger other events, as already - noted). Thus, after executing one event, and checking whether any - other events in the model have been triggered, all remaining - simultaneous events that either (i) have Trigger objects with - attributes 'persistent'=False or (ii) have Trigger expressions that - did not transition from True to False, must have their Priority - expression reevaluated. The highest-priority remaining event must - then be selected for execution next. - - Units of Priority object's mathematical expressions - ====================================================================== - - The unit associated with the value of a Priority object's 'math' - expression should be dimensionless. This is because the priority - expression only serves to provide a relative ordering between - different events, and only has meaning with respect to other - Priority object expressions. The value of Priority objects is not - comparable to any other kind of object in an SBML model. - - Note: - - The Priority construct exists only in SBML Level 3; it cannot be - used in SBML Level 2 or Level 1 models. - - See also Event, Delay, EventAssignment. -"; - - -%feature("docstring") Priority::Priority " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Priority(SBMLNamespaces sbmlns) - - Creates a new Priority object using the given SBMLNamespaces object - 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Priority object to an Event (e.g., using - Event.setPriority()), the SBML XML namespace of the document - overrides the value used when creating the Priority object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a Priority is an important aid to - producing valid SBML. Knowledge of the intented SBML Level and - Version determine whether it is valid to assign a particular value to - an attribute, or whether it is valid to add a particular Priority - object to an existing Event. - - Note: - - The Priority construct exists only in SBML Level 3; it cannot be - used in SBML Level 2 or Level 1 models. - - ______________________________________________________________________ - Method variant with the following signature: - - Priority(long level, long version) - - Creates a new Priority object using the given SBML 'level' and - 'version' values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - Priority - - Parameter 'version' is a long integer, the SBML Version to assign to - this Priority - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a Priority object to an Event (e.g., using - Event.setPriority()), the SBML Level, SBML Version and XML namespace - of the document override the values used when creating the Priority - object via this constructor. This is necessary to ensure that an - SBML document is a consistent structure. Nevertheless, the ability - to supply the values at the time of creation of a Priority is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add a - particular Priority object to an existing Event. - - Note: - - The Priority construct exists only in SBML Level 3; it cannot be - used in SBML Level 2 or Level 1 models. - - ______________________________________________________________________ - Method variant with the following signature: - - Priority(Priority orig) - - Copy constructor; creates a copy of this Priority. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Priority::accept " - Accepts the given SBMLVisitor for this instance of Priority. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") Priority::clone " - Creates and returns a deep copy of this Priority. - - Returns a (deep) copy of this Priority. -"; - - -%feature("docstring") Priority::getMath " - Get the mathematical formula for the priority and return it as an - AST. - - Returns the math of this Priority. -"; - - -%feature("docstring") Priority::isSetMath " - Predicate to test whether the formula for this delay is set. - - Returns True if the formula (meaning the math subelement) of this - Priority is set, False otherwise. -"; - - -%feature("docstring") Priority::setMath " - Sets the math expression of this Priority instance to a copy of the - given ASTNode. - - Parameter 'math' is an ASTNode representing a formula tree. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") Priority::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") Priority::getElementName " - Returns the XML element name of this object, which for Priority, is - always 'priority'. - - Returns the name of this element, i.e., 'priority'. - - See also getTypeCode(). -"; - - -%feature("docstring") Priority::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") Priority::writeElements " - Internal implementation method. -"; - - -%feature("docstring") Priority::hasRequiredElements " - Predicate returning True if all the required elements for this - Priority object have been set. - - Note: - - The required elements for a Priority object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") Priority::removeFromParentAndDelete " - Finds this Priority's Event parent and calls unsetPriority() on it, - indirectly deleting itself. Overridden from the SBase function since - the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") Priority::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Priority::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") Priority::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") Priority::getInternalId " - Internal implementation method. -"; - - -%feature("docstring") Priority::setInternalId " - Internal implementation method. -"; - - -%feature("docstring") Priority::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") Priority::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") Priority::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") Priority::readL3Attributes " - Internal implementation method. -"; - - -%feature("docstring") Priority::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBO " - @ingroup Core Methods for interacting with Systems Biology Ontology - terms. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The values of 'id' attributes on SBML components allow the components - to be cross-referenced within a model. The values of 'name' - attributes on SBML components provide the opportunity to assign them - meaningful labels suitable for display to humans. The specific - identifiers and labels used in a model necessarily must be - unrestricted by SBML, so that software and users are free to pick - whatever they need. However, this freedom makes it more difficult - for software tools to determine, without additional human - intervention, the semantics of models more precisely than the - semantics provided by the SBML object classes defined in other - sections of this document. For example, there is nothing inherent in - a parameter with identifier k that would indicate to a software - tool it is a first-order rate constant (if that's what k happened to - be in some given model). However, one may need to convert a model - between different representations (e.g., Henri-Michaelis-Menten - versus elementary steps), or to use it with different modeling - approaches (discrete or continuous). One may also need to relate - the model components with other description formats such as SBGN - (http://www.sbgn.org/) using deeper semantics. Although an advanced - software tool might be able to deduce the semantics of some model - components through detailed analysis of the kinetic rate expressions - and other parts of the model, this quickly becomes infeasible for - any but the simplest of models. - - An approach to solving this problem is to associate model components - with terms from carefully curated controlled vocabularies (CVs). - This is the purpose of the optional 'sboTerm' attribute provided on - the SBML class SBase. The 'sboTerm' attribute always refers to - terms belonging to the Systems Biology Ontology (SBO). - - Use of SBO - ====================================================================== - - Labeling model components with terms from shared controlled - vocabularies allows a software tool to identify each component using - identifiers that are not tool-specific. An example of where this is - useful is the desire by many software developers to provide users - with meaningful names for reaction rate equations. Software tools - with editing interfaces frequently provide these names in menus or - lists of choices for users. However, without a standardized set of - names or identifiers shared between developers, a given software - package cannot reliably interpret the names or identifiers of - reactions used in models written by other tools. - - The first solution that might come to mind is to stipulate that - certain common reactions always have the same name (e.g., - 'Michaelis-Menten'), but this is simply impossible to do: not only - do humans often disagree on the names themselves, but it would not - allow for correction of errors or updates to the list of predefined - names except by issuing new releases of the SBML specification -- to - say nothing of many other limitations with this approach. Moreover, - the parameters and variables that appear in rate expressions also - need to be identified in a way that software tools can interpret - mechanically, implying that the names of these entities would also - need to be regulated. - - The Systems Biology Ontology (SBO) provides terms for identifying - most elements of SBML. The relationship implied by an 'sboTerm' on - an SBML model component is is-a between the characteristic of the - component meant to be described by SBO on this element and the SBO - term identified by the value of the 'sboTerm'. By adding SBO term - references on the components of a model, a software tool can provide - additional details using independent, shared vocabularies that can - enable other software tools to recognize precisely what the - component is meant to be. Those tools can then act on that - information. For example, if the SBO identifier 'SBO:0000049' is - assigned to the concept of 'first-order irreversible mass-action - kinetics, continuous framework', and a given KineticLaw object in a - model has an 'sboTerm' attribute with this value, then regardless of - the identifier and name given to the reaction itself, a software - tool could use this to inform users that the reaction is a first- - order irreversible mass-action reaction. This kind of reverse - engineering of the meaning of reactions in a model would be - difficult to do otherwise, especially for more complex reaction - types. - - The presence of SBO labels on Compartment, Species, and Reaction - objects in SBML can help map those entities to equivalent concepts in - other standards, such as (but not limited to) BioPAX - (http://www.biopax.org/), PSI-MI (http://www.psidev.info), or the - Systems Biology Graphical Notation (SBGN, http://www.sbgn.org/). - Such mappings can be used in conversion procedures, or to build - interfaces, with SBO becoming a kind of 'glue' between standards of - representation. - - The presence of the label on a kinetic expression can also allow - software tools to make more intelligent decisions about reaction rate - expressions. For example, an application could recognize certain - types of reaction formulas as being ones it knows how to solve with - optimized procedures. The application could then use internal, - optimized code implementing the rate formula indexed by identifiers - such as 'SBO:0000049' appearing in SBML models. - - Finally, SBO labels may be very valuable when it comes to model - integration, by helping identify interfaces, convert mathematical - expressions and parameters etc. - - Although the use of SBO can be beneficial, it is critical to keep in - mind that the presence of an 'sboTerm' value on an object must not - change the fundamental mathematical meaning of the model. An SBML - model must be defined such that it stands on its own and does not - depend on additional information added by SBO terms for a correct - mathematical interpretation. SBO term definitions will not imply - any alternative mathematical semantics for any SBML object labeled - with that term. Two important reasons motivate this principle. - First, it would be too limiting to require all software tools to be - able to understand the SBO vocabularies in addition to understanding - SBML. Supporting SBO is not only additional work for the software - developer; for some kinds of applications, it may not make sense. - If SBO terms on a model are optional, it follows that the SBML model - must remain unambiguous and fully interpretable without them, - because an application reading the model may ignore the terms. - Second, we believe allowing the use of 'sboTerm' to alter the - mathematical meaning of a model would allow too much leeway to - shoehorn inconsistent concepts into SBML objects, ultimately - reducing the interoperability of the models. - - Relationships between SBO and SBML - ====================================================================== - - The goal of SBO labeling for SBML is to clarify to the fullest extent - possible the nature of each element in a model. The approach taken - in SBO begins with a hierarchically-structured set of controlled - vocabularies with six main divisions: (1) entity, (2) participant - role, (3) quantitative parameter, (4) modeling framework, (5) - mathematical expression, and (6) interaction. The web site for SBO - (http://biomodels.net) should be consulted for the current version - of the ontology. - - The Systems Biology Ontology (SBO) is not part of SBML; it is being - developed separately, to allow the modeling community to evolve the - ontology independently of SBML. However, the terms in the ontology - are being designed keeping SBML components in mind, and are - classified into subsets that can be directly related with SBML - components such as reaction rate expressions, parameters, and - others. The use of 'sboTerm' attributes is optional, and the - presence of 'sboTerm' on an element does not change the way the - model is interpreted. Annotating SBML elements with SBO terms adds - additional semantic information that may be used to convert the - model into another model, or another format. Although SBO support - provides an important source of information to understand the - meaning of a model, software does not need to support 'sboTerm' to - be considered SBML-compliant. -"; - - -%feature("docstring") SBO::readTerm " - Internal implementation method. -"; - - -%feature("docstring") SBO::writeTerm " - Internal implementation method. -"; - - -%feature("docstring") SBO::isQuantitativeParameter " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'quantiative parameter', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isQuantitativeParameter(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isParticipantRole " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'participant role', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isParticipantRole(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isModellingFramework " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'modeling framework', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isModellingFramework(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isMathematicalExpression " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'mathematical expression', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isMathematicalExpression(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isKineticConstant " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'kinetic constant', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isKineticConstant(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isReactant " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'reactant', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isReactant(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isProduct " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'product', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isProduct(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isModifier " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'modifier', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isModifier(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isRateLaw " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'rate law', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isRateLaw(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isEvent " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'event', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isEvent(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isPhysicalParticipant " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'physical participant, False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isPhysicalParticipant(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isParticipant " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'participant', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isParticipant(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isInteraction " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'interaction', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isInteraction(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isEntity " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'entity', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isEntity(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isFunctionalEntity " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'functional entity', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isFunctionalEntity(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isMaterialEntity " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'material entity', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isMaterialEntity(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isConservationLaw " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'conservation law', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isConservationLaw(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isSteadyStateExpression " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'steady state expression', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isSteadyStateExpression(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isFunctionalCompartment " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'functional compartment', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isFunctionalCompartment(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isContinuousFramework " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'continuous framework', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isContinuousFramework(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isDiscreteFramework " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'discrete framework', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isDiscreteFramework(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isLogicalFramework " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'logical framework', False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isLogicalFramework(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isMetadataRepresentation " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'metadata representation', False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isMetadataRepresentation(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isOccurringEntityRepresentation " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'occurring entity representation', - False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isOccurringEntityRepresentation(). They - are functionally identical. @~ -"; - - -%feature("docstring") SBO::isPhysicalEntityRepresentation " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'physical entity representation', - False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isPhysicalEntityRepresentation(). They - are functionally identical. @~ -"; - - -%feature("docstring") SBO::isSystemsDescriptionParameter " - Returns True if the given term identifier comes from the stated - branch of SBO. - - Returns True if 'term' is-a SBO 'systems description parameter', - False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isSystemsDescriptionParameter(). They are - functionally identical. @~ -"; - - -%feature("docstring") SBO::isObselete " - Predicate for checking whether the given term is obsolete. - - Returns True if 'term' is-a SBO 'obsolete' term, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_isObselete(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::intToString " - Returns the integer as a correctly formatted SBO identifier string. - - Returns the given integer sboTerm as a zero-padded seven digit - string. - - Note: - - If the sboTerm is not in the correct range (0000000-9999999), an - empty string is returned. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_intToString(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::stringToInt " - Returns the string as a correctly formatted SBO integer portion. - - Returns the given string sboTerm as an integer. If the sboTerm is - not in the correct format (a zero-padded, seven digit string), -1 is - returned. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_stringToInt(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::checkTerm " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - checkTerm(string sboTerm) - - Checks the format of the given SBO identifier string. - - Returns True if sboTerm is in the correct format (a zero-padded, - seven digit string), False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_checkTerm(). They are functionally - identical. @~ - - ______________________________________________________________________ - Method variant with the following signature: - - checkTerm(int sboTerm) - - Checks the format of the given SBO identifier, given in the form of - the integer portion alone. - - Returns True if sboTerm is in the range (0000000-9999999), False - otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBO), and the other will be a standalone top-level - function with the name SBO_checkTerm(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBO::isChildOf " - Internal implementation method. -"; - - -%feature("docstring") SBO::populateSBOTree " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker " - @ingroup Core Methods for checking syntax of SBML identifiers and - other strings. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - This utility class provides static methods for checking the syntax of - identifiers and other text used in an SBML model. The methods allow - callers to verify that strings such as SBML identifiers and XHTML - notes text conform to the SBML specifications. -"; - - -%feature("docstring") SyntaxChecker::isValidSBMLSId " - Returns true True or False depending on whether the argument string - conforms to the syntax of SBML identifiers. - - In SBML, identifiers that are the values of 'id' attributes on - objects must conform to a data type called SId in the SBML - specifications. LibSBML does not provide an explicit SId data type; - it uses ordinary character strings, which is easier for applications - to support. LibSBML does, however, test for identifier validity at - various times, such as when reading in models from files and data - streams. - - This method provides programs with the ability to test explicitly - that the identifier strings they create conform to the SBML - identifier syntax. - - Parameter 'sid' is string to be checked for conformance to SBML - identifier syntax. - - Returns True if the string conforms to type SBML data type SId, - False otherwise. - - Note: - - The following is a summary of the definition of the SBML identifier - type SId, which defines the permitted syntax of identifiers. We - express the syntax using an extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter - | digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML identifiers is determined by an exact character - sequence match; i.e., comparisons must be performed in a case- - sensitive manner. In addition, there are a few conditions for the - uniqueness of identifiers in an SBML model. Please consult the SBML - specifications for the exact formulations. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SyntaxChecker), and the other will be a standalone - top-level function with the name SyntaxChecker_isValidSBMLSId(). - They are functionally identical. @~ - - @see SyntaxChecker.isValidUnitSId() @~ @see - SyntaxChecker.isValidXMLID() @~ -"; - - -%feature("docstring") SyntaxChecker::isValidXMLID " - Returns True or False depending on whether the argument string - conforms to the XML data type ID. - - In SBML, identifiers that are the values of 'metaid' attributes on - objects must conform to the XML ID data type. LibSBML does not - provide an explicit XML ID data type; it uses ordinary character - strings, which is easier for applications to support. LibSBML does, - however, test for identifier validity at various times, such as when - reading in models from files and data streams. - - This method provides programs with the ability to test explicitly - that the identifier strings they create conform to the SBML - identifier syntax. - - Parameter 'id' is string to be checked for conformance to the syntax - of XML ID. - - Returns True if the string is a syntactically-valid value for the - XML type ID, False otherwise. - - Note: - - The following is a summary of the definition of the XML 1.0 data type - ID. We express the syntax using an extended form of BNF notation: - - NCNameChar ::= letter | digit | '.' | '-' | '_' | ':' | CombiningChar - | Extender ID ::= ( letter | '_' | ':' ) NCNameChar* - - The characters ( and ) are used for grouping, the character * means - \"zero or more times\", and the character | indicates logical \"or\". - The production letter consists of the basic upper and lower case - alphabetic characters of the Latin alphabet along with a large - number of related characters defined by Unicode 2.0; similarly, the - production digit consists of the numerals 0..9 along with related - Unicode 2.0 characters. The CombiningChar production is a list of - characters that add such things as accents to the preceding - character. (For example, the Unicode character \#x030A when combined - with a produces \aa.) The Extender production is a list of - characters that extend the shape of the preceding character. Please - consult the XML 1.0 specification for the complete definitions of - letter, digit, CombiningChar, and Extender. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SyntaxChecker), and the other will be a standalone - top-level function with the name SyntaxChecker_isValidXMLID(). They - are functionally identical. @~ - - @see SyntaxChecker.isValidSBMLSId() @~ @see - SyntaxChecker.isValidUnitSId() @~ -"; - - -%feature("docstring") SyntaxChecker::isValidXMLanyURI " - Returns True or False depending on whether the Parameter 'uri' is - argument string conforms to the XML data type anyURI. - - Type anyURI is defined by XML Schema 1.0. It is a character string - data type whose values are interpretable as URIs (Universal Resource - Identifiers) as described by the W3C document RFC 3986. LibSBML - does not provide an explicit XML anyURI data type; it uses ordinary - character strings, which is easier for applications to support. - LibSBML does, however, test for anyURI validity at various times, - such as when reading in models from files and data streams. - - This method provides programs with the ability to test explicitly - that the strings they create conform to the XML anyURI syntax. - - Parameter 'uri' is string to be checked for conformance to the syntax - of anyURI. - - Returns True if the string is a syntactically-valid value for the - XML type anyURI, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SyntaxChecker), and the other will be a standalone - top-level function with the name SyntaxChecker_isValidXMLanyURI(). - They are functionally identical. @~ -"; - - -%feature("docstring") SyntaxChecker::isValidUnitSId " - Returns True or False depending on whether the argument string - conforms to the syntax of SBML unit identifiers. - - In SBML, the identifiers of units (of both the predefined units and - user-defined units) must conform to a data type called UnitSId in - the SBML specifications. LibSBML does not provide an explicit - UnitSId data type; it uses ordinary character strings, which is - easier for applications to support. LibSBML does, however, test for - identifier validity at various times, such as when reading in models - from files and data streams. - - This method provides programs with the ability to test explicitly - that the identifier strings they create conform to the SBML - identifier syntax. - - Parameter 'units' is string to be checked for conformance to SBML - unit identifier syntax. - - Returns True if the string conforms to type SBML data type UnitSId, - False otherwise. - - Note: - - The following is a summary of the definition of the SBML identifier - type UnitSId, which defines the permitted syntax of identifiers. We - express the syntax using an extended form of BNF notation: - - letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter | - digit | '_' SId ::= ( letter | '_' ) idChar* - - The characters ( and ) are used for grouping, the character * \"zero - or more times\", and the character | indicates logical \"or\". The - equality of SBML unit identifiers is determined by an exact - character sequence match; i.e., comparisons must be performed in a - case-sensitive manner. In addition, there are a few conditions for - the uniqueness of unit identifiers in an SBML model. Please consult - the SBML specifications for the exact formulations. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SyntaxChecker), and the other will be a standalone - top-level function with the name SyntaxChecker_isValidUnitSId(). - They are functionally identical. @~ - - @see SyntaxChecker.isValidSBMLSId() @~ @see - SyntaxChecker.isValidXMLID() @~ -"; - - -%feature("docstring") SyntaxChecker::hasExpectedXHTMLSyntax " - Returns True or False depending on whether the given XMLNode object - contains valid XHTML content. - - In SBML, the content of the 'notes' subelement available on SBase, as - well as the 'message' subelement available on Constraint, must - conform to XHTML 1.0 (which is simply an XML-ized version of HTML). - However, the content cannot be entirely free-form; it must satisfy - certain requirements defined in the SBML specifications for - specific SBML Levels. This method implements a verification process - that lets callers check whether the content of a given XMLNode - object conforms to the SBML requirements for 'notes' and 'message' - structure. - - An aspect of XHTML validity is that the content is declared to be in - the XML namespace for XHTML 1.0. There is more than one way in - which this can be done in XML. In particular, a model might not - contain the declaration within the 'notes' or 'message' subelement - itself, but might instead place the declaration on an enclosing - element and use an XML namespace prefix within the 'notes' element to - refer to it. In other words, the following is valid: - - <sbml xmlns=\'http://www.sbml.org/sbml/level2/version3\' level=\'2\' version=\'3\' - xmlns:xhtml=\'http://www.w3.org/1999/xhtml\'> - <model> - <notes> - <xhtml:body> - <xhtml:center><xhtml:h2>A Simple Mitotic Oscillator</xhtml:h2></xhtml:center> - <xhtml:p>A minimal cascade model for the mitotic oscillator.</xhtml:p> - </xhtml:body> - </notes> - ... rest of model ... - </sbml> - Contrast the above with the following, self-contained - version, which places the XML namespace declaration within the - <notes> element itself: - - <sbml xmlns=\'http://www.sbml.org/sbml/level2/version3\' level=\'2\' version=\'3\'> - <model> - <notes> - <html xmlns=\'http://www.w3.org/1999/xhtml\'> - <head> - <title/> - </head> - <body> - <center><h2>A Simple Mitotic Oscillator</h2></center> - <p>A minimal cascade model for the mitotic oscillator.</p> - </body> - </html> - </notes> - ... rest of model ... - </sbml> - - Both of the above are valid XML. The purpose of the 'sbmlns' - argument to this method is to allow callers to check the validity of - 'notes' and 'message' subelements whose XML namespace declarations - have been put elsewhere in the manner illustrated above. Callers can - can pass in the SBMLNamespaces object of a higher-level model - component if the XMLNode object does not itself have the XML - namespace declaration for XHTML 1.0. - - Parameter 'xhtml' is the XMLNode to be checked for conformance. - Parameter 'sbmlns' is the SBMLNamespaces associated with the object. - - Returns True if the XMLNode content conforms, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SyntaxChecker), and the other will be a standalone - top-level function with the name - SyntaxChecker_hasExpectedXHTMLSyntax(). They are functionally - identical. @~ - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") SyntaxChecker::isValidInternalSId " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isValidInternalUnitSId " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isAllowedElement " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::hasDeclaredNS " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isCorrectHTMLNode " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isUnicodeLetter " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isUnicodeDigit " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isCombiningChar " - Internal implementation method. -"; - - -%feature("docstring") SyntaxChecker::isExtender " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath " - @ingroup Core Implementation of SBML Level 2's StoichiometryMath - construct. - - Stoichiometries in SBML Level 2 - ====================================================================== - - In SBML Level 2, product and reactant stoichiometries can be - specified using either the 'stoichiometry' attribute or a - 'stoichiometryMath' element in a SpeciesReference object. The - 'stoichiometry' attribute is of type double and should contain - values greater than zero (0). The 'stoichiometryMath' element is - implemented as an element containing a MathML expression. These two - are mutually exclusive; only one of 'stoichiometry' or - 'stoichiometryMath' should be defined in a given SpeciesReference - instance. When neither the attribute nor the element is present, - the value of 'stoichiometry' in the enclosing SpeciesReference - instance defaults to 1. - - For maximum interoperability, SpeciesReference's 'stoichiometry' - attribute should be used in preference to 'stoichiometryMath' when a - species' stoichiometry is a simple scalar number (integer or - decimal). When the stoichiometry is a rational number, or when it is - a more complicated formula, 'stoichiometryMath' must be used. The - MathML expression in 'stoichiometryMath' may also refer to - identifiers of entities in a model (except reaction identifiers). - However, the only species identifiers that can be used in - 'stoichiometryMath' are those referenced in the enclosing Reaction's - list of reactants, products and modifiers. - - The 'stoichiometry' attribute and the 'stoichiometryMath' element, - when either is used, is each interpreted as a factor applied to the - reaction rate to produce the rate of change of the species - identified by the 'species' attribute in the enclosing - SpeciesReference. This is the normal interpretation of a - stoichiometry, but in SBML, one additional consideration has to be - taken into account. The reaction rate, which is the result of the - KineticLaw's 'math' element, is always in the model's substance per - time units. However, the rate of change of the species will involve - the species' substance units (i.e., the units identified by the - Species object's 'substanceUnits' attribute), and these units may be - different from the model's default substance units. If the units - are different, the stoichiometry must incorporate a conversion - factor for converting the model's substance units to the species' - substance units. The conversion factor is assumed to be included in - the scalar value of the 'stoichiometry' attribute if 'stoichiometry' - is used. If instead 'stoichiometryMath' is used, then the product - of the model's 'substance' units times the 'stoichiometryMath' units - must match the substance units of the species. Note that in either - case, if the species' units and the model's default substance units - are the same, the stoichiometry ends up being a dimensionless number - and equivalent to the standard chemical stoichiometry found in - textbooks. Examples and more explanations of this are given in the - SBML specification. - - The following is a simple example of a species reference for species - 'X0', with stoichiometry 2, in a list of reactants within a reaction - having the identifier 'J1': - - <model> - ... - <listOfReactions> - <reaction id=\'J1\'> - <listOfReactants> - <speciesReference species=\'X0\' stoichiometry=\'2\'> - </listOfReactants> - ... - </reaction> - ... - </listOfReactions> - ... - </model> - - The following is a more complex example of a species reference for - species 'X0', with a stoichiometry formula consisting of a rational - number: - - <model> - ... - <listOfReactions> - <reaction id=\'J1\'> - <listOfReactants> - <speciesReference species=\'X0\'> - <stoichiometryMath> - <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> - <cn type=\'rational\'> 3 <sep/> 2 </cn> - </math> - </stoichiometryMath> - </speciesReference> - </listOfReactants> - ... - </reaction> - ... - </listOfReactions> - ... - </model> - - Additional discussions of stoichiometries and implications for - species and reactions are included in the documentation of - SpeciesReference class. - - Stoichiometries in SBML Level 3 - ====================================================================== - - The StoichiometryMath construct is not defined in SBML Level 3 - Version 1 Core. Instead, Level 3 defines the identifier of - SpeciesReference objects as a stand-in for the stoichiometry of the - reactant or product being referenced, and allows that identifier to - be used elsewhere in SBML models, including (for example) - InitialAssignment objects. This makes it possible to achieve the - same effect as StoichiometryMath, but with other SBML objects. For - instance, to produce a stoichiometry value that is a rational - number, a model can use InitialAssignment to assign the identifier - of a SpeciesReference object to a MathML expression evaluating to a - rational number. This is analogous to the same way that, in Level - 2, the model would use StoichiometryMath with a MathML expression - evaluating to a rational number. - - In SBML Level 2, the stoichiometry of a reactant or product is a - combination of both a biochemical stoichiometry (meaning, the - standard stoichiometry of a species in a reaction) and any necessary - unit conversion factors. The introduction of an explicit attribute on - the Species object for a conversion factor allows Level 3 to avoid - having to overload the meaning of stoichiometry. In Level 3, the - stoichiometry given by a SpeciesReference object in a reaction is a - 'proper' biochemical stoichiometry, meaning a dimensionless number - free of unit conversions. - - See also SpeciesReference, Reaction. -"; - - -%feature("docstring") StoichiometryMath::StoichiometryMath " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - StoichiometryMath(SBMLNamespaces sbmlns) - - Creates a new StoichiometryMath object using the given SBMLNamespaces - object 'sbmlns'. - - The SBMLNamespaces object encapsulates SBML Level/Version/namespaces - information. It is used to communicate the SBML Level, Version, and - (in Level 3) packages used in addition to SBML Level 3 Core. A - common approach to using this class constructor is to create an - SBMLNamespaces object somewhere in a program, once, then pass it to - object constructors such as this one when needed. - - Parameter 'sbmlns' is an SBMLNamespaces object. - - The StoichiometryMath construct exists only in SBML Level 2. It is - an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a StoichiometryMath object to an SBMLDocument - (e.g., using SpeciesReference.createStoichiometryMath()), the SBML - XML namespace of the document overrides the value used when creating - the StoichiometryMath object via this constructor. This is - necessary to ensure that an SBML document is a consistent structure. - Nevertheless, the ability to supply the values at the time of - creation of a StoichiometryMath is an important aid to producing - valid SBML. Knowledge of the intented SBML Level and Version - determine whether it is valid to assign a particular value to an - attribute, or whether it is valid to add an object to an existing - SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - StoichiometryMath(long level, long version) - - Creates a new StoichiometryMath object using the given SBML 'level' - values. - - Parameter 'level' is a long integer, the SBML Level to assign to this - StoichiometryMath - - Parameter 'version' is a long integer, the SBML Version to assign to - this StoichiometryMath - - The StoichiometryMath construct exists only in SBML Level 2. It is - an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. - - Throws ValueError: @~ Thrown if the given 'level' and 'version' - combination, or this kind of SBML object, are either invalid or - mismatched with respect to the parent SBMLDocument object. - - Note: - - Upon the addition of a StoichiometryMath object to an SBMLDocument - (e.g., using SpeciesReference.createStoichiometryMath()), the SBML - Level, SBML Version and XML namespace of the document override the - values used when creating the StoichiometryMath object via this - constructor. This is necessary to ensure that an SBML document is a - consistent structure. Nevertheless, the ability to supply the - values at the time of creation of a StoichiometryMath is an - important aid to producing valid SBML. Knowledge of the intented - SBML Level and Version determine whether it is valid to assign a - particular value to an attribute, or whether it is valid to add an - object to an existing SBMLDocument. - - ______________________________________________________________________ - Method variant with the following signature: - - StoichiometryMath(StoichiometryMath orig) - - Copy constructor; creates a copy of this StoichiometryMath. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") StoichiometryMath::accept " - Accepts the given SBMLVisitor for this instance of StoichiometryMath. - - Parameter 'v' is the SBMLVisitor instance to be used. - - Returns the result of calling v.visit(). -"; - - -%feature("docstring") StoichiometryMath::clone " - Creates and returns a deep copy of this StoichiometryMath object. - - Returns a (deep) copy of this StoichiometryMath. -"; - - -%feature("docstring") StoichiometryMath::getMath " - Retrieves the mathematical formula within this StoichiometryMath and - return it as an AST. - - Returns the math of this StoichiometryMath. - - The StoichiometryMath construct exists only in SBML Level 2. It is - an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. -"; - - -%feature("docstring") StoichiometryMath::isSetMath " - Predicate to test whether the math for this StoichiometryMath object - is set. - - Returns True if the formula (meaning the math subelement) of this - StoichiometryMath is set, False otherwise. - - The StoichiometryMath construct exists only in SBML Level 2. It is - an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. -"; - - -%feature("docstring") StoichiometryMath::setMath " - Sets the 'math' expression of this StoichiometryMath instance to a - copy of the given ASTNode. - - Parameter 'math' is an ASTNode representing a formula tree. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - The StoichiometryMath construct exists only in SBML Level 2. It is - an optional construct available for defining the stoichiometries of - reactants and products in Reaction objects. Note that a different - mechanism is used in SBML Level 3, where StoichiometryMath is not - available. Please consult the top of this libSBML StoichiometryMath - documentation for more information about the differences between SBML - Level 2 and 3 with respect to stoichiometries. -"; - - -%feature("docstring") StoichiometryMath::getDerivedUnitDefinition " - Calculates and returns a UnitDefinition object that expresses the - units returned by the math expression in this StoichiometryMath - object. - - The units are calculated based on the mathematical expression in the - StoichiometryMath and the model quantities referenced by <ci> - elements used within that expression. The - StoichiometryMath.getDerivedUnitDefinition() method returns the - calculated units. - - Note that the functionality that facilitates unit analysis depends - on the model as a whole. Thus, in cases where the object has not - been added to a model or the model itself is incomplete, unit - analysis is not possible and this method will return None. - - WARNING: - - Note that it is possible the 'math' expression in the - StoichiometryMath instance contains literal numbers or parameters - with undeclared units. In those cases, it is not possible to - calculate the units of the overall expression without making - assumptions. LibSBML does not make assumptions about the units, and - StoichiometryMath.getDerivedUnitDefinition() only returns the units - as far as it is able to determine them. For example, in an - expression X + Y, if X has unambiguously-defined units and Y does - not, it will return the units of X. When using this method, - <strong>it is critical that callers also invoke the method</strong> - StoichiometryMath.containsUndeclaredUnits() <strong>to determine - whether this situation holds</strong>. Callers should take suitable - action in those situations. - - Returns a UnitDefinition that expresses the units of the math, or - None if one cannot be constructed. - - See also containsUndeclaredUnits(). -"; - - -%feature("docstring") StoichiometryMath::containsUndeclaredUnits " - Predicate returning True if the math expression of this - StoichiometryMath object contains literal numbers or parameters with - undeclared units. - - The StoichiometryMath.getDerivedUnitDefinition() method returns what - libSBML computes the units of the Stoichiometry to be, to the extent - that libSBML can compute them. However, if the expression contains - literal numbers or parameters with undeclared units, libSBML may not - be able to compute the full units of the expression and will only - return what it can compute. Callers should always use - StoichiometryMath.containsUndeclaredUnits() when using - StoichiometryMath.getDerivedUnitDefinition() to decide whether the - returned units may be incomplete. - - Returns True if the math expression of this StoichiometryMath - includes numbers/parameters with undeclared units, False otherwise. - - Note: - - A return value of True indicates that the UnitDefinition returned by - StoichiometryMath.getDerivedUnitDefinition() may not accurately - represent the units of the expression. - - See also getDerivedUnitDefinition(). -"; - - -%feature("docstring") StoichiometryMath::getTypeCode " - Returns the libSBML type code of this object instance. - - LibSBML attaches an identifying code to every kind of SBML object. - These are known as SBML type codes. In the Python language - interface for libSBML, the type codes are defined as static integer - constants in the interface class libsbml. The names of the type - codes all begin with the characters SBML_. @~ - - Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN - (default). - - See also getElementName(). -"; - - -%feature("docstring") StoichiometryMath::getElementName " - Returns the XML element name of this object, which for - StoichiometryMath, is always 'stoichiometryMath'. - - Returns the name of this element, i.e., 'stoichiometryMath'. -"; - - -%feature("docstring") StoichiometryMath::getElementPosition " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::writeElements " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::hasRequiredElements " - Predicate returning True if all the required elements for this - StoichiometryMath object have been set. - - Note: - - The required elements for a StoichiometryMath object are: - - * 'math' - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") StoichiometryMath::removeFromParentAndDelete " - Finds this StoichiometryMath's SpeciesReference parent and calls - unsetStoichiometryMath() on it, indirectly deleting itself. - Overridden from the SBase function since the parent is not a ListOf. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") StoichiometryMath::renameSIdRefs " - Renames all the SIdRef attributes on this element, including any - found in MathML. - - In SBML, object identifiers are of a type called SId. In SBML Level - 3, an explicit data type called SIdRef was introduced for attribute - values that refer to SId values; in previous Levels of SBML, this - data type did not exist and attributes were simply described to as - \"referring to an identifier\", but the effective data type was the - same as Level 3's SIdRef. These and other methods of libSBML refer - to the type SIdRef for all Levels of SBML, even if the corresponding - SBML specification did not explicitly name the data type. - - This method works by looking at all attributes and (if appropriate) - mathematical formulas, comparing the identifiers to the value of - 'oldid'. If any matches are found, the matching identifiers are - replaced with 'newid'. The method does not descend into child - elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") StoichiometryMath::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this element. - - In SBML, unit definitions have identifiers of type UnitSId. In SBML - Level 3, an explicit data type called UnitSIdRef was introduced for - attribute values that refer to UnitSId values; in previous Levels of - SBML, this data type did not exist and attributes were simply - described to as \"referring to a unit identifier\", but the - effective data type was the same as Level 3's UnitSIdRef. These and - other methods of libSBML refer to the type UnitSIdRef for all Levels - of SBML, even if the corresponding SBML specification did not - explicitly name the data type. - - This method works by looking at all unit identifier attribute values - (including, if appropriate, inside mathematical formulas), comparing - the unit identifiers to the value of 'oldid'. If any matches are - found, the matching identifiers are replaced with 'newid'. The - method does not descend into child elements. - - Parameter 'oldid' is the old identifier Parameter 'newid' is the new - identifier -"; - - -%feature("docstring") StoichiometryMath::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::getInternalId " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::setInternalId " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::readOtherXML " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::addExpectedAttributes " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::readAttributes " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::readL2Attributes " - Internal implementation method. -"; - - -%feature("docstring") StoichiometryMath::writeAttributes " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces " - @ingroup Core Class to store SBML level, version and namespace - information. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - There are differences in the definitions of components between - different SBML Levels, as well as Versions within Levels. For - example, the 'sboTerm' attribute was not introduced until Level 2 - Version 2, and then only on certain component classes; the SBML - Level 2 Version 3 specification moved the 'sboTerm' attribute to the - SBase class, thereby allowing nearly all components to have SBO - annotations. As a result of differences such as those, libSBML needs - to track the SBML Level and Version of every object created. - - The purpose of the SBMLNamespaces object class is to make it easier - to communicate SBML Level and Version data between libSBML - constructors and other methods. The SBMLNamespaces object class - tracks 3-tuples (triples) consisting of SBML Level, Version, and the - corresponding SBML XML namespace. - - The plural name (SBMLNamespaces) is not a mistake, because in SBML - Level 3, objects may have extensions added by Level 3 packages used - by a given model and therefore may have multiple namespaces - associated with them; however, until the introduction of SBML Level - 3, the SBMLNamespaces object only records one SBML - Level/Version/namespace combination at a time. Most constructors for - SBML objects in libSBML take a SBMLNamespaces object as an argument, - thereby allowing the constructor to produce the proper combination of - attributes and other internal data structures for the given SBML - Level and Version. -"; - - -%feature("docstring") SBMLNamespaces::SBMLNamespaces " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLNamespaces(SBMLNamespaces orig) - - Copy constructor; creates a copy of a SBMLNamespaces. - - Parameter 'orig' is the SBMLNamespaces instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLNamespaces(long level = SBML_DEFAULT_LEVEL, long version = - SBML_DEFAULT_VERSION) - - Creates a new SBMLNamespaces object corresponding to the given SBML - 'level' and 'version'. - - SBMLNamespaces objects are used in libSBML to communicate SBML Level - and Version data between constructors and other methods. The - SBMLNamespaces object class tracks 3-tuples (triples) consisting of - SBML Level, Version, and the corresponding SBML XML namespace. Most - constructors for SBML objects in libSBML take a SBMLNamespaces object - as an argument, thereby allowing the constructor to produce the - proper combination of attributes and other internal data structures - for the given SBML Level and Version. - - The plural name (SBMLNamespaces) is not a mistake, because in SBML - Level 3, objects may have extensions added by Level 3 packages used - by a given model and therefore may have multiple namespaces - associated with them; however, until the introduction of SBML Level - 3, the SBMLNamespaces object only records one SBML - Level/Version/namespace combination at a time. Most constructors for - SBML objects in libSBML take a SBMLNamespaces object as an argument, - thereby allowing the constructor to produce the proper combination of - attributes and other internal data structures for the given SBML - Level and Version. - - Parameter 'level' is the SBML level Parameter 'version' is the SBML - version - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLNamespaces(long level, long version, string &pkgName, long - pkgVersion, string pkgPrefix = '') - - (For Extension) - - Creates a new SBMLNamespaces object corresponding to the combination - of (1) the given SBML 'level' and 'version', and (2) the given - 'package' with the 'package' 'version'. - - Note: - - SBMLExtensionException will be thrown if the extension module - that supports the combination of the given sbml level, sbml version, - package name, and package version has not been registered. - - Parameter 'level' is the SBML level Parameter 'version' is the SBML - version Parameter 'pkgName' is the string of package name (e.g. - 'layout', 'multi') Parameter 'pkgVersion' is the package version - Parameter 'pkgPrefix' is the prefix of the package namespace (e.g. - 'layout', 'multi') to be added. The package's name will be - used if the given string is empty (default). -"; - - -%feature("docstring") SBMLNamespaces::clone " - Creates and returns a deep copy of this SBMLNamespaces. - - Returns a (deep) copy of this SBMLNamespaces. -"; - - -%feature("docstring") SBMLNamespaces::getSBMLNamespaceURI " - Returns a string representing the SBML XML namespace for the given - 'level' and 'version' of SBML. - - Parameter 'level' is the SBML level Parameter 'version' is the SBML - version - - Returns a string representing the SBML namespace that reflects the - SBML Level and Version specified. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLNamespaces), and the other will be a standalone - top-level function with the name - SBMLNamespaces_getSBMLNamespaceURI(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBMLNamespaces::getSupportedNamespaces " - Returns a list of all supported SBMLNamespaces in this version of - libsbml. - - Returns a list with supported SBML namespaces. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLNamespaces), and the other will be a standalone - top-level function with the name - SBMLNamespaces_getSupportedNamespaces(). They are functionally - identical. @~ -"; - - -%feature("docstring") SBMLNamespaces::getURI " - Returns a string representing the SBML XML namespace of this object. - - Returns a string representing the SBML namespace that reflects the - SBML Level and Version of this object. -"; - - -%feature("docstring") SBMLNamespaces::getLevel " - Get the SBML Level of this SBMLNamespaces object. - - Returns the SBML Level of this SBMLNamespaces object. -"; - - -%feature("docstring") SBMLNamespaces::getVersion " - Get the SBML Version of this SBMLNamespaces object. - - Returns the SBML Version of this SBMLNamespaces object. -"; - - -%feature("docstring") SBMLNamespaces::getNamespaces " - Get the XML namespaces list for this SBMLNamespaces object. - - The plural is not a mistake, because in SBML Level 3, objects may - have extensions added by Level 3 packages used by a given model, and - therefore there may be multiple XML namespaces involved too. - However, until the introduction of SBML Level 3, the SBMLNamespaces - object only records one SBML Level/Version/namespace combination at - a time, and so this method will also only return a list of one item. - - Returns the XML namespaces of this SBMLNamespaces object. -"; - - -%feature("docstring") SBMLNamespaces::addNamespaces " - Add the given XML namespaces list to the set of namespaces within - this SBMLNamespaces object. - - The following code gives an example of how one could add the XHTML - namespace to the list of namespaces recorded by the top-level <sbml> - element of a model. It gives the new namespace a prefix of html. - - sbmlDoc = None - try: - sbmlDoc = SBMLDocument(3, 1) - except ValueError: - # Do something to handle exceptional situation. Candidate - # causes include invalid combinations of SBML Level and Version - # (impossible if hardwired as given here), running out of memory, and - # unknown system exceptions. - - namespaces = sbmlDoc.getNamespaces() - if namespaces == None: - # Do something to handle case of no namespaces. - - status = namespaces.add(\'http://www.w3.org/1999/xhtml\', \'html\') - if status != LIBSBML_OPERATION_SUCCESS: - # Do something to handle failure. - @~ - - Parameter 'xmlns' is the XML namespaces to be added. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") SBMLNamespaces::addNamespace " - Add an XML namespace (a pair of URI and prefix) to the set of - namespaces within this SBMLNamespaces object. - - Parameter 'uri' is the XML namespace to be added. Parameter 'prefix' - is the prefix of the namespace to be added. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") SBMLNamespaces::removeNamespace " - Removes an XML namespace from the set of namespaces within this - SBMLNamespaces object. - - Parameter 'uri' is the XML namespace to be added. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE -"; - - -%feature("docstring") SBMLNamespaces::addPackageNamespace " - Add an XML namespace (a pair of URI and prefix) of a package - extension to the set of namespaces within this SBMLNamespaces - object. The SBML Level and SBML Version of this object is used. - - Note: - - An XML namespace of a non-registered package extension can't be - added by this function (libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - will be returned). - - Parameter 'pkgName' is the string of package name (e.g. 'layout', - 'multi') Parameter 'pkgVersion' is the package version Parameter - 'prefix' is the prefix of the package namespace to be added. - The package's name will be used if the given string is empty - (default). - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - See also addNamespace(). -"; - - -%feature("docstring") SBMLNamespaces::addPackageNamespaces " - Add the XML namespaces of package extensions in the given - XMLNamespace object to the set of namespaces within this - SBMLNamespaces object (Non-package XML namespaces are not added by - this function). - - Note: - - XML namespaces of a non-registered package extensions are not added - (just ignored) by this function. - libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned if the - given xmlns is null. - - Parameter 'xmlns' is the XML namespaces to be added. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SBMLNamespaces::removePackageNamespace " - Removes an XML namespace of a package extension from the set of - namespaces within this SBMLNamespaces object. - - Parameter 'level' is the SBML level Parameter 'version' is the SBML - version Parameter 'pkgName' is the string of package name (e.g. - 'layout', 'multi') Parameter 'pkgVersion' is the package version - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE -"; - - -%feature("docstring") SBMLNamespaces::addPkgNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces::addPkgNamespaces " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces::removePkgNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces::isSBMLNamespace " - Predicate returning True if the given URL is one of SBML XML - namespaces. - - Parameter 'uri' is the URI of namespace - - Returns True if the 'uri' is one of SBML namespaces, False otherwise. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., SBMLNamespaces), and the other will be a standalone - top-level function with the name SBMLNamespaces_isSBMLNamespace(). - They are functionally identical. @~ -"; - - -%feature("docstring") SBMLNamespaces::isValidCombination " - Predicate returning True if the given set of namespaces represent a - valid set - - Returns True if the set of namespaces is valid, False otherwise. -"; - - -%feature("docstring") SBMLNamespaces::setLevel " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces::setVersion " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces::setNamespaces " - Internal implementation method. -"; - - -%feature("docstring") SBMLNamespaces::getPackageName " - Returns the name of the main package for this namespace. - - Returns the name of the main package for this namespace. 'core' will - be returned if this namespace is defined in the SBML core. -"; - - -%feature("docstring") SBMLNamespaces::initSBMLNamespace " - Internal implementation method. -"; - - -%feature("docstring") SBMLConstructorException " - @ingroup Core Class of exceptions thrown by constructors of some - libSBML objects. - - In some situations, constructors for SBML objects may need to - indicate to callers that the creation of the object failed. The - failure may be for different reasons, such as an attempt to use - invalid parameters or a system condition such as a memory error. To - communicate this to callers, those classes will throw an - SBMLConstructorException. - - In languages that don't have an exception mechanism (e.g., C), the - constructors generally try to return an error code instead of - throwing an exception. -"; - - -%feature("docstring") SBMLConstructorException::getSBMLErrMsg " - Returns the message associated with this SBML exception. - - Returns the message string. -"; - - -%feature("docstring") ConversionOption " - @ingroup Core Class of object that encapsulates a conversion option. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - LibSBML provides a number of converters that can perform - transformations on SBML documents. These converters allow their - behaviors to be controlled by setting property values. Converter - properties are communicated using objects of class - ConversionProperties, and within such objects, individual options - are encapsulated using ConversionOption objects. - - A ConversionOption object consists of four parts: - - * A key, acting as the name of the option; - - * A value of this option; - - * A type for the value; this is chosen from the enumeration type - ConversionOptionType_t; and - - * A description consisting of a text string that describes the - option in some way. - - There are no constraints on the values of keys or descriptions; - authors of SBML converters are free to choose them as they see fit. - - Conversion option data types - ====================================================================== - - An option in ConversionOption must have a data type declared, to - indicate whether it is a string value, an integer, and so forth. The - possible types of values are taken from the enumeration - ConversionOptionType_t. The following are the possible values: - - <center> <table width='90' cellspacing='1' cellpadding='1' - border='0' class='normal-font'> <tr style='background: lightgray' - class='normal-font'> <td><strong>Enumerator</strong></td> - <td><strong>Meaning</strong></td> </tr> <tr> - <td>libsbml.CNV_TYPE_BOOL</td> <td>Indicates the value type is a - Boolean.</td> </tr> <tr> <td>libsbml.CNV_TYPE_DOUBLE</td> - <td>Indicates the value type is a double-sized float.</td> </tr> - <tr> <td>libsbml.CNV_TYPE_INT</td> <td>Indicates the value type is - an integer.</td> </tr> <tr> <td>libsbml.CNV_TYPE_SINGLE</td> - <td>Indicates the value type is a float.</td> </tr> <tr> - <td>libsbml.CNV_TYPE_STRING</td> <td>Indicates the value type is a - string.</td> </tr> </table> </center> - - See also ConversionProperties. -"; - - -%feature("docstring") ConversionOption::ConversionOption " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(string key, double value, string description='') - - Creates a new ConversionOption specialized for double-type options. - - Parameter 'key' is the key for this option Parameter 'value' is the - value for this option Parameter 'description' is an optional - description - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(string key, int value, string description='') - - Creates a new ConversionOption specialized for integer-type options. - - Parameter 'key' is the key for this option Parameter 'value' is the - value for this option Parameter 'description' is an optional - description - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(string key, float value, string description='') - - Creates a new ConversionOption specialized for float-type options. - - Parameter 'key' is the key for this option Parameter 'value' is the - value for this option Parameter 'description' is an optional - description - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(string key, string value, string description='') - - Creates a new ConversionOption specialized for string-type options. - - Parameter 'key' is the key for this option Parameter 'value' is the - value for this option Parameter 'description' is an optional - description - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(string key, bool value, string description='') - - Creates a new ConversionOption specialized for Boolean-type options. - - Parameter 'key' is the key for this option Parameter 'value' is the - value for this option Parameter 'description' is an optional - description - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(string key, string value='', - ConversionOptionType_t type=CNV_TYPE_STRING, string description='') - - Creates a new ConversionOption. - - This is the general constructor, taking arguments for all aspects of - an option. Other constructors exist with different arguments. - - Parameter 'key' is the key for this option Parameter 'value' is an - optional value for this option Parameter 'type' is the type of this - option Parameter 'description' is the description for this option - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionOption(ConversionOption orig) - - Copy constructor; creates a copy of an ConversionOption object. - - Parameter 'orig' is the ConversionOption object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") ConversionOption::clone " - Creates and returns a deep copy of this ConversionOption object. - - Returns a (deep) copy of this ConversionOption object. -"; - - -%feature("docstring") ConversionOption::getKey " - Returns the key for this option. - - Returns the key, as a string. -"; - - -%feature("docstring") ConversionOption::setKey " - Sets the key for this option. - - Parameter 'key' is a string representing the key to set. -"; - - -%feature("docstring") ConversionOption::getValue " - Returns the value of this option. - - Returns the value of this option, as a string. -"; - - -%feature("docstring") ConversionOption::setValue " - Sets the value for this option. - - Parameter 'value' is the value to set, as a string. -"; - - -%feature("docstring") ConversionOption::getDescription " - Returns the description string for this option. - - Returns the description of this option. -"; - - -%feature("docstring") ConversionOption::setDescription " - Sets the description text for this option. - - Parameter 'description' is the description to set for this option. -"; - - -%feature("docstring") ConversionOption::getType " - Returns the type of this option - - Returns the type of this option. -"; - - -%feature("docstring") ConversionOption::setType " - Sets the type of this option. - - Parameter 'type' is the type value to use. -"; - - -%feature("docstring") ConversionOption::getBoolValue " - Returns the value of this option as a Boolean. - - Returns the value of this option. -"; - - -%feature("docstring") ConversionOption::setBoolValue " - Set the value of this option to a given Boolean value. - - Invoking this method will also set the type of the option to - libsbml.CNV_TYPE_BOOL. - - Parameter 'value' is the Boolean value to set -"; - - -%feature("docstring") ConversionOption::getDoubleValue " - Returns the value of this option as a double. - - Returns the value of this option. -"; - - -%feature("docstring") ConversionOption::setDoubleValue " - Set the value of this option to a given double value. - - Invoking this method will also set the type of the option to - libsbml.CNV_TYPE_DOUBLE. - - Parameter 'value' is the value to set -"; - - -%feature("docstring") ConversionOption::getFloatValue " - Returns the value of this option as a float. - - Returns the value of this option as a float -"; - - -%feature("docstring") ConversionOption::setFloatValue " - Set the value of this option to a given float value. - - Invoking this method will also set the type of the option to - libsbml.CNV_TYPE_SINGLE. - - Parameter 'value' is the value to set -"; - - -%feature("docstring") ConversionOption::getIntValue " - Returns the value of this option as an integer. - - Returns the value of this option, as an int -"; - - -%feature("docstring") ConversionOption::setIntValue " - Set the value of this option to a given int value. - - Invoking this method will also set the type of the option to - libsbml.CNV_TYPE_INT. - - Parameter 'value' is the value to set -"; - - -%feature("docstring") ConversionProperties " - @ingroup Core Class of object that encapsulates the properties of an - SBML converter. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - The properties of SBML converters are communicated using objects of - class ConversionProperties, and within such objects, individual - options are encapsulated using ConversionOption objects. The - ConversionProperties class provides numerous methods for setting and - getting options. - - ConversionProperties objects are also used to determine the target - SBML namespace when an SBML converter's behavior depends on the - intended Level+Version combination of SBML. In addition, it is - conceivable that conversions may be affected by SBML Level 3 - packages being used by an SBML document. These, too, are - communicated by the values of the SBML namespaces set on a - ConversionProperties object. - - See also ConversionOption, SBMLNamespaces. -"; - - -%feature("docstring") ConversionProperties::ConversionProperties " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionProperties(ConversionProperties orig) - - Copy constructor. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - ConversionProperties(SBMLNamespaces targetNS=None) - - Constructor that initializes the conversion properties with a - specific SBML target namespace. - - Parameter 'targetNS' is the target namespace to convert to -"; - - -%feature("docstring") ConversionProperties::clone " - Creates and returns a deep copy of this ConversionProperties object. - - Returns a (deep) copy of this ConversionProperties object. -"; - - -%feature("docstring") ConversionProperties::getTargetNamespaces " - Returns the current target SBML namespace. - - Returns the SBMLNamepaces object expressing the target namespace. -"; - - -%feature("docstring") ConversionProperties::hasTargetNamespaces " - Returns True if the target SBML namespace has been set. - - Returns True if the target namespace has been set, False otherwise. -"; - - -%feature("docstring") ConversionProperties::setTargetNamespaces " - Sets the target namespace. - - Parameter 'targetNS' is the target namespace to use. -"; - - -%feature("docstring") ConversionProperties::getDescription " - Returns the description string for a given option in this properties - object. - - Parameter 'key' is the key for the option. - - Returns the description text of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::getType " - Returns the type of a given option in this properties object. - - Parameter 'key' is the key for the option. - - Returns the type of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::getOption " - Returns the ConversionOption object for a given key. - - Parameter 'key' is the key for the option. - - Returns the option with the given key. -"; - - -%feature("docstring") ConversionProperties::addOption " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(ConversionOption option) - - Adds a copy of the given option to this properties object. - - Parameter 'option' is the option to add - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(string key, double value, string description='') - - Adds a new ConversionOption object with the given parameters. - - Parameter 'key' is the key for the new option Parameter 'value' is - the double value of that option Parameter 'description' is - (optional) the description for the option - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(string key, int value, string description='') - - Adds a new ConversionOption object with the given parameters. - - Parameter 'key' is the key for the new option Parameter 'value' is - the integer value of that option Parameter 'description' is - (optional) the description for the option - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(string key, float value, string description='') - - Adds a new ConversionOption object with the given parameters. - - Parameter 'key' is the key for the new option Parameter 'value' is - the float value of that option Parameter 'description' is (optional) - the description for the option - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(string key, string value, string description='') - - Adds a new ConversionOption object with the given parameters. - - Parameter 'key' is the key for the new option Parameter 'value' is - the string value of that option Parameter 'description' is - (optional) the description for the option - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(string key, bool value, string description='') - - Adds a new ConversionOption object with the given parameters. - - Parameter 'key' is the key for the new option Parameter 'value' is - the boolean value of that option Parameter 'description' is - (optional) the description for the option - - ______________________________________________________________________ - Method variant with the following signature: - - addOption(string key, string value='', ConversionOptionType_t - type=CNV_TYPE_STRING, string description='') - - Adds a new ConversionOption object with the given parameters. - - Parameter 'key' is the key for the new option Parameter 'value' is - (optional) the value of that option Parameter 'type' is (optional) - the type of the option Parameter 'description' is (optional) the - description for the option -"; - - -%feature("docstring") ConversionProperties::removeOption " - Removes the option with the given key from this properties object. - - Parameter 'key' is the key for the new option to remove Returns the - removed option -"; - - -%feature("docstring") ConversionProperties::hasOption " - Returns True if this properties object contains an option with the - given key. - - Parameter 'key' is the key of the option to find. - - Returns True if an option with the given 'key' exists in this - properties object, False otherwise. -"; - - -%feature("docstring") ConversionProperties::getValue " - Returns the value of the given option as a string. - - Parameter 'key' is the key for the option. - - Returns the string value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setValue " - Sets the value of the given option to a string. - - Parameter 'key' is the key for the option Parameter 'value' is the - new value -"; - - -%feature("docstring") ConversionProperties::getBoolValue " - Returns the value of the given option as a Boolean. - - Parameter 'key' is the key for the option. - - Returns the boolean value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setBoolValue " - Sets the value of the given option to a Boolean. - - Parameter 'key' is the key for the option. - - Parameter 'value' is the new Boolean value. -"; - - -%feature("docstring") ConversionProperties::getDoubleValue " - Returns the value of the given option as a double. - - Parameter 'key' is the key for the option. - - Returns the double value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setDoubleValue " - Sets the value of the given option to a double. - - Parameter 'key' is the key for the option. - - Parameter 'value' is the new double value. -"; - - -%feature("docstring") ConversionProperties::getFloatValue " - Returns the value of the given option as a float. - - Parameter 'key' is the key for the option. - - Returns the float value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setFloatValue " - Sets the value of the given option to a float. - - Parameter 'key' is the key for the option. - - Parameter 'value' is the new float value. -"; - - -%feature("docstring") ConversionProperties::getIntValue " - Returns the value of the given option as an integer. - - Parameter 'key' is the key for the option. - - Returns the int value of the option with the given key. -"; - - -%feature("docstring") ConversionProperties::setIntValue " - Sets the value of the given option to an integer. - - Parameter 'key' is the key for the option. - - Parameter 'value' is the new integer value. -"; - - -%feature("docstring") SBMLConverter " - @ingroup Core Base class for SBML converters. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - The SBMLConverter class is the base class for the various SBML - converters: classes of objects that transform or convert SBML - documents. These transformations can involve essentially anything - that can be written algorithmically; examples include converting the - units of measurement in a model, or converting from one - Level+Version combination of SBML to another. - - LibSBML provides a number of built-in converters, and applications - can create their own by subclassing SBMLConverter and following the - examples of the existing converters. The following are the built-in - converters in libSBML 5.8.1: - - * SBMLFunctionDefinitionConverter - - * SBMLInitialAssignmentConverter - - * SBMLLevelVersionConverter - - * SBMLRuleConverter - - * SBMLStripPackageConverter - - * SBMLUnitsConverter - - Many converters provide the ability to configure their behavior to - some extent. This is realized through the use of properties that - offer different options. Two related classes implement these - features: ConversionProperties and ConversionOptions. The default - property values for each converter can be interrogated using the - method SBMLConverter.getDefaultProperties() on the converter class. -"; - - -%feature("docstring") SBMLConverter::SBMLConverter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLConverter() - - Creates a new SBMLConverter object. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLConverter(SBMLConverter c) - - Copy constructor; creates a copy of an SBMLConverter object. - - Parameter 'c' is the SBMLConverter object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") SBMLConverter::clone " - Creates and returns a deep copy of this SBMLConverter object. - - Returns a (deep) copy of this SBMLConverter object. -"; - - -%feature("docstring") SBMLConverter::getDocument " - Returns the SBML document that is the subject of the conversions. - - Returns the current SBMLDocument object. -"; - - -%feature("docstring") SBMLConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. The run-time properties of the converter object - can be adjusted by using the method SBMLConverter.setProperties(). - - Returns the default properties for the converter. - - See also setProperties(), matchesProperties(). -"; - - -%feature("docstring") SBMLConverter::getTargetNamespaces " - Returns the target SBML namespaces of the currently set properties. - - SBML namespaces are used by libSBML to express the Level+Version of - the SBML document (and, possibly, any SBML Level 3 packages in use). - Some converters' behavior is affected by the SBML namespace - configured in the converter. For example, the actions of - SBMLLevelVersionConverter, the converter for converting SBML - documents from one Level+Version combination to another, are - fundamentally dependent on the SBML namespaces being targeted. - - Returns the SBMLNamespaces object that describes the SBML namespaces - in effect. -"; - - -%feature("docstring") SBMLConverter::matchesProperties " - Predicate returning True if this converter's properties matches a - given set of configuration properties. - - Parameter 'props' is the configuration properties to match. - - Returns True if this converter's properties match, False otherwise. -"; - - -%feature("docstring") SBMLConverter::setDocument " - Sets the current SBML document to the given SBMLDocument object. - - Parameter 'doc' is the document to use for this conversion. - - Returns integer value indicating the success/failure of the - operation. @~ The set of possible values that may be returned - ultimately depends on the specific subclass of SBMLConverter being - used, but the default method can return the following values: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") SBMLConverter::setProperties " - Sets the configuration properties to be used by this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - sets the current properties for this converter. - - Parameter 'props' is the ConversionProperties object defining the - properties to set. - - Returns integer value indicating the success/failure of the - operation. @~ The set of possible values that may be returned - ultimately depends on the specific subclass of SBMLConverter being - used, but the default method can return the following values: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also getProperties(), matchesProperties(). -"; - - -%feature("docstring") SBMLConverter::getProperties " - Returns the current properties in effect for this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the current properties for this converter; in other words, - the settings in effect at this moment. To change the property - values, you can use SBMLConverter.setProperties(). - - Returns the currently set configuration properties. - - See also setProperties(), matchesProperties(). -"; - - -%feature("docstring") SBMLConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and with the configuration options set - by SBMLConverter.setProperties(). - - Returns integer value indicating the success/failure of the - operation. @~ The set of possible values that may be returned - depends on the converter subclass; please consult the documentation - for the relevant class to find out what the possibilities are. -"; - - -%feature("docstring") SBMLConverterRegistry " - @ingroup Core Registry of all SBML converters. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - LibSBML provides facilities for transforming and converting SBML - documents in various ways. These transformations can involve - essentially anything that can be written algorithmically; examples - include converting the units of measurement in a model, or converting - from one Level+Version combination of SBML to another. Converters - are implemented as objects derived from the class SBMLConverter. - - The converter registry, implemented as a singleton object of class - SBMLConverterRegistry, maintains a list of known converters and - provides methods for discovering them. Callers can use the method - SBMLConverterRegistry.getNumConverters() to find out how many - converters are registered, then use - SBMLConverterRegistry.getConverterByIndex() to iterate over each - one; alternatively, callers can use - SBMLConverterRegistry.getConverterFor() to search for a converter - having specific properties. -"; - - -%feature("docstring") SBMLConverterRegistry::getInstance " - Returns the singleton instance for the converter registry. - - Prior to using the registry, callers have to obtain a copy of the - registry. This static method provides the means for doing that. - - Returns the singleton for the converter registry. -"; - - -%feature("docstring") SBMLConverterRegistry::addConverter " - Adds the given converter to the registry of SBML converters. - - Parameter 'converter' is the converter to add to the registry. - - Returns integer value indicating the success/failure of the - operation. @~ The possible values are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") SBMLConverterRegistry::getConverterByIndex " - Returns the converter with the given index number. - - Converters are given arbitrary index numbers by the registry. - Callers can use the method SBMLConverterRegistry.getNumConverters() - to find out how many converters are registered, then use this method - to iterate over the list and obtain each one in turn. - - Parameter 'index' is the zero-based index of the converter to fetch. - - Returns the converter with the given index number, or None if the - number is less than 0 or there is no converter at the given index - position. -"; - - -%feature("docstring") SBMLConverterRegistry::getConverterFor " - Returns the converter that best matches the given configuration - properties. - - Many converters provide the ability to configure their behavior. - This is realized through the use of properties that offer different - options. The present method allows callers to search for converters - that have specific property values. Callers can do this by creating - a ConversionProperties object, adding the desired option(s) to the - object, then passing the object to this method. - - Parameter 'props' is a ConversionProperties object defining the - properties to match against. - - Returns the converter matching the properties, or None if no - suitable converter is found. - - See also getConverterByIndex(). -"; - - -%feature("docstring") SBMLConverterRegistry::getNumConverters " - Returns the number of converters known by the registry. - - Returns the number of registered converters. - - See also getConverterByIndex(). -"; - - -%feature("docstring") SBMLConverterRegistry::SBMLConverterRegistry " - Internal implementation method. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter " - @ingroup Core SBML converter for replacing function definitions. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - This is an SBML converter for manipulating user-defined functions in - an SBML file. When invoked on the current model, it performs the - following operation: <ol> - - * Read the list of user-defined functions in the model (i.e., the - list of FunctionDefinition objects); - - * Look for invocations of the function in mathematical expressions - throughout the model; and - - * For each invocation found, replaces the invocation with a in- - line copy of the function's body, similar to how macro expansions - might be performed in scripting and programming languages. </ol> - - For example, suppose the model contains a function definition - representing the function f(x, y) = x * y. Further suppose this - functions invoked somewhere else in the model, in a mathematical - formula, as f(s, p). The outcome of running - SBMLFunctionDefinitionConverter on the model will be to replace the - call to f with the expression s * p. - - See also SBMLInitialAssignmentConverter, SBMLLevelVersionConverter, - SBMLRuleConverter, SBMLStripPackageConverter, SBMLUnitsConverter. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::SBMLFunctionDefinitionConverter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLFunctionDefinitionConverter() - - Creates a new SBMLFunctionDefinitionConverter object. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLFunctionDefinitionConverter(SBMLFunctionDefinitionConverter - obj) - - Copy constructor; creates a copy of an - SBMLFunctionDefinitionConverter object. - - Parameter 'obj' is the SBMLFunctionDefinitionConverter object to - copy. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::clone " - Creates and returns a deep copy of this - SBMLFunctionDefinitionConverter object. - - Returns a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::matchesProperties " - Returns True if this converter object's properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLFunctionDefinitionConverter object to find out if the object's - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() to search across all - registered converters for one matching particular properties. - - Parameter 'props' is the properties to match. - - Returns True if this converter's properties match, False otherwise. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::convert " - Replaces invocations of each user-defined function with an in-line - copy, similar to macro expansion. - - Returns integer value indicating the success/failure of the - operation. @~ The possible values are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - Returns the ConversionProperties object describing the default - properties for this converter. -"; - - -%feature("docstring") SBMLFunctionDefinitionConverter::expandFD_errors " - Internal implementation method. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter " - @ingroup Core SBML converter for replacing initial assignments. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - This is an SBML converter for replacing InitialAssignment objects - (when possible) by setting the initial value attributes on the model - objects being assigned. In other words, for every object that is - the target of an initial assignment in the model, it evaluates the - mathematical expression of the assignment to get a numerical value, - and then sets the corresponding attribute of the object to the - value. The effects for different kinds of SBML components are as - follows: - - <center> <table border='0' class='text-table width80 normal-font - alt-row-colors'> <tr style='background: lightgray; font-size: - 14px;'> <th align='left' width='200'>Component</th> <th - align='left'>Effect</th> </tr> <tr> <td>Compartment</td> - <td>Sets the value of the size attribute.</td> </tr> <tr> - <td>Species</td> <td>Sets the value of either the initialAmount - or the initialConcentration attributes, depending on the value of - the Species object's hasOnlySubstanceUnits attribute.</td> </tr> - <tr> <td>Parameter</td> <td>Sets the value of the value - attribute.</td> </tr> <tr> <td>SpeciesReference</td> <td>Sets - the value of the stoichiometry attribute in the Reaction object - where the SpeciesReference object appears.</td> </tr> </table> - </center> - - See also SBMLFunctionDefinitionConverter, SBMLLevelVersionConverter, - SBMLRuleConverter, SBMLStripPackageConverter, SBMLUnitsConverter. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::SBMLInitialAssignmentConverter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLInitialAssignmentConverter(SBMLInitialAssignmentConverter obj) - - Copy constructor; creates a copy of an SBMLInitialAssignmentConverter - object. - - Parameter 'obj' is the SBMLInitialAssignmentConverter object to copy. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLInitialAssignmentConverter() - - Creates a new SBMLInitialAssignmentConverter object. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::clone " - Creates and returns a deep copy of this - SBMLInitialAssignmentConverter object. - - Returns a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::matchesProperties " - Returns True if this converter object's properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLInitialAssignmentConverter object to find out if the object's - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() to search across all - registered converters for one matching particular properties. - - Parameter 'props' is the properties to match. - - Returns True if this converter's properties match, False otherwise. -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and with the configuration options set - by SBMLConverter.setProperties(). - - Returns integer value indicating the success/failure of the - operation. @~ The possible values are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") SBMLInitialAssignmentConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - Returns the ConversionProperties object describing the default - properties for this converter. -"; - - -%feature("docstring") SBMLLevelVersionConverter " - @ingroup Core SBML converter for transforming documents from one - Level+Version to another. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - This SBML converter takes an SBML document of one SBML Level+Version - combination and attempts to convert it to another Level+Version - combination. The target Level+Version is set using an SBMLNamespace - object in the ConversionProperties object that controls this - converter. - - This class is the basis for SBMLDocument.setLevelAndVersion(). - - See also SBMLFunctionDefinitionConverter, - SBMLInitialAssignmentConverter, SBMLRuleConverter, - SBMLStripPackageConverter, SBMLUnitsConverter. -"; - - -%feature("docstring") SBMLLevelVersionConverter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLLevelVersionConverter() - - Creates a new SBMLLevelVersionConverter object. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLLevelVersionConverter(SBMLLevelVersionConverter obj) - - Copy constructor; creates a copy of an SBMLLevelVersionConverter - object. - - Parameter 'obj' is the SBMLLevelVersionConverter object to copy. -"; - - -%feature("docstring") clone " - Creates and returns a deep copy of this SBMLLevelVersionConverter - object. - - Returns a (deep) copy of this converter. -"; - - -%feature("docstring") matchesProperties " - Returns True if this converter object's properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLLevelVersionConverter object to find out if the object's - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() to search across all - registered converters for one matching particular properties. - - Parameter 'props' is the properties to match. - - Returns True if this converter's properties match, False otherwise. -"; - - -%feature("docstring") convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and with the configuration options set - by SBMLConverter.setProperties(). SBMLConverter.setProperties(). - - Returns integer value indicating the success/failure of the - operation. @~ The possible values are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - Returns the ConversionProperties object describing the default - properties for this converter. -"; - - -%feature("docstring") getTargetLevel " - Returns the target SBML Level for the conversion. - - Returns an integer indicating the SBML Level. -"; - - -%feature("docstring") getTargetVersion " - Returns the target SBML Version for the conversion. - - Returns an integer indicating the Version within the SBML Level. -"; - - -%feature("docstring") getValidityFlag " - Returns the flag indicating whether the conversion has been set to - 'strict'. - - Returns True if strict validity has been requested, False otherwise. -"; - - -%feature("docstring") SBMLRuleConverter " - @ingroup Core SBML converter for reordering rules and assignments in - a model. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - This converter reorders assignments in a model. Specifically, it - sorts the list of assignment rules (i.e., the AssignmentRule objects - contained in the ListOfAssignmentRules within the Model object) and - the initial assignments (i.e., the InitialAssignment objects - contained in the ListOfInitialAssignments) such that, within each - set, assignments that depend on prior values are placed after the - values are set. For example, if there is an assignment rule stating - a = b + 1, and another rule stating b = 3, the list of rules is - sorted and the rules are arranged so that the rule for b = 3 appears - before the rule for a = b + 1. Similarly, if dependencies of this - sort exist in the list of initial assignments in the model, the - initial assignments are sorted as well. - - Beginning with SBML Level 2, assignment rules have no ordering - required -- the order in which the rules appear in an SBML file has - no significance. Software tools, however, may need to reorder - assignments for purposes of evaluating them. For example, for - simulators that use time integration methods, it would be a good idea - to reorder assignment rules such as the following, - - b = a + 10 seconds - - a = time - - so that the evaluation of the rules is independent of integrator - step sizes. (This is due to the fact that, in this case, the order in - which the rules are evaluated changes the result.) This converter - can be used to reorder the SBML objects regardless of whether the - input file contained them in the desired order. Here is a code - fragment to illustrate how to do that: - - ConversionProperties props; - props.addOption(\'sortRules\', true, \'sort rules\'); - - SBMLConverter converter; - converter.setProperties(&props); - converter.setDocument(&doc); - converter.convert(); - - Note: - - The two sets of assignments (list of assignment rules on the one - hand, and list of initial assignments on the other hand) are handled - independently. In an SBML model, these entities are treated - differently and no amount of sorting can deal with inter- - dependencies between assignments of the two kinds. - - See also SBMLFunctionDefinitionConverter, - SBMLInitialAssignmentConverter, SBMLLevelVersionConverter, - SBMLStripPackageConverter, SBMLUnitsConverter. -"; - - -%feature("docstring") SBMLRuleConverter::SBMLRuleConverter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLRuleConverter(SBMLRuleConverter obj) - - Copy constructor; creates a copy of an SBMLLevelVersionConverter - object. - - Parameter 'obj' is the SBMLLevelVersionConverter object to copy. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLRuleConverter() - - Creates a new SBMLLevelVersionConverter object. -"; - - -%feature("docstring") SBMLRuleConverter::clone " - Creates and returns a deep copy of this SBMLLevelVersionConverter - object. - - Returns a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLRuleConverter::matchesProperties " - Returns True if this converter object's properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLLevelVersionConverter object to find out if the object's - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() to search across all - registered converters for one matching particular properties. - - Parameter 'props' is the properties to match. - - Returns True if this converter's properties match, False otherwise. -"; - - -%feature("docstring") SBMLRuleConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and with the configuration options set - by SBMLConverter.setProperties(). - - Returns integer value indicating the success/failure of the - operation. @~ The possible values are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT -"; - - -%feature("docstring") SBMLRuleConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - Returns the ConversionProperties object describing the default - properties for this converter. -"; - - -%feature("docstring") SBMLStripPackageConverter " - @ingroup Core SBML converter for removing packages. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - This SBML converter takes an SBML document and removes (strips) a - package from it. No conversion is performed; the package constructs - are simply removed from the SBML document. The package to be - stripped is determined by the value of the option 'package' on the - conversion properties. - - See also SBMLFunctionDefinitionConverter, SBMLLevelVersionConverter, - SBMLRuleConverter, SBMLLevelVersionConverter, SBMLUnitsConverter. -"; - - -%feature("docstring") SBMLStripPackageConverter::SBMLStripPackageConverter " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLStripPackageConverter() - - Creates a new SBMLStripPackageConverter object. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLStripPackageConverter(SBMLStripPackageConverter obj) - - Copy constructor; creates a copy of an SBMLStripPackageConverter - object. - - Parameter 'obj' is the SBMLStripPackageConverter object to copy. -"; - - -%feature("docstring") SBMLStripPackageConverter::clone " - Creates and returns a deep copy of this SBMLStripPackageConverter - object. - - Returns a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLStripPackageConverter::matchesProperties " - Returns True if this converter object's properties match the given - properties. - - A typical use of this method involves creating a ConversionProperties - object, setting the options desired, and then calling this method on - an SBMLStripPackageConverter object to find out if the object's - property values match the given ones. This method is also used by - SBMLConverterRegistry.getConverterFor() to search across all - registered converters for one matching particular properties. - - Parameter 'props' is the properties to match. - - Returns True if this converter's properties match, False otherwise. -"; - - -%feature("docstring") SBMLStripPackageConverter::convert " - Perform the conversion. - - This method causes the converter to do the actual conversion work, - that is, to convert the SBMLDocument object set by - SBMLConverter.setDocument() and with the configuration options set - by SBMLConverter.setProperties(). - - Returns integer value indicating the success/failure of the - operation. @~ The possible values are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SBMLStripPackageConverter::getDefaultProperties " - Returns the default properties of this converter. - - A given converter exposes one or more properties that can be adjusted - in order to influence the behavior of the converter. This method - returns the default property settings for this converter. It is - meant to be called in order to discover all the settings for the - converter object. - - Returns the ConversionProperties object describing the default - properties for this converter. -"; - - -%feature("docstring") SBMLUnitsConverter " - @ingroup Core SBML converter to convert a model's units to SI units. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. It is a class used in the - implementation of extra functionality provided by libSBML. - - This SBML converter converts the units in a model to base SI units, - namely metre, kilogram, second, Ampere, Kelvin, mole and candela. - - Unit conversion will only be performed on models that are fully unit - consistent; that is, all objects have associated units, and there are - no literal numbers with no units specified. In the case of an SBML - Level 3 model involving math expressions, this means that the - timeUnits attribute on the Model object must be set, and if there are - any reactions in the model, the extentUnits attribute on the Model - object must also be set. - - This converter has the additional Boolean property - 'removeUnusedUnits' that can be used to tell the converter whether - to remove any UnitDefinition objects that are not referred to, after - conversion is complete. You can set this value by adding the - property using - - prop.addOption(\'removeUnusedUnits\', false); - The converter's default behavior is to remove the unused - UnitDefinition objects in the model. - - See also SBMLFunctionDefinitionConverter, SBMLLevelVersionConverter, - SBMLRuleConverter, SBMLStripPackageConverter, SBMLUnitsConverter. -"; - - -%feature("docstring") SBMLValidator " - @ingroup Core Base class for SBML validators - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - LibSBML implements facilities for verifying that a given SBML - document is valid according to the SBML specifications; it also - exposes the validation interface so that user programs and SBML - Level 3 package authors may use the facilities to implement new - validators. There are two main interfaces to libSBML's validation - facilities, based on the classes Validator and SBMLValidator. - - The Validator class is the basis of the system for validating an SBML - document against the validation rules defined in the SBML - specifications. The scheme used by Validator relies is compact and - uses the visitor programming pattern, but it relies on C/C++ - features and is not directly accessible from language bindings. - SBMLValidator offers a framework for straightforward class-based - extensibility, so that user code can subclass SBMLValidator to - implement new validation systems, different validators can be - introduced or turned off at run-time, and interfaces can be provided - in the libSBML language bindings. SBMLValidator can call Validator - functionality internally (as is the case in the current - implementation of SBMLInternalValidator) or use entirely different - implementation approaches, as necessary. - - Users of libSBML may already be familiar with the facilities - encompassed by the validation system, in the form of the - consistency-checking methods defined on SBMLDocument. The methods - SBMLDocument.setConsistencyChecks(), - SBMLDocument.checkConsistency(), - SBMLDocument.checkInternalConsistency() and other method of that - sort are in fact implemented via SBMLValidator, specifically as - methods on the class SBMLInternalValidator. - - Authors may use SBMLValidator as the base class for their own - validator extensions to libSBML. The class SBMLInternalValidator - may serve as a code example for how to implement such things. -"; - - -%feature("docstring") SBMLValidator::SBMLValidator " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLValidator() - - Creates a new SBMLValidator. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLValidator(const SBMLValidator& orig) - - Copy constructor; creates a copy of an SBMLValidator object. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") SBMLValidator::clone " - Creates and returns a deep copy of this SBMLValidator. - - Returns a (deep) copy of this SBMLValidator. -"; - - -%feature("docstring") SBMLValidator::getDocument " - Returns the current SBML document in use by this validator. - - Returns the current SBML document - - See also setDocument(). -"; - - -%feature("docstring") SBMLValidator::setDocument " - Sets the current SBML document to the given SBMLDocument object. - - Parameter 'doc' is the document to use for this validation - - Returns an integer value indicating the success/failure of the - validation. @~ The possible values returned by this function are - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also getDocument(). -"; - - -%feature("docstring") SBMLValidator::validate " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - validate(string filename) - - Validates the SBML document located at the given 'filename'. - - This is a convenience method that saves callers the trouble of using - SBMLReader to read the document first. - - Parameter 'filename' is the path to the file to be read and - validated. - - Returns the number of validation failures that occurred. The objects - describing the actual failures can be retrieved using getFailures(). - - ______________________________________________________________________ - Method variant with the following signature: - - validate() - - Runs this validator on the current SBML document. - - Returns an integer value indicating the success/failure of the - validation. @~ The possible values returned by this function are - determined by the specific subclasses of this class. - - ______________________________________________________________________ - Method variant with the following signature: - - validate(SBMLDocument d) - - Validates the given SBMLDocument object. - - This is identical to calling setDocument() followed by validate(). - - Parameter 'd' is the SBML document to validate - - Returns the number of validation failures that occurred. The objects - describing the actual failures can be retrieved using getFailures(). -"; - - -%feature("docstring") SBMLValidator::clearFailures " - Clears this validator's list of failures. - - If you are validating multiple SBML documents with the same - validator, call this method after you have processed the list of - failures from the last validation run and before validating the next - document. - - @~ -"; - - -%feature("docstring") SBMLValidator::getFailures " - Returns a list of SBMLError objects (if any) that were logged by the - last run of this validator. - - Returns a list of errors, warnings and other diagnostics logged - during validation. - - See also clearFailures(). -"; - - -%feature("docstring") SBMLValidator::logFailure " - Adds the given failure to this list of Validators failures. - - Parameter 'err' is an SBMLError object representing an error or - warning - - @~ -"; - - -%feature("docstring") SBMLValidator::getErrorLog " - Returns the list of errors or warnings logged during parsing, - consistency checking, or attempted translation of this model. - - Note that this refers to the SBMLDocument object's error log (i.e., - the list returned by SBMLDocument.getErrorLog()). That list of - errors and warnings is separate from the validation failures tracked - by this validator (i.e., the list returned by getFailures()). - - Returns the SBMLErrorLog used for the SBMLDocument - - @~ -"; - - -%feature("docstring") SBMLValidator::getModel " - Returns the Model object stored in the SBMLDocument. - - It is important to note that this method does not create a Model - instance. The model in the SBMLDocument must have been created at - some prior time, for example using SBMLDocument.createModel() or - SBMLDocument.setModel(). This method returns None if a model does - not yet exist. - - Returns the Model contained in this validator's SBMLDocument object. - - See also SBMLDocument.setModel(), SBMLDocument.createModel(). -"; - - -%feature("docstring") SBMLValidator::getNumFailures " - Returns the number of failures encountered in the last validation - run. - - This method returns the number of failures logged by this validator. - This number only reflects this validator's actions; the number may - not be the same as the number of errors and warnings logged on the - SBMLDocument object's error log (i.e., the object returned by - SBMLDocument.getErrorLog()), because other parts of libSBML may log - errors and warnings beyond those found by this validator. - - Returns the number of errors logged by this validator. -"; - - -%feature("docstring") SBMLValidator::getFailure " - Returns the failure object at index n in this validator's list of - failures logged during the last run. - - Callers should use getNumFailures() first, to find out the number of - entries in this validator's list of failures. - - Parameter 'n' is an integer indicating the index of the object to - return from the failures list; index values start at 0. - - Returns the failure at the given index number. - - See also getNumFailures(). -"; - - -%feature("docstring") SBMLExternalValidator::SBMLExternalValidator " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLExternalValidator() - - Constructor. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLExternalValidator(SBMLExternalValidator) - - Copy constructor. -"; - - -%feature("docstring") SBMLExternalValidator::clone " - Creates and returns a deep copy of this converter. - - Returns a (deep) copy of this converter. -"; - - -%feature("docstring") SBMLExternalValidator::validate " - the actual conversion - - Returns status code represeting success/failure/conversion impossible -"; - - -%feature("docstring") SBMLExternalValidator::getProgram " - Returns the program name of the validator to be run -"; - - -%feature("docstring") SBMLExternalValidator::setProgram " - Sets the name of the program to run - - Parameter 'program' is the program to be started -"; - - -%feature("docstring") SBMLExternalValidator::getOutputFileName " - Returns the output file name (this is the file the external program - will write) -"; - - -%feature("docstring") SBMLExternalValidator::setOutputFileName " - Sets the output file name - - Parameter 'outputFileName' is the name of the output XML file -"; - - -%feature("docstring") SBMLExternalValidator::getSBMLFileName " - Returns the name of the SBML file (the document of this validator - will be written to it) -"; - - -%feature("docstring") SBMLExternalValidator::setSBMLFileName " - Sets the filename for the temporary file to be created - - Parameter 'sbmlFileName' is the temporary name -"; - - -%feature("docstring") SBMLExternalValidator::clearArguments " - Clear all additional arguments -"; - - -%feature("docstring") SBMLExternalValidator::addArgument " - Adds the given argument to the list of additional arguments - - Parameter 'arg' is the argument -"; - - -%feature("docstring") SBMLExternalValidator::getNumArguments " - Returns the number of arguments. -"; - - -%feature("docstring") SBMLExternalValidator::getArgument " - Returns the argument for the given index. - - Parameter 'n' is the zero based index of the argument. - - Returns the argument at the given index. -"; - - -%feature("docstring") SBMLExternalValidator::getArguments " - Returns all arguments -"; - - -%feature("docstring") SBMLExternalValidator::setArguments " - Sets the additional arguments - - Parameter 'args' is teh additional arguments -"; - - -%feature("docstring") readMathML " - Internal implementation method. -"; - - -%feature("docstring") writeMathML " - Internal implementation method. -"; - - -%feature("docstring") readMathMLFromString " - Reads the MathML from the given XML string, constructs a - corresponding abstract syntax tree, and returns a pointer to the - root of the tree. - - Parameter 'xml' is a string containing a full MathML expression - - Returns the root of an AST corresponding to the given mathematical - expression, otherwise None is returned if the given string is None - or invalid. -"; - - -%feature("docstring") writeMathMLToString " - Writes the given ASTNode (and its children) to a string as MathML, - and returns the string. - - Parameter 'node' is the root of an AST to write out to the stream. - - Returns a string containing the written-out MathML representation of - the given AST. - - Note: - - The string is owned by the caller and should be freed (with free()) - when no longer needed. None is returned if the given argument is - None. -"; - - -%feature("docstring") ASTNode " - @ingroup Core Abstract Syntax Tree (AST) representation of a - mathematical expression. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - Abstract Syntax Trees (ASTs) are a simple kind of data structure used - in libSBML for storing mathematical expressions. The ASTNode is the - cornerstone of libSBML's AST representation. An AST 'node' - represents the most basic, indivisible part of a mathematical - formula and come in many types. For instance, there are node types - to represent numbers (with subtypes to distinguish integer, real, - and rational numbers), names (e.g., constants or variables), simple - mathematical operators, logical or relational operators and - functions. LibSBML ASTs provide a canonical, in-memory - representation for all mathematical formulas regardless of their - original format (which might be MathML or might be text strings). - - An AST node in libSBML is a recursive structure containing a pointer - to the node's value (which might be, for example, a number or a - symbol) and a list of children nodes. Each ASTNode node may have - none, one, two, or more children depending on its type. The - following diagram illustrates an example of how the mathematical - expression '1 + 2' is represented as an AST with one plus node - having two integer children nodes for the numbers 1 and 2. The - figure also shows the corresponding MathML representation: - - Example AST representation of a mathematical expression. Infix AST - MathML 1 + 2 <math xmlns=\"http://www.w3.org/1998/Math/MathML\"> - - <plus/> <cn type=\"integer\"> 1 </cn> <cn - type=\"integer\"> 2 </cn> </apply> </math> - - The following are other noteworthy points about the AST - representation in libSBML: - - * A numerical value represented in MathML as a real number with - an exponent is preserved as such in the AST node representation, - even if the number could be stored in a double data type. This is - done so that when an SBML model is read in and then written out - again, the amount of change introduced by libSBML to the SBML during - the round-trip activity is minimized. - - * Rational numbers are represented in an AST node using separate - numerator and denominator values. These can be retrieved using the - methods ASTNode.getNumerator() and ASTNode.getDenominator(). - - * The children of an ASTNode are other ASTNode objects. The list of - children is empty for nodes that are leaf elements, such as numbers. - For nodes that are actually roots of expression subtrees, the list of - children points to the parsed objects that make up the rest of the - expression. - - <a class='anchor' name='ASTNodeType_t'>The set of possible ASTNode - types</h3> @~ Every ASTNode has an associated type code to - indicate, for example, whether it holds a number or stands for an - arithmetic operator. The type is recorded as a value drawn from a - set of static integer constants defined in the class {@link - libsbml}. Their names begin with the characters AST_. The list of - possible types is quite long, because it covers all the mathematical - functions that are permitted in SBML. The values are shown in the - following table: AST_CONSTANT_E AST_CONSTANT_FALSE - AST_CONSTANT_PI AST_CONSTANT_TRUE AST_DIVIDE AST_FUNCTION - AST_FUNCTION_ABS AST_FUNCTION_ARCCOS AST_FUNCTION_ARCCOSH - AST_FUNCTION_ARCCOT AST_FUNCTION_ARCCOTH AST_FUNCTION_ARCCSC - AST_FUNCTION_ARCCSCH AST_FUNCTION_ARCSEC AST_FUNCTION_ARCSECH - AST_FUNCTION_ARCSIN AST_FUNCTION_ARCSINH AST_FUNCTION_ARCTAN - AST_FUNCTION_ARCTANH AST_FUNCTION_CEILING AST_FUNCTION_COS - AST_FUNCTION_COSH AST_FUNCTION_COT AST_FUNCTION_COTH - AST_FUNCTION_CSC AST_FUNCTION_CSCH AST_FUNCTION_DELAY - AST_FUNCTION_EXP AST_FUNCTION_FACTORIAL AST_FUNCTION_FLOOR - AST_FUNCTION_LN AST_FUNCTION_LOG AST_FUNCTION_PIECEWISE - AST_FUNCTION_POWER AST_FUNCTION_ROOT AST_FUNCTION_SEC - AST_FUNCTION_SECH AST_FUNCTION_SIN AST_FUNCTION_SINH - AST_FUNCTION_TAN AST_FUNCTION_TANH AST_INTEGER AST_LAMBDA - AST_LOGICAL_AND AST_LOGICAL_NOT AST_LOGICAL_OR AST_LOGICAL_XOR - AST_MINUS AST_NAME AST_NAME_AVOGADRO (Level 3 only) AST_NAME_TIME - AST_PLUS AST_POWER AST_RATIONAL AST_REAL AST_REAL_E - AST_RELATIONAL_EQ AST_RELATIONAL_GEQ AST_RELATIONAL_GT - AST_RELATIONAL_LEQ AST_RELATIONAL_LT AST_RELATIONAL_NEQ AST_TIMES - AST_UNKNOWN The types have the following meanings: * If - the node is basic mathematical operator (e.g., '+'), then the - node's type will be AST_PLUS, AST_MINUS, AST_TIMES, AST_DIVIDE, or - AST_POWER, as appropriate. * If the node is a predefined function - or operator from SBML Level 1 (in the string-based formula syntax - used in Level 1) or SBML Levels 2 and 3 (in the subset of MathML - used in SBML Levels 2 and 3), then the node's type will be either - AST_FUNCTION_X, AST_LOGICAL_X, or AST_RELATIONAL_X, as appropriate. - (Examples: AST_FUNCTION_LOG, AST_RELATIONAL_LEQ.) * If the node - refers to a user-defined function, the node's type will be - AST_FUNCTION (because it holds the name of the function). * If the - node is a lambda expression, its type will be AST_LAMBDA. * If the - node is a predefined constant ('ExponentialE', 'Pi', 'True' or - 'False'), then the node's type will be AST_CONSTANT_E, - AST_CONSTANT_PI, AST_CONSTANT_TRUE, or AST_CONSTANT_FALSE. * - (Levels 2 and 3 only) If the node is the special MathML csymbol - time, the value of the node will be AST_NAME_TIME. (Note, however, - that the MathML csymbol delay is translated into a node of type - AST_FUNCTION_DELAY. The difference is due to the fact that time is a - single variable, whereas delay is actually a function taking - arguments.) * (Level 3 only) If the node is the special MathML - csymbol avogadro, the value of the node will be AST_NAME_AVOGADRO. - * If the node contains a numerical value, its type will be - AST_INTEGER, AST_REAL, AST_REAL_E, or AST_RATIONAL, as appropriate. - <h3>Converting between ASTs and text strings - ...................................................................... - - The text-string form of mathematical formulas produced by - libsbml.formulaToString()@~ and read by libsbml.parseFormula()@~ - and libsbml.parseL3Formula()@~ are in a simple C-inspired infix - notation. A formula in this text-string form can be handed to a - program that understands SBML mathematical expressions, or used as - part of a translation system. The libSBML distribution comes with - an example program in the 'examples' subdirectory called - translateMath that implements an interactive command-line - demonstration of translating infix formulas into MathML and vice- - versa. - - The formula strings may contain operators, function calls, symbols, - and white space characters. The allowable white space characters - are tab and space. The following are illustrative examples of - formulas expressed in the syntax: - - 0.10 * k4^2 - - - (vm * s1)/(km + s1) - - The following table shows the precedence rules in this syntax. In - the Class column, operand implies the construct is an operand, - prefix implies the operation is applied to the following arguments, - unary implies there is one argument, and binary implies there are - two arguments. The values in the Precedence column show how the - order of different types of operation are determined. For example, - the expression a * b + c is evaluated as (a * b) + c because the * - operator has higher precedence. The Associates column shows how the - order of similar precedence operations is determined; for example, a - - b + c is evaluated as (a - b) + c because the + and - operators - are left-associative. The precedence and associativity rules are - taken from the C programming language, except for the symbol ^, - which is used in C for a different purpose. (Exponentiation can be - invoked using either ^ or the function power.) - - Token Operation Class Precedence Associates namesymbol - referenceoperand6n/a (expression)expression groupingoperand6n/a - f(...)function callprefix6left -negationunary5right - ^powerbinary4left *multiplicationbinary3left /divisonbinary3left - +additionbinary2left -subtractionbinary2left ,argument - delimiterbinary1left A table of the expression operators and their - precedence in the text-string format for mathematical expressions - used by SBML_parseFormula(). - - A program parsing a formula in an SBML model should assume that names - appearing in the formula are the identifiers of Species, Parameter, - Compartment, FunctionDefinition, Reaction (in SBML Levels 2 and 3), - or SpeciesReference (in SBML Level 3 only) objects defined in a - model. When a function call is involved, the syntax consists of a - function identifier, followed by optional white space, followed by - an opening parenthesis, followed by a sequence of zero or more - arguments separated by commas (with each comma optionally preceded - and/or followed by zero or more white space characters), followed by - a closing parenthesis. There is an almost one-to-one mapping - between the list of predefined functions available, and those - defined in MathML. All of the MathML functions are recognized; this - set is larger than the functions defined in SBML Level 1. In the - subset of functions that overlap between MathML and SBML Level 1, - there exist a few differences. The following table summarizes the - differences between the predefined functions in SBML Level 1 and the - MathML equivalents in SBML Levels 2 and 3: - - Text string formula functions MathML equivalents in SBML Levels 2 and - 3 acosarccos asinarcsin atanarctan ceilceiling logln log10(x)log(10, - x) pow(x, y)power(x, y) sqr(x)power(x, 2) sqrt(x)root(2, x) Table - comparing the names of certain functions in the SBML text-string - formula syntax and MathML. The left column shows the names of - functions recognized by SBML_parseFormula(); the right column shows - their equivalent function names in MathML 2.0, used in SBML Levels 2 - and 3. - - WARNING: - - We urge developers to keep in mind that the text-string formula - syntax is specific to SBML Level 1's C-like mathematical formula - syntax. In particular, it is not a general-purpose mathematical - expression syntax. LibSBML provides methods for parsing and - transforming text-string math formulas back and forth from AST - structures, but it is important to keep the system's limitations in - mind. - - @~ @~ See also libsbml.parseL3Formula()@~, - libsbml.parseFormula()@~. @~ -"; - - -%feature("docstring") ASTNode::ASTNode " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ASTNode(ASTNode orig) - - Copy constructor; creates a deep copy of the given ASTNode. - - Parameter 'orig' is the ASTNode to be copied. - - ______________________________________________________________________ - Method variant with the following signature: - - ASTNode(Token_t *token) - - Creates a new ASTNode from the given Token. The resulting ASTNode - will contain the same data as the Token. - - Parameter 'token' is the Token to add. - - ______________________________________________________________________ - Method variant with the following signature: - - ASTNode(ASTNodeType_t type = AST_UNKNOWN) - - Creates and returns a new ASTNode. - - Unless the argument 'type' is given, the returned node will by - default have a type of libsbml.AST_UNKNOWN. If the type isn't - supplied when caling this constructor, the caller should set the - node type to something else as soon as possible using - ASTNode.setType(). - - Parameter 'type' is an optional type@~ code indicating the type of - node to create. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") ASTNode::freeName " - Frees the name of this ASTNode and sets it to None. - - This operation is only applicable to ASTNode objects corresponding to - operators, numbers, or libsbml.AST_UNKNOWN. This method has no - effect on other types of nodes. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") ASTNode::canonicalize " - Converts this ASTNode to a canonical form and returns True if - successful, False otherwise. - - The rules determining the canonical form conversion are as follows: - - - * If the node type is libsbml.AST_NAME and the node name matches - 'ExponentialE', 'Pi', 'True' or 'False' the node type is converted to - the corresponding AST_CONSTANT_X type. - - * If the node type is an libsbml.AST_FUNCTION and the node name - matches an SBML (MathML) function name, logical operator name, or - relational operator name, the node is converted to the corresponding - AST_FUNCTION_X or AST_LOGICAL_X type. - - SBML Level 1 function names are searched first; thus, for example, - canonicalizing log will result in a node type of - libsbml.AST_FUNCTION_LN. (See the SBML Level 1 Version 2 - Specification, Appendix C.) - - Sometimes, canonicalization of a node results in a structural - conversion of the node as a result of adding a child. For example, a - node with the SBML Level 1 function name sqr and a single child node - (the argument) will be transformed to a node of type - libsbml.AST_FUNCTION_POWER with two children. The first child will - remain unchanged, but the second child will be an ASTNode of type - libsbml.AST_INTEGER and a value of 2. The function names that result - in structural changes are: log10, sqr, and sqrt. -"; - - -%feature("docstring") ASTNode::addChild " - Adds the given node as a child of this ASTNode. Child nodes are - added in-order, from left to right. - - Parameter 'child' is the ASTNode instance to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - Adding a child to an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. Callers need to be careful to use - this method in the context of other operations to create complete and - correct formulas. The method ASTNode.isWellFormedASTNode()@~ may - also be useful for checking the results of node modifications. - - See also prependChild(), replaceChild(), insertChild(), - removeChild(), isWellFormedASTNode(). -"; - - -%feature("docstring") ASTNode::prependChild " - Adds the given node as a child of this ASTNode. This method adds - child nodes from right to left. - - Parameter 'child' is the ASTNode instance to add - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - Prepending a child to an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - See also addChild(), replaceChild(), insertChild(), removeChild(). -"; - - -%feature("docstring") ASTNode::removeChild " - Removes the nth child of this ASTNode object. - - Parameter 'n' is long the index of the child to remove - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - Note: - - Removing a child from an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - See also addChild(), prependChild(), replaceChild(), insertChild(). -"; - - -%feature("docstring") ASTNode::replaceChild " - Replaces the nth child of this ASTNode with the given ASTNode. - - Parameter 'n' is long the index of the child to replace Parameter - 'newChild' is ASTNode to replace the nth child - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - Replacing a child from an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - See also addChild(), prependChild(), insertChild(), removeChild(). -"; - - -%feature("docstring") ASTNode::insertChild " - Insert the given ASTNode at point n in the list of children of this - ASTNode. - - Parameter 'n' is long the index of the ASTNode being added Parameter - 'newChild' is ASTNode to insert as the nth child - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - Inserting a child into an ASTNode may change the structure of the - mathematical formula being represented by the tree structure, and may - render the representation invalid. - - See also addChild(), prependChild(), replaceChild(), removeChild(). -"; - - -%feature("docstring") ASTNode::deepCopy " - Creates a recursive copy of this node and all its children. - - Returns a copy of this ASTNode and all its children. The caller owns - the returned ASTNode and is reponsible for deleting it. -"; - - -%feature("docstring") ASTNode::getChild " - Get a child of this node according to its index number. - - Parameter 'n' is the index of the child to get - - Returns the nth child of this ASTNode or None if this node has no nth - child (n > ASTNode.getNumChildren()@~ - 1). -"; - - -%feature("docstring") ASTNode::getLeftChild " - Get the left child of this node. - - Returns the left child of this ASTNode. This is equivalent to - calling ASTNode.getChild()@~ with an argument of 0. -"; - - -%feature("docstring") ASTNode::getRightChild " - Get the right child of this node. - - Returns the right child of this ASTNode, or None if this node has no - right child. If ASTNode.getNumChildren()@~ > 1, then this is - equivalent to: - - getChild( getNumChildren() - 1 ); -"; - - -%feature("docstring") ASTNode::getNumChildren " - Get the number of children that this node has. - - Returns the number of children of this ASTNode, or 0 is this node has - no children. -"; - - -%feature("docstring") ASTNode::addSemanticsAnnotation " - Adds the given XMLNode as a semantic annotation of this ASTNode. - - The <semantics> element is a MathML 2.0 construct that can be used to - associate additional information with a MathML construct. The - construct can be used to decorate a MathML expressions with a - sequence of one or more or <annotation-xml> elements. Each such - element contains a pair of items; the first is a symbol that acts as - an attribute or key, and the second is the value associated with the - attribute or key. Please refer to the MathML 2.0 documentation, - particularly the Section 5.2, Semantic Annotations for more - information about these constructs. - - Parameter 'sAnnotation' is the annotation to add. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - Note: - - Although SBML permits the semantic annotation construct in MathML - expressions, the truth is that this construct has so far (at this - time of this writing, which is early 2011) seen very little use in - SBML software. The full implications of using semantic annotations - are still poorly understood. If you wish to use this construct, we - urge you to discuss possible uses and applications on the SBML - discussion lists, particularly <a target='_blank' - href='http://sbml.org/Forums'>sbml-discuss@caltech.edu and/or sbml- - interoperability@caltech.edu. -"; - - -%feature("docstring") ASTNode::getNumSemanticsAnnotations " - Get the number of semantic annotation elements inside this node. - - The <semantics> element is a MathML 2.0 construct that can be used to - associate additional information with a MathML construct. The - construct can be used to decorate a MathML expressions with a - sequence of one or more <annotation> or <annotation-xml> elements. - Each such element contains a pair of items; the first is a symbol - that acts as an attribute or key, and the second is the value - associated with the attribute or key. Please refer to the MathML 2.0 - documentation, particularly the Section 5.2, Semantic Annotations - for more information about these constructs. - - Returns the number of annotations of this ASTNode. - - See also ASTNode.addSemanticsAnnotation(). -"; - - -%feature("docstring") ASTNode::getSemanticsAnnotation " - Get the nth semantic annotation of this node. - - The <semantics> element is a MathML 2.0 construct that can be used to - associate additional information with a MathML construct. The - construct can be used to decorate a MathML expressions with a - sequence of one or more <annotation> or <annotation-xml> elements. - Each such element contains a pair of items; the first is a symbol - that acts as an attribute or key, and the second is the value - associated with the attribute or key. Please refer to the MathML 2.0 - documentation, particularly the Section 5.2, Semantic Annotations - for more information about these constructs. - - Returns the nth annotation of this ASTNode, or None if this node has - no nth annotation (n > ASTNode.getNumChildren()@~ - 1). - - See also ASTNode.addSemanticsAnnotation(). -"; - - -%feature("docstring") ASTNode::getListOfNodes " - Performs a depth-first search of the tree rooted at this ASTNode - object, and returns a List of nodes where the given function - predicate(node) returns True (non-zero). - - For portability between different programming languages, the - predicate is passed in as a pointer to a function. - - Parameter 'predicate' is the predicate to use - - Returns the list of nodes for which the predicate returned True - (non-zero). The List returned is owned by the caller and should be - deleted after the caller is done using it. The ASTNode objects in - the list; however, are not owned by the caller (as they still belong - to the tree itself), and therefore should not be deleted. -"; - - -%feature("docstring") ASTNode::fillListOfNodes " - Performs a depth-first search of the tree rooted at this ASTNode - object, and adds to the list 'lst' the nodes where the given function - predicate(node) returns True (non-zero). - - This method is identical to getListOfNodes(ASTNodePredicate - predicate) const, except that instead of creating a new List - object, it uses the one passed in as argument 'lst'. - - For portability between different programming languages, the - predicate is passed in as a pointer to a function. The function - definition must have the type ASTNode.h::ASTNodePredicate, which is - defined as - - int (*ASTNodePredicate) (const ASTNode_t *node); - where a return value of non-zero represents True and zero - represents False. - - Parameter 'predicate' is the predicate to use. - - Parameter 'lst' is the List to which ASTNode objects should be added. - - See also getListOfNodes(). -"; - - -%feature("docstring") ASTNode::getCharacter " - Get the value of this node as a single character. This function - should be called only when ASTNode.getType()@~ returns - libsbml.AST_PLUS, libsbml.AST_MINUS, libsbml.AST_TIMES, - libsbml.AST_DIVIDE or libsbml.AST_POWER. - - Returns the value of this ASTNode as a single character -"; - - -%feature("docstring") ASTNode::getId " - Get the id of this ASTNode. - - Returns the mathml id of this ASTNode. -"; - - -%feature("docstring") ASTNode::getClass " - Get the class of this ASTNode. - - Returns the mathml class of this ASTNode. -"; - - -%feature("docstring") ASTNode::getStyle " - Get the style of this ASTNode. - - Returns the mathml style of this ASTNode. -"; - - -%feature("docstring") ASTNode::getInteger " - Get the value of this node as an integer. This function should be - called only when ASTNode.getType()@~ == libsbml.AST_INTEGER. - - Returns the value of this ASTNode as a (long) integer. -"; - - -%feature("docstring") ASTNode::getName " - Get the value of this node as a string. This function may be called - on nodes that (1) are not operators, i.e., nodes for which - ASTNode.isOperator()@~ returns False, and (2) are not numbers, i.e., - ASTNode.isNumber()@~ returns False. - - Returns the value of this ASTNode as a string. -"; - - -%feature("docstring") ASTNode::getOperatorName " - Get the value of this operator node as a string. This function may - be called on nodes that are operators, i.e., nodes for which - ASTNode.isOperator()@~ returns True. - - Returns the name of this operator ASTNode as a string (or None if not - an operator). -"; - - -%feature("docstring") ASTNode::getNumerator " - Get the value of the numerator of this node. This function should be - called only when ASTNode.getType()@~ == libsbml.AST_RATIONAL. - - Returns the value of the numerator of this ASTNode. -"; - - -%feature("docstring") ASTNode::getDenominator " - Get the value of the denominator of this node. This function should - be called only when ASTNode.getType()@~ == libsbml.AST_RATIONAL. - - Returns the value of the denominator of this ASTNode. -"; - - -%feature("docstring") ASTNode::getReal " - Get the real-numbered value of this node. This function should be - called only when ASTNode.isReal()@~ == true. - - This function performs the necessary arithmetic if the node type is - libsbml.AST_REAL_E (mantissa * 10^exponent) or libsbml.AST_RATIONAL - (numerator / denominator). - - Returns the value of this ASTNode as a real (double). -"; - - -%feature("docstring") ASTNode::getMantissa " - Get the mantissa value of this node. This function should be called - only when ASTNode.getType()@~ returns libsbml.AST_REAL_E or - libsbml.AST_REAL. If ASTNode.getType()@~ returns libsbml.AST_REAL, - this method is identical to ASTNode.getReal(). - - Returns the value of the mantissa of this ASTNode. -"; - - -%feature("docstring") ASTNode::getExponent " - Get the exponent value of this ASTNode. This function should be - called only when ASTNode.getType()@~ returns libsbml.AST_REAL_E or - libsbml.AST_REAL. - - Returns the value of the exponent of this ASTNode. -"; - - -%feature("docstring") ASTNode::getPrecedence " - Get the precedence of this node in the infix math syntax of SBML - Level 1. For more information about the infix syntax, see the - discussion about text string formulas at the top of the - documentation for ASTNode. - - Returns an integer indicating the precedence of this ASTNode -"; - - -%feature("docstring") ASTNode::getType " - Get the type of this ASTNode. The value returned is one of the - enumeration values such as libsbml.AST_LAMBDA, libsbml.AST_PLUS, - etc. - - Returns the type of this ASTNode. -"; - - -%feature("docstring") ASTNode::getUnits " - Get the units of this ASTNode. - - SBML Level 3 Version 1 introduced the ability to include an attribute - sbml:units on MathML cn elements appearing in SBML mathematical - formulas. The value of this attribute can be used to indicate the - unit of measurement to be associated with the number in the content - of the cn element. The value of this attribute must be the - identifier of a unit of measurement defined by SBML or the enclosing - Model. Here, the sbml portion is an XML namespace prefix that must - be associated with the SBML namespace for SBML Level 3. The - following example illustrates how this attribute can be used to - define a number with value 10 and unit of measurement second: - - <math xmlns=\"http://www.w3.org/1998/Math/MathML\" - xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> - <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> - - Returns the units of this ASTNode. - - Note: - - The sbml:units attribute is only available in SBML Level 3. It may - not be used in Levels 1-2 of SBML. - - @~ @~ See also libsbml.parseL3Formula()@~. @~ -"; - - -%feature("docstring") ASTNode::isAvogadro " - Predicate returning True (non-zero) if this node is the special - symbol avogadro. The predicate returns False (zero) otherwise. - - Returns True if this ASTNode is the special symbol avogadro. - - @~ @~ See also libsbml.parseL3Formula()@~. @~ -"; - - -%feature("docstring") ASTNode::isBoolean " - Predicate returning True (non-zero) if this node has a boolean type - (a logical operator, a relational operator, or the constants True or - False). - - Returns true if this ASTNode is a boolean, false otherwise. -"; - - -%feature("docstring") ASTNode::returnsBoolean " - Predicate returning True (non-zero) if this node returns a boolean - type or False (zero) otherwise. - - This function looks at the whole ASTNode rather than just the top - level of the ASTNode. Thus it will consider return values from - piecewise statements. In addition, if this ASTNode uses a function - call, the return value of the functionDefinition will be determined. - Note that this is only possible where the ASTNode can trace its - parent Model, that is, the ASTNode must represent the math element - of some SBML object that has already been added to an instance of an - SBMLDocument. - - See also isBoolean(). - - Returns true if this ASTNode returns a boolean, false otherwise. -"; - - -%feature("docstring") ASTNode::isConstant " - Predicate returning True (non-zero) if this node represents a MathML - constant (e.g., True, Pi). - - Returns True if this ASTNode is a MathML constant, False otherwise. - - Note: - - this function will also return True for libsbml.AST_NAME_AVOGADRO in - SBML Level 3. -"; - - -%feature("docstring") ASTNode::isFunction " - Predicate returning True (non-zero) if this node represents a MathML - function (e.g., abs()), or an SBML Level 1 function, or a user- - defined function. - - Returns True if this ASTNode is a function, False otherwise. -"; - - -%feature("docstring") ASTNode::isInfinity " - Predicate returning True (non-zero) if this node represents the - special IEEE 754 value infinity, False (zero) otherwise. - - Returns True if this ASTNode is the special IEEE 754 value infinity, - False otherwise. -"; - - -%feature("docstring") ASTNode::isInteger " - Predicate returning True (non-zero) if this node contains an integer - value, False (zero) otherwise. - - Returns True if this ASTNode is of type libsbml.AST_INTEGER, False - otherwise. -"; - - -%feature("docstring") ASTNode::isLambda " - Predicate returning True (non-zero) if this node is a MathML - <lambda>, False (zero) otherwise. - - Returns True if this ASTNode is of type libsbml.AST_LAMBDA, False - otherwise. -"; - - -%feature("docstring") ASTNode::isLog10 " - Predicate returning True (non-zero) if this node represents a log10 - function, False (zero) otherwise. More precisely, this predicate - returns True if the node type is libsbml.AST_FUNCTION_LOG with two - children, the first of which is an libsbml.AST_INTEGER equal to 10. - - Returns True if the given ASTNode represents a log10() function, - false otherwise. - - @~ @~ See also libsbml.parseL3Formula()@~. @~ -"; - - -%feature("docstring") ASTNode::isLogical " - Predicate returning True (non-zero) if this node is a MathML logical - operator (i.e., and, or, not, xor). - - Returns True if this ASTNode is a MathML logical operator -"; - - -%feature("docstring") ASTNode::isName " - Predicate returning True (non-zero) if this node is a user-defined - variable name in SBML L1, L2 (MathML), or the special symbols delay - or time. The predicate returns False (zero) otherwise. - - Returns True if this ASTNode is a user-defined variable name in SBML - L1, L2 (MathML) or the special symbols delay or time. -"; - - -%feature("docstring") ASTNode::isNaN " - Predicate returning True (non-zero) if this node represents the - special IEEE 754 value 'not a number' (NaN), False (zero) otherwise. - - Returns True if this ASTNode is the special IEEE 754 NaN. -"; - - -%feature("docstring") ASTNode::isNegInfinity " - Predicate returning True (non-zero) if this node represents the - special IEEE 754 value 'negative infinity', False (zero) otherwise. - - Returns True if this ASTNode is the special IEEE 754 value negative - infinity, False otherwise. -"; - - -%feature("docstring") ASTNode::isNumber " - Predicate returning True (non-zero) if this node contains a number, - False (zero) otherwise. This is functionally equivalent to the - following code: - - isInteger() || isReal() - - Returns True if this ASTNode is a number, False otherwise. -"; - - -%feature("docstring") ASTNode::isOperator " - Predicate returning True (non-zero) if this node is a mathematical - operator, meaning, +, -, *, / or ^ (power). - - Returns True if this ASTNode is an operator. -"; - - -%feature("docstring") ASTNode::isPiecewise " - Predicate returning True (non-zero) if this node is the MathML - <piecewise> construct, False (zero) otherwise. - - Returns True if this ASTNode is a MathML piecewise function -"; - - -%feature("docstring") ASTNode::isRational " - Predicate returning True (non-zero) if this node represents a - rational number, False (zero) otherwise. - - Returns True if this ASTNode is of type libsbml.AST_RATIONAL. -"; - - -%feature("docstring") ASTNode::isReal " - Predicate returning True (non-zero) if this node can represent a - real number, False (zero) otherwise. More precisely, this node must - be of one of the following types: libsbml.AST_REAL, - libsbml.AST_REAL_E or libsbml.AST_RATIONAL. - - Returns True if the value of this ASTNode can represented as a real - number, False otherwise. -"; - - -%feature("docstring") ASTNode::isRelational " - Predicate returning True (non-zero) if this node is a MathML - relational operator, meaning ==, >=, >, <, and !=. - - Returns True if this ASTNode is a MathML relational operator, false - otherwise -"; - - -%feature("docstring") ASTNode::isSqrt " - Predicate returning True (non-zero) if this node represents a square - root function, False (zero) otherwise. More precisely, the node - type must be libsbml.AST_FUNCTION_ROOT with two children, the first - of which is an libsbml.AST_INTEGER node having value equal to 2. - - Returns True if the given ASTNode represents a sqrt() function, - False otherwise. -"; - - -%feature("docstring") ASTNode::isUMinus " - Predicate returning True (non-zero) if this node is a unary minus - operator, False (zero) otherwise. A node is defined as a unary - minus node if it is of type libsbml.AST_MINUS and has exactly one - child. - - For numbers, unary minus nodes can be 'collapsed' by negating the - number. In fact, libsbml.parseFormula()@~ does this during its - parsing process, and libsbml.parseL3Formula()@~ has a - configuration option that allows this behavior to be turned on or - off. However, unary minus nodes for symbols (libsbml.AST_NAME) - cannot be 'collapsed', so this predicate function is necessary. - - Returns True if this ASTNode is a unary minus, False otherwise. - - @~ @~ See also libsbml.parseL3Formula()@~. @~ -"; - - -%feature("docstring") ASTNode::isUPlus " - Predicate returning True (non-zero) if this node is a unary plus - operator, False (zero) otherwise. A node is defined as a unary - minus node if it is of type libsbml.AST_MINUS and has exactly one - child. - - Returns True if this ASTNode is a unary plus, False otherwise. -"; - - -%feature("docstring") ASTNode::hasTypeAndNumChildren " - Predicate returning True if this node is of type Parameter 'type' is - and has Parameter 'numchildren' is number of children. Designed for - use in cases where it is useful to discover if the node is a unary - not or unary minus, or a times node with no children, etc. - - Returns True if this ASTNode is has the specified type and number - of children, False otherwise. -"; - - -%feature("docstring") ASTNode::isUnknown " - Predicate returning True (non-zero) if this node has an unknown type. - - 'Unknown' nodes have the type libsbml.AST_UNKNOWN. Nodes with - unknown types will not appear in an ASTNode tree returned by libSBML - based upon valid SBML input; the only situation in which a node with - type libsbml.AST_UNKNOWN may appear is immediately after having - create a new, untyped node using the ASTNode constructor. Callers - creating nodes should endeavor to set the type to a valid node type - as soon as possible after creating new nodes. - - Returns True if this ASTNode is of type libsbml.AST_UNKNOWN, False - otherwise. -"; - - -%feature("docstring") ASTNode::isSetId " - Predicate returning True (non-zero) if this node has the mathml - attribute id. - - Returns true if this ASTNode has an attribute id, false otherwise. -"; - - -%feature("docstring") ASTNode::isSetClass " - Predicate returning True (non-zero) if this node has the mathml - attribute class. - - Returns true if this ASTNode has an attribute class, false otherwise. -"; - - -%feature("docstring") ASTNode::isSetStyle " - Predicate returning True (non-zero) if this node has the mathml - attribute style. - - Returns true if this ASTNode has an attribute style, false otherwise. -"; - - -%feature("docstring") ASTNode::isSetUnits " - Predicate returning True (non-zero) if this node has the attribute - sbml:units. - - SBML Level 3 Version 1 introduced the ability to include an attribute - sbml:units on MathML cn elements appearing in SBML mathematical - formulas. The value of this attribute can be used to indicate the - unit of measurement to be associated with the number in the content - of the cn element. The value of this attribute must be the - identifier of a unit of measurement defined by SBML or the enclosing - Model. Here, the sbml portion is an XML namespace prefix that must - be associated with the SBML namespace for SBML Level 3. The - following example illustrates how this attribute can be used to - define a number with value 10 and unit of measurement second: - - <math xmlns=\"http://www.w3.org/1998/Math/MathML\" - xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> - <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> - - Returns True if this ASTNode has units associated with it, False - otherwise. - - Note: - - The sbml:units attribute is only available in SBML Level 3. It may - not be used in Levels 1-2 of SBML. -"; - - -%feature("docstring") ASTNode::hasUnits " - Predicate returning True (non-zero) if this node or any of its - children nodes have the attribute sbml:units. - - SBML Level 3 Version 1 introduced the ability to include an attribute - sbml:units on MathML cn elements appearing in SBML mathematical - formulas. The value of this attribute can be used to indicate the - unit of measurement to be associated with the number in the content - of the cn element. The value of this attribute must be the - identifier of a unit of measurement defined by SBML or the enclosing - Model. Here, the sbml portion is an XML namespace prefix that must - be associated with the SBML namespace for SBML Level 3. The - following example illustrates how this attribute can be used to - define a number with value 10 and unit of measurement second: - - <math xmlns=\"http://www.w3.org/1998/Math/MathML\" - xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> - <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> - - Returns True if this ASTNode or its children has units associated - with it, False otherwise. - - Note: - - The sbml:units attribute is only available in SBML Level 3. It may - not be used in Levels 1-2 of SBML. -"; - - -%feature("docstring") ASTNode::setCharacter " - Sets the value of this ASTNode to the given character. If character - is one of +, -, *, / or ^, the node type will be set accordingly. - For all other characters, the node type will be set to - libsbml.AST_UNKNOWN. - - Parameter 'value' is the character value to which the node's value - should be set. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ASTNode::setId " - Sets the mathml id of this ASTNode to id. - - Parameter 'id' is string representing the identifier. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ASTNode::setClass " - Sets the mathml class of this ASTNode to className. - - Parameter 'className' is string representing the mathml class for - this node. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ASTNode::setStyle " - Sets the mathml style of this ASTNode to style. - - Parameter 'style' is string representing the identifier. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ASTNode::setName " - Sets the value of this ASTNode to the given name. - - As a side-effect, this ASTNode object's type will be reset to - libsbml.AST_NAME if (and only if) the ASTNode was previously an - operator ( ASTNode.isOperator()@~ == true), number ( - ASTNode.isNumber()@~ == true), or unknown. This allows names to be - set for libsbml.AST_FUNCTION nodes and the like. - - Parameter 'name' is the string containing the name to which this - node's value should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ASTNode::setValue " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setValue(long numerator, long denominator) - - Sets the value of this ASTNode to the given rational in two parts: - the numerator and denominator. The node type is set to - libsbml.AST_RATIONAL. - - Parameter 'numerator' is the numerator value of the rational - Parameter 'denominator' is the denominator value of the rational - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - ______________________________________________________________________ - Method variant with the following signature: - - setValue(double mantissa, long exponent) - - Sets the value of this ASTNode to the given real (double) in two - parts: the mantissa and the exponent. The node type is set to - libsbml.AST_REAL_E. - - Parameter 'mantissa' is the mantissa of this node's real-numbered - value Parameter 'exponent' is the exponent of this node's real- - numbered value - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - ______________________________________________________________________ - Method variant with the following signature: - - setValue(int value) - - Sets the value of this ASTNode to the given integer and sets the node - type to libsbml.AST_INTEGER. - - Parameter 'value' is the integer to which this node's value should be - set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - ______________________________________________________________________ - Method variant with the following signature: - - setValue(double value) - - Sets the value of this ASTNode to the given real (double) and sets - the node type to libsbml.AST_REAL. - - This is functionally equivalent to: - - setValue(value, 0); - - Parameter 'value' is the double format number to which this node's - value should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: * - libsbml.LIBSBML_OPERATION_SUCCESS - - ______________________________________________________________________ - Method variant with the following signature: - - setValue(long value) - - Sets the value of this ASTNode to the given (long) integer and sets - the node type to libsbml.AST_INTEGER. - - Parameter 'value' is the integer to which this node's value should be - set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ASTNode::setType " - Sets the type of this ASTNode to the given type code. A side-effect - of doing this is that any numerical values previously stored in this - node are reset to zero. - - Parameter 'type' is the type to which this node should be set - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") ASTNode::setUnits " - Sets the units of this ASTNode to units. - - The units will be set only if this ASTNode object represents a - MathML <cn> element, i.e., represents a number. Callers may use - ASTNode.isNumber()@~ to inquire whether the node is of that type. - - SBML Level 3 Version 1 introduced the ability to include an attribute - sbml:units on MathML cn elements appearing in SBML mathematical - formulas. The value of this attribute can be used to indicate the - unit of measurement to be associated with the number in the content - of the cn element. The value of this attribute must be the - identifier of a unit of measurement defined by SBML or the enclosing - Model. Here, the sbml portion is an XML namespace prefix that must - be associated with the SBML namespace for SBML Level 3. The - following example illustrates how this attribute can be used to - define a number with value 10 and unit of measurement second: - - <math xmlns=\"http://www.w3.org/1998/Math/MathML\" - xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> - <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> - - Parameter 'units' is string representing the unit identifier. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - The sbml:units attribute is only available in SBML Level 3. It may - not be used in Levels 1-2 of SBML. -"; - - -%feature("docstring") ASTNode::swapChildren " - Swap the children of this ASTNode object with the children of the - given ASTNode object. - - Parameter 'that' is the other node whose children should be used to - replace this node's children - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ASTNode::renameSIdRefs " - Renames all the SIdRef attributes on this node and any child node -"; - - -%feature("docstring") ASTNode::renameUnitSIdRefs " - Renames all the UnitSIdRef attributes on this node and any child - node. (The only place UnitSIDRefs appear in MathML <cn> elements.) -"; - - -%feature("docstring") ASTNode::replaceIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::multiplyTimeBy " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::unsetUnits " - Unsets the units of this ASTNode. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ASTNode::unsetId " - Unsets the mathml id of this ASTNode. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ASTNode::unsetClass " - Unsets the mathml class of this ASTNode. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ASTNode::unsetStyle " - Unsets the mathml style of this ASTNode. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ASTNode::setSemanticsFlag " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::unsetSemanticsFlag " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::getSemanticsFlag " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::setDefinitionURL " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::getDefinitionURL " - Gets the MathML definitionURL attribute value. - - Returns the value of the definitionURL attribute, in the form of a - libSBML XMLAttributes object. -"; - - -%feature("docstring") ASTNode::replaceArgument " - Replaces occurences of a given name within this ASTNode with the - name/value/formula represented by 'arg'. - - For example, if the formula in this ASTNode is x + y, then the - <bvar> is x and arg is an ASTNode representing the real value 3. - This method substitutes 3 for x within this ASTNode object. - - Parameter 'bvar' is a string representing the variable name to be - substituted Parameter 'arg' is an ASTNode representing the - name/value/formula to substitute -"; - - -%feature("docstring") ASTNode::setParentSBMLObject " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::getParentSBMLObject " - Returns the parent SBML object. - - Returns the parent SBML object of this ASTNode. -"; - - -%feature("docstring") ASTNode::reduceToBinary " - Reduces this ASTNode to a binary tree. - - Example: if this ASTNode is and(x, y, z), then the formula of the - reduced node is and(and(x, y), z). The operation replaces the - formula stored in the current ASTNode object. -"; - - -%feature("docstring") ASTNode::setUserData " - Sets the user data of this node. This can be used by the application - developer to attach custom information to the node. In case of a deep - copy this attribute will passed as it is. The attribute will be never - interpreted by this class. - - Parameter 'userData' is specifies the new user data. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ASTNode::*getUserData " - Returns the user data that has been previously set via setUserData(). - - Returns the user data of this node, or None if no user data has been - set. - - @~ -"; - - -%feature("docstring") ASTNode::isWellFormedASTNode " - Predicate returning True or False depending on whether this ASTNode - is well-formed. - - Note: - - An ASTNode may be well-formed, with each node and its children - having the appropriate number of children for the given type, but may - still be invalid in the context of its use within an SBML model. - - Returns True if this ASTNode is well-formed, False otherwise. - - See also hasCorrectNumberArguments(). -"; - - -%feature("docstring") ASTNode::hasCorrectNumberArguments " - Predicate returning True or False depending on whether this ASTNode - has the correct number of children for it's type. - - For example, an ASTNode with type libsbml.AST_PLUS expects 2 child - nodes. - - Note: - - This function performs a check on the toplevel node only. Child - nodes are not checked. - - Returns True if this ASTNode is has appropriate number of children - for it's type, False otherwise. - - See also isWellFormedASTNode(). -"; - - -%feature("docstring") ASTNode::isBvar " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::setBvar " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::canonicalizeConstant " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::canonicalizeFunction " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::canonicalizeFunctionL1 " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::canonicalizeLogical " - Internal implementation method. -"; - - -%feature("docstring") ASTNode::canonicalizeRelational " - Internal implementation method. -"; - - -%feature("docstring") SBML_parseFormula " - Parses the given SBML formula and returns a representation of it as - an Abstract Syntax Tree (AST). - - The text-string form of mathematical formulas produced by - libsbml.formulaToString()@~ and read by libsbml.parseFormula()@~ - and libsbml.parseL3Formula()@~ use a simple C-inspired infix - notation. A formula in this text-string form therefore can be - handed to a program that understands SBML mathematical expressions, - or used as part of a formula translation system. The syntax is - described in detail in the documentation for ASTNode. - - This returns the root node of the AST corresponding to the formula. - If the formula contains a syntax error, None is returned instead. - - Note that this facility is provided as a convenience by libSBML -- - the MathML standard does not actually define a 'string-form' - equivalent to MathML expression trees, so the choice of formula - syntax is somewhat arbitrary. The approach taken by libSBML is to - use the syntax defined by SBML Level 1 (which in fact used a text- - string representation of formulas and not MathML). This formula - syntax is based mostly on C programming syntax, and may contain - operators, function calls, symbols, and white space characters. The - following table provides the precedence rules for the different - entities that may appear in formula strings. - - Token Operation Class Precedence Associates namesymbol - referenceoperand6n/a (expression)expression groupingoperand6n/a - f(...)function callprefix6left -negationunary5right - ^powerbinary4left *multiplicationbinary3left /divisonbinary3left - +additionbinary2left -subtractionbinary2left ,argument - delimiterbinary1left A table of the expression operators and their - precedence in the text-string format for mathematical expressions - used by SBML_parseFormula(). - - In the table above, operand implies the construct is an operand, - prefix implies the operation is applied to the following arguments, - unary implies there is one argument, and binary implies there are - two arguments. The values in the Precedence column show how the - order of different types of operation are determined. For example, - the expression a * b + c is evaluated as (a * b) + c because the * - operator has higher precedence. The Associates column shows how the - order of similar precedence operations is determined; for example, a - - b + c is evaluated as (a - b) + c because the + and - operators - are left-associative. - - The function call syntax consists of a function name, followed by - optional white space, followed by an opening parenthesis token, - followed by a sequence of zero or more arguments separated by commas - (with each comma optionally preceded and/or followed by zero or more - white space characters, followed by a closing parenthesis token. - The function name must be chosen from one of the pre-defined - functions in SBML or a user-defined function in the model. The - following table lists the names of certain common mathematical - functions; this table corresponds to Table 6 in the SBML Level 1 - Version 2 specification: - - Name Args Formula or meaning Argument Constraints Result constraints - absxabsolute value of x acosxarc cosine of x in radians-1.0 ≤ - x ≤ 1.00 ≤ acos(x) ≤ π asinxarc sine of x in - radians-1.0 ≤ x ≤ 1.00 ≤ asin(x) ≤ π - atanxarc tangent of x in radians0 ≤ atan(x) ≤ π - ceilxsmallest number not less than x whose value is an exact integer - cosxcosine of x expxe x, where e is the base of the natural - logarithm floorxthe largest number not greater than x whose value is - an exact integer logxnatural logarithm of xx > 0 log10xbase 10 - logarithm of xx > 0 powx, yx y sqrxx2 sqrtx√xx > 0sqrt(x) - ≥ 0 sinxsine of x tanxtangent of xx ≠ n*π/2, for - odd integer n The names of mathematical functions defined in the - SBML Level 1 Version 2 text-string formula syntax. - - WARNING: - - There are differences between the symbols used to represent the - common mathematical functions and the corresponding MathML token - names. This is a potential source of incompatibilities. Note in - particular that in this text-string syntax, log(x) represents the - natural logarithm, whereas in MathML, the natural logarithm is - <ln/>. Application writers are urged to be careful when translating - between text forms and MathML forms, especially if they provide a - direct text-string input facility to users of their software - systems. - - We urge developers to keep in mind that the text-string formula - syntax is specific to SBML Level 1's C-like mathematical formula - syntax. In particular, it is not a general-purpose mathematical - expression syntax. LibSBML provides methods for parsing and - transforming text-string math formulas back and forth from AST - structures, but it is important to keep the system's limitations in - mind. - - Parameter 'formula' is the text-string formula expression to be - parsed - - Returns the root node of the AST, or None if an error occurred in - parsing the formula - - @~ @~ See also libsbml.formulaToString(), - libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), - libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), - libsbml.getDefaultL3ParserSettings(). @~ @~ -"; - - -%feature("docstring") SBML_formulaToString " - Converts an AST to a string representation of a formula using a - syntax basically derived from SBML Level 1. - - The text-string form of mathematical formulas produced by - libsbml.formulaToString()@~ and read by libsbml.parseFormula()@~ - use a simple C-inspired infix notation taken from SBML Level 1. A - formula in this text-string form therefore can be handed to a program - that understands SBML Level 1 mathematical expressions, or used as - part of a formula translation system. The syntax is described in - detail in the documentation for ASTNode. - - Note that this facility is provided as a convenience by libSBML -- - the MathML standard does not actually define a 'string-form' - equivalent to MathML expression trees, so the choice of formula - syntax is somewhat arbitrary. The approach taken by libSBML is to - use the syntax defined by SBML Level 1 (which in fact used a text- - string representation of formulas and not MathML). This formula - syntax is based mostly on C programming syntax, and may contain - operators, function calls, symbols, and white space characters. The - following table provides the precedence rules for the different - entities that may appear in formula strings. - - Token Operation Class Precedence Associates namesymbol - referenceoperand6n/a (expression)expression groupingoperand6n/a - f(...)function callprefix6left -negationunary5right - ^powerbinary4left *multiplicationbinary3left /divisonbinary3left - +additionbinary2left -subtractionbinary2left ,argument - delimiterbinary1left A table of the expression operators and their - precedence in the text-string format for mathematical expressions - used by SBML_parseFormula(). - - In the table above, operand implies the construct is an operand, - prefix implies the operation is applied to the following arguments, - unary implies there is one argument, and binary implies there are - two arguments. The values in the Precedence column show how the - order of different types of operation are determined. For example, - the expression a * b + c is evaluated as (a * b) + c because the * - operator has higher precedence. The Associates column shows how the - order of similar precedence operations is determined; for example, a - - b + c is evaluated as (a - b) + c because the + and - operators - are left-associative. - - The function call syntax consists of a function name, followed by - optional white space, followed by an opening parenthesis token, - followed by a sequence of zero or more arguments separated by commas - (with each comma optionally preceded and/or followed by zero or more - white space characters, followed by a closing parenthesis token. - The function name must be chosen from one of the pre-defined - functions in SBML or a user-defined function in the model. The - following table lists the names of certain common mathematical - functions; this table corresponds to Table 6 in the SBML Level 1 - Version 2 specification: - - Name Args Formula or meaning Argument Constraints Result constraints - absxabsolute value of x acosxarc cosine of x in radians-1.0 ≤ - x ≤ 1.00 ≤ acos(x) ≤ π asinxarc sine of x in - radians-1.0 ≤ x ≤ 1.00 ≤ asin(x) ≤ π - atanxarc tangent of x in radians0 ≤ atan(x) ≤ π - ceilxsmallest number not less than x whose value is an exact integer - cosxcosine of x expxe x, where e is the base of the natural - logarithm floorxthe largest number not greater than x whose value is - an exact integer logxnatural logarithm of xx > 0 log10xbase 10 - logarithm of xx > 0 powx, yx y sqrxx2 sqrtx√xx > 0sqrt(x) - ≥ 0 sinxsine of x tanxtangent of xx ≠ n*π/2, for - odd integer n The names of mathematical functions defined in the - SBML Level 1 Version 2 text-string formula syntax. - - WARNING: - - There are differences between the symbols used to represent the - common mathematical functions and the corresponding MathML token - names. This is a potential source of incompatibilities. Note in - particular that in this text-string syntax, log(x) represents the - natural logarithm, whereas in MathML, the natural logarithm is - <ln/>. Application writers are urged to be careful when translating - between text forms and MathML forms, especially if they provide a - direct text-string input facility to users of their software - systems. - - We urge developers to keep in mind that the text-string formula - syntax is specific to SBML Level 1's C-like mathematical formula - syntax. In particular, it is not a general-purpose mathematical - expression syntax. LibSBML provides methods for parsing and - transforming text-string math formulas back and forth from AST - structures, but it is important to keep the system's limitations in - mind. - - Parameter 'tree' is the AST to be converted. - - Returns the formula from the given AST as an SBML Level 1 text-string - mathematical formula. The caller owns the returned string and is - responsible for freeing it when it is no longer needed. - - @~ @~ See also libsbml.formulaToString(), - libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), - libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), - libsbml.getDefaultL3ParserSettings(). @~ @~ -"; - - -%feature("docstring") SBML_parseL3Formula " - Parses the given mathematical formula and returns a representation of - it as an Abstract Syntax Tree (AST). - - The text-string form of mathematical formulas read by this function - are expanded versions of the formats produced and read by - libsbml.formulaToString()@~ and libsbml.parseFormula()@~, - respectively. The latter two libSBML functions were originally - developed to support conversion between SBML Levels 1 and 2, and - were focused on the syntax of mathematical formulas used in SBML - Level 1. With time, and the use of MathML in SBML Levels 2 and 3, - it became clear that supporting Level 2 and 3's expanded - mathematical syntax would be useful for software developers. To - maintain backwards compatibility, the original - libsbml.formulaToString()@~ and libsbml.parseFormula()@~ have been - left untouched, and instead, the new functionality is provided in - the form of libsbml.parseL3Formula()@~. - - The following are the differences in the formula syntax supported by - this function, compared to what is supported by - libsbml.parseFormula()@~: - - * Units may be asociated with bare numbers, using the following - syntax: - - number unit - - The number may be in any form (an integer, real, or rational - number), and the unit must conform to the syntax of an SBML - identifier (technically, the type defined as SId in the SBML - specifications). The whitespace between number and unit is - optional. - - * The Boolean function symbols &&, ||, !, and != may be used. - - * The modulo operation is allowed as the symbol @ and will - produce a piecewise function in the MathML. - - * All inverse trigonometric functions may be defined in the infix - either using arc as a prefix or simply a; in other words, both - arccsc and acsc are interpreted as the operator arccosecant defined - in MathML. (Many functions in the SBML Level 1 infix-notation - parser implemented by libsbml.parseFormula()@~ are defined this way - as well, but not all.) - - * The following expression is parsed as a rational number instead - of as a numerical division: - - (<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>/<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>) - - No spaces are allowed in this construct; in other words, \"(3 / 4)\" - will be parsed into the MathML <divide> construct rather than a - rational number. The general number syntax allows you to assign - units to a rational number, e.g., \"(3/4) ml\". (If the string is a - division, units are not interpreted in this way.) - - * Various settings may be altered by using an L3ParserSettings - object in conjunction with the alternative function call - libsbml.parseL3FormulaWithSettings()@~, including the following: - - * The function log with a single argument (\"log(x)\") can be - parsed as log10(x), ln(x), or treated as an error, as desired. - - * Unary minus signs can be collapsed or preserved; that is, - sequential pairs of unary minuses (e.g., \"- -3\") can be removed - from the input entirely and single unary minuses can be incorporated - into the number node, or all minuses can be preserved in the AST - node structure. - - * Parsing of units embedded in the input string can be turned on - and off. - - * The string avogadro can be parsed as a MathML csymbol or as an - identifier. - - * A Model object may optionally be provided to the parser using - the variant function call libsbml.SBML_parseL3FormulaWithModel()@~. - or stored in a L3ParserSettings object passed to the variant function - libsbml.parseL3FormulaWithSettings()@~. When a Model object is - provided, identifiers (values of type SId) from that model are used - in preference to pre-defined MathML definitions. More precisely, - the Model entities whose identifiers will shadow identical symbols - in the mathematical formula are: Species, Compartment, Parameter, - Reaction, and SpeciesReference. For instance, if the parser is - given a Model containing a Species with the identifier \"pi\", and - the formula to be parsed is \"3*pi\", the MathML produced will - contain the construct <ci> pi </ci> instead of the construct <pi/>. - - * Similarly, when a Model object is provided, SId values of user- - defined functions present in the model will be used preferentially - over pre-defined MathML functions. For example, if the passed-in - Model contains a FunctionDefinition with the identifier \"sin\", - that function will be used instead of the predefined MathML function - <sin/>. - - These configuration settings cannot be changed using this function - (i.e., libsbml.parseL3Formula()@~), but they can be change on a - per-call basis by using the alternative function - libsbml.parseL3FormulaWithSettings()@~ - - This function returns the root node of the AST corresponding to the - formula given as the argument. If the formula contains a syntax - error, this function will return None instead. When None is - returned, an error is set; information about the error can be - retrieved using libsbml.getLastParseL3Error()@~. - - Note that this facility and the SBML Level 1-based - libsbml.parseFormula()@~ are provided as a convenience by libSBML -- - the MathML standard does not actually define a 'string-form' - equivalent to MathML expressions, so the choice of formula syntax is - arbitrary. The approach taken by libSBML is to start with the - syntax defined by SBML Level 1 (which in fact used a text-string - representation of formulas, and not MathML), and expand it to - include the above functionality. This formula syntax is based - mostly on C programming syntax, and may contain operators, function - calls, symbols, and white space characters. The following table - provides the precedence rules for the different entities that may - appear in formula strings. - - Token Operation Class Precedence Associates namesymbol - referenceoperand8n/a (expression)expression groupingoperand8n/a - f(...)function callprefix8left ^powerbinary7left -, !negation and - boolean 'not'unary6right *, /, multiplication, division, and - modulobinary5left +, -addition and subtractionbinary4left ==, <, >, - <=, >=, !=boolean equality, inequality, and comparisonbinary3left - &&, ||boolean 'and' and 'or'binary2left ,argument - delimiterbinary1left A table of the expression operators and their - precedence in the text-string format for mathematical expressions - used by SBML_parseL3Formula(). - - In the table above, operand implies the construct is an operand, - prefix implies the operation is applied to the following arguments, - unary implies there is one argument, and binary implies there are - two arguments. The values in the Precedence column show how the - order of different types of operation are determined. For example, - the expression a + b * c is evaluated as a + (b * c) because the * - operator has higher precedence. The Associates column shows how the - order of similar precedence operations is determined; for example, a - && b || c is evaluated as (a && b) || c because the && and || - operators are left-associative and have the same precedence. - - The function call syntax consists of a function name, followed by - optional white space, followed by an opening parenthesis token, - followed by a sequence of zero or more arguments separated by commas - (with each comma optionally preceded and/or followed by zero or more - white space characters), followed by a closing parenthesis token. - The function name must be chosen from one of the pre-defined - functions in SBML or a user-defined function in the model. The - following table lists the names of certain common mathematical - functions; this table corresponds to Table 6 in the SBML Level 1 - Version 2 specification with additions based on the functions added - in SBML Level 2 and Level 3: - - Name Argument(s) Formula or meaning Argument Constraints Result - constraints abs x Absolute value of x. acos, arccos x Arccosine of x - in radians. -1.0 ≤ x ≤ 1.0 0 ≤ acos(x) ≤ - π acosh, arccosh x Hyperbolic arccosine of x in radians. acot, - arccot x Arccotangent of x in radians. acoth, arccoth x Hyperbolic - arccotangent of x in radians. acsc, arccsc x Arccosecant of x in - radians. acsch, arccsch x Hyperbolic arccosecant of x in radians. - asec, arcsec x Arcsecant of x in radians. asech, arcsech x - Hyperbolic arcsecant of x in radians. asin, arcsin xArcsine of x in - radians. -1.0 ≤ x ≤ 1.0 0 ≤ asin(x) ≤ π - atan, arctan x Arctangent of x in radians. 0 ≤ atan(x) ≤ - π atanh, arctanh x Hyperbolic arctangent of x in radians. ceil, - ceiling x Smallest number not less than x whose value is an exact - integer. cos x Cosine of x cosh x Hyperbolic cosine of x. cot x - Cotangent of x. coth x Hyperbolic cotangent of x. csc x Cosecant of - x. csch x Hyperbolic cosecant of x. delay x, y The value of x at y - time units in the past. factorial n The factorial of n. Factorials - are defined by n! = n*(n-1)* ... * 1. n must be an integer. exp x e - x, where e is the base of the natural logarithm. floor x The largest - number not greater than x whose value is an exact integer. ln x - Natural logarithm of x. x > 0 log x By default, the base 10 - logarithm of x, but can be set to be the natural logarithm of x, or - to be an illegal construct. x > 0 log x, y The base x logarithm of y. - y > 0 log10 x Base 10 logarithm of x. x > 0 piecewise x1, y1, [x2, - y2,] [...] [z] A piecewise function: if (y1), x1. Otherwise, if - (y2), x2, etc. Otherwise, z. y1, y2, y3 [etc] must be boolean pow, - power x, y x y. root b, x The root base b of x. sec x Secant of x. - sech x Hyperbolic secant of x. sqr x x2. sqrt x √x. x > 0 - sqrt(x) ≥ 0 sin x Sine of x. sinh x Hyperbolic sine of x. tan - x Tangent of x. x ≠ n*π/2, for odd integer n tanh x - Hyperbolic tangent of x. and x, y, z... Boolean and(x, y, z...): - returns true if all of its arguments are true. Note that 'and' is an - n-ary function, taking 0 or more arguments, and that and() returns - 'true'. All arguments must be boolean not x Boolean not(x) x must be - boolean or x, y, z... Boolean or(x, y, z...): returns true if at - least one of its arguments is true. Note that 'or' is an n-ary - function, taking 0 or more arguments, and that or() returns 'false'. - All arguments must be boolean xor x, y, z... Boolean xor(x, y, - z...): returns true if an odd number of its arguments is true. Note - that 'xor' is an n-ary function, taking 0 or more arguments, and - that xor() returns 'false'. All arguments must be boolean eq x, y, - z... Boolean eq(x, y, z...): returns true if all arguments are - equal. Note that 'eq' is an n-ary function, but must take 2 or more - arguments. geq x, y, z... Boolean geq(x, y, z...): returns true if - each argument is greater than or equal to the argument following it. - Note that 'geq' is an n-ary function, but must take 2 or more - arguments. gt x, y, z... Boolean gt(x, y, z...): returns true if - each argument is greater than the argument following it. Note that - 'gt' is an n-ary function, but must take 2 or more arguments. leq x, - y, z... Boolean leq(x, y, z...): returns true if each argument is - less than or equal to the argument following it. Note that 'leq' is - an n-ary function, but must take 2 or more arguments. lt x, y, z... - Boolean lt(x, y, z...): returns true if each argument is less than - the argument following it. Note that 'lt' is an n-ary function, but - must take 2 or more arguments. neq x, y Boolean x != y: returns true - unless x and y are equal. plus x, y, z... x + y + z + ...: The sum of - the arguments of the function. Note that 'plus' is an n-ary function - taking 0 or more arguments, and that 'plus()' returns 0. times x, y, - z... x * y * z * ...: The product of the arguments of the function. - Note that 'times' is an n-ary function taking 0 or more arguments, - and that 'times()' returns 1. minus x, y x - y. divide x, y x / y. - The names of mathematical functions defined in the text-string - formula syntax understood by SBML_parseL3Formula() and related - functions. - - Note that this function's interpretation of the string \"log\" as a - function with a single argument can be changed; use the function - libsbml.parseL3FormulaWithSettings()@~ instead of this function and - pass it an appropriate L3ParserSettings object. By default, unlike - the SBML Level 1 parser implemented by libsbml.parseFormula()@~, - the string \"log\" is interpreted as the base 10 logarithm, and not - as the natural logarithm. However, you can change the - interpretation to be base-10 log, natural log, or as an error; since - the name 'log' by itself is ambiguous, you require that the parser - uses log10 or ln instead, which are more clear. Please refer to - libsbml.parseL3FormulaWithSettings()@~. - - In addition, the following symbols will be translated to their MathML - equivalents, if no symbol with the same SId identifier string exists - in the Model object provided: - - Name Meaning MathML true The boolean value true <true/> false The - boolean value false <false/> pi The mathematical constant pi <pi/> - avogadro The numerical value of Avogadro's constant, as defined in - the SBML specification <csymbol encoding=\"text\" - definitionURL=\"http://www.sbml.org/sbml/symbols/avogadro\"> avogadro - </csymbol/> time Simulation time as defined in SBML <csymbol - encoding=\"text\" - definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time - </csymbol/> inf or infinity The mathematical constant \"infinity\" - <infinity/> nan or notanumber The mathematical concept \"not a - number\" <notanumber/> The names of mathematical symbols defined in - the text-string formula syntax understood by SBML_parseL3Formula() - and related functions. - - Note that whether the string \"avogadro\" is parsed as an AST node - of type libsbml.AST_NAME_AVOGADRO or libsbml.AST_NAME is - configurable; use the alternate version of this function, called - libsbml.parseL3FormulaWithSettings()@~. This functionality is - provided because SBML Level 2 models may not use - libsbml.AST_NAME_AVOGADRO AST nodes. - - Parameter 'formula' is the text-string formula expression to be - parsed - - Returns the root node of an AST representing the mathematical - formula, or None if an error occurred while parsing the formula. - When None is returned, an error is recorded internally; information - about the error can be retrieved using - libsbml.getLastParseL3Error()@~. - - @~ @~ See also libsbml.formulaToString(), - libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), - libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), - libsbml.getDefaultL3ParserSettings(). @~ @~ -"; - - -%feature("docstring") SBML_parseL3FormulaWithModel " - Parses the given mathematical formula using specific a specific Model - to resolve symbols, and returns an Abstract Syntax Tree (AST) - representation of the result. - - This is identical to libsbml.parseL3Formula()@~, except that this - function uses the given model in the argument 'model' to check - against identifiers that appear in the 'formula'. - - For more details about the parser, please see the definition of the - function libsbml.parseL3Formula()@~. - - Parameter 'formula' is the mathematical formula expression to be - parsed - - Parameter 'model' is the Model object to use for checking identifiers - - Returns the root node of an AST representing the mathematical - formula, or None if an error occurred while parsing the formula. - When None is returned, an error is recorded internally; information - about the error can be retrieved using - libsbml.getLastParseL3Error()@~. - - @~ @~ See also libsbml.formulaToString(), - libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), - libsbml.getLastParseL3Error(), libsbml.getDefaultL3ParserSettings(). - @~ @~ -"; - - -%feature("docstring") SBML_parseL3FormulaWithSettings " - Parses the given mathematical formula using specific parser settings - and returns an Abstract Syntax Tree (AST) representation of the - result. - - This is identical to libsbml.parseL3Formula()@~, except that this - function uses the parser settings given in the argument 'settings'. - The settings override the default parsing behavior. - - The parameter 'settings' allows callers to change the following - parsing behaviors: - - * Use a specific Model object against which identifiers to compare - identifiers. This causes the parser to search the Model for - identifiers that the parser encounters in the formula. If a given - symbol in the formula matches the identifier of a Species, - Compartment, Parameter, Reaction, SpeciesReference or - FunctionDefinition in the Model, then the symbol is assumed to refer - to that model entity instead of any possible mathematical terms with - the same symbol. For example, if the parser is given a Model - containing a Species with the identifier \"pi\", and the formula to - be parsed is \"3*pi\", the MathML produced will contain the - construct <ci> pi </ci> instead of the construct <pi/>. - - * Whether to parse \"log(x)\" with a single argument as the base - 10 logarithm of x, the natural logarithm of x, or treat the case as - an error. - - * Whether to parse \"number id\" by interpreting id as the - identifier of a unit of measurement associated with the number, or - whether to treat the case as an error. - - * Whether to parse \"avogadro\" as an ASTNode of type - libsbml.AST_NAME_AVOGADRO or as type libsbml.AST_NAME. - - * Whether to always create explicit ASTNodes of type - libsbml.AST_MINUS for all unary minuses, or collapse and remove - minuses where possible. - - For more details about the parser, please see the definition of - L3ParserSettings and libsbml.parseL3Formula()@~. - - Parameter 'formula' is the mathematical formula expression to be - parsed - - Parameter 'settings' is the settings to be used for this parser - invocation - - Returns the root node of an AST representing the mathematical - formula, or None if an error occurred while parsing the formula. - When None is returned, an error is recorded internally; information - about the error can be retrieved using - libsbml.getLastParseL3Error()@~. - - @~ @~ See also libsbml.formulaToString(), libsbml.parseL3Formula(), - libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), - libsbml.getDefaultL3ParserSettings(). @~ @~ -"; - - -%feature("docstring") SBML_getDefaultL3ParserSettings " - Returns a copy of the default parser settings used by - libsbml.parseL3Formula()@~. - - The settings structure allows callers to change the following parsing - behaviors: - - * Use a specific Model object against which identifiers to compare - identifiers. This causes the parser to search the Model for - identifiers that the parser encounters in the formula. If a given - symbol in the formula matches the identifier of a Species, - Compartment, Parameter, Reaction, SpeciesReference or - FunctionDefinition in the Model, then the symbol is assumed to refer - to that model entity instead of any possible mathematical terms with - the same symbol. For example, if the parser is given a Model - containing a Species with the identifier \"pi\", and the formula to - be parsed is \"3*pi\", the MathML produced will contain the - construct <ci> pi </ci> instead of the construct <pi/>. - - * Whether to parse \"log(x)\" with a single argument as the base - 10 logarithm of x, the natural logarithm of x, or treat the case as - an error. - - * Whether to parse \"number id\" by interpreting id as the - identifier of a unit of measurement associated with the number, or - whether to treat the case as an error. - - * Whether to parse \"avogadro\" as an ASTNode of type - libsbml.AST_NAME_AVOGADRO or as type libsbml.AST_NAME. - - * Whether to always create explicit ASTNodes of type - libsbml.AST_MINUS for all unary minuses, or collapse and remove - minuses where possible. - - For more details about the parser, please see the definition of - L3ParserSettings and libsbml.parseL3Formula()@~. - - @~ @~ See also libsbml.formulaToString(), - libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), - libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(). @~ - @~ -"; - - -%feature("docstring") SBML_getLastParseL3Error " - Returns the last error reported by the parser. - - If libsbml.parseL3Formula()@~, - libsbml.parseL3FormulaWithSettings()@~, or - libsbml.parseL3FormulaWithModel()@~ return None, an error is set - internally which is accessible via this function. - - Returns a string describing the error that occurred. This will - contain the string the parser was trying to parse, which character - it had parsed when it encountered the error, and a description of - the error. - - @~ @~ See also libsbml.formulaToString(), - libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), - libsbml.parseL3FormulaWithModel(), - libsbml.getDefaultL3ParserSettings(). @~ @~ -"; - - -%feature("docstring") L3ParserSettings " - @ingroup Core A helper class for controlling the behavior of the - text-string formula parser. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The function libsbml.parseL3FormulaWithSettings()@~, along with its - variants libsbml.parseFormula()@~ and - libsbml.parseL3FormulaWithModel()@~, are the interfaces to a parser - for mathematical formulas expressed as text strings. The parser - converts the text-string formulas into Abstract Syntax Trees (ASTs), - represented in libSBML using ASTNode objects. Compared to the parser - implemented by the function libsbml.parseFormula()@~, which was - designed primarily for converting the mathematical formula strings - in SBML Level 1, the 'L3' variant of the parser accepts an extended - formula syntax. It also has a number of configurable behaviors. - This class (L3ParserSettings) is an object used to communicate the - configuration settings with callers. - - The following aspects of the parser are configurable: - - * The function log with a single argument (\"log(x)\") can be - parsed as log10(x), ln(x), or treated as an error, as desired. - - * Unary minus signs can be collapsed or preserved; that is, - sequential pairs of unary minuses (e.g., \"- -3\") can be removed - from the input entirely and single unary minuses can be incorporated - into the number node, or all minuses can be preserved in the AST - node structure. - - * Parsing of units embedded in the input string can be turned on - and off. - - * The string avogadro can be parsed as a MathML csymbol or as an - identifier. - - * A Model object may optionally be provided to the parser using - the variant function call libsbml.SBML_parseL3FormulaWithModel()@~. - or stored in a L3ParserSettings object passed to the variant function - libsbml.parseL3FormulaWithSettings()@~. When a Model object is - provided, identifiers (values of type SId) from that model are used - in preference to pre-defined MathML definitions. More precisely, - the Model entities whose identifiers will shadow identical symbols - in the mathematical formula are: Species, Compartment, Parameter, - Reaction, and SpeciesReference. For instance, if the parser is - given a Model containing a Species with the identifier \"pi\", and - the formula to be parsed is \"3*pi\", the MathML produced will - contain the construct <ci> pi </ci> instead of the construct <pi/>. - - * Similarly, when a Model object is provided, SId values of user- - defined functions present in the Model will be used preferentially - over pre-defined MathML functions. For example, if the passed-in - Model contains a FunctionDefinition with the identifier \"sin\", - that function will be used instead of the predefined MathML function - <sin/>. - - To obtain the default configuration values, callers can use the - function libsbml.SBML_getDefaultL3ParserSettings()@~. To change the - configuration, callers can create an L3ParserSettings object, set - the desired characteristics using the methods provided, and pass - that object to libsbml.parseL3FormulaWithSettings()@~. - - @~ @~ See also libsbml.parseL3FormulaWithSettings(), - libsbml.parseL3Formula(), libsbml.parseL3FormulaWithModel(). @~ @~ -"; - - -%feature("docstring") L3ParserSettings::L3ParserSettings " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - L3ParserSettings(Model model, ParseLogType_t parselog, bool - collapseminus, bool parseunits, bool avocsymbol) - - Creates a new L3ParserSettings object with specific values for all - possible settings. - - Parameter 'model' is a Model object to be used for disambiguating - identifiers - - Parameter 'parselog' is a flag that controls how the parser will - handle the symbol log in formulas - - Parameter 'collapseminus' is a flag that controls how the parser will - handle minus signs - - Parameter 'parseunits' is a flag that controls how the parser will - handle apparent references to units of measurement associated with - raw numbers in a formula - - Parameter 'avocsymbol' is a flag that controls how the parser will - handle the appearance of the symbol avogadro in a formula - - See also getModel(), setModel(), unsetModel(), getParseLog(), - setParseLog(), getParseUnits(), setParseUnits(), - getParseCollapseMinus(), setParseCollapseMinus(), - getParseAvogadroCsymbol(), setParseAvogadroCsymbol(). - - ______________________________________________________________________ - Method variant with the following signature: - - L3ParserSettings() - - Creates a new L3ParserSettings object with default values. - - This is the default constructor for the L3ParserSettings object. It - sets the Model to None and other settings to L3P_PARSE_LOG_AS_LOG10, - L3P_EXPAND_UNARY_MINUS, L3P_PARSE_UNITS, and - L3P_AVOGADRO_IS_CSYMBOL. -"; - - -%feature("docstring") L3ParserSettings::setModel " - Sets the model reference in this L3ParserSettings object. - - When a Model object is provided, identifiers (values of type SId) - from that model are used in preference to pre-defined MathML - definitions. More precisely, the Model entities whose identifiers - will shadow identical symbols in the mathematical formula are: - Species, Compartment, Parameter, Reaction, and SpeciesReference. - For instance, if the parser is given a Model containing a Species - with the identifier \"pi\", and the formula to be parsed is - \"3*pi\", the MathML produced will contain the construct <ci> pi - </ci> instead of the construct <pi/>. Similarly, when a Model - object is provided, SId values of user-defined functions present in - the Model will be used preferentially over pre-defined MathML - functions. For example, if the passed-in Model contains a - FunctionDefinition with the identifier \"sin\", that function will - be used instead of the predefined MathML function <sin/>. - - Parameter 'model' is a Model object to be used for disambiguating - identifiers - - WARNING: - - This does not copy the Model object. This means that modifications - made to the object after invoking this method may affect parsing - behavior. - - See also getModel(), unsetModel(). -"; - - -%feature("docstring") L3ParserSettings::getModel " - Returns the Model object referenced by this L3ParserSettings object. - - See also setModel(), unsetModel(). -"; - - -%feature("docstring") L3ParserSettings::unsetModel " - Sets the Model reference in this L3ParserSettings object to None. - - See also setModel(), getModel(). -"; - - -%feature("docstring") L3ParserSettings::setParseLog " - Sets the behavior for handling log in mathematical formulas. - - The function log with a single argument (\"log(x)\") can be parsed - as log10(x), ln(x), or treated as an error, as desired. - - Parameter 'type' is a constant, one of following three possibilities: - - * libsbml.L3P_PARSE_LOG_AS_LOG10 - - * libsbml.L3P_PARSE_LOG_AS_LN - - * libsbml.L3P_PARSE_LOG_AS_ERROR - - See also getParseLog(). -"; - - -%feature("docstring") L3ParserSettings::getParseLog " - Returns the current setting indicating what to do with formulas - containing the function log with one argument. - - The function log with a single argument (\"log(x)\") can be parsed - as log10(x), ln(x), or treated as an error, as desired. - - Returns One of following three constants: - - * libsbml.L3P_PARSE_LOG_AS_LOG10 - - * libsbml.L3P_PARSE_LOG_AS_LN - - * libsbml.L3P_PARSE_LOG_AS_ERROR - - See also setParseLog(). -"; - - -%feature("docstring") L3ParserSettings::setParseCollapseMinus " - Sets the behavior for handling unary minuses appearing in - mathematical formulas. - - This setting affects two behaviors. First, pairs of multiple unary - minuses in a row (e.g., \"- -3\") can be collapsed and ignored in - the input, or the multiple minuses can be preserved in the AST node - tree that is generated by the parser. Second, minus signs in front - of numbers can be collapsed into the number node itself; for - example, a \"- 4.1\" can be turned into a single ASTNode of type - libsbml.AST_REAL with a value of -4.1, or it can be turned into a - node of type libsbml.AST_MINUS having a child node of type - libsbml.AST_REAL. This method lets you tell the parser which - behavior to use -- either collapse minuses or always preserve them. - The two possibilities are represented using the following constants: - - * libsbml.L3P_COLLAPSE_UNARY_MINUS (value = True): collapse unary - minuses where possible. - - * libsbml.L3P_EXPAND_UNARY_MINUS (value = False): do not collapse - unary minuses, and instead translate each one into an AST node of - type libsbml.AST_MINUS. - - Parameter 'collapseminus' is a boolean value (one of the constants - libsbml.L3P_COLLAPSE_UNARY_MINUS or libsbml.L3P_EXPAND_UNARY_MINUS) - indicating how unary minus signs in the input should be handled. - - See also getParseCollapseMinus(). -"; - - -%feature("docstring") L3ParserSettings::getParseCollapseMinus " - Returns a flag indicating the current behavior set for handling - multiple unary minuses in formulas. - - This setting affects two behaviors. First, pairs of multiple unary - minuses in a row (e.g., \"- -3\") can be collapsed and ignored in - the input, or the multiple minuses can be preserved in the AST node - tree that is generated by the parser. Second, minus signs in front - of numbers can be collapsed into the number node itself; for - example, a \"- 4.1\" can be turned into a single ASTNode of type - libsbml.AST_REAL with a value of -4.1, or it can be turned into a - node of type libsbml.AST_MINUS having a child node of type - libsbml.AST_REAL. This method lets you tell the parser which - behavior to use -- either collapse minuses or always preserve them. - The two possibilities are represented using the following constants: - - * libsbml.L3P_COLLAPSE_UNARY_MINUS (value = True): collapse unary - minuses where possible. - - * libsbml.L3P_EXPAND_UNARY_MINUS (value = False): do not collapse - unary minuses, and instead translate each one into an AST node of - type libsbml.AST_MINUS. - - Returns A boolean, one of libsbml.L3P_COLLAPSE_UNARY_MINUS or - libsbml.L3P_EXPAND_UNARY_MINUS. - - See also setParseCollapseMinus(). -"; - - -%feature("docstring") L3ParserSettings::setParseUnits " - Sets the parser's behavior in handling units associated with numbers - in a mathematical formula. - - In SBML Level 2, there is no means of associating a unit of - measurement with a pure number in a formula, while SBML Level 3 does - define a syntax for this. In Level 3, MathML <cn> elements can have - an attribute named units placed in the SBML namespace, which can be - used to indicate the units to be associated with the number. The - text-string infix formula parser allows units to be placed after raw - numbers; they are interpreted as unit identifiers for units defined - by the SBML specification or in the containing Model object. Some - examples include: \"4 mL\", \"2.01 Hz\", \"3.1e-6 M\", and \"(5/8) - inches\". To produce a valid SBML model, there must either exist a - UnitDefinition corresponding to the identifier of the unit, or the - unit must be defined in Table 2 of the SBML specification. - - Parameter 'units' is A boolean indicating whether to parse units: - - * libsbml.L3P_PARSE_UNITS (value = True): parse units in the text- - string formula. - - * libsbml.L3P_NO_UNITS (value = false): treat units in the text- - string formula as errors. - - See also getParseUnits(). -"; - - -%feature("docstring") L3ParserSettings::getParseUnits " - Returns if the current settings allow units in text-string - mathematical formulas. - - In SBML Level 2, there is no means of associating a unit of - measurement with a pure number in a formula, while SBML Level 3 does - define a syntax for this. In Level 3, MathML <cn> elements can have - an attribute named units placed in the SBML namespace, which can be - used to indicate the units to be associated with the number. The - text-string infix formula parser allows units to be placed after raw - numbers; they are interpreted as unit identifiers for units defined - by the SBML specification or in the containing Model object. Some - examples include: \"4 mL\", \"2.01 Hz\", \"3.1e-6 M\", and \"(5/8) - inches\". To produce a valid SBML model, there must either exist a - UnitDefinition corresponding to the identifier of the unit, or the - unit must be defined in Table 2 of the SBML specification. - - Since SBML Level 2 does not have the ability to associate units with - pure numbers, the value should be set to False when parsing text- - string formulas intended for use in SBML Level 2 documents. - - Returns A boolean indicating whether to parse units: - - * libsbml.L3P_PARSE_UNITS (value = True): parse units in the text- - string formula. - - * libsbml.L3P_NO_UNITS (value = false): treat units in the text- - string formula as errors. - - See also setParseUnits(). -"; - - -%feature("docstring") L3ParserSettings::setParseAvogadroCsymbol " - Sets the parser's behavior in handling the string avogadro in - mathematical formulas. - - SBML Level 3 defines a symbol for representing the value of - Avogadro's constant, but it is not defined in SBML Level 2. As a - result, the text-string formula parser must behave differently - depending on which SBML Level is being targeted. The argument to - this method can be one of two values: - - * libsbml.L3P_AVOGADRO_IS_CSYMBOL (value = True): tells the parser to - translate the string avogadro (in any capitalization) into an AST - node of type libsbml.AST_NAME_AVOGADRO. - - * libsbml.L3P_AVOGADRO_IS_NAME (value = False): tells the parser to - translate the string avogadro into an AST of type libsbml.AST_NAME. - - Since SBML Level 2 does not define a symbol for Avogadro's constant, - the value should be set to False when parsing text-string formulas - intended for use in SBML Level 2 documents. - - Parameter 'l2only' is a boolean value (one of the constants - libsbml.L3P_AVOGADRO_IS_CSYMBOL or libsbml.L3P_AVOGADRO_IS_NAME) - indicating how the string avogadro should be treated when - encountered in a formula. - - See also getParseAvogadroCsymbol(). -"; - - -%feature("docstring") L3ParserSettings::getParseAvogadroCsymbol " - Returns True if the current settings are oriented towards handling - avogadro for SBML Level 3. - - SBML Level 3 defines a symbol for representing the value of - Avogadro's constant, but it is not defined in SBML Level 2. As a - result, the text-string formula parser must behave differently - depending on which SBML Level is being targeted. - - Returns A boolean indicating which mode is currently set; the value - is one of the following possibilities: - - * libsbml.L3P_AVOGADRO_IS_CSYMBOL (value = True): tells the parser - to translate the string avogadro (in any capitalization) into an AST - node of type libsbml.AST_NAME_AVOGADRO. - - * libsbml.L3P_AVOGADRO_IS_NAME (value = False): tells the parser to - translate the string avogadro into an AST of type libsbml.AST_NAME. - - See also setParseAvogadroCsymbol(). -"; - - -%feature("docstring") XMLAttributes " - @ingroup Core Representation of attributes on an XML node. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. -"; - - -%feature("docstring") XMLConstructorException " - @ingroup Core Class of exceptions thrown by constructors of some - libSBML objects. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - In some situations, constructors for SBML objects may need to - indicate to callers that the creation of the object failed. The - failure may be for different reasons, such as an attempt to use - invalid parameters or a system condition such as a memory error. To - communicate this to callers, those classes will throw an - XMLConstructorException. @~ - - In languages that don't have an exception mechanism (e.g., C), the - constructors generally try to return an error code instead of - throwing an exception. - - See also SBMLConstructorException. -"; - - -%feature("docstring") XMLAttributes::XMLAttributes " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLAttributes() - - Creates a new empty XMLAttributes set. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLAttributes(XMLAttributes orig) - - Copy constructor; creates a copy of this XMLAttributes set. - - 'orig' the XMLAttributes object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") XMLAttributes::clone " - Creates and returns a deep copy of this XMLAttributes set. - - Returns a (deep) copy of this XMLAttributes set. -"; - - -%feature("docstring") XMLAttributes::add " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - add( XMLTriple triple, string value) - - Adds an attribute with the given XMLTriple/value pair to this - XMLAttributes set. - - Note: - - if local name with the same namespace URI already exists in this - attribute set, its value and prefix will be replaced. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a string, the value of the attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - ______________________________________________________________________ - Method variant with the following signature: - - add( string name , string value , string namespaceURI = '' , - string prefix = '') - - Adds an attribute (a name/value pair) to this XMLAttributes object, - optionally with a prefix and URI defining a namespace. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a string, the value of the attribute. Parameter - 'namespaceURI' is a string, the namespace URI of the attribute. - Parameter 'prefix' is a string, the prefix of the namespace - - Returns an integer code indicating the success or failure of the - function. The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - Note: - - if local name with the same namespace URI already exists in this - attribute set, its value and prefix will be replaced. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLAttributes::addResource " - Internal implementation method. -"; - - -%feature("docstring") XMLAttributes::removeResource " - Removes an attribute with the given index from this XMLAttributes - set. - - Parameter 'n' is an integer the index of the resource to be deleted - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE -"; - - -%feature("docstring") XMLAttributes::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(XMLTriple triple) - - Removes an attribute with the given XMLTriple from this XMLAttributes - set. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - ______________________________________________________________________ - Method variant with the following signature: - - remove(int n) - - Removes an attribute with the given index from this XMLAttributes - set. (This function is an alias of XMLAttributes.removeResource() - ). - - Parameter 'n' is an integer the index of the resource to be deleted - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string name, string uri = '') - - Removes an attribute with the given local name and namespace URI from - this XMLAttributes set. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'uri' is a string, the namespace URI of the attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE -"; - - -%feature("docstring") XMLAttributes::clear " - Clears (deletes) all attributes in this XMLAttributes object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") XMLAttributes::getIndex " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getIndex(XMLTriple triple) - - Return the index of an attribute with the given XMLTriple. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute - for which the index is required. - - Returns the index of an attribute with the given XMLTriple, or -1 if - not present. - - ______________________________________________________________________ - Method variant with the following signature: - - getIndex(string name, string uri) - - Return the index of an attribute with the given local name and - namespace URI. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'uri' is a string, the namespace URI of the attribute. - - Returns the index of an attribute with the given local name and - namespace URI, or -1 if not present. - - ______________________________________________________________________ - Method variant with the following signature: - - getIndex(string name) - - Return the index of an attribute with the given name. - - Note: - - A namespace bound to the name is not checked by this function. Thus, - if there are multiple attributes with the given local name and - different namespaces, the smallest index among those attributes will - be returned. XMLAttributes.getIndex() const or - XMLAttributes.getIndex() const should be used to get an index of an - attribute with the given local name and namespace. - - Parameter 'name' is a string, the local name of the attribute for - which the index is required. - - Returns the index of an attribute with the given local name, or -1 if - not present. -"; - - -%feature("docstring") XMLAttributes::getLength " - Return the number of attributes in the set. - - Returns the number of attributes in this XMLAttributes set. -"; - - -%feature("docstring") XMLAttributes::getNumAttributes " - Return the number of attributes in the set. - - Returns the number of attributes in this XMLAttributes set. - - This function is an alias for getLength introduced for consistency - with other XML classes. -"; - - -%feature("docstring") XMLAttributes::getName " - Return the local name of an attribute in this XMLAttributes set (by - position). - - Parameter 'index' is an integer, the position of the attribute whose - local name is required. - - Returns the local name of an attribute in this list (by position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for the attribute - existence. -"; - - -%feature("docstring") XMLAttributes::getPrefix " - Return the prefix of an attribute in this XMLAttributes set (by - position). - - Parameter 'index' is an integer, the position of the attribute whose - prefix is required. - - Returns the namespace prefix of an attribute in this list (by - position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for the attribute - existence. -"; - - -%feature("docstring") XMLAttributes::getPrefixedName " - Return the prefixed name of an attribute in this XMLAttributes set - (by position). - - Parameter 'index' is an integer, the position of the attribute whose - prefixed name is required. - - Returns the prefixed name of an attribute in this list (by - position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. -"; - - -%feature("docstring") XMLAttributes::getURI " - Return the namespace URI of an attribute in this XMLAttributes set - (by position). - - Parameter 'index' is an integer, the position of the attribute whose - namespace URI is required. - - Returns the namespace URI of an attribute in this list (by position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. -"; - - -%feature("docstring") XMLAttributes::getValue " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getValue(XMLTriple triple) - - Return a value of an attribute with the given XMLTriple. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute - whose value is required. - - Returns The attribute value as a string. - - Note: - - If an attribute with the given XMLTriple does not exist, an empty - string will be returned. Use XMLAttributes.hasAttribute() const to - test for attribute existence. - - ______________________________________________________________________ - Method variant with the following signature: - - getValue(int index) - - Return the value of an attribute in this XMLAttributes set (by - position). - - Parameter 'index' is an integer, the position of the attribute whose - value is required. - - Returns the value of an attribute in the list (by position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. - - ______________________________________________________________________ - Method variant with the following signature: - - getValue(string name) - - Return an attribute's value by name. - - Parameter 'name' is a string, the local name of the attribute whose - value is required. - - Returns The attribute value as a string. - - Note: - - If an attribute with the given local name does not exist, an empty - string will be returned. Use XMLAttributes.hasAttribute() const to - test for attribute existence. A namespace bound to the local name - is not checked by this function. Thus, if there are multiple - attributes with the given local name and different namespaces, the - value of an attribute with the smallest index among those attributes - will be returned. XMLAttributes.getValue() const or - XMLAttributes.getValue() const should be used to get a value of an - attribute with the given local name and namespace. - - ______________________________________________________________________ - Method variant with the following signature: - - getValue(string name, string uri) - - Return a value of an attribute with the given local name and - namespace URI. - - Parameter 'name' is a string, the local name of the attribute whose - value is required. Parameter 'uri' is a string, the namespace URI of - the attribute. - - Returns The attribute value as a string. - - Note: - - If an attribute with the given local name and namespace URI does not - exist, an empty string will be returned. Use - XMLAttributes.hasAttribute() const to test for attribute existence. -"; - - -%feature("docstring") XMLAttributes::hasAttribute " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - hasAttribute(XMLTriple triple) - - Predicate returning True or False depending on whether an attribute - with the given XML triple exists in this XMLAttributes. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute - - Returns True if an attribute with the given XML triple exists in this - XMLAttributes, False otherwise. - - ______________________________________________________________________ - Method variant with the following signature: - - hasAttribute(int index) - - Predicate returning True or False depending on whether an attribute - with the given index exists in this XMLAttributes. - - Parameter 'index' is an integer, the position of the attribute. - - Returns True if an attribute with the given index exists in this - XMLAttributes, False otherwise. - - ______________________________________________________________________ - Method variant with the following signature: - - hasAttribute(string name, string uri='') - - Predicate returning True or False depending on whether an attribute - with the given local name and namespace URI exists in this - XMLAttributes. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'uri' is a string, the namespace URI of the attribute. - - Returns True if an attribute with the given local name and namespace - URI exists in this XMLAttributes, False otherwise. -"; - - -%feature("docstring") XMLAttributes::isEmpty " - Predicate returning True or False depending on whether this - XMLAttributes set is empty. - - Returns True if this XMLAttributes set is empty, False otherwise. -"; - - -%feature("docstring") XMLAttributes::readInto " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( XMLTriple triple , string& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute with the given XMLTriple into - value. If the XMLTriple was not found, value is not modified. - - If an XMLErrorLog is passed in and required is true, missing - attributes are logged. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a string, the value of the attribute. Parameter - 'log' is an XMLErrorLog, the error log. Parameter 'required' is a - boolean, indicating whether the attribute is required. Parameter - 'line' is a long integer, the line number at which the error occured. - Parameter 'column' is a long integer, the column number at which the - error occured. - - @returns True if the attribute was read into value, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( XMLTriple triple , long& value , XMLErrorLog - log = None , bool required = false , const long line - = 0 , const long column = 0) - - Reads the value for the attribute XMLTriple into value. If the - XMLTriple was not found or value could be interpreted as a long, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, - we limit values to what can be stored in a long. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a long, the value of the attribute. Parameter - 'log' is an XMLErrorLog, the error log. Parameter 'required' is a - boolean, indicating whether the attribute is required. Parameter - 'line' is a long integer, the line number at which the error occured. - Parameter 'column' is a long integer, the column number at which the - error occured. - - @returns True if the attribute was read into value, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( XMLTriple triple , double& value , - XMLErrorLog log = None , bool required = false - , const long line = 0 , const long column = 0) - - Reads the value for the attribute with the given XMLTriple into - value. If the triple was not found or value could be interpreted - as a double, value is not modified. - - According to the W3C XML Schema, valid doubles are the same as valid - doubles for C and the special values 'INF', '-INF', and 'NaN' (case- - sensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#double - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a double, the value of the attribute. Parameter - 'log' is an XMLErrorLog, the error log. Parameter 'required' is a - boolean, indicating whether the attribute is required. Parameter - 'line' is a long integer, the line number at which the error occured. - Parameter 'column' is a long integer, the column number at which the - error occured. - - @returns True if the attribute was read into value, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( string name , string& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute name into value. If the given - local name was not found, value is not modified. - - If an XMLErrorLog is passed in and required is true, missing - attributes are logged. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a string, the value of the attribute. Parameter - 'log' is an XMLErrorLog, the error log. Parameter 'required' is a - boolean, indicating whether the attribute is required. Parameter - 'line' is a long integer, the line number at which the error occured. - Parameter 'column' is a long integer, the column number at which the - error occured. - - @returns True if the attribute was read into value, False otherwise. - - Note: - - A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a - value for an attribute name with a prefix and namespace. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( string name , bool& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute name into value. If the given - local name was not found or value could be interpreted as a boolean, - value is not modified. - - According to the W3C XML Schema, valid boolean values are: 'true', - 'false', '1', and '0' (case-insensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#boolean - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a boolean, the value of the attribute. - Parameter 'log' is an XMLErrorLog, the error log. Parameter - 'required' is a boolean, indicating whether the attribute is - required. Parameter 'line' is a long integer, the line number at - which the error occured. Parameter 'column' is a long integer, the - column number at which the error occured. - - @returns True if the attribute was read into value, False otherwise. - - Note: - - A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a - value for an attribute name with a prefix and namespace. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( string name , int& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute name into value. If the given - local name was not found or value could be interpreted as an int, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, - we limit values to what can be stored in a int. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is an integer, the value of the attribute. - Parameter 'log' is an XMLErrorLog, the error log. Parameter - 'required' is a boolean, indicating whether the attribute is - required. Parameter 'line' is a long integer, the line number at - which the error occured. Parameter 'column' is a long integer, the - column number at which the error occured. - - @returns True if the attribute was read into value, False otherwise. - - Note: - - A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a - value for an attribute name with a prefix and namespace. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( XMLTriple triple , bool& value , XMLErrorLog log - = None , bool required = false , const long line = 0 , - const long column = 0) - - Reads the value for the attribute with the given XMLTriple into - value. If the XMLTriple was not found or value could be - interpreted as a boolean, value is not modified. - - According to the W3C XML Schema, valid boolean values are: 'true', - 'false', '1', and '0' (case-insensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#boolean - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a boolean, the value of the attribute. - Parameter 'log' is an XMLErrorLog, the error log. Parameter - 'required' is a boolean, indicating whether the attribute is - required. Parameter 'line' is a long integer, the line number at - which the error occured. Parameter 'column' is a long integer, the - column number at which the error occured. - - @returns True if the attribute was read into value, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( string name , double& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute name into value. If the given - local name was not found or value could be interpreted as a double, - value is not modified. - - According to the W3C XML Schema, valid doubles are the same as valid - doubles for C and the special values 'INF', '-INF', and 'NaN' (case- - sensitive). For more information, see: - http://www.w3.org/TR/xmlschema-2/#double - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a double, the value of the attribute. Parameter - 'log' is an XMLErrorLog, the error log. Parameter 'required' is a - boolean, indicating whether the attribute is required. Parameter - 'line' is a long integer, the line number at which the error occured. - Parameter 'column' is a long integer, the column number at which the - error occured. - - @returns True if the attribute was read into value, False otherwise. - - Note: - - A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a - value for an attribute name with a prefix and namespace. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( string name , long& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute name into value. If the given - local name was not found or value could be interpreted as an long, - value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, - we limit values to what can be stored in a long. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a long, the value of the attribute. Parameter - 'log' is an XMLErrorLog, the error log. Parameter 'required' is a - boolean, indicating whether the attribute is required. Parameter - 'line' is a long integer, the line number at which the error occured. - Parameter 'column' is a long integer, the column number at which the - error occured. - - @returns True if the attribute was read into value, False otherwise. - - Note: - - A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a - value for an attribute name with a prefix and namespace. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( string name , long& value , XMLErrorLog - log = None , bool required = false , const long - line = 0 , const long column = 0) - - Reads the value for the attribute name into value. If the given - local name was not found or value could be interpreted as a long - integer, value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, - we limit values to what can be stored in a long. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a long integereger, the value of the attribute. - Parameter 'log' is an XMLErrorLog, the error log. Parameter - 'required' is a boolean, indicating whether the attribute is - required. Parameter 'line' is a long integer, the line number at - which the error occured. Parameter 'column' is a long integer, the - column number at which the error occured. - - @returns True if the attribute was read into value, False otherwise. - - Note: - - A namespace bound to the given local name is not checked by this - function. XMLAttributes.readInto() const should be used to read a - value for an attribute name with a prefix and namespace. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( XMLTriple triple , int& value , XMLErrorLog - log = None , bool required = false , const long line - = 0 , const long column = 0) - - Reads the value for the attribute with the given XMLTriple into - value. If the XMLTriple was not found or value could be - interpreted as an int, value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, - we limit values to what can be stored in a int. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is an integer, the value of the attribute. - Parameter 'log' is an XMLErrorLog, the error log. Parameter - 'required' is a boolean, indicating whether the attribute is - required. Parameter 'line' is a long integer, the line number at - which the error occured. Parameter 'column' is a long integer, the - column number at which the error occured. - - @returns True if the attribute was read into value, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - readInto( XMLTriple triple , long& value , XMLErrorLog log - = None , bool required = false , const long line = 0 - , const long column = 0) - - Reads the value for the attribute with the given XMLTriple into - value. If the XMLTriple was not found or value could be - interpreted as a long integer, value is not modified. - - According to the W3C XML Schema valid integers include zero, *all* - positive and *all* negative whole numbers. For practical purposes, - we limit values to what can be stored in a long. For more - information, see: http://www.w3.org/TR/xmlschema-2/#integer - - If an XMLErrorLog is passed in datatype format errors are logged. If - required is true, missing attributes are also logged. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a long integereger, the value of the attribute. - Parameter 'log' is an XMLErrorLog, the error log. Parameter - 'required' is a boolean, indicating whether the attribute is - required. Parameter 'line' is a long integer, the line number at - which the error occured. Parameter 'column' is a long integer, the - column number at which the error occured. - - @returns True if the attribute was read into value, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLAttributes::write " - Internal implementation method. -"; - - -%feature("docstring") XMLAttributes::setErrorLog " - Internal implementation method. -"; - - -%feature("docstring") XMLAttributes::attributeTypeError " - Internal implementation method. -"; - - -%feature("docstring") XMLAttributes::attributeRequiredError " - Internal implementation method. -"; - - -%feature("docstring") XMLConstructorException " - @ingroup Core Class of exceptions thrown by constructors of some - libSBML objects. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - In some situations, constructors for SBML objects may need to - indicate to callers that the creation of the object failed. The - failure may be for different reasons, such as an attempt to use - invalid parameters or a system condition such as a memory error. To - communicate this to callers, those classes will throw an - XMLConstructorException. @~ - - In languages that don't have an exception mechanism (e.g., C), the - constructors generally try to return an error code instead of - throwing an exception. - - See also SBMLConstructorException. -"; - - -%feature("docstring") XMLNamespaces " - @ingroup Core Representation of XML Namespaces. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - This class serves to organize functionality for tracking XML - namespaces in a document or data stream. The namespace declarations - are stored as a list of pairs of XML namespace URIs and prefix - strings. These correspond to the parts of a namespace declaration - on an XML element. For example, in the following XML fragment, - - <annotation> - <mysim:nodecolors xmlns:mysim=\'urn:lsid:mysim.org\' - mysim:bgcolor=\'green\' mysim:fgcolor=\'white\'/> - </annotation> - there is one namespace declaration. Its URI is - urn:lsid:mysim.org and its prefix is mysim. This pair could be - stored as one item in an XMLNamespaces list. - - XMLNamespaces provides various methods for manipulating the list of - prefix-URI pairs. Individual namespaces stored in a given - XMLNamespace object instance can be retrieved based on their index - using XMLNamespaces.getPrefix(), or by their characteristics such as - their URI or position in the list. -"; - - -%feature("docstring") XMLNamespaces::XMLNamespaces " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNamespaces() - - Creates a new empty list of XML namespace declarations. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNamespaces(XMLNamespaces orig) - - Copy constructor; creates a copy of this XMLNamespaces list. - - Parameter 'orig' is the XMLNamespaces object to copy - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") XMLNamespaces::clone " - Creates and returns a deep copy of this XMLNamespaces list. - - Returns a (deep) copy of this XMLNamespaces list. -"; - - -%feature("docstring") XMLNamespaces::add " - Appends an XML namespace prefix and URI pair to this list of - namespace declarations. - - An XMLNamespaces object stores a list of pairs of namespaces and - their prefixes. If there is an XML namespace with the given 'uri' - prefix in this list, then its corresponding URI will be overwritten - by the new 'uri' unless the uri represents the core sbml namespace. - Calling programs could use one of the other XMLNamespaces methods, - such as XMLNamespaces.hasPrefix() and XMLNamespaces.hasURI() to - inquire whether a given prefix and/or URI is already present in this - XMLNamespaces object. If the 'uri' represents the sbml namespaces - then it will not be overwritten, as this has potentially serious - consequences. If it is necessary to replace the sbml namespace the - namespace should be removed prior to adding the new namespace. - - Parameter 'uri' is a string, the uri for the namespace Parameter - 'prefix' is a string, the prefix for the namespace - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLNamespaces::remove " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - remove(int index) - - Removes an XML Namespace stored in the given position of this list. - - Parameter 'index' is an integer, position of the namespace to remove. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - ______________________________________________________________________ - Method variant with the following signature: - - remove(string prefix) - - Removes an XML Namespace with the given prefix. - - Parameter 'prefix' is a string, prefix of the required namespace. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - See also remove(). -"; - - -%feature("docstring") XMLNamespaces::clear " - Clears (deletes) all XML namespace declarations in this XMLNamespaces - object. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also remove(). -"; - - -%feature("docstring") XMLNamespaces::getIndex " - Look up the index of an XML namespace declaration by URI. - - An XMLNamespaces object stores a list of pairs of namespaces and - their prefixes. If this XMLNamespaces object contains a pair with - the given URI 'uri', this method returns its index in the list. - - Parameter 'uri' is a string, the URI of the sought-after namespace. - - Returns the index of the given declaration, or -1 if not present. -"; - - -%feature("docstring") XMLNamespaces::containsUri " - Tests whether the given uri is contained in this set of namespaces. -"; - - -%feature("docstring") XMLNamespaces::getIndexByPrefix " - Look up the index of an XML namespace declaration by prefix. - - An XMLNamespaces object stores a list of pairs of namespaces and - their prefixes. If this XMLNamespaces object contains a pair with - the given prefix 'prefix', this method returns its index in the - list. - - Parameter 'prefix' is a string, the prefix string of the sought-after - namespace - - Returns the index of the given declaration, or -1 if not present. -"; - - -%feature("docstring") XMLNamespaces::getLength " - Returns the total number of URI-and-prefix pairs stored in this - particular XMLNamespaces instance. - - Returns the number of namespaces in this list. -"; - - -%feature("docstring") XMLNamespaces::getNumNamespaces " - Returns the total number of URI-and-prefix pairs stored in this - particular XMLNamespaces instance. - - Returns the number of namespaces in this list. - - This function is an alias for getLength introduced for consistency - with other XML classes. -"; - - -%feature("docstring") XMLNamespaces::getPrefix " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getPrefix(int index) - - Look up the prefix of an XML namespace declaration by its position. - - An XMLNamespaces object stores a list of pairs of namespaces and - their prefixes. This method returns the prefix of the nth element - in that list (if it exists). Callers should use - XMLAttributes.getLength() first to find out how many namespaces are - stored in the list. - - Parameter 'index' is an integer, position of the sought-after prefix - - Returns the prefix of an XML namespace declaration in this list (by - position), or an empty string if the 'index' is out of range - - See also getLength(). - - ______________________________________________________________________ - Method variant with the following signature: - - getPrefix(string uri) - - Look up the prefix of an XML namespace declaration by its URI. - - An XMLNamespaces object stores a list of pairs of namespaces and - their prefixes. This method returns the prefix for a pair that has - the given 'uri'. - - Parameter 'uri' is a string, the URI of the prefix being sought - - Returns the prefix of an XML namespace declaration given its URI, or - an empty string if no such 'uri' exists in this XMLNamespaces object -"; - - -%feature("docstring") XMLNamespaces::getURI " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getURI(int index) - - Look up the URI of an XML namespace declaration by its position. - - An XMLNamespaces object stores a list of pairs of namespaces and - their prefixes. This method returns the URI of the nth element in - that list (if it exists). Callers should use - XMLAttributes.getLength() first to find out how many namespaces are - stored in the list. - - Parameter 'index' is an integer, position of the required URI. - - Returns the URI of an XML namespace declaration in this list (by - position), or an empty string if the 'index' is out of range. - - See also getLength(), getURI(). -"; - - -%feature("docstring") XMLNamespaces::isEmpty " - Predicate returning True or False depending on whether this - XMLNamespaces list is empty. - - Returns True if this XMLNamespaces list is empty, False otherwise. -"; - - -%feature("docstring") XMLNamespaces::hasURI " - Predicate returning True or False depending on whether an XML - Namespace with the given URI is contained in this XMLNamespaces list. - - Parameter 'uri' is a string, the uri for the namespace - - Returns True if an XML Namespace with the given URI is contained in - this XMLNamespaces list, False otherwise. -"; - - -%feature("docstring") XMLNamespaces::hasPrefix " - Predicate returning True or False depending on whether an XML - Namespace with the given prefix is contained in this XMLNamespaces - list. - - Parameter 'prefix' is a string, the prefix for the namespace - - Returns True if an XML Namespace with the given URI is contained in - this XMLNamespaces list, False otherwise. -"; - - -%feature("docstring") XMLNamespaces::hasNS " - Predicate returning True or False depending on whether an XML - Namespace with the given URI and prefix pair is contained in this - XMLNamespaces list. - - Parameter 'uri' is a string, the URI for the namespace Parameter - 'prefix' is a string, the prefix for the namespace - - Returns True if an XML Namespace with the given uri/prefix pair is - contained in this XMLNamespaces list, False otherwise. -"; - - -%feature("docstring") XMLNamespaces::removeDefault " - Internal implementation method. -"; - - -%feature("docstring") XMLNamespaces::containIdenticalSetNS " - Internal implementation method. -"; - - -%feature("docstring") XMLToken " - @ingroup Core Representation of a token in an XML stream. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. -"; - - -%feature("docstring") XMLToken::XMLToken " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLToken() - - Creates a new empty XMLToken. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLToken(XMLToken orig) - - Copy constructor; creates a copy of this XMLToken. - - Parameter 'orig' is the XMLToken object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLToken( XMLTriple triple , XMLAttributes attributes , - const long line = 0 , const long column = 0 ) - - Creates a start element XMLToken with the given set of attributes. - - Parameter 'triple' is XMLTriple. Parameter 'attributes' is - XMLAttributes, the attributes to set. Parameter 'line' is a long - integer, the line number (default = 0). Parameter 'column' is a long - integer, the column number (default = 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLToken( XMLTriple triple , const long line = 0 , const - long column = 0 ) - - Creates an end element XMLToken. - - Parameter 'triple' is XMLTriple. Parameter 'line' is a long integer, - the line number (default = 0). Parameter 'column' is a long integer, - the column number (default = 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLToken( XMLTriple triple , XMLAttributes attributes , - XMLNamespaces namespaces , const long line = 0 , const long - column = 0 ) - - Creates a start element XMLToken with the given set of attributes and - namespace declarations. - - Parameter 'triple' is XMLTriple. Parameter 'attributes' is - XMLAttributes, the attributes to set. Parameter 'namespaces' is - XMLNamespaces, the namespaces to set. Parameter 'line' is a long - integer, the line number (default = 0). Parameter 'column' is a long - integer, the column number (default = 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLToken( string chars , const long line = 0 , const long - column = 0 ) - - Creates a text XMLToken. - - Parameter 'chars' is a string, the text to be added to the XMLToken - Parameter 'line' is a long integer, the line number (default = 0). - Parameter 'column' is a long integer, the column number (default = - 0). - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::clone " - Creates and returns a deep copy of this XMLToken. - - Returns a (deep) copy of this XMLToken set. -"; - - -%feature("docstring") XMLToken::getAttributes " - Returns the attributes of this element. - - Returns the XMLAttributes of this XML element. -"; - - -%feature("docstring") XMLToken::setAttributes " - Sets an XMLAttributes to this XMLToken. Nothing will be done if this - XMLToken is not a start element. - - Parameter 'attributes' is XMLAttributes to be set to this XMLToken. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - This function replaces the existing XMLAttributes with the new one. -"; - - -%feature("docstring") XMLToken::addAttr " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - addAttr( XMLTriple triple, string value) - - Adds an attribute with the given XMLTriple/value pair to the - attribute set in this XMLToken. Nothing will be done if this - XMLToken is not a start element. - - Note: - - if local name with the same namespace URI already exists in the - attribute set, its value and prefix will be replaced. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - Parameter 'value' is a string, the value of the attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - ______________________________________________________________________ - Method variant with the following signature: - - addAttr( string name , string value , string namespaceURI = '' , - string prefix = '') - - Adds an attribute to the attribute set in this XMLToken optionally - with a prefix and URI defining a namespace. Nothing will be done if - this XMLToken is not a start element. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'value' is a string, the value of the attribute. Parameter - 'namespaceURI' is a string, the namespace URI of the attribute. - Parameter 'prefix' is a string, the prefix of the namespace - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - Note: - - if local name with the same namespace URI already exists in the - attribute set, its value and prefix will be replaced. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::removeAttr " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeAttr(XMLTriple triple) - - Removes an attribute with the given XMLTriple from the attribute set - in this XMLToken. Nothing will be done if this XMLToken is not a - start element. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - ______________________________________________________________________ - Method variant with the following signature: - - removeAttr(int n) - - Removes an attribute with the given index from the attribute set in - this XMLToken. Nothing will be done if this XMLToken is not a start - element. - - Parameter 'n' is an integer the index of the resource to be deleted - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - ______________________________________________________________________ - Method variant with the following signature: - - removeAttr(string name, string uri = '') - - Removes an attribute with the given local name and namespace URI from - the attribute set in this XMLToken. Nothing will be done if this - XMLToken is not a start element. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'uri' is a string, the namespace URI of the attribute. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE -"; - - -%feature("docstring") XMLToken::clearAttributes " - Clears (deletes) all attributes in this XMLToken. Nothing will be - done if this XMLToken is not a start element. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION -"; - - -%feature("docstring") XMLToken::getAttrIndex " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getAttrIndex(XMLTriple triple) - - Return the index of an attribute with the given XMLTriple. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute - for which the index is required. - - Returns the index of an attribute with the given XMLTriple, or -1 if - not present. - - ______________________________________________________________________ - Method variant with the following signature: - - getAttrIndex(string name, string uri='') - - Return the index of an attribute with the given local name and - namespace URI. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'uri' is a string, the namespace URI of the attribute. - - Returns the index of an attribute with the given local name and - namespace URI, or -1 if not present. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::getAttributesLength " - Return the number of attributes in the attributes set. - - Returns the number of attributes in the attributes set in this - XMLToken. -"; - - -%feature("docstring") XMLToken::getAttrName " - Return the local name of an attribute in the attributes set in this - XMLToken (by position). - - Parameter 'index' is an integer, the position of the attribute whose - local name is required. - - Returns the local name of an attribute in this list (by position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test for the attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrPrefix " - Return the prefix of an attribute in the attribute set in this - XMLToken (by position). - - Parameter 'index' is an integer, the position of the attribute whose - prefix is required. - - Returns the namespace prefix of an attribute in the attribute set - (by position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test for the attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrPrefixedName " - Return the prefixed name of an attribute in the attribute set in this - XMLToken (by position). - - Parameter 'index' is an integer, the position of the attribute whose - prefixed name is required. - - Returns the prefixed name of an attribute in the attribute set (by - position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test for attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrURI " - Return the namespace URI of an attribute in the attribute set in this - XMLToken (by position). - - Parameter 'index' is an integer, the position of the attribute whose - namespace URI is required. - - Returns the namespace URI of an attribute in the attribute set (by - position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test for attribute existence. -"; - - -%feature("docstring") XMLToken::getAttrValue " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getAttrValue(XMLTriple triple) - - Return a value of an attribute with the given XMLTriple. - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute - whose value is required. - - Returns The attribute value as a string. - - Note: - - If an attribute with the given XMLTriple does not exist, an empty - string will be returned. Use XMLToken.hasAttr() to test for - attribute existence. - - ______________________________________________________________________ - Method variant with the following signature: - - getAttrValue(int index) - - Return the value of an attribute in the attribute set in this - XMLToken (by position). - - Parameter 'index' is an integer, the position of the attribute whose - value is required. - - Returns the value of an attribute in the attribute set (by position). - - Note: - - If index is out of range, an empty string will be returned. Use - XMLToken.hasAttr() to test for attribute existence. - - ______________________________________________________________________ - Method variant with the following signature: - - getAttrValue(string name, string uri='') - - Return a value of an attribute with the given local name and - namespace URI. - - Parameter 'name' is a string, the local name of the attribute whose - value is required. Parameter 'uri' is a string, the namespace URI of - the attribute. - - Returns The attribute value as a string. - - Note: - - If an attribute with the given local name and namespace URI does - not exist, an empty string will be returned. Use - XMLToken.hasAttr() to test for attribute existence. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::hasAttr " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - hasAttr(XMLTriple triple) - - Predicate returning True or False depending on whether an attribute - with the given XML triple exists in the attribute set in this - XMLToken - - Parameter 'triple' is an XMLTriple, the XML triple of the attribute - - Returns True if an attribute with the given XML triple exists in the - attribute set in this XMLToken, False otherwise. - - ______________________________________________________________________ - Method variant with the following signature: - - hasAttr(int index) - - Predicate returning True or False depending on whether an attribute - with the given index exists in the attribute set in this XMLToken. - - Parameter 'index' is an integer, the position of the attribute. - - Returns True if an attribute with the given index exists in the - attribute set in this XMLToken, False otherwise. - - ______________________________________________________________________ - Method variant with the following signature: - - hasAttr(string name, string uri='') - - Predicate returning True or False depending on whether an attribute - with the given local name and namespace URI exists in the attribute - set in this XMLToken. - - Parameter 'name' is a string, the local name of the attribute. - Parameter 'uri' is a string, the namespace URI of the attribute. - - Returns True if an attribute with the given local name and namespace - URI exists in the attribute set in this XMLToken, False otherwise. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::isAttributesEmpty " - Predicate returning True or False depending on whether the - attribute set in this XMLToken set is empty. - - Returns True if the attribute set in this XMLToken is empty, False - otherwise. -"; - - -%feature("docstring") XMLToken::getNamespaces " - Returns the XML namespace declarations for this XML element. - - Returns the XML namespace declarations for this XML element. -"; - - -%feature("docstring") XMLToken::setNamespaces " - Sets an XMLnamespaces to this XML element. Nothing will be done if - this XMLToken is not a start element. - - Parameter 'namespaces' is XMLNamespaces to be set to this XMLToken. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INVALID_OBJECT - - Note: - - This function replaces the existing XMLNamespaces with the new one. -"; - - -%feature("docstring") XMLToken::addNamespace " - Appends an XML namespace prefix and URI pair to this XMLToken. If - there is an XML namespace with the given prefix in this XMLToken, - then the existing XML namespace will be overwritten by the new one. - - Nothing will be done if this XMLToken is not a start element. - - Parameter 'uri' is a string, the uri for the namespace Parameter - 'prefix' is a string, the prefix for the namespace - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::removeNamespace " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - removeNamespace(int index) - - Removes an XML Namespace stored in the given position of the - XMLNamespaces of this XMLToken. Nothing will be done if this - XMLToken is not a start element. - - Parameter 'index' is an integer, position of the removed namespace. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE - - ______________________________________________________________________ - Method variant with the following signature: - - removeNamespace(string prefix) - - Removes an XML Namespace with the given prefix. Nothing will be done - if this XMLToken is not a start element. - - Parameter 'prefix' is a string, prefix of the required namespace. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE -"; - - -%feature("docstring") XMLToken::clearNamespaces " - Clears (deletes) all XML namespace declarations in the XMLNamespaces - of this XMLToken. Nothing will be done if this XMLToken is not a - start element. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION -"; - - -%feature("docstring") XMLToken::getNamespaceIndex " - Look up the index of an XML namespace declaration by URI. - - Parameter 'uri' is a string, uri of the required namespace. - - Returns the index of the given declaration, or -1 if not present. -"; - - -%feature("docstring") XMLToken::getNamespaceIndexByPrefix " - Look up the index of an XML namespace declaration by prefix. - - Parameter 'prefix' is a string, prefix of the required namespace. - - Returns the index of the given declaration, or -1 if not present. -"; - - -%feature("docstring") XMLToken::getNamespacesLength " - Returns the number of XML namespaces stored in the XMLNamespaces of - this XMLToken. - - Returns the number of namespaces in this list. -"; - - -%feature("docstring") XMLToken::getNamespacePrefix " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getNamespacePrefix(int index) - - Look up the prefix of an XML namespace declaration by position. - - Callers should use getNamespacesLength() to find out how many - namespaces are stored in the XMLNamespaces. - - Parameter 'index' is an integer, position of the required prefix. - - Returns the prefix of an XML namespace declaration in the - XMLNamespaces (by position). - - Note: - - If index is out of range, an empty string will be returned. - - See also getNamespacesLength(). - - ______________________________________________________________________ - Method variant with the following signature: - - getNamespacePrefix(string uri) - - Look up the prefix of an XML namespace declaration by its URI. - - Parameter 'uri' is a string, the URI of the prefix being sought - - Returns the prefix of an XML namespace declaration given its URI. - - Note: - - If 'uri' does not exist, an empty string will be returned. -"; - - -%feature("docstring") XMLToken::getNamespaceURI " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getNamespaceURI(int index) - - Look up the URI of an XML namespace declaration by its position. - - Parameter 'index' is an integer, position of the required URI. - - Returns the URI of an XML namespace declaration in the XMLNamespaces - (by position). - - Note: - - If 'index' is out of range, an empty string will be returned. - - See also getNamespacesLength(). - - ______________________________________________________________________ - Method variant with the following signature: - - getNamespaceURI(string prefix = '') - - Look up the URI of an XML namespace declaration by its prefix. - - Parameter 'prefix' is a string, the prefix of the required URI - - Returns the URI of an XML namespace declaration given its prefix. - - Note: - - If 'prefix' does not exist, an empty string will be returned. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLToken::isNamespacesEmpty " - Predicate returning True or False depending on whether the - XMLNamespaces of this XMLToken is empty. - - Returns True if the XMLNamespaces of this XMLToken is empty, False - otherwise. -"; - - -%feature("docstring") XMLToken::hasNamespaceURI " - Predicate returning True or False depending on whether an XML - Namespace with the given URI is contained in the XMLNamespaces of - this XMLToken. - - Parameter 'uri' is a string, the uri for the namespace - - Returns True if an XML Namespace with the given URI is contained in - the XMLNamespaces of this XMLToken, False otherwise. -"; - - -%feature("docstring") XMLToken::hasNamespacePrefix " - Predicate returning True or False depending on whether an XML - Namespace with the given prefix is contained in the XMLNamespaces of - this XMLToken. - - Parameter 'prefix' is a string, the prefix for the namespace - - Returns True if an XML Namespace with the given URI is contained in - the XMLNamespaces of this XMLToken, False otherwise. -"; - - -%feature("docstring") XMLToken::hasNamespaceNS " - Predicate returning True or False depending on whether an XML - Namespace with the given uri/prefix pair is contained in the - XMLNamespaces ofthis XMLToken. - - Parameter 'uri' is a string, the uri for the namespace Parameter - 'prefix' is a string, the prefix for the namespace - - Returns True if an XML Namespace with the given uri/prefix pair is - contained in the XMLNamespaces of this XMLToken, False otherwise. -"; - - -%feature("docstring") XMLToken::setTriple " - Sets the XMLTripe (name, uri and prefix) of this XML element. - Nothing will be done if this XML element is a text node. - - Parameter 'triple' is XMLTriple to be added to this XML element. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") XMLToken::getName " - Returns the (unqualified) name of this XML element. - - Returns the (unqualified) name of this XML element. -"; - - -%feature("docstring") XMLToken::getPrefix " - Returns the namespace prefix of this XML element. - - Returns the namespace prefix of this XML element. - - Note: - - If no prefix exists, an empty string will be return. -"; - - -%feature("docstring") XMLToken::getURI " - Returns the namespace URI of this XML element. - - Returns the namespace URI of this XML element. -"; - - -%feature("docstring") XMLToken::getCharacters " - Returns the text of this element. - - Returns the characters of this XML text. -"; - - -%feature("docstring") XMLToken::append " - Appends characters to this XML text content. - - Parameter 'chars' is string, characters to append - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") XMLToken::getColumn " - Returns the column at which this XMLToken occurred in the input - document or data stream. - - Returns the column at which this XMLToken occurred. -"; - - -%feature("docstring") XMLToken::getLine " - Returns the line at which this XMLToken occurred in the input - document or data stream. - - Returns the line at which this XMLToken occurred. -"; - - -%feature("docstring") XMLToken::isElement " - Predicate returning True or False depending on whether this - XMLToken is an XML element. - - Returns True if this XMLToken is an XML element, False otherwise. -"; - - -%feature("docstring") XMLToken::isEnd " - Predicate returning True or False depending on whether this - XMLToken is an XML end element. - - Returns True if this XMLToken is an XML end element, False otherwise. -"; - - -%feature("docstring") XMLToken::isEndFor " - Predicate returning True or False depending on whether this - XMLToken is an XML end element for the given start element. - - Parameter 'element' is XMLToken, element for which query is made. - - Returns True if this XMLToken is an XML end element for the given - XMLToken start element, False otherwise. -"; - - -%feature("docstring") XMLToken::isEOF " - Predicate returning True or False depending on whether this - XMLToken is an end of file marker. - - Returns True if this XMLToken is an end of file (input) marker, False - otherwise. -"; - - -%feature("docstring") XMLToken::isStart " - Predicate returning True or False depending on whether this - XMLToken is an XML start element. - - Returns True if this XMLToken is an XML start element, False - otherwise. -"; - - -%feature("docstring") XMLToken::isText " - Predicate returning True or False depending on whether this - XMLToken is an XML text element. - - Returns True if this XMLToken is an XML text element, False - otherwise. -"; - - -%feature("docstring") XMLToken::setEnd " - Declares this XML start element is also an end element. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") XMLToken::setEOF " - Declares this XMLToken is an end-of-file (input) marker. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") XMLToken::unsetEnd " - Declares this XML start/end element is no longer an end element. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") XMLToken::write " - Internal implementation method. -"; - - -%feature("docstring") XMLToken::toString " - Prints a string representation of the underlying token stream, for - debugging purposes. -"; - - -%feature("docstring") XMLNode " - @ingroup Core Representation of a node in an XML document tree. - - Beginning with version 3.0.0, libSBML implements an XML abstraction - layer. This layer presents a uniform XML interface to calling - programs regardless of which underlying XML parser libSBML has - actually been configured to use. The basic data object in the XML - abstraction is a node, represented by XMLNode. - - An XMLNode can contain any number of children. Each child is another - XMLNode, thereby forming a tree. The methods - XMLNode.getNumChildren() and XMLNode.getChild() can be used to - access the tree structure starting from a given node. - - Each XMLNode is subclassed from XMLToken, and thus has the same - methods available as XMLToken. These methods include - XMLToken.getNamespaces(), XMLToken.getPrefix(), XMLToken.getName(), - XMLToken.getURI(), and XMLToken.getAttributes(). - - Conversion between an XML string and an XMLNode - ====================================================================== - - LibSBML provides the following utility functions for converting an - XML string (e.g., <annotation>...</annotation>) to/from an XMLNode - object. - - * XMLNode.toXMLString() returns a string representation of the - XMLNode object. - - * XMLNode.convertXMLNodeToString() (static function) returns a - string representation of the given XMLNode object. - - * XMLNode.convertStringToXMLNode() (static function) returns an - XMLNode object converted from the given XML string. - - The returned XMLNode object by XMLNode.convertStringToXMLNode() is a - dummy root (container) XMLNode if the given XML string has two or - more top-level elements (e.g., \"......\"). In the dummy root node, - each top-level element in the given XML string is contained as a - child XMLNode. XMLToken.isEOF() can be used to identify if the - returned XMLNode object is a dummy node or not. Here is an example: - - xn = XMLNode.convertStringToXMLNode(\'<p></p>\') - if xn == None: - # Do something to handle exceptional situation. - - elif xn.isEOF(): - # Node is a dummy node. - - else: - # None is not a dummy node. - @~ -"; - - -%feature("docstring") XMLNode::XMLNode " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode(XMLToken token) - - Creates a new XMLNode by copying token. - - Parameter 'token' is XMLToken to be copied to XMLNode - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode( XMLTriple triple , XMLAttributes attributes , - XMLNamespaces namespaces , const long line = 0 , const long - column = 0 ) - - Creates a new start element XMLNode with the given set of attributes - and namespace declarations. - - Parameter 'triple' is XMLTriple. Parameter 'attributes' is - XMLAttributes, the attributes to set. Parameter 'namespaces' is - XMLNamespaces, the namespaces to set. Parameter 'line' is a long - integer, the line number (default = 0). Parameter 'column' is a long - integer, the column number (default = 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode(XMLNode orig) - - Copy constructor; creates a copy of this XMLNode. - - Parameter 'orig' is the XMLNode instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode() - - Creates a new empty XMLNode with no children. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode( XMLTriple triple , XMLAttributes attributes , - const long line = 0 , const long column = 0 ) - - Creates a start element XMLNode with the given set of attributes. - - Parameter 'triple' is XMLTriple. Parameter 'attributes' is - XMLAttributes, the attributes to set. Parameter 'line' is a long - integer, the line number (default = 0). Parameter 'column' is a long - integer, the column number (default = 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode( XMLTriple triple , const long line = 0 , const - long column = 0 ) - - Creates an end element XMLNode. - - Parameter 'triple' is XMLTriple. Parameter 'line' is a long integer, - the line number (default = 0). Parameter 'column' is a long integer, - the column number (default = 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLNode( string chars , const long line = 0 , const long - column = 0 ) - - Creates a text XMLNode. - - Parameter 'chars' is a string, the text to be added to the XMLToken - Parameter 'line' is a long integer, the line number (default = 0). - Parameter 'column' is a long integer, the column number (default = - 0). - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLNode::clone " - Creates and returns a deep copy of this XMLNode. - - Returns a (deep) copy of this XMLNode. -"; - - -%feature("docstring") XMLNode::addChild " - Adds a copy of 'node' as a child of this XMLNode. - - The given 'node' is added at the end of the list of children. - - Parameter 'node' is the XMLNode to be added as child. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_XML_OPERATION - - Note: - - The given node is added at the end of the children list. -"; - - -%feature("docstring") XMLNode::insertChild " - Inserts a copy of the given node as the nth child of this XMLNode. - - If the given index 'n' is out of range for this XMLNode instance, - the 'node' is added at the end of the list of children. Even in - that situation, this method does not throw an error. - - Parameter 'n' is an integer, the index at which the given node is - inserted Parameter 'node' is an XMLNode to be inserted as nth child. - - Returns a reference to the newly-inserted child 'node' -"; - - -%feature("docstring") XMLNode::removeChild " - Removes the nth child of this XMLNode and returns the removed node. - - It is important to keep in mind that a given XMLNode may have more - than one child. Calling this method erases all existing references - to child nodes after the given position 'n'. If the index 'n' is - greater than the number of child nodes in this XMLNode, this method - takes no action (and returns None). - - Parameter 'n' is an integer, the index of the node to be removed - - Returns the removed child, or None if 'n' is greater than the number - of children in this node - - Note: - - The caller owns the returned node and is responsible for deleting it. -"; - - -%feature("docstring") XMLNode::removeChildren " - Removes all children from this node. Returns integer value - indicating success/failure of the function. The possible values - returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") XMLNode::getChild " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getChild(long n) - - Returns the nth child of this XMLNode. - - If the index 'n' is greater than the number of child nodes, or it is - 0 or less, this method returns an empty node. - - Parameter 'n' is an integer, the index of the node to return - - Returns the nth child of this XMLNode. - - ______________________________________________________________________ - Method variant with the following signature: - - getChild(string name) - - Returns the first child of this XMLNode with the corresponding name. - - If no child with corrsponding name can be found, this method - returns an empty node. - - Parameter 'name' is the name of the node to return - - Returns the first child of this XMLNode with given name. -"; - - -%feature("docstring") XMLNode::getIndex " - Return the index of the first child of this XMLNode with the given - name. - - Parameter 'name' is a string, the name of the child for which the - index is required. - - Returns the index of the first child of this XMLNode with the given - name, or -1 if not present. -"; - - -%feature("docstring") XMLNode::hasChild " - Return a boolean indicating whether this XMLNode has a child with the - given name. - - Parameter 'name' is a string, the name of the child to be checked. - - Returns boolean indicating whether this XMLNode has a child with the - given name. -"; - - -%feature("docstring") XMLNode::equals " - Compare this XMLNode against another XMLNode returning true if both - nodes represent the same XML tree, or false otherwise. - - Parameter 'other' is another XMLNode to compare against. - - Parameter 'ignoreURI' is whether to ignore the namespace URI when - doing the comparison. - - Returns boolean indicating whether this XMLNode represents the same - XML tree as another. -"; - - -%feature("docstring") XMLNode::getNumChildren " - Returns the number of children for this XMLNode. - - Returns the number of children for this XMLNode. -"; - - -%feature("docstring") XMLNode::write " - Internal implementation method. -"; - - -%feature("docstring") XMLNode::toXMLString " - Returns a string representation of this XMLNode. - - Returns a string derived from this XMLNode. -"; - - -%feature("docstring") XMLNode::convertXMLNodeToString " - Returns a string representation of a given XMLNode. - - Parameter 'node' is the XMLNode to be represented as a string - - Returns a string-form representation of 'node' -"; - - -%feature("docstring") XMLNode::convertStringToXMLNode " - Returns an XMLNode which is derived from a string containing XML - content. - - The XML namespace must be defined using argument 'xmlns' if the - corresponding XML namespace attribute is not part of the string of - the first argument. - - Parameter 'xmlstr' is string to be converted to a XML node. - Parameter 'xmlns' is XMLNamespaces the namespaces to set (default - value is None). - - Note: - - The caller owns the returned XMLNode and is reponsible for deleting - it. The returned XMLNode object is a dummy root (container) XMLNode - if the top-level element in the given XML string is NOT <html>, - <body>, <annotation>, or <notes>. In the dummy root node, each - top-level element in the given XML string is contained as a child - XMLNode. XMLToken.isEOF() can be used to identify if the returned - XMLNode object is a dummy node. - - Returns a XMLNode which is converted from string 'xmlstr'. If the - conversion failed, this method returns None. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLTriple " - @ingroup Core Representation of a qualified XML name. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - A 'triple' in the libSBML XML layer encapsulates the notion of - qualified name, meaning an element name or an attribute name with an - optional namespace qualifier. An XMLTriple instance carries up to - three data items: - - - * The name of the attribute or element; that is, the attribute name - as it appears in an XML document or data stream; - - * The XML namespace prefix (if any) of the attribute. For example, - in the following fragment of XML, the namespace prefix is the string - mysim and it appears on both the element someelement and the - attribute attribA. When both the element and the attribute are - stored as XMLTriple objects, their prefix is mysim. - - <mysim:someelement mysim:attribA=\'value\' /> - - * The XML namespace URI with which the prefix is associated. In - XML, every namespace used must be declared and mapped to a URI. - - XMLTriple objects are the lowest-level data item in the XML layer - of libSBML. Other objects such as XMLToken make use of XMLTriple - objects. -"; - - -%feature("docstring") XMLTriple::XMLTriple " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLTriple( string name , string uri , string prefix ) - - Creates a new XMLTriple with the given 'name', 'uri' and and - 'prefix'. - - Parameter 'name' is a string, name for the XMLTriple. Parameter - 'uri' is a string, URI of the XMLTriple. Parameter 'prefix' is a - string, prefix for the URI of the XMLTriple, - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLTriple(string triplet, const char sepchar = ' ') - - Creates a new XMLTriple by splitting the given 'triplet' on the - separator character 'sepchar'. - - Triplet may be in one of the following formats: - - * name - - * URI sepchar name - - * URI sepchar name sepchar prefix - - Parameter 'triplet' is a string representing the triplet as above - Parameter 'sepchar' is a character, the sepchar used in the triplet - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - XMLTriple() - - Creates a new, empty XMLTriple. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLTriple(XMLTriple orig) - - Copy constructor; creates a copy of this XMLTriple set. - - Parameter 'orig' is the XMLTriple object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") XMLTriple::clone " - Creates and returns a deep copy of this XMLTriple set. - - Returns a (deep) copy of this XMLTriple set. -"; - - -%feature("docstring") XMLTriple::getName " - Returns the name portion of this XMLTriple. - - Returns a string, the name from this XMLTriple. -"; - - -%feature("docstring") XMLTriple::getPrefix " - Returns the prefix portion of this XMLTriple. - - Returns a string, the prefix portion of this XMLTriple. -"; - - -%feature("docstring") XMLTriple::getURI " - Returns the URI portion of this XMLTriple. - - Returns URI a string, the prefix portion of this XMLTriple. -"; - - -%feature("docstring") XMLTriple::getPrefixedName " - Returns the prefixed name from this XMLTriple. - - Returns a string, the prefixed name from this XMLTriple. -"; - - -%feature("docstring") XMLTriple::isEmpty " - Predicate returning True or False depending on whether this - XMLTriple is empty. - - Returns True if this XMLTriple is empty, False otherwise. -"; - - -%feature("docstring") XMLOutputStream " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStream::endElement " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - endElement(XMLTriple triple) - - Writes the given XML end element 'prefix:name' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - endElement(string name, string prefix = '') - - Writes the given XML end element name to this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::setAutoIndent " - Turns automatic indentation on or off for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::startElement " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - startElement(XMLTriple triple) - - Writes the given XML start element 'prefix:name' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - startElement(string name, string prefix = '') - - Writes the given XML start element name to this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::startEndElement " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - startEndElement(XMLTriple triple) - - Writes the given XML start and end element 'prefix:name' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - startEndElement(string name, string prefix = '') - - Writes the given XML start and end element name to this - XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::writeAttribute " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, string value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string prefix, const double& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string prefix, string value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, const bool& value) - - Writes the given attribute, prefix:name='true' or prefix:name='false' - to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, const double& value) - - Writes the given attribute, name='value' to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, const long& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, const double& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, const long& value) - - Writes the given attribute, name='value' to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string value) - - Writes the given attribute, name='value' to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string value) - - Writes the given attribute, name='value' to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string prefix, const long& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string prefix, const long& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string prefix, const int& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, const long& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, const int& value) - - Writes the given attribute, name='value' to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, const int& value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, const bool& value) - - Writes the given attribute, name='true' or name='false' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(XMLTriple triple, string value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, const long& value) - - Writes the given attribute, name='value' to this XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string prefix, string value) - - Writes the given attribute, prefix:name='value' to this - XMLOutputStream. - - ______________________________________________________________________ - Method variant with the following signature: - - writeAttribute(string name, string &prefix, const bool& value) - - Writes the given attribute, prefix:name='true' or prefix:name='false' - to this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::writeXMLDecl " - Writes the XML declaration: <?xml version='1.0' encoding='...'?> -"; - - -%feature("docstring") XMLOutputStream::writeComment " - Writes an XML comment: <?xml version='1.0' encoding='...'?> -"; - - -%feature("docstring") XMLOutputStream::downIndent " - Decreases the indentation level for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::upIndent " - Increases the indentation level for this XMLOutputStream. -"; - - -%feature("docstring") XMLOutputStream::getStringStream " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStream::writeChars " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStream::writeIndent " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStream::setStringStream " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStream::unsetStringStream " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStringStream::XMLOutputStringStream " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputStringStream::getString " - Internal implementation method. -"; - - -%feature("docstring") XMLOutputFileStream::XMLOutputFileStream " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::getEncoding " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::getVersion " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::getErrorLog " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::isEOF " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::isError " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::isGood " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::next " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::peek " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::skipPastEnd " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::skipText " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::setErrorLog " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::toString " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::getSBMLNamespaces " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::setSBMLNamespaces " - Internal implementation method. -"; - - -%feature("docstring") XMLInputStream::queueToken " - Internal implementation method. -"; - - -%feature("docstring") XMLError " - @ingroup Core Representation of errors, warnings and other - diagnostics - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - LibSBML can be configured to use any of a number of XML parsers; at - the time of this writing, libSBML supports Xerces versions 2.4 - through 3.1, Expat version 1.95.x and higher, and libxml2 version - 2.6.16 and higher. These parsers each report different status codes - for the various exceptions that can occur during XML processing. - The XMLError object class abstracts away from the particular - diagnostics reported by the different parsers and presents a single - uniform interface and set of status codes, along with operations for - manipulating the error objects. - - When the libSBML XML parser layer encounters an error in the XML - content being processed, or when there is something else wrong (such - as an out-of-memory condition), the problems are reported as - XMLError objects. Each XMLError object instance has an - identification number that identifies the nature of the problem. - This error identifier is one of the constants listed in the next - section below. Applications can use the error identifiers as a means - of recognizing the error encountered and changing their behavior if - desired. @~ - - Integer error codes are useful for software, but not so much for - telling humans what happened. For this reason, XMLError also - provides two text messages describing the nature of the error. - These messages are accessible by means of the methods - XMLError.getShortMessage() and XMLError.getMessage(). The method - XMLError.getShortMessage() returns a very brief synopsis of the - warning or error condition, whereas XMLError.getMessage() returns a - longer explanation. These text strings are suitable for displaying - to human users. - - Each XMLError object also contains a category code; its value may be - retrieved using the method XMLError.getCategory(). Category values - are drawn from a set of constants whose names begin with the - characters LIBSBML_CAT_, described below.@~ Categories are used by - libSBML to provide more information to calling programs about the - nature of a given error. - - In addition to category codes, each XMLError object also has a - severity code; its value may be retrieved using the method - XMLError.getSeverity(). Severity code values are drawn from a set - of constants whose names begin with the characters LIBSBML_SEV_, - described below. Severity levels range from informational - (libsbml.LIBSBML_SEV_INFO) to fatal errors - (libsbml.LIBSBML_SEV_FATAL). - - Finally, XMLError objects record the line and column near where the - problem occurred in the XML content. The values can be retrieved - using the methods XMLError.getLine() and XMLError.getColumn(). We - say 'near where the problem occurred', because many factors affect - how accurate the line/column information ultimately is. For - example, sometimes, the underlying XML parsers can only report such - information for the parent XML element where an error occurs, and - not for the specific point where the problem occurs. In other - situations, some parsers report invalid line and/or column numbers - altogether. If this occurs, libSBML sets the line and/or column - number in the XMLError object to either 0 or the value of the - maximum unsigned long integer representable on the platform where - libSBML is running. The probability that a true line or column - number in an SBML model would equal this value is vanishingly small; - thus, if an application encounters these values in an XMLError - object, it can assume no valid line/column number could be provided - by libSBML in that situation. - - @~ - - <center> <table cellspacing='1' cellpadding='1' border='0' class - ='text-table width80 normal-font alt-row-colors'> <caption>Possible - XMLError error codes. Depending on the programming language in use, - the Enumerator values will be defined either as a value from the - enumeration XMLErrorCode_t or as integer constants. To make this - table more compact, we have shortened the identifiers for the - category and severity codes to their essential parts. To get the - actual names of the constants, prepend LIBSBML_CAT_ to the category - names and LIBSBML_SEV_ to the severity names shown in the two right- - hand columns. </caption> <tr style='background: lightgray' class - ='normal-font'> <th>Enumerator</th> <th>Meaning</th> - <th width='90'>Category</th> <th width='90'>Severity</th> - </tr> <tr><td>libsbml.XMLUnknownError</td><td>Unrecognized error - encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>libsbml.XMLOutOfMemory</td> <td>Out of - memory</td><td>SYSTEM</td><td>FATAL</td></tr> - <tr><td>libsbml.XMLFileUnreadable</td> <td>File - unreadable</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLFileUnwritable</td> <td>File - unwritable</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLFileOperationError</td><td>Error encountered while - attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLNetworkAccessError</td><td>Network access - error</td><td>SYSTEM</td><td>ERROR</td></tr> - <tr><td>libsbml.InternalXMLParserError</td><td>Internal XML parser - state error</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>libsbml.UnrecognizedXMLParserCode</td><td>XML parser returned - an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>libsbml.XMLTranscoderError</td><td>Character transcoder - error</td><td>INTERNAL</td><td>FATAL</td></tr> - <tr><td>libsbml.MissingXMLDecl</td><td>Missing XML declaration at - beginning of XML input</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.MissingXMLEncoding</td><td>Missing encoding attribute - in XML declaration</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLDecl</td><td>Invalid or unrecognized XML - declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLDOCTYPE</td><td>Invalid, malformed or - unrecognized XML DOCTYPE - declaration</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.InvalidCharInXML</td><td>Invalid character in XML - content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadlyFormedXML</td><td>XML content is not well- - formed</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.UnclosedXMLToken</td><td>Unclosed XML - token</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.InvalidXMLConstruct</td><td>XML construct is invalid - or not permitted</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLTagMismatch</td><td>Element tag mismatch or - missing tag</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.DuplicateXMLAttribute</td><td>Duplicate XML - attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.UndefinedXMLEntity</td><td>Undefined XML - entity</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadProcessingInstruction</td><td>Invalid, malformed - or unrecognized XML processing - instruction</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLPrefix</td><td>Invalid or undefined XML - namespace prefix</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLPrefixValue</td><td>Invalid XML namespace - prefix value</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.MissingXMLRequiredAttribute</td><td>Missing a - required XML attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLAttributeTypeMismatch</td><td>Data type mismatch - for the value of an attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLBadUTF8Content</td><td>Invalid UTF8 - content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.MissingXMLAttributeValue</td><td>Missing or - improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLAttributeValue</td><td>Invalid or - unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLAttribute</td><td>Invalid, unrecognized or - malformed attribute</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.UnrecognizedXMLElement</td><td>Element either not - recognized or not permitted</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLComment</td><td>Badly formed XML - comment</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLDeclLocation</td><td>XML declaration not - permitted in this location</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLUnexpectedEOF</td><td>Reached end of input - unexpectedly</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLIDValue</td><td>Value is invalid for XML ID, or - has already been used</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLIDRef</td><td>XML ID value was never - declared</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.UninterpretableXMLContent</td><td>Unable to interpret - content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.BadXMLDocumentStructure</td><td>Bad XML document - structure</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.InvalidAfterXMLContent</td><td>Encountered invalid - content after expected content</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLExpectedQuotedString</td><td>Expected to find a - quoted string</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLEmptyValueNotPermitted</td><td>An empty value is - not permitted in this context</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLBadNumber</td><td>Invalid or unrecognized - number</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLBadColon</td><td>Colon characters are invalid in - this context</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.MissingXMLElements</td><td>One or more expected - elements are missing</td><td>XML</td><td>ERROR</td></tr> - <tr><td>libsbml.XMLContentEmpty</td><td>Main XML content is - empty</td><td>XML</td><td>ERROR</td></tr> </table> </center> - - @~ - - <center> <table width='90' cellspacing='1' cellpadding='1' - border='0' class='text-table width80 normal-font alt-row-colors'> - <tr style='background: lightgray' class='normal-font'> - <th>Enumerator</th> <th>Meaning</th> </tr> - <tr><td>libsbml.LIBSBML_CAT_INTERNAL</td> <td>A problem involving - the libSBML software itself or the underlying XML parser. This - almost certainly indicates a software defect (i.e., bug) in libSBML. - Please report instances of this to the libSBML developers.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SYSTEM</td> <td>A problem reported by - the operating system, such as an inability to read or write a file. - This indicates something that is not a program error but is outside - of the control of libSBML.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_XML</td> <td>A problem in the XML - content itself. This usually arises from malformed XML or the use - of constructs not permitted in SBML.</td></tr> </table> </center> - - @~ - - <center> <table width='90' cellspacing='1' cellpadding='1' - border='0' class='text-table width80 normal-font alt-row-colors'> - <tr style='background: lightgray' class='normal-font'> - <th>Enumerator</th> <th>Meaning</th> </tr> - <tr><td>libsbml.LIBSBML_SEV_INFO</td> <td>The error is actually - informational and not necessarily a serious problem.</td></tr> - <tr><td>libsbml.LIBSBML_SEV_WARNING</td> <td>The error object - represents a problem that is not serious enough to necessarily stop - the problem, but applications should take note of the problem and - evaluate what its implications may be.</td></tr> - <tr><td>libsbml.LIBSBML_SEV_ERROR</td> <td>The error object - represents a serious error. The application may continue running - but it is unlikely to be able to continue processing the same XML - file or data stream.</td></tr> - <tr><td>libsbml.LIBSBML_SEV_FATAL</td> <td>A serious error occurred, - such as an out-of-memory condition, and the software should - terminate immediately.</td></tr> </table> </center> -"; - - -%feature("docstring") XMLError::XMLError " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLError(XMLError orig) - - Copy constructor; creates a copy of this XMLError. - - 'orig' the XMLError object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - XMLError( const int errorId = 0 , string details = '' , - const long line = 0 , const long column = 0 , const long - severity = LIBSBML_SEV_FATAL , const long category = - LIBSBML_CAT_INTERNAL ) - - Creates a new XMLError to report that something occurred during XML - processing. - - XMLError objects have identification numbers to indicate the nature - of the exception. These numbers are defined as unsigned integer - constants in the file 'libsbmlConstants.java'. See the top of this - documentation for a table listing the possible values and their - meanings. @~ The argument 'errorId' to this constructor can be (but - does not have to be) a value from this set of constants. If it is - one of the predefined error identifiers, the XMLError class assumes - the error is a low-level system or XML layer error and prepends a - built-in, predefined error message to any string passed in the - argument 'details' to this constructor. In addition, all the - predefined error identifiers have associated values for the - 'severity' and 'category' codes, and these fields are filled-in as - well. @~ - - If the error identifier 'errorId' is a number greater than 9999, this - constructor assumes that the error was generated from another part of - the software, and does not do additional filling in of values beyond - the defaults in the constructor itself. This allows XMLError to - serve as a base class for other errors (and is used in this way - elsewhere in libSBML). Callers should fill in all the parameters - with suitable values if generating errors with codes greater than - 9999 to make maximum use of the XMLError facilities. - - As mentioned above, there are additional constants defined for - standard severity and standard category codes, and every predefined - error in libSBML has an associated value for severity and category - taken from these predefined sets. These constants have symbol names - prefixed with LIBSBML_SEV_ and LIBSBML_CAT_, respectively. If the - value of 'errorId' is one of the standard error codes, callers do - not need to fill in 'severity' and 'category' in a call to this - constructor. Conversely, if 'errorId' is not an existing XML-level - error code, callers can use other values for 'severity' and - 'category'. @~ - - Parameter 'errorId' is a long integer, the identification number of - the error. - - Parameter 'details' is a string containing additional details about - the error. If the error code in 'errorId' is one that is recognized - by XMLError, the given message is appended to a predefined message - associated with the given code. If the error code is not - recognized, the message is stored as-is as the text of the error. - - Parameter 'line' is a long integer, the line number at which the - error occured. - - Parameter 'column' is a long integer, the column number at which the - error occured. - - Parameter 'severity' is an integer indicating severity of the error. - - Parameter 'category' is an integer indicating the category to which - the error belongs. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLError::getErrorId " - Returns the identifier of this error. - - Returns the error code for this error. - - See also getMessage(), getShortMessage(), getCategory(), - getSeverity(). -"; - - -%feature("docstring") XMLError::getMessage " - Returns the message text of this error. - - The message associated with an error object describes the nature of - the problem. The message returned by this method is generally longer - and clearer than the message returned by XMLError.getShortMessage(), - but not in all cases. - - Callers may use XMLError.getCategory() and XMLError.getSeverity() to - obtain additional information about the nature and severity of the - problem. - - Returns the message text - - See also getErrorId(), getShortMessage(), getCategory(), - getSeverity(). -"; - - -%feature("docstring") XMLError::getShortMessage " - Returns a brief message for this error. - - This is an alternative error message that, in general, is as short as - the authors could make it. However, brevity is often inversely - proportional to clarity, so this short message may not be - sufficiently informative to understand the nature of the error. - Calling applications may wish to check XMLError.getMessage() in - addition or instead. - - Returns the short error message text - - See also getErrorId(), getMessage(), getCategory(), getSeverity(). -"; - - -%feature("docstring") XMLError::getLine " - Returns the line number in the XML input near where the error, - warning or other diagnostic occurred. - - We say 'near where the problem occurred', because many factors affect - how accurate the line/column information ultimately is. For example, - sometimes, the underlying XML parsers can only report such - information for the parent XML element where an error occurs, and - not for the specific point where the problem occurs. In other - situations, some parsers report invalid line and/or column numbers - altogether. If this occurs, libSBML sets the line and/or column - number in the XMLError object to either 0 or the value of the - maximum unsigned long integer representable on the platform where - libSBML is running. The probability that a true line or column - number in an SBML model would equal this value is vanishingly small; - thus, if an application encounters these values in an XMLError - object, it can assume no valid line/column number could be provided - by libSBML in that situation. - - Returns the line number - - See also getColumn(). -"; - - -%feature("docstring") XMLError::getColumn " - Returns the column number in the XML input near where the error, - warning or other diagnostic occurred. - - We say 'near where the problem occurred', because many factors affect - how accurate the line/column information ultimately is. For example, - sometimes, the underlying XML parsers can only report such - information for the parent XML element where an error occurs, and - not for the specific point where the problem occurs. In other - situations, some parsers report invalid line and/or column numbers - altogether. If this occurs, libSBML sets the line and/or column - number in the XMLError object to either 0 or the value of the - maximum unsigned long integer representable on the platform where - libSBML is running. The probability that a true line or column - number in an SBML model would equal this value is vanishingly small; - thus, if an application encounters these values in an XMLError - object, it can assume no valid line/column number could be provided - by libSBML in that situation. - - Returns the column number - - See also getLine(). -"; - - -%feature("docstring") XMLError::getSeverity " - Returns the severity of this error. - - XMLError defines an enumeration of severity codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own severity codes with numbers higher than those in the predefined - set of severity codes. - - Returns the severity of this XMLError. - - See also getSeverityAsString(), getCategory(). -"; - - -%feature("docstring") XMLError::getSeverityAsString " - Returns a string describing the severity level of this error. - - XMLError defines an enumeration of severity codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own severity codes with numbers higher than those in the predefined - set of severity codes. - - Returns string representing the severity of this XMLError. - - See also getSeverity(), getCategoryAsString(). -"; - - -%feature("docstring") XMLError::getCategory " - Returns the category of this error. - - XMLError defines an enumeration of category codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own categories with numbers higher than those in the predefined set - of category codes. - - Categories can be used to partition errors into distinct groups. - Among other things, this can be used to prevent id conflicts by - uniquely identifying an XMLError by both id and category. - - Returns the category of this XMLError. - - See also getSeverity(), getCategoryAsString(). -"; - - -%feature("docstring") XMLError::getCategoryAsString " - Returns a string describing the category of this error. - - XMLError defines an enumeration of category codes for the XML layer. - Applications that build on XMLError by subclassing it may add their - own categories with numbers higher than those in the predefined set - of category codes. - - Categories can be used to partition errors into distinct groups. - Among other things, this can be used to prevent id conflicts by - uniquely identifying an XMLError by both id and category. - - Returns string representing the category of this XMLError. - - See also getCategory(), getSeverityAsString(). -"; - - -%feature("docstring") XMLError::isInfo " - Predicate returning True or False depending on whether this error - object is for information purposes only. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value libsbml.LIBSBML_SEV_INFO from the set of predefined severity - codes.@~ - - Returns True if this XMLError is for informational purposes only, - False otherwise. - - See also isWarning(), isError(), isFatal(). -"; - - -%feature("docstring") XMLError::isWarning " - Predicate returning True or False depending on whether this error - object is a warning. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value libsbml.LIBSBML_SEV_WARNING from the set of predefined - severity codes.@~ - - Returns True if this error is a warning, False otherwise. - - See also isInfo(), isError(), isFatal(). -"; - - -%feature("docstring") XMLError::isError " - Predicate returning True or False depending on whether this error is - a significant error. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value libsbml.LIBSBML_SEV_ERROR from the set of predefined severity - codes.@~ - - Returns True if this error is an error, False otherwise. - - See also isInfo(), isWarning(), isFatal(). -"; - - -%feature("docstring") XMLError::isFatal " - Predicate returning True or False depending on whether this error is - a fatal run-time error. - - This is equivalent to obtaining the severity code from an XMLError - object (via XMLError.getSeverity()) and then comparing it to the - value libsbml.LIBSBML_SEV_FATAL from the set of predefined severity - codes.@~ - - Returns True if this error is a fatal error, False otherwise. - - See also isInfo(), isWarning(), isError(). -"; - - -%feature("docstring") XMLError::isInternal " - Predicate returning True or False depending on whether this error - resulted from an internal program error. - - This is equivalent to obtaining the category identifier from an - XMLError object (via XMLError.getCategory()) and then comparing it to - the value libsbml.LIBSBML_CAT_INTERNAL from the set of predefined - category codes.@~ - - Returns True or False - - See also isSystem(), isXML(). -"; - - -%feature("docstring") XMLError::isSystem " - Predicate returning True or False depending on whether this error - was generated by the operating system. - - This is equivalent to obtaining the category identifier from an - XMLError object (via XMLError.getCategory()) and then comparing it to - the value libsbml.LIBSBML_CAT_SYSTEM from the set of predefined - category codes.@~ - - Returns True or False - - See also isInternal(), isXML(). -"; - - -%feature("docstring") XMLError::isXML " - Predicate returning True or False depending on whether this error - resulted from a problem in the XML input (e.g., an XML syntax - error). - - This is equivalent to obtaining the category identifier from an - XMLError object (via XMLError.getCategory()) and then comparing it to - the value libsbml.LIBSBML_CAT_XML from the set of predefined - category codes.@~ - - Returns True or False - - See also isInternal(), isSystem(). -"; - - -%feature("docstring") XMLError::isValid " - Predicate returning True or False depending on whether this error - resulted from a problem or whether it was logged as an unknown - error. - - This is equivalent to obtaining the error identifier from an - XMLError object (via XMLError.getErrorId()) and then comparing it to - the value XMLUnknownError or UnknownError from the set of predefined - error codes.@~ - - Returns True or False -"; - - -%feature("docstring") XMLError::setLine " - Sets the line number where this error occurred. - - Parameter 'line' is a long integer, the line number to set. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also setColumn(). -"; - - -%feature("docstring") XMLError::setColumn " - Sets the column number where this error occurred. - - Parameter 'column' is a long integer, the column number to set. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also setLine(). -"; - - -%feature("docstring") XMLError::getStandardMessage " - Returns a copy of the message string associated with the given - predefined XMLError code. - - Parameter 'code' is the error code whose message is sought; it must - be a predefined value from the set of predefined error - identifiers.@~ -"; - - -%feature("docstring") XMLError::getPackage " - Returns a copy of the message string associated with the given - predefined XMLError code. - - Parameter 'code' is the error code whose message is sought; it must - be a predefined value from the set of predefined error - identifiers.@~ -"; - - -%feature("docstring") XMLError::getErrorIdOffset " - Returns a copy of the message string associated with the given - predefined XMLError code. - - Parameter 'code' is the error code whose message is sought; it must - be a predefined value from the set of predefined error - identifiers.@~ -"; - - -%feature("docstring") XMLErrorLog " - @ingroup Core Log of errors and other events encountered while - processing an XML file or data stream. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The error log is a list. The XML layer of libSBML maintains an error - log associated with a given XML document or data stream. When an - operation results in an error, or when there is something wrong with - the XML content, the problem is reported as an XMLError object - stored in the XMLErrorLog list. Potential problems range from low- - level issues (such as the inability to open a file) to XML syntax - errors (such as mismatched tags or other problems). - - A typical approach for using this error log is to first use - getNumErrors()@~ to inquire how many XMLError object instances it - contains, and then to iterate over the list of objects one at a time - using getError(long n) const. Indexing in the list begins at 0. - - In normal circumstances, programs using libSBML will actually obtain - an SBMLErrorLog rather than an XMLErrorLog. The former is - subclassed from XMLErrorLog and simply wraps commands for working - with SBMLError objects rather than the low-level XMLError objects. - Classes such as SBMLDocument use the higher-level SBMLErrorLog. -"; - - -%feature("docstring") XMLErrorLog::getNumErrors " - Returns the number of errors that have been logged. - - To retrieve individual errors from the log, callers may use - XMLErrorLog.getError() . - - Returns the number of errors that have been logged. -"; - - -%feature("docstring") XMLErrorLog::getError " - Returns the nth XMLError object in this log. - - Index 'n' is counted from 0. Callers should first inquire about the - number of items in the log by using the method getNumErrors(). - Attempts to use an error index number that exceeds the actual number - of errors in the log will result in a None being returned. - - Parameter 'n' is the index number of the error to retrieve (with 0 - being the first error). - - Returns the nth XMLError in this log, or None if 'n' is greater than - or equal to getNumErrors(). - - See also getNumErrors(). -"; - - -%feature("docstring") XMLErrorLog::clearLog " - Deletes all errors from this log. -"; - - -%feature("docstring") XMLErrorLog::XMLErrorLog " - Internal implementation method. -"; - - -%feature("docstring") XMLErrorLog::setParser " - Internal implementation method. -"; - - -%feature("docstring") XMLErrorLog::toString " - Writes all errors contained in this log to a string and returns it. - - This method uses printErrors() to format the diagnostic messages. - Please consult that method for information about the organization of - the messages in the string returned by this method. - - Returns a string containing all logged errors and warnings. - - See also printErrors(). -"; - - -%feature("docstring") XMLErrorLog::printErrors " - Prints all the errors or warnings stored in this error log - - It prints the text to the stream given by the optional parameter - 'stream'. If no parameter is given, it prints the output to the - standard error stream. - - If no errors have occurred, i.e., getNumErrors() == 0, no output - will be sent to the stream. - - The format of the output is: - - N error(s): - line NNN: (id) message - - Parameter 'stream' is the ostream or ostringstream object indicating - where the output should be printed. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") XMLErrorLog::isSeverityOverridden " - Returns a boolean indicating whether or not the severity is overriden -"; - - -%feature("docstring") XMLErrorLog::unsetSeverityOverride " - usets an existing override -"; - - -%feature("docstring") XMLErrorLog::getSeverityOverride " - Returns the current override -"; - - -%feature("docstring") XMLErrorLog::setSeverityOverride " - Set the severity override. - - If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be - logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG - no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then - all errors will be logged as warnings. -"; - - -%feature("docstring") XMLErrorLog::changeErrorSeverity " - Set the severity override. - - If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be - logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG - no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then - all errors will be logged as warnings. -"; - - -%feature("docstring") SBMLErrorLog " - @ingroup Core Log of errors and other events encountered during SBML - processing. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The error log is a list. Each SBMLDocument maintains its own - SBMLErrorLog. When a libSBML operation on SBML content results in an - error, or when there is something worth noting about the SBML - content, the issue is reported as an SBMLError object stored in the - SBMLErrorLog list. - - SBMLErrorLog is derived from XMLErrorLog, an object class that serves - exactly the same purpose but for the XML parsing layer. XMLErrorLog - provides crucial methods such as getNumErrors()@~ for determining - how many SBMLError or XMLError objects are in the log. SBMLErrorLog - inherits these methods. - - The general approach to working with SBMLErrorLog in user programs - involves first obtaining a pointer to a log from a libSBML object - such as SBMLDocument. Callers should then use getNumErrors() @~ to - inquire how many objects there are in the list. (The answer may be - 0.) If there is at least one SBMLError object in the SBMLErrorLog - instance, callers can then iterate over the list using - SBMLErrorLog.getError(), using methods provided by the SBMLError - class to find out the error code and associated information such as - the error severity, the message, and the line number in the input. - - If you wish to simply print the error strings for a human to read, an - easier and more direct way might be to use - SBMLDocument.printErrors(). - - See also SBMLError, XMLErrorLog, XMLError. -"; - - -%feature("docstring") SBMLErrorLog::getError " - Returns the nth SBMLError object in this log. - - Index 'n' is counted from 0. Callers should first inquire about the - number of items in the log by using the getNumErrors()@~ method. - Attempts to use an error index number that exceeds the actual number - of errors in the log will result in a None being returned. - - Parameter 'n' is the index number of the error to retrieve (with 0 - being the first error). - - Returns the nth SBMLError in this log, or None if 'n' is greater - than or equal to getNumErrors(). - - See also getNumErrors(). -"; - - -%feature("docstring") SBMLErrorLog::getNumFailsWithSeverity " - Returns the number of errors that have been logged with the given - severity code. - - LibSBML associates severity levels with every SBMLError object to - provide an indication of how serious the problem is. Severities - range from informational diagnostics to fatal (irrecoverable) - errors. Given an SBMLError object instance, a caller can - interrogate it for its severity level using methods such as - SBMLError.getSeverity(), SBMLError.isFatal(), and so on. The - present method encapsulates iteration and interrogation of all - objects in an SBMLErrorLog, making it easy to check for the presence - of error objects with specific severity levels. - - Parameter 'severity' is a value from the set of LIBSBML_SEV_ - constants defined by the interface class libsbml. @~ - - Returns a count of the number of errors with the given severity code. - - See also getNumErrors(). -"; - - -%feature("docstring") SBMLErrorLog::SBMLErrorLog " - Internal implementation method. -"; - - -%feature("docstring") SBMLErrorLog::logError " - Internal implementation method. -"; - - -%feature("docstring") SBMLErrorLog::logPackageError " - Internal implementation method. -"; - - -%feature("docstring") SBMLErrorLog::remove " - Removes an error having errorId from the SBMLError list. - - Only the first item will be removed if there are multiple errors - with the given errorId. - - Parameter 'errorId' is the error identifier of the error to be - removed. -"; - - -%feature("docstring") SBMLErrorLog::contains " - Returns true if SBMLErrorLog contains an errorId - - Parameter 'errorId' is the error identifier of the error to be found. -"; - - -%feature("docstring") SBMLError " - @ingroup Core Representation of errors, warnings and other - diagnostics - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - When a libSBML operation on SBML content results in an error, or when - there is something wrong with the SBML content, the problems are - reported as SBMLError objects. These are generally stored in an - SBMLErrorLog object; this log object, in turn, is kept in the - SBMLDocument object containing the SBML content. Applications can - obtain the list of logged errors using SBMLDocument.getErrorLog() and - then use the methods provided by SBMLErrorLog to access individual - SBMLError objects. (Note that despite the word 'error' in the name, - SBMLError objects are used to represent not only 'true' errors, but - also warnings and some informational diagnostics. The name is a - historical hold-over from early versions of libSBML, in which the - object really was only used to report errors.) - - Each SBMLError object instance has an identification number that - identifies the nature of the problem. This 'error id' number will be - up to five digits long, and it will come from one of two sets of - static integer constants defined in the interface class libsbml: - either the SBML error identifiers (described below) or the XML - error identifiers (described in the documentation for the class - XMLError). The former set of constants includes all the SBML - validation rule numbers listed in the appendices of the SBML - specification documents, as well as some additional libSBML-specific - error codes. @~ - - Error codes are useful mainly for software. For human readers, - SBMLError also includes text messages that describe the nature of a - given problem. The messages can be accessed using - SBMLError.getShortMessage() and SBMLError.getMessage(). The former - provides a brief one-line description of the issue, while - SBMLError.getMessage() provides a more detailed text, including (if - appropriate) references to sections of the SBML specifications where - relevant topics are discussed. These text strings are suitable for - displaying to human users. - - An SBMLError object also contains a category code; its value may be - retrieved using the method SBMLError.getCategory(). Category values - are drawn from a set of static integer constants defined in libsbml - and having names beginning with the characters LIBSBML_CAT_. The - list of possible codes is described in a separate section below. - Categories are used to partition errors into distinct conceptual - groups. This is principally used by the libSBML validation system - to group classes of validation checks. For example, - libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY is the category for tests - that check identifier consistency; - libsbml.LIBSBML_CAT_MATHML_CONSISTENCY is the category for MathML - consistency checking; and so on. @~ - - In addition, SBMLError also has a severity code. Its value may be - retrieved using the method SBMLError.getSeverity(). The possible - severity values are the same as those reported by XMLError.@~ - Severity levels currently range from informational - (libsbml.LIBSBML_SEV_INFO) to fatal errors - (libsbml.LIBSBML_SEV_FATAL). They can be used by an application to - evaluate how serious a given problem is. - - Finally, SBMLError records the line and column near where the problem - occurred in the SBML content. The values may be retrieved using the - methods SBMLError.getLine() and SBMLError.getColumn(). We say - 'near', because a lot of factors affect how accurate the line/column - information ultimately is. For example, different XML parsers have - different conventions for which line and column number they report - for a particular problem (which makes a difference when a problem - involves an opening XML tag on one line and a closing tag on another - line). In some situations, some parsers report invalid line and/or - column numbers altogether. If this occurs, libSBML sets the line - and/or column number in the SBMLError object to the the value of the - maximum unsigned long integer representable on the platform where - libSBML is running. (This is equal to the constant named ULONG_MAX - in C and C++.) The probability that a true line or column number in - an SBML model would equal this value is vanishingly small; thus, if - an application encounters these values in an XMLError object, it can - assume no valid line/column number could be provided by libSBML in - that situation. - - Error codes associated with SBMLError objects - ...................................................................... - - The error and warning codes returned by libSBML are listed in the - table below. The method SBMLError.getErrorId() returns the error - code of a given SBMLError object instance. In the libSBML Python - language interface, these error identifiers are currently - implemented as static integer constants defined in the interface - class libsbml. - - In this table, the right-hand columns titled 'L1V1', 'L1V2', etc. - refer to Levels and Versions of the SBML specifications, and the - entries in each column refer to whether the severity of the - condition in that particular Level+Version of SBML. The codes stand - for the following: - - @~ - - <table cellspacing='1' cellpadding='2' border='0' class='normal- - font'> <tr><td class='s-na'>N</td><td>= Not applicable</td></tr> - <tr><td class='s-info'>I</td><td>= Informational</td></tr> <tr><td - class='s-warning'>W</td><td>= Warning</td></tr> <tr><td - class='s-error'>E</td><td>= Error</td></tr> <tr><td - class='s-fatal'>F</td><td>= Fatal</td></tr> </table> - - The text shown in the 'Meaning' is the text returned by the - SBMLError.getShortMessage() method on a given SBMLError object. A - longer and (hopefully) clearer explanation of the issue is returned - by SBMLError.getMessage(). - - Enumerator Meaning L 1 V 1 L 1 V 2 L 2 V 1 L 2 V 2 L 2 V 3 L 2 V 4 L - 3 V 1 UnknownErrorEncountered unknown internal libSBML errorFFFFFFF - NotUTF8File does not use UTF-8 encodingEEEEEEE - UnrecognizedElementEncountered unrecognized elementEEEEEEE - NotSchemaConformantDocument does not conform to the SBML XML - schemaEEEEEEE L3NotSchemaConformantDocument is not well-formed - XMLNNNNNNE InvalidMathElementInvalid MathMLNNEEEEE - DisallowedMathMLSymbolDisallowed MathML symbol foundNNEEEEE - DisallowedMathMLEncodingUseUse of the MathML 'encoding' attribute is - not allowed on this elementNNEEEEE DisallowedDefinitionURLUseUse of - the MathML 'definitionURL' attribute is not allowed on this - elementNNEEEEE BadCsymbolDefinitionURLValueInvalid <csymbol> - 'definitionURL' attribute valueNNEEEEE - DisallowedMathTypeAttributeUseUse of the MathML 'type' attribute is - not allowed on this elementNNEEEEE - DisallowedMathTypeAttributeValueDisallowed MathML 'type' attribute - valueNNEEEEE LambdaOnlyAllowedInFunctionDefUse of <lambda> not - permitted outside of FunctionDefinition objectsNNEEEEE - BooleanOpsNeedBooleanArgsNon-Boolean argument given to Boolean - operatorNNWEEEE NumericOpsNeedNumericArgsNon-numerical argument - given to numerical operatorNNWEEEE ArgsToEqNeedSameTypeArguments to - <eq> and <neq> must have the same data typesNNWEEEE - PiecewiseNeedsConsistentTypesTerms in a <piecewise> expression must - have consistent data typesNNWEEEE PieceNeedsBooleanThe second - argument of a <piece> expression must yield a Boolean valueNNWEEEE - ApplyCiMustBeUserFunctionA <ci> element in this context must refer - to a function definitionNNWEEEE ApplyCiMustBeModelComponentA <ci> - element in this context must refer to a model componentNNWEEEE - KineticLawParametersAreLocalOnlyCannot use a KineticLaw local - parameter outside of its local scopeNNWEEEE MathResultMustBeNumericA - formula's result in this context must be a numerical valueNNWEEEE - OpsNeedCorrectNumberOfArgsIncorrect number of arguments given to - MathML operatorNNWEEEE InvalidNoArgsPassedToFunctionDefIncorrect - number of arguments given to function invocationNNNNNEE - DisallowedMathUnitsUseAttribute 'units' is only permitted on <cn> - elementsNNNNNNE InvalidUnitsValueInvalid value given for the 'units' - attributeNNNNNNE DuplicateComponentIdDuplicate 'id' attribute - valueEEEEEEE DuplicateUnitDefinitionIdDuplicate unit definition 'id' - attribute valueEEEEEEE DuplicateLocalParameterIdDuplicate local - parameter 'id' attribute valueEEEEEEE - MultipleAssignmentOrRateRulesMultiple rules for the same variable are - not allowedEEEEEEE MultipleEventAssignmentsForIdMultiple event - assignments for the same variable are not allowedNNEEEEE - EventAndAssignmentRuleForIdAn event assignment and an assignment rule - must not have the same value for 'variable'NNEEEEE - DuplicateMetaIdDuplicate 'metaid' attribute valueNNEEEEE - InvalidSBOTermSyntaxInvalid syntax for an 'sboTerm' attribute - valueNNNEEEE InvalidMetaidSyntaxInvalid syntax for a 'metaid' - attribute valueNNEEEEE InvalidIdSyntaxInvalid syntax for an 'id' - attribute valueEEEEEEE InvalidUnitIdSyntaxInvalid syntax for the - identifier of a unitNNNEEEE InvalidNameSyntaxInvalid syntax for a - 'name' attribute valueNNNNNNE MissingAnnotationNamespaceMissing - declaration of the XML namespace for the annotationNNNEEEE - DuplicateAnnotationNamespacesMultiple annotations using the same XML - namespaceNNNEEEE SBMLNamespaceInAnnotationThe SBML XML namespace - cannot be used in an Annotation objectNNNEEEN - MultipleAnnotationsOnly one Annotation object is permitted under a - given SBML objectNNNNNNE InconsistentArgUnitsThe units of the - function call's arguments are not consistent with its - definitionWWWEEWW InconsistentKineticLawUnitsL3The kinetic law's - units are inconsistent with those of other kinetic laws in the - modelNNNNNNW AssignRuleCompartmentMismatchMismatched units in - assignment rule for compartmentEEEEEWW - AssignRuleSpeciesMismatchMismatched units in assignment rule for - speciesEEEEEWW AssignRuleParameterMismatchMismatched units in - assignment rule for parameterEEEEEWW - AssignRuleStoichiometryMismatchMismatched units in assignment rule - for stoichiometryNNNNNNW InitAssignCompartmenMismatchMismatched - units in initial assignment to compartmentNNNEEWW - InitAssignSpeciesMismatchMismatched units in initial assignment to - speciesNNNEEWW InitAssignParameterMismatchMismatched units in - initial assignment to parameterNNNEEWW - InitAssignStoichiometryMismatchMismatched units in initial - assignment to stoichiometryNNNNNNW - RateRuleCompartmentMismatchMismatched units in rate rule for - compartmentEEEEEWW RateRuleSpeciesMismatchMismatched units in rate - rule for speciesEEEEEWW RateRuleParameterMismatchMismatched units in - rate rule for parameterEEEEEWW - RateRuleStoichiometryMismatchMismatched units in rate rule for - stoichiometryNNNNNNW KineticLawNotSubstancePerTimeThe units of the - kinetic law are not 'substance'/'time'EEEEEWW - SpeciesInvalidExtentUnitsThe species' units are not consistent with - units of extentNNNNNNW DelayUnitsNotTimeThe units of the delay - expression are not units of timeNNEEEWW - EventAssignCompartmentMismatchMismatched units in event assignment - for compartmentNNEEEWW EventAssignSpeciesMismatchMismatched units in - event assignment for speciesNNEEEWW - EventAssignParameterMismatchMismatched units in event assignment for - parameterNNEEEWW EventAssignStoichiometryMismatchMismatched units in - event assignment for stoichiometryNNNNNNW - PriorityUnitsNotDimensionlessThe units of a priority expression must - be 'dimensionless'NNNNNNW UpperUnitBoundUpper boundary of unit - validation diagnostic codesNNNNNNN OverdeterminedSystemThe model is - overdeterminedWWWEEEE InvalidModelSBOTermInvalid 'sboTerm' attribute - value for a Model objectNNNEEWW InvalidFunctionDefSBOTermInvalid - 'sboTerm' attribute value for a FunctionDefinition objectNNNEEWW - InvalidParameterSBOTermInvalid 'sboTerm' attribute value for a - Parameter objectNNNEEWW InvalidInitAssignSBOTermInvalid 'sboTerm' - attribute value for an InitialAssignment objectNNNEEWW - InvalidRuleSBOTermInvalid 'sboTerm' attribute value for a Rule - objectNNNEEWW InvalidConstraintSBOTermInvalid 'sboTerm' attribute - value for a Constraint objectNNNEEWW InvalidReactionSBOTermInvalid - 'sboTerm' attribute value for a Reaction objectNNNEEWW - InvalidSpeciesReferenceSBOTermInvalid 'sboTerm' attribute value for a - SpeciesReference objectNNNEEWW InvalidKineticLawSBOTermInvalid - 'sboTerm' attribute value for a KineticLaw objectNNNEEWW - InvalidEventSBOTermInvalid 'sboTerm' attribute value for an Event - objectNNNEEWW InvalidEventAssignmentSBOTermInvalid 'sboTerm' - attribute value for an EventAssignment objectNNNEEWW - InvalidCompartmentSBOTermInvalid 'sboTerm' attribute value for a - Compartment objectNNNNEWW InvalidSpeciesSBOTermInvalid 'sboTerm' - attribute value for a Species objectNNNNEWW - InvalidCompartmentTypeSBOTermInvalid 'sboTerm' attribute value for a - CompartmentType objectNNNNEWN InvalidSpeciesTypeSBOTermInvalid - 'sboTerm' attribute value for a SpeciesType objectNNNNEWN - InvalidTriggerSBOTermInvalid 'sboTerm' attribute value for an Event - Trigger objectNNNNEWW InvalidDelaySBOTermInvalid 'sboTerm' attribute - value for an Event Delay objectNNNNEWW NotesNotInXHTMLNamespaceNotes - must be placed in the XHTML XML namespaceEEEEEEE - NotesContainsXMLDeclXML declarations are not permitted in Notes - objectsNNNEEEE NotesContainsDOCTYPEXML DOCTYPE elements are not - permitted in Notes objectsNNNEEEE InvalidNotesContentInvalid notes - content foundNNNEEEN OnlyOneNotesElementAllowedOnly one Notes - subobject is permitted on a given SBML objectNNNNNNE - InvalidNamespaceOnSBMLInvalid XML namespace for the SBML container - elementEEEEEEE MissingOrInconsistentLevelMissing or inconsistent - value for the 'level' attributeEEEEEEE - MissingOrInconsistentVersionMissing or inconsistent value for the - 'version' attributeEEEEEEE PackageNSMustMatchInconsistent or invalid - SBML Level/Version for the package namespace declarationNNNNNNE - LevelPositiveIntegerThe 'level' attribute must have a positive - integer valueNNNNNNE VersionPositiveIntegerThe 'version' attribute - must have a positive integer valueNNNNNNE - AllowedAttributesOnSBMLInvalid attribute found on the SBML container - elementNNNNNNE L3PackageOnLowerSBMLAn L3 package ns found on the - SBML container element.WWWWWWN MissingModelNo model definition - foundEEEEEEE IncorrectOrderInModelIncorrect ordering of components - within the Model objectEEEEEEN EmptyListElementEmpty ListOf___ - object foundEEEEEEE NeedCompartmentIfHaveSpeciesThe presence of a - species requires a compartmentEEEEEEE OneOfEachListOfOnly one of - each kind of ListOf___ object is allowed inside a Model objectNNNNNNE - OnlyFuncDefsInListOfFuncDefsOnly FunctionDefinition, Notes and - Annotation objects are allowed in ListOfFunctionDefinitionsNNNNNNE - OnlyUnitDefsInListOfUnitDefsOnly UnitDefinition, Notes and Annotation - objects are allowed in ListOfUnitDefinitions objectsNNNNNNE - OnlyCompartmentsInListOfCompartmentsOnly Compartment, Notes and - Annotation objects are allowed in ListOfCompartments objectsNNNNNNE - OnlySpeciesInListOfSpeciesOnly Species, Notes and Annotation objects - are allowed in ListOfSpecies objectsNNNNNNE - OnlyParametersInListOfParametersOnly Parameter, Notes and Annotation - objects are allowed in ListOfParameters objectsNNNNNNE - OnlyInitAssignsInListOfInitAssignsOnly InitialAssignment, Notes and - Annotation objects are allowed in ListOfInitialAssignments - objectsNNNNNNE OnlyRulesInListOfRulesOnly Rule, Notes and Annotation - objects are allowed in ListOfRules objectsNNNNNNE - OnlyConstraintsInListOfConstraintsOnly Constraint, Notes and - Annotation objects are allowed in ListOfConstraints objectsNNNNNNE - OnlyReactionsInListOfReactionsOnly Reaction, Notes and Annotation - objects are allowed in ListOfReactions objectsNNNNNNE - OnlyEventsInListOfEventsOnly Event, Notes and Annotation objects are - allowed in ListOfEvents objectsNNNNNNE L3ConversionFactorOnModelA - 'conversionFactor' attribute value must reference a Parameter - objectNNNNNNE L3TimeUnitsOnModelInvalid 'timeUnits' attribute - valueNNNNNNW L3VolumeUnitsOnModelInvalid 'volumeUnits' attribute - valueNNNNNNW L3AreaUnitsOnModelInvalid 'areaUnits' attribute - valueNNNNNNW L3LengthUnitsOnModelInvalid 'lengthUnits' attribute - valueNNNNNNW L3ExtentUnitsOnModelInvalid 'extentUnits' attribute - valueNNNNNNW AllowedAttributesOnModelInvalid attribute found on the - Model objectNNNNNNE AllowedAttributesOnListOfFuncsInvalid attribute - found on the ListOfFunctionDefinitions objectNNNNNNE - AllowedAttributesOnListOfUnitDefsInvalid attribute found on the - ListOfUnitDefinitions objectNNNNNNE - AllowedAttributesOnListOfCompsInvalid attribute found on the - ListOfCompartments objectNNNNNNE - AllowedAttributesOnListOfSpeciesInvalid attribute found on the - ListOfSpecies objectNNNNNNE AllowedAttributesOnListOfParamsInvalid - attribute found on the ListOfParameters objectNNNNNNE - AllowedAttributesOnListOfInitAssignInvalid attribute found on the - ListOfInitialAssignments objectNNNNNNE - AllowedAttributesOnListOfRulesInvalid attribute found on the - ListOfRules objectNNNNNNE - AllowedAttributesOnListOfConstraintsInvalid attribute found on the - ListOfConstraints objectNNNNNNE - AllowedAttributesOnListOfReactionsInvalid attribute found on the - ListOfReactions objectNNNNNNE AllowedAttributesOnListOfEventsInvalid - attribute found on the ListOfEvents objectNNNNNNE - FunctionDefMathNotLambdaInvalid expression found in the function - definitionNNEEEEE InvalidApplyCiInLambdaInvalid forward reference in - the MathML <ci>...</ci></apply> expressionNNEEENN - RecursiveFunctionDefinitionRecursive function definitions are not - permittedNNEEEEE InvalidCiInLambdaInvalid <ci> reference found inside - the <lambda> mathematical formulaNNEEEEE - InvalidFunctionDefReturnTypeA function's return type must be either - a number or a BooleanNNEEEEE OneMathElementPerFuncA - FunctionDefinition object must contain one <math> elementNNNNNNE - AllowedAttributesOnFuncInvalid attribute found on the - FunctionDefinition objectNNNNNNE InvalidUnitDefIdInvalid 'id' - attribute value for a UnitDefinition objectEEEEEEE - InvalidSubstanceRedefinitionInvalid redefinition of built-in type - 'substance'EEEEEEN InvalidLengthRedefinitionInvalid redefinition of - built-in type 'length'WWEEEEN InvalidAreaRedefinitionInvalid - redefinition of built-in type name 'area'WWEEEEN - InvalidTimeRedefinitionInvalid redefinition of built-in type name - 'time'EEEEEEN InvalidVolumeRedefinitionInvalid redefinition of - built-in type name 'volume'EEEEEEN VolumeLitreDefExponentNotOneMust - use 'exponent'=1 when defining 'volume' in terms of litresEEEEENN - VolumeMetreDefExponentNot3Must use 'exponent'=3 when defining - 'volume' in terms of metresNNEEENN EmptyListOfUnitsAn empty list of - Unit objects is not permitted in a UnitDefinition objectEEEEEEN - InvalidUnitKindInvalid value for the 'kind' attribute of a - UnitDefinition objectEEEEEEE OffsetNoLongerValidUnit attribute - 'offset' is not supported in this Level+Version of SBMLNNNEEEN - CelsiusNoLongerValidUnit name 'Celsius' is not defined in this - Level+Version of SBMLNNNEEEN EmptyUnitListElementA ListOfUnits object - must not be emptyNNNNNNE OneListOfUnitsPerUnitDefAt most one - ListOfUnits object is allowed inside a UnitDefinition objectNNNNNNE - OnlyUnitsInListOfUnitsOnly Unit, Notes and Annotation objects are - allowed in ListOfUnits objectsNNNNNNE - AllowedAttributesOnUnitDefinitionInvalid attribute found on the - UnitDefinition objectNNNNNNE AllowedAttributesOnListOfUnitsInvalid - attribute found on the ListOfUnits objectNNNNNNE - AllowedAttributesOnUnitInvalid attribute found on the Unit - objectNNNNNNE ZeroDimensionalCompartmentSizeInvalid use of the 'size' - attribute for a zero-dimensional compartmentNNEEEEN - ZeroDimensionalCompartmentUnitsInvalid use of the 'units' attribute - for a zero-dimensional compartmentNNEEEEN - ZeroDimensionalCompartmentConstZero-dimensional compartments must be - defined to be constantNNEEEEN UndefinedOutsideCompartmentInvalid - value for the 'outside' attribute of a Compartment objectEEEEEEN - RecursiveCompartmentContainmentRecursive nesting of compartments via - the 'outside' attribute is not permittedWWWEEEN - ZeroDCompartmentContainmentInvalid nesting of zero-dimensional - compartmentsNNWEEEN Invalid1DCompartmentUnitsInvalid value for the - 'units' attribute of a one-dimensional compartmentNNEEEEW - Invalid2DCompartmentUnitsInvalid value for the 'units' attribute of a - two-dimensional compartmentNNEEEEW Invalid3DCompartmentUnitsInvalid - value for the 'units' attribute of a three-dimensional - compartmentEEEEEEW InvalidCompartmentTypeRefInvalid value for the - 'compartmentType' attribute of a compartmentNNNEEEN - OneDimensionalCompartmentUnitsNo units defined for 1-D - compartmentNNNNNNW TwoDimensionalCompartmentUnitsNo units defined - for 2-D compartmentNNNNNNW ThreeDimensionalCompartmentUnitsNo units - defined for 3-D Compartment objectNNNNNNW - AllowedAttributesOnCompartmentInvalid attribute found on Compartment - objectNNNNNNE NoUnitsOnCompartmentNo units defined for Compartment - objectNNNNNNW InvalidSpeciesCompartmentRefInvalid value found for - Species 'compartment' attributeEEEEEEE - HasOnlySubsNoSpatialUnitsAttribute 'spatialSizeUnits' must not be set - if 'hasOnlySubstanceUnits'='true'NNEENNN - NoSpatialUnitsInZeroDAttribute 'spatialSizeUnits' must not be set if - the compartment is zero-dimensionalNNEENNN - NoConcentrationInZeroDAttribute 'initialConcentration' must not be - set if the compartment is zero-dimensionalNNEEEEN - SpatialUnitsInOneDInvalid value for 'spatialSizeUnits' attribute of - a one-dimensional compartmentNNEENNN SpatialUnitsInTwoDInvalid value - for the 'spatialSizeUnits' attribute of a two-dimensional - compartmentNNEENNN SpatialUnitsInThreeDInvalid value for the - 'spatialSizeUnits' attribute of a three-dimensional - compartmentNNEENNN InvalidSpeciesSusbstanceUnitsInvalid value for a - Species 'units' attributeEEEEEEW BothAmountAndConcentrationSetCannot - set both 'initialConcentration' and 'initialAmount' attributes - simultaneouslyNNEEEEE NonBoundarySpeciesAssignedAndUsedCannot use a - non-boundary species in both reactions and rules - simultaneouslyWWEEEEE NonConstantSpeciesUsedCannot use a constant, - non-boundary species as a reactant or productNNEEEEE - InvalidSpeciesTypeRefInvalid value for the 'speciesType' attribute of - a speciesNNNEEEN MultSpeciesSameTypeInCompartmentCannot have - multiple species of the same species type in the same - compartmentNNNEEEN MissingSpeciesCompartmentMissing value for the - 'compartment' attributeEEEEEEE SpatialSizeUnitsRemovedAttribute - 'spatialSizeUnits' is not supported in this Level+Version of - SBMLNNNNEEN SubstanceUnitsOnSpeciesNo substance units defined for - the speciesNNNNNNW ConversionFactorOnSpeciesInvalid value for the - 'conversionFactor' attributeNNNNNNE - AllowedAttributesOnSpeciesInvalid attribute found on Species - objectNNNNNNE InvalidParameterUnitsInvalid value for the 'units' - attribute of a Parameter objectEEEEEEW ParameterUnitsNo units - defined for the parameterNNNNNNW ConversionFactorMustConstantA - conversion factor must reference a Parameter object declared to be a - constantNNNNNNE AllowedAttributesOnParameterInvalid attribute found - on Parameter objectNNNNNNE InvalidInitAssignSymbolInvalid value for - the 'symbol' attribute of an InitialAssignment objectNNNEEEE - MultipleInitAssignmentsMultiple initial assignments for the same - 'symbol' value are not allowedNNNEEEE - InitAssignmentAndRuleForSameIdCannot set a value using both an - initial assignment and an assignment rule simultaneouslyNNNEEEE - OneMathElementPerInitialAssignAn InitialAssignment object must - contain one <math> elementNNNNNNE - AllowedAttributesOnInitialAssignInvalid attribute found on an - InitialAssignment objectNNNNNNE InvalidAssignRuleVariableInvalid - value for the 'variable' attribute of an AssignmentRule - objectEEEEEEE InvalidRateRuleVariableInvalid value for the - 'variable' attribute of a RateRule objectEEEEEEE - AssignmentToConstantEntityAn assignment rule cannot assign an entity - declared to be constantNNEEEEE RateRuleForConstantEntityA rate rule - cannot assign an entity declared to be constantNNEEEEE - CircularRuleDependencyCircular dependencies involving rules and - reactions are not permittedNNNEEEE OneMathElementPerRuleA rule object - must contain one <math> elementNNNNNNE - AllowedAttributesOnAssignRuleInvalid attribute found on an - AssignmentRule objectNNNNNNE AllowedAttributesOnRateRuleInvalid - attribute found on a RateRule objectNNNNNNE - AllowedAttributesOnAlgRuleInvalid attribute found on an AlgebraicRule - objectNNNNNNE ConstraintMathNotBooleanA Constraint object's <math> - must evaluate to a Boolean valueNNNEEEE - IncorrectOrderInConstraintSubobjects inside the Constraint object - are not in the prescribed orderNNNEEEN - ConstraintNotInXHTMLNamespaceA Constraint's Message subobject must be - in the XHTML XML namespaceNNNEEEN ConstraintContainsXMLDeclXML - declarations are not permitted within Constraint's Message - objectsNNNEEEE ConstraintContainsDOCTYPEXML DOCTYPE elements are not - permitted within Constraint's Message objectsNNNEEEE - InvalidConstraintContentInvalid content for a Constraint object's - Message objectNNNEEEN OneMathElementPerConstraintA Constraint object - must contain one <math> elementNNNNNNE - OneMessageElementPerConstraintA Constraint object must contain one - Message subobjectNNNNNNE AllowedAttributesOnConstraintInvalid - attribute found on Constraint objectNNNNNNE - NoReactantsOrProductsCannot have a reaction with neither reactants - nor productsEEEEEEE IncorrectOrderInReactionSubobjects inside the - Reaction object are not in the prescribed orderEEEEEEN - EmptyListInReactionReaction components, if present, cannot be - emptyEEEEEEE InvalidReactantsProductsListInvalid object found in the - list of reactants or productsEEEEEEE InvalidModifiersListInvalid - object found in the list of modifiersNNEEEEE - OneSubElementPerReactionA Reaction object can only contain one of - each allowed type of objectNNNNNNE CompartmentOnReactionInvalid - value for the Reaction 'compartment' attributeNNNNNNE - AllowedAttributesOnReactionInvalid attribute for a Reaction - objectNNNNNNE InvalidSpeciesReferenceInvalid 'species' attribute - value in SpeciesReference objectEEEEEEE BothStoichiometryAndMathThe - 'stoichiometry' attribute and StoichiometryMath subobject are - mutually exclusiveNNEEEEN AllowedAttributesOnSpeciesReferenceInvalid - attribute found on the SpeciesReference objectNNNNNNE - AllowedAttributesOnModifierInvalid attribute found on the - ModifierSpeciesReference objectNNNNNNE UndeclaredSpeciesRefUnknown - species referenced in the kinetic law <math> formulaWWEEEEE - IncorrectOrderInKineticLawIncorrect ordering of components in the - KineticLaw objectNNEEEEN EmptyListInKineticLawThe list of - parameters, if present, cannot be emptyEEEEEEE - NonConstantLocalParameterParameters local to a KineticLaw object must - have a 'constant' attribute value of 'true'NNWEEEN - SubsUnitsNoLongerValidAttribute 'substanceUnits' is not supported in - this Level+Version of SBMLNNNEEEN TimeUnitsNoLongerValidAttribute - 'timeUnits' is not supported in this Level+Version of SBMLNNNEEEN - OneListOfPerKineticLawOnly one ListOfLocalParameters object is - permitted within a KineticLaw objectNNNNNNE - OnlyLocalParamsInListOfLocalParamsOnly LocalParameter, Notes and - Annotation objects are allowed in ListOfLocalParameter - objectsNNNNNNE AllowedAttributesOnListOfLocalParamInvalid attribute - found on the ListOfLocalParameters objectNNNNNNE - OneMathPerKineticLawOnly one <math> element is allowed in a - KineticLaw objectNNEEEEE UndeclaredSpeciesInStoichMathUnknown - species referenced in the StoichiometryMath object's <math> - formulaNNWEEEN AllowedAttributesOnKineticLawInvalid attribute found - on the KineticLaw objectNNNNNNE - AllowedAttributesOnListOfSpeciesRefInvalid attribute found on the - ListOfSpeciesReferences objectNNNNNNE - AllowedAttributesOnListOfModsInvalid attribute found on the - ListOfModifiers objectNNNNNNE - AllowedAttributesOnLocalParameterInvalid attribute found on the - LocalParameter objectNNNNNNE MissingTriggerInEventThe Event object - is missing a Trigger subobjectNNEEEEE TriggerMathNotBooleanA Trigger - object's <math> expression must evaluate to a Boolean valueNNEEEEE - MissingEventAssignmentThe Event object is missing an EventAssignment - subobjectNNEEEEE TimeUnitsEventUnits referenced by 'timeUnits' - attribute are not compatible with units of timeNNEENNN - IncorrectOrderInEventIncorrect ordering of components in Event - objectNNEEEEN ValuesFromTriggerTimeNeedDelayAttribute - 'useValuesFromTriggerTime'='false', but the Event object does not - define a delayNNNNNEN DelayNeedsValuesFromTriggerTimeThe use of a - Delay object requires the Event attribute - 'useValuesFromTriggerTime'NNNNNNN OneMathPerTriggerA Trigger object - must have one <math> elementNNNNNNE OneMathPerDelayA Delay object - must have one <math> elementNNNNNNE - InvalidEventAssignmentVariableInvalid 'variable' attribute value in - Event objectNNEEEEE EventAssignmentForConstantEntityAn - EventAssignment object cannot assign to a component having attribute - 'constant'='true'NNWEEEE OneMathPerEventAssignmentAn EventAssignment - object must have one <math> elementNNNNNNE - AllowedAttributesOnEventAssignmentInvalid attribute found on the - EventAssignment objectNNNNNNE OnlyOneDelayPerEventAn Event object - can only have one Delay subobjectNNNNNNE - OneListOfEventAssignmentsPerEventAn Event object can only have one - ListOfEventAssignments subobjectNNNNNNE - OnlyEventAssignInListOfEventAssignOnly EventAssignment, Notes and - Annotation objects are allowed in ListOfEventAssignmentsNNNNNNE - AllowedAttributesOnListOfEventAssignInvalid attribute found on the - ListOfEventAssignments objectNNNNNNE AllowedAttributesOnEventInvalid - attribute found on the Event objectNNNNNNE - AllowedAttributesOnTriggerInvalid attribute found on the Trigger - objectNNNNNNE AllowedAttributesOnDelayInvalid attribute found on the - Delay objectNNNNNNE PersistentNotBooleanThe Trigger attribute - 'persistent' must evaluate to a Boolean valueNNNNNNE - InitialValueNotBooleanThe Trigger attribute 'initialValue' must - evaluate to a Boolean valueNNNNNNE OnlyOnePriorityPerEventAn Event - object can only have one Priority subobjectNNNNNNE - OneMathPerPriorityA Priority object must have one <math> - elementNNNNNNE AllowedAttributesOnPriorityInvalid attribute found on - the Priority objectNNNNNNE GeneralWarningNotSpecifiedUnknown - errorNNNNNNN CompartmentShouldHaveSizeIt's best to define a size for - every compartment in a modelNNWWWWW SpeciesShouldHaveValueIt's best - to define an initial amount or initial concentration for every - species in a modelNNWWWWW ParameterShouldHaveUnitsIt's best to - declare units for every parameter in a modelWWWWWWW - LocalParameterShadowsIdLocal parameters defined within a kinetic law - shadow global object symbolsWWWWWWW CannotConvertToL1V1Cannot - convert to SBML Level 1 Version 1NEEEEEE NoEventsInL1SBML Level 1 - does not support eventsNNEEEEE NoFunctionDefinitionsInL1SBML Level 1 - does not support function definitionsNNWWWWW NoConstraintsInL1SBML - Level 1 does not support constraintsNNNWWWW - NoInitialAssignmentsInL1SBML Level 1 does not support initial - assignmentsNNNWWWW NoSpeciesTypesInL1SBML Level 1 does not support - species typesNNNWWWN NoCompartmentTypeInL1SBML Level 1 does not - support compartment typesNNNWWWN NoNon3DCompartmentsInL1SBML Level 1 - only supports three-dimensional compartmentsNNEEEEE - NoFancyStoichiometryMathInL1SBML Level 1 does not support non-integer - nor non-rational stoichiometry formulasNNEEEEE - NoNonIntegerStoichiometryInL1SBML Level 1 does not support non- - integer 'stoichiometry' attribute valuesNNEEEEE - NoUnitMultipliersOrOffsetsInL1SBML Level 1 does not support - multipliers or offsets in unit definitionsNNEEEEE - SpeciesCompartmentRequiredInL1In SBML Level 1, a value for - 'compartment' is mandatory in species definitionsNNEEEEE - NoSpeciesSpatialSizeUnitsInL1SBML Level 1 does not support species - 'spatialSizeUnits' settingsNNEEEEN NoSBOTermsInL1SBML Level 1 does - not support the 'sboTerm' attributeNNNWWWW - StrictUnitsRequiredInL1SBML Level 1 requires strict unit - consistencyNNNNNWW ConversionFactorNotInL1SBML Level 1 does not - support the 'conversionFactor' attributeNNNNNNE - CompartmentNotOnL1ReactionSBML Level 1 does not support the - 'compartment' attribute on Reaction objectsNNNNNNW - ExtentUnitsNotSubstanceUnits of extent must be compatible with units - of substanceNNNNNNE GlobalUnitsNotDeclaredGlobal units must be refer - to unit kind or unitDefinition.NNNNNNE - HasOnlySubstanceUnitsNotinL1The concept of hasOnlySubstanceUnits was - not available in SBML Level 1.NNEEEEE AvogadroNotSupportedAvogadro - not supported in Levels 2 and 1.NNNNNNE NoConstraintsInL2v1SBML - Level 2 Version 1 does not support Constraint objectsNNNWWWW - NoInitialAssignmentsInL2v1SBML Level 2 Version 1 does not support - InitialAssignment objectsNNNWWWW NoSpeciesTypeInL2v1SBML Level 2 - Version 1 does not support SpeciesType objectsNNNWWWN - NoCompartmentTypeInL2v1SBML Level 2 Version 1 does not support - CompartmentType objectsNNNWWWN NoSBOTermsInL2v1SBML Level 2 Version 1 - does not support the 'sboTerm' attributeNNNWWWW - NoIdOnSpeciesReferenceInL2v1SBML Level 2 Version 1 does not support - the 'id' attribute on SpeciesReference objectsNNNWWWW - NoDelayedEventAssignmentInL2v1SBML Level 2 Version 1 does not support - the 'useValuesFromTriggerTime' attributeNNNNNEE - StrictUnitsRequiredInL2v1SBML Level 2 Version 1 requires strict unit - consistencyNNNNNWW IntegerSpatialDimensionsSBML Level 2 Version 1 - requires that compartments have spatial dimensions of 0-3NNNNNNE - StoichiometryMathNotYetSupportedConversion to StoichiometryMath - objects not yet supportedNNNNNNN PriorityLostFromL3SBML Level 2 - Version 1 does not support priorities on Event objectsNNNNNNE - NonPersistentNotSupportedSBML Level 2 Version 1 does not support the - 'persistent' attribute on Trigger objectsNNNNNNE - InitialValueFalseEventNotSupportedSBML Level 2 Version 1 does not - support the 'initialValue' attribute on Trigger objectsNNNNNNE - SBOTermNotUniversalInL2v2The 'sboTerm' attribute is invalid for this - component in SBML Level 2 Version 2NNNNWWW NoUnitOffsetInL2v2This - Level+Version of SBML does not support the 'offset' attribute on Unit - objectsNNENNNN NoKineticLawTimeUnitsInL2v2This Level+Version of SBML - does not support the 'timeUnits' attribute on KineticLaw - objectsEEENNNN NoKineticLawSubstanceUnitsInL2v2This Level+Version of - SBML does not support the 'substanceUnits' attribute on KineticLaw - objectsEEENNNN NoDelayedEventAssignmentInL2v2This Level+Version of - SBML does not support the 'useValuesFromTriggerTime' - attributeNNNNNEE ModelSBOBranchChangedBeyondL2v2The allowable - 'sboTerm' attribute values for Model objects differ for this SBML - Level+VersionNNNNNEE StrictUnitsRequiredInL2v2SBML Level 2 Version 2 - requires strict unit consistencyNNNNNWW StrictSBORequiredInL2v2SBML - Level 2 Version 2 requires strict SBO term consistencyNNNNNWW - DuplicateAnnotationInvalidInL2v2Duplicate top-level annotations are - invalid in SBML Level 2 Version 2WWWNNNN NoUnitOffsetInL2v3This - Level+Version of SBML does not support the 'offset' attribute on Unit - objectsNNENNNN NoKineticLawTimeUnitsInL2v3This Level+Version of SBML - does not support the 'timeUnits' attribute on KineticLaw - objectsEEENNNN NoKineticLawSubstanceUnitsInL2v3This Level+Version of - SBML does not support the 'substanceUnits' attribute on KineticLaw - objectsEEENNNN NoSpeciesSpatialSizeUnitsInL2v3This Level+Version of - SBML does not support the 'spatialSizeUnit' attribute on Species - objectsNNEENNN NoEventTimeUnitsInL2v3This Level+Version of SBML does - not support the 'timeUnits' attribute on Event objectsNNEENNN - NoDelayedEventAssignmentInL2v3This Level+Version of SBML does not - support the 'useValuesFromTriggerTime' attributeNNNNNEE - ModelSBOBranchChangedBeyondL2v3The allowable 'sboTerm' attribute - values for Model objects differ for this SBML Level+VersionNNNNNEE - StrictUnitsRequiredInL2v3SBML Level 2 Version 3 requires strict unit - consistencyNNNNNWW StrictSBORequiredInL2v3SBML Level 2 Version 3 - requires strict SBO term consistencyNNNNNWW - DuplicateAnnotationInvalidInL2v3Duplicate top-level annotations are - invalid in SBML Level 2 Version 3WWWNNNN NoUnitOffsetInL2v4This - Level+Version of SBML does not support the 'offset' attribute on Unit - objectsNNENNNN NoKineticLawTimeUnitsInL2v4This Level+Version of SBML - does not support the 'timeUnits' attribute on KineticLaw - objectsEEENNNN NoKineticLawSubstanceUnitsInL2v4This Level+Version of - SBML does not support the 'substanceUnits' attribute on KineticLaw - objectsEEENNNN NoSpeciesSpatialSizeUnitsInL2v4This Level+Version of - SBML does not support the 'spatialSizeUnit' attribute on Species - objectsNNEENNN NoEventTimeUnitsInL2v4This Level+Version of SBML does - not support the 'timeUnits' attribute on Event objectsNNEENNN - ModelSBOBranchChangedInL2v4The allowable 'sboTerm' attribute values - for Model objects differ for this SBML Level+VersionNNNEENN - DuplicateAnnotationInvalidInL2v4Duplicate top-level annotations are - invalid in SBML Level 2 Version 4WWWNNNN NoSpeciesTypeInL3v1SBML - Level 3 Version 1 does not support SpeciesType objectsNNNWWWN - NoCompartmentTypeInL3v1SBML Level 3 Version 1 does not support - CompartmentType objectsNNNWWWN NoUnitOffsetInL3v1This Level+Version - of SBML does not support the 'offset' attribute on Unit - objectsNNENNNN NoKineticLawTimeUnitsInL3v1This Level+Version of SBML - does not support the 'timeUnits' attribute on KineticLaw - objectsEEENNNN NoKineticLawSubstanceUnitsInL3v1This Level+Version of - SBML does not support the 'substanceUnits' attribute on KineticLaw - objectsEEENNNN NoSpeciesSpatialSizeUnitsInL3v1This Level+Version of - SBML does not support the 'spatialSizeUnit' attribute on Species - objectsNNEENNN NoEventTimeUnitsInL3v1This Level+Version of SBML does - not support the 'timeUnits' attribute on Event objectsNNEENNN - ModelSBOBranchChangedInL3v1The allowable 'sboTerm' attribute values - for Model objects differ for this SBML Level+VersionNNNEENN - DuplicateAnnotationInvalidInL3v1Duplicate top-level annotations are - invalid in SBML Level 3 Version 1WWWNNNN - NoCompartmentOutsideInL3v1This Level+Version of SBML does not - support the 'outside' attribute on Compartment objectsWWWWWWN - NoStoichiometryMathInL3v1This Level+Version of SBML does not support - the StoichiometryMath objectNNEEEEN InvalidSBMLLevelVersionUnknown - Level+Version combination of SBMLEEEEEEE - AnnotationNotesNotAllowedLevel1Annotation objects on the SBML - container element are not permitted in SBML Level 1EENNNNN - InvalidRuleOrderingInvalid ordering of rulesEEENNNN - RequiredPackagePresentThe SBML document requires an SBML Level 3 - package unavailable in this softwareNNNNNNE - UnrequiredPackagePresentThe SBML document uses an SBML Level 3 - package unavailable in this softwareNNNNNNW - PackageRequiredShouldBeFalseThis package expects required to be - false.NNNNNNW SubsUnitsAllowedInKLDisallowed value for attribute - 'substanceUnits' on KineticLaw objectEEENNNN - TimeUnitsAllowedInKLDisallowed value for attribute 'timeUnits' on - KineticLaw objectEEENNNN FormulaInLevel1KLOnly predefined functions - are allowed in SBML Level 1 formulasEENNNNN - L3SubstanceUnitsOnModelInvalid 'substanceUnits' attribute - valueNNNNNNW TimeUnitsRemovedThis Level+Version of SBML does not - support the 'timeUnits' attribute on Event objectsNNNNEEE - BadMathMLInvalid MathML expressionNNEEEEE - FailedMathMLReadOfDoubleMissing or invalid floating-point number in - MathML expressionNNEEEEE FailedMathMLReadOfIntegerMissing or invalid - integer in MathML expressionNNEEEEE - FailedMathMLReadOfExponentialMissing or invalid exponential - expression in MathMLNNEEEEE FailedMathMLReadOfRationalMissing or - invalid rational expression in MathMLNNEEEEE - BadMathMLNodeTypeInvalid MathML elementNNEEEEE - NoTimeSymbolInFunctionDefUse of <csymbol> for 'time' not allowed - within FunctionDefinition objectsNNWEEEE NoBodyInFunctionDefThere - must be a <lambda> body within the <math> element of a - FunctionDefinition objectNNEEEEE DanglingUnitSIdRefUnits must refer - to valid unit or unitDefinitionWWWWWWW RDFMissingAboutTagRDF missing - the <about> tag.NNNWWWW RDFEmptyAboutTagRDF empty <about> - tag.NNNWWWW RDFAboutTagNotMetaidRDF <about> tag is not - metaid.NNNWWWW RDFNotCompleteModelHistoryRDF does not contain valid - ModelHistory.NNNWWWW RDFNotModelHistoryRDF does not result in a - ModelHistory.NNNWWWW AnnotationNotElementAnnotation must contain - element.NNNWWWW UndeclaredUnitsMissing unit declarations on - parameters or literal numbers in expressionWWWWWWW - UndeclaredTimeUnitsL3Unable to verify consistency of units: the unit - of time has not been declaredNNNNNNW UndeclaredExtentUnitsL3Unable - to verify consistency of units: the units of reaction extent have - not been declaredNNNNNNW UndeclaredObjectUnitsL3Unable to verify - consistency of units: encountered a model entity with no declared - unitsNNNNNNW UnrecognisedSBOTermUnrecognized 'sboTerm' attribute - valueNNNWWWW ObseleteSBOTermObsolete 'sboTerm' attribute valueNNNWWWW - IncorrectCompartmentSpatialDimensionsIn SBML Level 1, only three- - dimensional compartments are allowedEENNNNN - CompartmentTypeNotValidAttributeCompartmentType objects are not - available in this Level+Version of SBMLEEENNNE - ConstantNotValidAttributeThis Level+Version of SBML does not support - the 'constant' attribute on this componentEENNNNN - MetaIdNotValidAttributeAttribute 'metaid' is not available in SBML - Level 1EENNNNN SBOTermNotValidAttributeBeforeL2V3The 'sboTerm' - attribute is not available on this component before SBML Level 2 - Version 3EEEENNN InvalidL1CompartmentUnitsInvalid units for a - compartment in SBML Level 1EENNNNN L1V1CompartmentVolumeReqdIn SBML - Level 1, a compartment's volume must be specifiedENNNNNN - CompartmentTypeNotValidComponentCompartmentType objects are not - available in this Level+Version of SBMLEEENNNE - ConstraintNotValidComponentConstraint objects are not available in - this Level+Version of SBMLEEENNNN EventNotValidComponentEvent - objects are not available in this Level+Version of SBMLEENNNNN - SBOTermNotValidAttributeBeforeL2V2The 'sboTerm' attribute is invalid - for this component before Level 2 Version 2EEENNNN - FuncDefNotValidComponentFunctionDefinition objects are not available - in this Level+Version of SBMLEENNNNN - InitialAssignNotValidComponentInitialAssignment objects are not - available in this Level+Version of SBMLEEENNNN - VariableNotValidAttributeAttribute 'variable' is not available on - this component in this Level+Version of SBMLEEEEEEE - UnitsNotValidAttributeAttribute 'units' is not available on this - component in this Level+Version of SBMLEEEEEEE - ConstantSpeciesNotValidAttributeAttribute 'constant' is not available - on Species objects in SBML Level 1EENNNNN - SpatialSizeUnitsNotValidAttributeAttribute 'spatialSizeUnits' is not - available on Species objects in SBML Level 1EENNNNN - SpeciesTypeNotValidAttributeAttribute 'speciesType' is not available - on Species objects in SBML Level 1EEENNNE - HasOnlySubsUnitsNotValidAttributeAttribute 'hasOnlySubstanceUnits' - is not available on Species objects in SBML Level 1EENNNNN - IdNotValidAttributeAttribute 'id' is not available on - SpeciesReference objects in SBML Level 1EEENNNN - NameNotValidAttributeAttribute 'name' is not available on - SpeciesReference objects in SBML Level 1EEENNNN - SpeciesTypeNotValidComponentThe SpeciesType object is not supported - in SBML Level 1EEENNNE StoichiometryMathNotValidComponentThe - StoichiometryMath object is not supported in SBML Level 1EENNNNE - MultiplierNotValidAttributeAttribute 'multiplier' on Unit objects is - not supported in SBML Level 1EENNNNN - OffsetNotValidAttributeAttribute 'offset' on Unit objects is only - available in SBML Level 2 Version 1EENNNNN - L3SpatialDimensionsUnsetNo value given for 'spatialDimensions' - attribute; assuming a value of 3NNNNNNW - PackageConversionNotSupportedConversion of SBML Level 3 package - constructs is not yet supportedEEEEEEE InvalidTargetLevelVersionThe - requested SBML Level/Version combination is not known to - existEEEEEEE L3NotSupportedSBML Level 3 is not yet supportedEEEEEEE - - <a class='anchor' name='SBMLErrorCategory_t'>Category codes - associated with SBMLError objects - ...................................................................... - - As discussed above, each SBMLError object contains a value for a - category identifier, describing the type of issue that the SBMLError - object represents. The category can be retrieved from an SBMLError - object using the method SBMLError.getCategory(). The following table - lists each possible value and a brief description of its meaning. - - As is the case with the error codes, in the libSBML Python language - interface, the category identifiers are currently implemented as - static integer constants defined in the interface class libsbml. - - The following table lists each possible value and a brief description - of its meaning. - - @~ - - <center> <table width='90' cellspacing='1' cellpadding='4' - border='0' class='text-table normal-font alt-row-colors'> <tr - style='background: lightgray' class='normal-font'> - <th>Enumerator</td> <th>Meaning</td> </tr> - <tr><td>libsbml.LIBSBML_CAT_SBML</td><td>General error not falling - into another category below.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBML_L1_COMPAT</td><td>Category of errors - that can only occur during attempted translation from one - Level/Version of SBML to another. This particular category applies - to errors encountered while trying to convert a model from SBML - Level 2 to SBML Level 1.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBML_L2V1_COMPAT</td><td>Category of - errors that can only occur during attempted translation from one - Level/Version of SBML to another. This particular category applies - to errors encountered while trying to convert a model to SBML Level - 2 Version 1.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBML_L2V2_COMPAT</td><td>Category of - errors that can only occur during attempted translation from one - Level/Version of SBML to another. This particular category applies - to errors encountered while trying to convert a model to SBML Level - 2 Version 2.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY</td><td>Category of - errors that can occur while validating general SBML constructs. With - respect to the SBML specification, these concern failures in applying - the validation rules numbered 2xxxx in the Level 2 Versions 2-4 and - Level 3 Version 1 specifications.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY</td><td>Category - of errors that can occur while validating symbol identifiers in a - model. With respect to the SBML specification, these concern - failures in applying the validation rules numbered 103xx in the - Level 2 Versions 2-4 and Level 3 Version 1 specifications.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_UNITS_CONSISTENCY</td><td>Category of - errors that can occur while validating the units of measurement on - quantities in a model. With respect to the SBML specification, these - concern failures in applying the validation rules numbered 105xx in - the Level 2 Versions 2-4 and Level 3 Version 1 - specifications.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_MATHML_CONSISTENCY</td><td>Category of - errors that can occur while validating MathML formulas in a model. - With respect to the SBML specification, these concern failures in - applying the validation rules numbered 102xx in the Level 2 Versions - 2-4 and Level 3 Version 1 specifications.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBO_CONSISTENCY</td><td>Category of - errors that can occur while validating SBO identifiers in a model. - With respect to the SBML specification, these concern failures in - applying the validation rules numbered 107xx in the Level 2 Versions - 2-4 and Level 3 Version 1 specifications.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL</td><td>Error in the - system of equations in the model: the system is overdetermined, - therefore violating a tenet of proper SBML. With respect to the SBML - specification, this is validation rule #10601 in the SBML Level 2 - Versions 2-4 and Level 3 Version 1 specifications.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBML_L2V3_COMPAT</td><td>Category of - errors that can only occur during attempted translation from one - Level/Version of SBML to another. This particular category applies - to errors encountered while trying to convert a model to SBML Level - 2 Version 3.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_MODELING_PRACTICE</td><td>Category of - warnings about recommended good practices involving SBML and - computational modeling. (These are tests performed by libSBML and do - not have equivalent SBML validation rules.)</td></tr> - <tr><td>libsbml.LIBSBML_CAT_INTERNAL_CONSISTENCY</td><td>Category of - errors that can occur while validating libSBML's internal - representation of SBML constructs. (These are tests performed by - libSBML and do not have equivalent SBML validation rules.)</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBML_L2V4_COMPAT</td><td>Category of - errors that can only occur during attempted translation from one - Level/Version of SBML to another. This particular category applies - to errors encountered while trying to convert a model to SBML Level - 2 Version 4.</td></tr> - <tr><td>libsbml.LIBSBML_CAT_SBML_L3V1_COMPAT</td><td>Category of - errors that can only occur during attempted translation from one - Level/Version of SBML to another. This particular category applies - to errors encountered while trying to convert a model to SBML Level - 3 Version 1.</td></tr> - - </table> </center> - - <a class='anchor' name='SBMLErrorSeverity_t'>Severity codes - associated with SBMLError objects - ...................................................................... - - In libSBML version 5.8.1 there are no additional severity codes - beyond those defined by XMLError. They are implemented as static - integer constants defined in the interface class libsbml, and have - names beginning with LIBSBML_SEV_. @~ -"; - - -%feature("docstring") SBMLError::SBMLError " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLError(SBMLError orig) - - Copy constructor; creates a copy of this SBMLError. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLError( const long errorId = 0 , const long level = - SBML_DEFAULT_LEVEL , const long version = SBML_DEFAULT_VERSION , - string details = '' , const long line = 0 , const long column - = 0 , const long severity = LIBSBML_SEV_ERROR , const long category = - LIBSBML_CAT_SBML , string package = 'core' , const long pkgVersion = - 1 ) - - Creates a new SBMLError to report that something occurred during SBML - processing. - - When a libSBML operation on SBML content results in a warning, error - or other diagnostic, the issue is reported as an SBMLError object. - SBMLError objects have identification numbers to indicate the nature - of the exception. These numbers are defined as longeger constants - in the interface class libsbml. See the top of this documentation - page for a table listing the possible values and their meanings. @~ - The argument 'errorId' to this constructor can be (but does not - have to be) a value from this set of constants. If it is one of the - predefined error identifiers, the SBMLError class assumes the error - is a low-level system or SBML layer error and prepends a built-in, - predefined error message to any string passed in the argument - 'details' to this constructor. In addition, all the predefined - error identifiers have associated values for the 'severity' and - 'category' codes, and these fields are filled-in using the libSBML - defaults for each different error identifier. @~ - - If the error identifier 'errorId' is a number greater than 99999, the - SBMLError class assumes the error was generated from another part of - the software and does not do additional filling in of values beyond - the default in the constructor itself. This allows SBMLError to - serve as a base class for other errors, such as for user-defined - validation rules (see Validator). Callers should fill in all the - parameters with suitable values if generating errors with codes - greater than 99999 to make maximum use of the SBMLError facilities. - - As mentioned above, there are additional constants defined for - standard severity and standard category codes, and every predefined - error in libSBML has an associated value for severity and category - taken from these predefined sets. These constants have symbol names - prefixed with LIBSBML_SEV_ and LIBSBML_CAT_, respectively. If the - value of 'errorId' is one of the standard error codes, callers do - not need to fill in 'severity' and 'category' in a call to this - constructor. Conversely, if 'errorId' is not an existing SBML-level - error code, callers can use other values for 'severity' and - 'category'. @~ - - Please see the top of the documentation for SBMLError for a longer - discussion of the possible error codes, their meanings, and their - applicability to different combinations of Level+Version of SBML. - - Parameter 'errorId' is a long integer, the identification number of - the error. - - Parameter 'level' is the SBML Level of the SBML model - - Parameter 'version' is the SBML Version within the Level of the SBML - model - - Parameter 'details' is a string containing additional details about - the error. If the error code in 'errorId' is one that is recognized - by SBMLError, the given message is appended to a predefined message - associated with the given code. If the error code is not - recognized, the message is stored as-is as the text of the error. - - Parameter 'line' is a long integer, the line number at which the - error occured. - - Parameter 'column' is a long integer, the column number at which the - error occured. - - Parameter 'severity' is an integer indicating severity of the error. - - Parameter 'category' is an integer indicating the category to which - the error belongs. - - Parameter 'package' is the SBML Level package involved. - - Parameter 'pkgVersion' is the version of the 'package'. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") CVTerm " - @ingroup Core Representation of MIRIAM-compliant controlled - vocabulary annotation. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The SBML Level 2 and Level 3 specifications define a simple format - for annotating models when (a) referring to controlled vocabulary - terms and database identifiers that define and describe biological - and biochemical entities, and (b) describing the creator of a model - and the model's modification history. This SBML format is a - concrete syntax that conforms to the guidelines of MIRIAM ('Minimum - Information Requested in the Annotation of biochemical Models', - Nature Biotechnology, vol. 23, no. 12, Dec. 2005). The format uses - a subset of W3C RDF (Resource Description Format). In order to help - application developers work with annotations in this format, libSBML - provides several helper classes that provide higher-level interfaces - to the data elements; these classes include CVTerm, ModelCreator, - ModelHistory, RDFAnnotationParser, and Date. - - Components of an SBML annotation - ====================================================================== - - The SBML annotation format consists of RDF-based content placed - inside an <annotation> element attached to an SBML component such - as Species, Compartment, etc. The following template illustrates - the different parts of SBML annotations in XML form: - - <<span style=\'background-color: #bbb\'>SBML_ELEMENT</span> <span style=\'background-color: #d0eed0\'>+++</span> metaid=\"<span style=\'border-bottom: 1px solid black\'>meta id</span>\" <span style=\'background-color: #d0eed0\'>+++</span>> - <span style=\'background-color: #d0eed0\'>+++</span> - <annotation> - <span style=\'background-color: #d0eed0\'>+++</span> - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterm=\'http://purl.org/dc/terms/\' - xmlns:vcard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' - xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' - xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > - <rdf:Description rdf:about=\"#<span style=\'border-bottom: 1px solid black\'>meta id</span>\"> - <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> - <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <rdf:Bag> - <rdf:li rdf:resource=\"<span style=\'background-color: #d0d0ee\'>URI</span>\" /> - <span style=\'background-color: #edd\'>...</span> - </rdf:Bag> - </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <span style=\'background-color: #edd\'>...</span> - </rdf:Description> - <span style=\'background-color: #d0eed0\'>+++</span> - </rdf:RDF> - <span style=\'background-color: #d0eed0\'>+++</span> - </annotation> - <span style=\'background-color: #d0eed0\'>+++</span> - </<span style=\'background-color: #bbb\'>SBML_ELEMENT</span>> - - In the template above, the placeholder SBML_ELEMENT stands for the - XML tag name of an SBML model component (e.g., model, reaction, - etc.) and the placeholder meta id stands for the element's meta - identifier, which is a field available on all SBML components - derived from the SBase base object class. The dotted portions are - optional, the symbol +++ is a placeholder for either no content or - valid XML content that is not defined by this annotation scheme, and - the ellipses ... are placeholders for zero or more elements of the - same form as the immediately preceding element. The optional - content HISTORY is a creation and modification history; in libSBML, - this is stored using ModelHistory objects. - - The placeholder RELATION_ELEMENT refers to a BioModels.net qualifier - element name. This is an element in either the XML namespace - 'http://biomodels.net/model-qualifiers' (for model qualifiers) or - 'http://biomodels.net/biology-qualifiers' (for biological - qualifier). Note that these namespace URIs are only labels, and not - actual Web locations, which means you cannot visit an address such - as 'http://biomodels.net/model-qualifiers' in your browser or try to - have your application access it. Refer instead to the enumerations - #ModelQualifierType_t and #BiolQualifierType_t for a list of the - available relationship elements that can be used for - RELATION_ELEMENT. - - The URI is a required data value that uniquely identifies a resource - and data within that resource to which the annotation refers. - Again, being URIs, these do not refer to physical Web locations; - nevertheless, applications will often want a means of finding the - resource to which a given URI refers. Providing the facilities for - this task is the purpose of MIRIAM Resources, described in detail - online at http://biomodels.net/miriam) and also in the paper 'MIRIAM - Resources: tools to generate and resolve robust cross-references in - Systems Biology', BMC Systems Biology, 58(1), 2007. - - The relation-resource pairs above are the 'controlled vocabulary' - terms that which CVTerm is designed to store and manipulate. The - next section describes these parts in more detail. For more - information about SBML annotations in general, please refer to - Section 6 in the SBML Level 2 (Versions 2-4) or Level 3 - specification documents. - - The parts of a CVTerm - ====================================================================== - - Annotations that refer to controlled vocabularies are managed in - libSBML using CVTerm objects. A set of RDF-based annotations - attached to a given SBML <annotation> element are read by - RDFAnnotationParser and converted into a list of these CVTerm - objects. Each CVTerm object instance stores the following components - of an annotation: - - - * The qualifier, which can be a BioModels.net 'biological - qualifier', a BioModels.net 'model qualifier', or an unknown - qualifier (as far as the CVTerm class is concerned). Qualifiers are - used in MIRIAM to indicate the nature of the relationship between - the object being annotated and the resource. In CVTerm, the - qualifiers can be manipulated using the methods - CVTerm.getQualifierType(), CVTerm.setQualifierType(), and related - methods. - - * The resource, represented by a URI (which, we must remind - developers, is not the same as a URL). In the CVTerm class, the - resource component can be manipulated using the methods - CVTerm.addResource() and CVTerm.removeResource(). - - Note that a CVTerm contains a single qualifier, but possibly more - than one resource. This corresponds to the possibility of an - annotation that points to multiple resources, all of which are - qualified by the same BioModels.net qualifier. The CVTerm object - class supports this by supporting a list of resources. - - Detailed explanations of the qualifiers defined by BioModels.net can - be found at http://biomodels.net/qualifiers. -"; - - -%feature("docstring") CVTerm::CVTerm " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - CVTerm(CVTerm orig) - - Copy constructor; creates a copy of a CVTerm object. - - Parameter 'orig' is the CVTerm instance to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - CVTerm(const XMLNode node) - - Creates a new CVTerm from the given XMLNode. - - The SBML Level 2 and Level 3 specifications define a simple format - for annotating models when (a) referring to controlled vocabulary - terms and database identifiers that define and describe biological - and other entities, and (b) describing the creator of a model and - the model's modification history. The annotation content is stored - in <annotation> elements attached to individual SBML elements. The - format for storing the content inside SBML <annotation> elements is - a subset of W3C RDF (Resource Description Format) expressed in XML. - The CVTerm class provides a programming interface for working - directly with controlled vocabulary term ('CV term') objects without - having to deal directly with the XML form. When libSBML reads in an - SBML model containing RDF annotations, it parses those annotations - into a list of CVTerm objects, and when writing a model, it parses - the CVTerm objects back into the appropriate SBML <annotation> - structure. - - This method creates a CVTerm object from the XMLNode object 'node'. - Recall that XMLNode is a node in an XML tree of elements, and each - such element can be placed in a namespace. This constructor looks - for the element to be in the XML namespaces 'http://biomodels.net - /model-qualifiers' (for model qualifiers) and 'http://biomodels.net - /biology-qualifiers' (for biological qualifier), and if they are, - creates CVTerm objects for the result. - - Parameter 'node' is an XMLNode representing a CVTerm. - - Note: - - This method assumes that the given XMLNode object 'node' is of the - correct structural form. - - ______________________________________________________________________ - Method variant with the following signature: - - CVTerm(QualifierType_t type = UNKNOWN_QUALIFIER) - - Creates an empty CVTerm, optionally with the given qualifier@~ - 'type'. - - The SBML Level 2 and Level 3 specifications define a simple format - for annotating models when (a) referring to controlled vocabulary - terms and database identifiers that define and describe biological - and other entities, and (b) describing the creator of a model and - the model's modification history. The annotation content is stored - in <annotation> elements attached to individual SBML elements. The - format for storing the content inside SBML <annotation> elements is - a subset of W3C RDF (Resource Description Format) expressed in XML. - The CVTerm class provides a programming interface for working - directly with controlled vocabulary term ('CV term') objects without - having to deal directly with the XML form. When libSBML reads in an - SBML model containing RDF annotations, it parses those annotations - into a list of CVTerm objects, and when writing a model, it parses - the CVTerm objects back into the appropriate SBML <annotation> - structure. - - This method creates an empty CVTerm object. The possible qualifier - types usable as values of 'type' are libsbml.MODEL_QUALIFIER and - libsbml.BIOLOGICAL_QUALIFIER. If an explicit value for 'type' is - not given, this method defaults to using libsbml.UNKNOWN_QUALIFIER. - The qualifier type@~ can be set later using the - CVTerm.setQualifierType() method. - - Different BioModels.net qualifier elements encode different types of - relationships. Please refer to the SBML specification or the - BioModels.net qualifiers web page for an explanation of the meaning - of these different qualifiers. - - Parameter 'type' is a qualifier type@~ - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ -"; - - -%feature("docstring") CVTerm::clone " - Creates and returns a deep copy of this CVTerm object. - - Returns a (deep) copy of this CVTerm. -"; - - -%feature("docstring") CVTerm::getQualifierType " - Returns the qualifier type of this CVTerm object. - - The RDF element used in the SBML format for referring to external - entities is <rdf:Description>, with a <rdf:Bag> element inside of it - containing one or more <rdf:li> elements. The following template - illustrates the structure: - - <rdf:Description rdf:about=\"#meta id\"> HISTORY - <RELATION_ELEMENT> <rdf:Bag> <rdf:li - rdf:resource=\"resource URI\" /> ... </rdf:Bag> - </RELATION_ELEMENT> ... </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. - - The placeholder RELATION_ELEMENT refers to a BioModels.net - qualifier element name. This is an element in either the XML - namespace 'http://biomodels.net/model-qualifiers' (for model - qualifiers) or 'http://biomodels.net/biology-qualifiers' (for - biological qualifier). The present method returns a code - identifying which one of these two relationship namespaces is being - used; any other qualifier in libSBML is considered unknown (as far as - the CVTerm class is concerned). Consequently, this method will - return one of the following values: - - * libsbml.MODEL_QUALIFIER - - * libsbml.BIOLOGICAL_QUALIFIER - - * libsbml.UNKNOWN_QUALIFIER - - The specific relationship of this CVTerm to the enclosing SBML object - can be determined using the CVTerm methods such as - getModelQualifierType() and getBiologicalQualifierType(). Callers - will typically want to use the present method to find out which one - of the other two methods to call to find out the specific - relationship. - - Returns the qualifier type@~ of this object or - libsbml.UNKNOWN_QUALIFIER (the default). - - See also getResources(), getModelQualifierType(), - getBiologicalQualifierType(). -"; - - -%feature("docstring") CVTerm::getModelQualifierType " - Returns the model qualifier type of this CVTerm object. - - The RDF element used in the SBML format for referring to external - entities is <rdf:Description>, with a <rdf:Bag> element inside of it - containing one or more <rdf:li> elements. The following template - illustrates the structure: - - <rdf:Description rdf:about=\"#meta id\"> HISTORY - <RELATION_ELEMENT> <rdf:Bag> <rdf:li - rdf:resource=\"resource URI\" /> ... </rdf:Bag> - </RELATION_ELEMENT> ... </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. - - The placeholder RELATION_ELEMENT refers to a BioModels.net - qualifier element name. This is an element in either the XML - namespace 'http://biomodels.net/model-qualifiers' (for model - qualifiers) or 'http://biomodels.net/biology-qualifiers' (for - biological qualifier). Callers will typically use - getQualifierType() to find out the type of qualifier relevant to this - particular CVTerm object, then if it is a model qualifier, use the - present method to determine the specific qualifier. - - Annotations with model qualifiers express a relationship between an - annotation resource and the modeling concept represented by a given - object in the model. The diagram below illustrates the relationship - in this case: - - ‰PNG - - The set of known model qualifiers is, at the time of this libSBML - release, the following: - - * libsbml.BQM_IS - - * libsbml.BQM_IS_DESCRIBED_BY - - * libsbml.BQM_IS_DERIVED_FROM - - Any other BioModels.net qualifier found in the model is considered - unknown by libSBML and reported as libsbml.BQM_UNKNOWN. - - Returns the model qualifier type@~ of this object or - libsbml.BQM_UNKNOWN (the default). -"; - - -%feature("docstring") CVTerm::getBiologicalQualifierType " - Returns the biological qualifier type of this CVTerm object. - - The RDF element used in the SBML format for referring to external - entities is <rdf:Description>, with a <rdf:Bag> element inside of it - containing one or more <rdf:li> elements. The following template - illustrates the structure: - - <rdf:Description rdf:about=\"#meta id\"> HISTORY - <RELATION_ELEMENT> <rdf:Bag> <rdf:li - rdf:resource=\"resource URI\" /> ... </rdf:Bag> - </RELATION_ELEMENT> ... </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. - - The placeholder RELATION_ELEMENT refers to a BioModels.net - qualifier element name. This is an element in either the XML - namespace 'http://biomodels.net/model-qualifiers' (for model - qualifiers) or 'http://biomodels.net/biology-qualifiers' (for - biological qualifier). Callers will typically use - getQualifierType() to find out the type of qualifier relevant to this - particular CVTerm object, then if it is a biological qualifier, use - the present method to determine the specific qualifier. - - Annotations with biological qualifiers express a relationship between - an annotation resource and the biological concept represented by a - given object in the model. The diagram below illustrates the - relationship in this case: - - ‰PNG - - The set of known biological qualifiers is, at the time of this - libSBML release, the following: - - * libsbml.BQB_IS - - * libsbml.BQB_HAS_PART - - * libsbml.BQB_IS_PART_OF - - * libsbml.BQB_IS_VERSION_OF - - * libsbml.BQB_HAS_VERSION - - * libsbml.BQB_IS_HOMOLOG_TO - - * libsbml.BQB_IS_DESCRIBED_BY - - * libsbml.BQB_IS_ENCODED_BY - - * libsbml.BQB_ENCODES - - * libsbml.BQB_OCCURS_IN - - * libsbml.BQB_HAS_PROPERTY - - * libsbml.BQB_IS_PROPERTY_OF - - Any other BioModels.net qualifier found in the model is considered - unknown by libSBML and reported as libsbml.BQB_UNKNOWN. - - Returns the biology qualifier type@~ of this object or - libsbml.BQB_UNKNOWN (the default). -"; - - -%feature("docstring") CVTerm::getResources " - Returns the resource references for this CVTerm object. - - The RDF element used in the SBML format for referring to external - entities is <rdf:Description>, with a <rdf:Bag> element inside of it - containing one or more <rdf:li> elements. The following template - illustrates the structure: - - <rdf:Description rdf:about=\"#meta id\"> HISTORY - <RELATION_ELEMENT> <rdf:Bag> <rdf:li - rdf:resource=\"resource URI\" /> ... </rdf:Bag> - </RELATION_ELEMENT> ... </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. - - The resource URI values shown in the template above are stored - internally in CVTerm objects using an XMLAttributes object. Each - attribute stored inside the XMLAttributes will have the same name - (specifically, \"rdf:resource\") but a different value, and the - value will be a resource URI shown in the XML template above. - - A valid CVTerm entity must always have at least one resource and a - value for the relationship qualifier. - - Returns the XMLAttributes that store the resources of this CVTerm. - - See also getQualifierType(), addResource(), getResourceURI(). -"; - - -%feature("docstring") CVTerm::getNumResources " - Returns the number of resources for this CVTerm object. - - The RDF element used in the SBML format for referring to external - entities is <rdf:Description>, with a <rdf:Bag> element inside of it - containing one or more <rdf:li> elements. The following template - illustrates the structure: - - <rdf:Description rdf:about=\"#meta id\"> HISTORY - <RELATION_ELEMENT> <rdf:Bag> <rdf:li - rdf:resource=\"resource URI\" /> ... </rdf:Bag> - </RELATION_ELEMENT> ... </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. - - The fragment above illustrates that there can be more than one - resource referenced by a given relationship annotation (i.e., the - resource URI values associated with a particular RELATION_ELEMENT). - The present method returns a count of the resources stored in this - CVTerm object. - - Returns the number of resources in the set of XMLAttributes of this - CVTerm. - - See also getResources(), getResourceURI(). -"; - - -%feature("docstring") CVTerm::getResourceURI " - Returns the value of the nth resource for this CVTerm object. - - The RDF element used in the SBML format for referring to external - entities is <rdf:Description>, with a <rdf:Bag> element inside of it - containing one or more <rdf:li> elements. The following template - illustrates the structure: - - <rdf:Description rdf:about=\"#meta id\"> HISTORY - <RELATION_ELEMENT> <rdf:Bag> <rdf:li - rdf:resource=\"resource URI\" /> ... </rdf:Bag> - </RELATION_ELEMENT> ... </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. - - The fragment above illustrates that there can be more than one - resource referenced by a given relationship annotation (i.e., the - resource URI values associated with a particular RELATION_ELEMENT). - LibSBML stores all resource URIs in a single CVTerm object for a - given relationship. Callers can use getNumResources() to find out - how many resources are stored in this CVTerm object, then call this - method to retrieve the nth resource URI. - - Parameter 'n' is the index of the resource to query - - Returns string representing the value of the nth resource in the set - of XMLAttributes of this CVTerm. - - See also getNumResources(), getQualifierType(). -"; - - -%feature("docstring") CVTerm::setQualifierType " - Sets the qualifier code@~ of this CVTerm object. - - Parameter 'type' is the qualifier type. The possible values returned - by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also getQualifierType(). -"; - - -%feature("docstring") CVTerm::setModelQualifierType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setModelQualifierType(string qualifier) - - Sets the @~ value of this CVTerm object. - - Parameter 'qualifier' is the string representing a model qualifier - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - If the Qualifier Type of this object is not libsbml.MODEL_QUALIFIER, - then the ModelQualifierType_t value will default to - libsbml.BQM_UNKNOWN. - - See also getQualifierType(), setQualifierType(), getQualifierType(), - setQualifierType(). -"; - - -%feature("docstring") CVTerm::setBiologicalQualifierType " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - setBiologicalQualifierType(string qualifier) - - Sets the @~ of this CVTerm object. - - Parameter 'qualifier' is the string representing a biology qualifier - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - Note: - - If the Qualifier Type of this object is not - libsbml.BIOLOGICAL_QUALIFIER, then the @~ value will default to - libsbml.BQB_UNKNOWN. - - See also getQualifierType(), setQualifierType(), getQualifierType(), - setQualifierType(). -"; - - -%feature("docstring") CVTerm::addResource " - Adds a resource reference to this CVTerm object. - - The SBML Level 2 and Level 3 specifications define a simple - standardized format for annotating models with references to - controlled vocabulary terms and database identifiers that define and - describe biological or other entities. This annotation format - consists of RDF-based content placed inside an <annotation> element - attached to an SBML component such as Species, Compartment, etc. - - The specific RDF element used in this SBML format for referring to - external entities is <rdf:Description>, with a <rdf:Bag> element - containing one or more <rdf:li> elements. Each such element refers - to a data item in an external resource; the resource and data item - are together identified uniquely using a URI. The following - template illustrates the structure: - - <rdf:Description rdf:about=\"#<span style=\'border-bottom: 1px solid black\'>meta id</span>\"> - <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> - <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <rdf:Bag> - <rdf:li rdf:resource=\"<span style=\'background-color: #d0d0ee\'>resource URI</span>\" /> - <span style=\'background-color: #edd\'>...</span> - </rdf:Bag> - </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> - <span style=\'background-color: #edd\'>...</span> - </rdf:Description> - - In the template above, the placeholder meta id stands for the - element's meta identifier, which is a field available on all SBML - components derived from the SBase base object class. The dotted - portions are optional, and the ellipses ... are placeholders for - zero or more elements of the same form as the immediately preceding - element. The placeholder RELATION_ELEMENT refers to a - BioModels.net qualifier element name. This is an element in either - the XML namespace 'http://biomodels.net/model-qualifiers' (for model - qualifiers) or 'http://biomodels.net/biology-qualifiers' (for - biological qualifier). - - The resource URI is a required data value that uniquely identifies a - resource and data within that resource to which the annotation - refers. The present method allows callers to add a reference to a - resource URI with the same relationship to the enclosing SBML - object. (In other words, the argument to this method is a resource - URI as shown in the XML fragment above.) Resources are stored in - this CVTerm object within an XMLAttributes object. - - The relationship of this CVTerm to the enclosing SBML object can be - determined using the CVTerm methods such as getModelQualifierType() - and getBiologicalQualifierType(). - - Parameter 'resource' is a string representing the URI of the resource - and data item being referenced; e.g., - 'http://www.geneontology.org/#GO:0005892'. - - Returns integer value indicating success/failure of the call. The - possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also getResources(), removeResource(), getQualifierType(), - getModelQualifierType(), getBiologicalQualifierType(). -"; - - -%feature("docstring") CVTerm::removeResource " - Removes a resource URI from the set of resources stored in this - CVTerm object. - - Parameter 'resource' is a string representing the resource URI to - remove; e.g., 'http://www.geneontology.org/#GO:0005892'. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE - - See also addResource(). -"; - - -%feature("docstring") CVTerm::hasRequiredAttributes " - Predicate returning True if all the required elements for this - CVTerm object have been set. - - Note: - - The required attributes for a CVTerm are: - - * a qualifier type, which can be either a model qualifier or a - biological qualifier - - * at least one resource -"; - - -%feature("docstring") CVTerm::hasBeenModified " - Internal implementation method. -"; - - -%feature("docstring") CVTerm::resetModifiedFlags " - Internal implementation method. -"; - - -%feature("docstring") Date " - @ingroup Core Representation of MIRIAM-compliant dates used in - ModelHistory. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - A Date object stores a reasonably complete representation of date and - time. Its purpose is to serve as a way to store dates to be read and - written in the W3C date format used in RDF Dublin Core annotations - within SBML. The W3C date format is a restricted form of ISO 8601, - the international standard for the representation of dates and - times. A time and date value in this W3C format takes the form - YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., 1997-07-16T19:20:30+01:00) where - XHH:ZZ is the time zone offset. The libSBML Date object contains - the following fields to represent these values: - - - * year: a long integer representing the year. This should be a - four-digit number such as 2011. - - * month: a long integer representing the month, with a range of - values of 1-12. The value 1 represents January, and so on. - - * day: a long integer representing the day of the month, with a - range of values of 1-31. - - * hour: a long integer representing the hour on a 24-hour clock, - with a range of values of 0-23. - - * minute: a long integer representing the minute, with a range of - 0-59. - - * second: a long integer representing the second, with a range of - 0-59. - - * sign: a long integer representing the sign of the offset (0 - signifying + and 1 signifying -). See the paragraph below for - further explanations. - - * hours offset: a long integer representing the time zone's hour - offset from GMT. - - * minute offset: a long integer representing the time zone's minute - offset from GMT. - - To illustrate the time zone offset, a value of -05:00 would - correspond to USA Eastern Standard Time. In the Date object, this - would require a value of 1 for the sign field, 5 for the hour offset - and 0 for the minutes offset. - - In the restricted RDF annotations used in SBML, described in Section - 6 of the SBML Level 2 and Level 3 specification documents, date/time - stamps can be used to indicate the time of creation and modification - of a model. The following SBML model fragment illustrates this: - - <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> - <annotation> - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterms=\'http://purl.org/dc/terms/\' - xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > - <rdf:Description rdf:about=\'#_180340\'> - <dc:creator> - <rdf:Bag> - <rdf:li rdf:parseType=\'Resource\'> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family>Shapiro</vCard:Family> - <vCard:Given>Bruce</vCard:Given> - </vCard:N> - <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> - </vCard:ORG> - </rdf:li> - </rdf:Bag> - </dc:creator> - <dcterms:created rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> - </dcterms:created> - <dcterms:modified rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> - </dcterms:modified> - </rdf:Description> - </rdf:RDF> - </annotation> - </model> -"; - - -%feature("docstring") Date::Date " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - Date(string date) - - Creates a Date object from a string expressing a date and time value. - - This constructor expects its argument to be in the W3C date format - with time zone offset, used in RDF Dublin Core annotations within - SBML. This format expresses a date and time value as a string of the - form YYYY-MM-DDThh:mm:ssXHH:ZZ, where - - - * YYYY is a four-digit integer representing the year. This - should be a four-digit number such as 2011. - - * MM is a two-digit integer representing the month, with a range of - values of 01-12. The value 1 represents January, and so on. - - * DD is a two-digit integer representing the day of the month, with - a range of values of 01-31. - - * hh is a two-digit integer representing the hour on a 24-hour - clock, with a range of values of 00-23. - - * mm is a two-digit integer representing the minute, with a range - of 00-59. - - * ss is a two-digit integer representing the second, with a range - of 0-59. - - * X is the the sign of the time zone offset, either + or -. - - * HH is a two-digit integer representing the hour of the time zone - offset, with a range of 00-23. - - * ZZ is a two-digit integer representing the minutes of the time - zone offset, with a range of 00-59. - - In the string format above, it is important not to forget the - literal character T in the string. Here is an example date/time - string: 1997-07-16T19:20:30+01:00, which would represent July 16, - 1997, at 19:20:30 in Central European Time (which is UTC +1:00). - - If this constructor is given a None argument or a string of length - zero, it constructs a Date object with the value of January 1, 2000, - at time 00:00 UTC. Otherwise, the argument must be in the complete - format described above, or unpredictable results will happen. - - Parameter 'date' is a string representing the date. - - ______________________________________________________________________ - Method variant with the following signature: - - Date(long year = 2000, long month = 1, long day = 1, long hour = - 0, long minute = 0, long second = 0, long sign = 0, long hoursOffset - = 0, long minutesOffset = 0) - - Creates a time and date representation for use in model annotations - and elsewhere. - - The following is the complete set of possible arguments to this - constructor, with default values as indicated: - - Parameter 'year' is a long integereger representing the year. This - should be a four-digit number such as 2011. (Default value used if - this argument is not given: 2000.) - - Parameter 'month' is a long integereger representing the month, with - a range of values of 1-12. The value 1 represents January, and so - on. (Default value used if this argument is not given: 1.) - - Parameter 'day' is a long integereger representing the day of the - month, with a range of values of 1-31. (Default value used if this - argument is not given: 1.) - - Parameter 'hour' is a long integereger representing the hour on a - 24-hour clock, with a range of values of 0-23. (Default value used - if this argument is not given: 0.) - - Parameter 'minute' is a long integereger representing the minute, - with a range of 0-59. (Default value used if this argument is not - given: 0.) - - Parameter 'second' is a long integereger representing the second, - with a range of 0-59. (Default value used if this argument is not - given: 0.) - - Parameter 'sign' is a long integereger representing the sign of the - offset (0 signifying + and 1 signifying -). See the paragraph - below for further explanations. (Default value used if this argument - is not given: 0.) - - Parameter 'hoursOffset' is a long integereger representing the time - zone's hour offset from GMT. (Default value used if this argument - is not given: 0.) - - Parameter 'minutesOffset' is a long integereger representing the time - zone's minute offset from GMT. (Default value used if this argument - is not given: 0.) - - To illustrate the time zone offset, a value of -05:00 would - correspond to USA Eastern Standard Time. In the Date object, this - would require a value of 1 for the sign field, 5 for the hour offset - and 0 for the minutes offset. - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. - - @~ - - ______________________________________________________________________ - Method variant with the following signature: - - Date(Date orig) - - Copy constructor; creates a copy of this Date. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") Date::clone " - Returns a copy of this Date. - - Returns a (deep) copy of this Date. -"; - - -%feature("docstring") Date::getYear " - Returns the year from this Date. - - Returns the year from this Date. -"; - - -%feature("docstring") Date::getMonth " - Returns the month from this Date. - - Returns the month from this Date. -"; - - -%feature("docstring") Date::getDay " - Returns the day from this Date. - - Returns the day from this Date. -"; - - -%feature("docstring") Date::getHour " - Returns the hour from this Date. - - Returns the hour from this Date. -"; - - -%feature("docstring") Date::getMinute " - Returns the minute from this Date. - - Returns the minute from this Date. -"; - - -%feature("docstring") Date::getSecond " - Returns the seconds from this Date. - - Returns the seconds from this Date. -"; - - -%feature("docstring") Date::getSignOffset " - Returns the sign of the time zone offset from this Date. - - Returns the sign of the offset from this Date. -"; - - -%feature("docstring") Date::getHoursOffset " - Returns the hours of the time zone offset from this Date. - - Returns the hours of the offset from this Date. -"; - - -%feature("docstring") Date::getMinutesOffset " - Returns the minutes of the time zone offset from this Date. - - Returns the minutes of the offset from this Date. -"; - - -%feature("docstring") Date::getDateAsString " - Returns the current Date value in text-string form. - - The string returned will be in the W3C date format with time zone - offset, used in RDF Dublin Core annotations within SBML. This format - expresses a date and time value as a string of the form YYYY-MM- - DDThh:mm:ssXHH:ZZ, where - - - * YYYY is a four-digit integer representing the year. This - should be a four-digit number such as 2011. - - * MM is a two-digit integer representing the month, with a range of - values of 01-12. The value 1 represents January, and so on. - - * DD is a two-digit integer representing the day of the month, with - a range of values of 01-31. - - * hh is a two-digit integer representing the hour on a 24-hour - clock, with a range of values of 00-23. - - * mm is a two-digit integer representing the minute, with a range - of 00-59. - - * ss is a two-digit integer representing the second, with a range - of 0-59. - - * X is the the sign of the time zone offset, either + or -. - - * HH is a two-digit integer representing the hour of the time zone - offset, with a range of 00-23. - - * ZZ is a two-digit integer representing the minutes of the time - zone offset, with a range of 00-59. - - An example date/time string is 1997-07-16T19:20:30+01:00, which - represents July 16, 1997, at 19:20:30 in Central European Time - (which is UTC +1:00). - - Returns the date as a string. -"; - - -%feature("docstring") Date::setYear " - Sets the value of the year of this Date object. - - The value given as argument must be between 1000 and 9999 inclusive. - (In the millennium during which this libSBML documentation is being - written, a typical value is 2011, but we hope that SBML will - continue to be used for a long time.) - - Parameter 'year' is a long integer representing the year. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setMonth " - Sets the value of the month of this Date object. - - Parameter 'month' is a long integer representing the month; it must - be in the range 1-12 or an error will be signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setDay " - Sets the value of the day of this Date object. - - Parameter 'day' is a long integer representing the day; it must be in - the range 0-31 or an error will be signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setHour " - Sets the value of the hour of this Date object. - - Parameter 'hour' is a long integer representing the hour to set; it - must be in the range 0-23 or an error will be signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setMinute " - Sets the value of the minute of this Date object. - - Parameter 'minute' is a long integer representing the minute to set; - it must be in the range 0-59 or an error will be signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setSecond " - Sets the value of the second of the Date object. - - Parameter 'second' is a long integer representing the seconds; it - must be in the range 0-59 or an error will be signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setSignOffset " - Sets the value of the sign of the time zone offset of this Date - object. - - The only permissible values are 0 and 1. - - Parameter 'sign' is a long integer representing the sign of the - offset, with 0 signifying + and 1 signifying -. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setHoursOffset " - Sets the value of this Date object's time zone hour offset. - - Parameter 'hoursOffset' is a long integer representing the hours of - the offset; it must be in the range 0-23 or an error will be - signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setMinutesOffset " - Sets the value of this Date object's time zone minutes offset. - - Parameter 'minutesOffset' is a long integer representing the minutes - of the offset; it must be in the range 0-59 or an error will be - signaled. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::setDateAsString " - Sets the value of this Date object using a date and time value - expressed as a text string. - - This method expects its argument to be in the W3C date format with - time zone offset, used in RDF Dublin Core annotations within SBML. - This format expresses a date and time value as a string of the form - YYYY-MM-DDThh:mm:ssXHH:ZZ, where - - * YYYY is a four-digit integer representing the year. This - should be a four-digit number such as 2011. - - * MM is a two-digit integer representing the month, with a range of - values of 01-12. The value 1 represents January, and so on. - - * DD is a two-digit integer representing the day of the month, with - a range of values of 01-31. - - * hh is a two-digit integer representing the hour on a 24-hour - clock, with a range of values of 00-23. - - * mm is a two-digit integer representing the minute, with a range - of 00-59. - - * ss is a two-digit integer representing the second, with a range - of 0-59. - - * X is the the sign of the time zone offset, either + or -. - - * HH is a two-digit integer representing the hour of the time zone - offset, with a range of 00-23. - - * ZZ is a two-digit integer representing the minutes of the time - zone offset, with a range of 00-59. - - In the string format above, it is important not to forget the - literal character T in the string. Here is an example date/time - string: 1997-07-16T19:20:30+01:00, which would represent July 16, - 1997, at 19:20:30 in Central European Time (which is UTC +1:00). - - If this method is given a None argument or a string of length zero, - it constructs a Date object with the value of January 1, 2000, at - time 00:00 UTC. Otherwise, the argument must be in the complete - format described above, or unpredictable results will happen. - - Parameter 'date' is a string representing the date. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") Date::representsValidDate " - Returns true or false depending on whether this date object - represents a valid date and time value. - - This method verifies that the date/time value stored in this object - is well-formed and represents plausible values. A time and date - value in the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ - (e.g., 1997-07-16T19:20:30+01:00) where XHH:ZZ is the time zone - offset. This method checks such things as whether the value of the - month number is less than or equal to 12, whether the value of the - minutes number is less than or equal to 59, whether a time zone - offset is set, etc. - - Returns True if the date is valid, False otherwise. -"; - - -%feature("docstring") Date::hasBeenModified " - Internal implementation method. -"; - - -%feature("docstring") Date::resetModifiedFlags " - Internal implementation method. -"; - - -%feature("docstring") Date::parseDateStringToNumbers " - Internal implementation method. -"; - - -%feature("docstring") Date::parseDateNumbersToString " - Internal implementation method. -"; - - -%feature("docstring") ModelCreator " - @ingroup Core Representation of MIRIAM-compliant model creator data - used in ModelHistory. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The SBML specification beginning with Level 2 Version 2 defines a - standard approach to recording model history and model creator - information in a form that complies with MIRIAM ('Minimum Information - Requested in the Annotation of biochemical Models', Nature - Biotechnology, vol. 23, no. 12, Dec. 2005). For the model creator, - this form involves the use of parts of the vCard representation. - LibSBML provides the ModelCreator class as a convenience high-level - interface for working with model creator data. Objects of class - ModelCreator can be used to store and carry around creator data - within a program, and the various methods in this object class let - callers manipulate the different parts of the model creator - representation. - - The different parts of a model creator definition - ====================================================================== - - The ModelCreator class mirrors the structure of the MIRIAM model - creator annotations in SBML. The following template illustrates - these different fields when they are written in XML form: - - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> - <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> - </vCard:N> - ... - <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> - ... - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> - </vCard:ORG> - - Each of the separate data values family name, given name, email - address, and organization can be set and retrieved via - corresponding methods in the ModelCreator class. These methods are - documented in more detail below. -"; - - -%feature("docstring") ModelCreator::ModelCreator " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ModelCreator(const XMLNode creator) - - Creates a new ModelCreator from an XMLNode. - - Parameter 'creator' is the XMLNode from which to create the - ModelCreator. - - ______________________________________________________________________ - Method variant with the following signature: - - ModelCreator() - - Creates a new ModelCreator object. - - ______________________________________________________________________ - Method variant with the following signature: - - ModelCreator(ModelCreator orig) - - Copy constructor; creates a copy of the ModelCreator. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. -"; - - -%feature("docstring") ModelCreator::clone " - Creates and returns a copy of this ModelCreator. - - Returns a (deep) copy of this ModelCreator. -"; - - -%feature("docstring") ModelCreator::getFamilyName " - Returns the 'family name' stored in this ModelCreator object. - - Returns the 'family name' portion of the ModelCreator object. -"; - - -%feature("docstring") ModelCreator::getGivenName " - Returns the 'given name' stored in this ModelCreator object. - - Returns the 'given name' portion of the ModelCreator object. -"; - - -%feature("docstring") ModelCreator::getEmail " - Returns the 'email' stored in this ModelCreator object. - - Returns email from the ModelCreator. -"; - - -%feature("docstring") ModelCreator::getOrganization " - Returns the 'organization' stored in this ModelCreator object. - - Returns organization from the ModelCreator. -"; - - -%feature("docstring") ModelCreator::getOrganisation " - (Alternate spelling) Returns the 'organization' stored in this - ModelCreator object. - - Note: - - This function is an alias of getOrganization(). - - Returns organization from the ModelCreator. - - See also getOrganization(). -"; - - -%feature("docstring") ModelCreator::isSetFamilyName " - Predicate returning True or False depending on whether this - ModelCreator's 'family name' part is set. - - Returns True if the familyName of this ModelCreator is set, False - otherwise. -"; - - -%feature("docstring") ModelCreator::isSetGivenName " - Predicate returning True or False depending on whether this - ModelCreator's 'given name' part is set. - - Returns True if the givenName of this ModelCreator is set, False - otherwise. -"; - - -%feature("docstring") ModelCreator::isSetEmail " - Predicate returning True or False depending on whether this - ModelCreator's 'email' part is set. - - Returns True if the email of this ModelCreator is set, False - otherwise. -"; - - -%feature("docstring") ModelCreator::isSetOrganization " - Predicate returning True or False depending on whether this - ModelCreator's 'organization' part is set. - - Returns True if the organization of this ModelCreator is set, False - otherwise. -"; - - -%feature("docstring") ModelCreator::isSetOrganisation " - (Alternate spelling) Predicate returning True or False depending on - whether this ModelCreator's 'organization' part is set. - - Note: - - This function is an alias of isSetOrganization(). - - Returns True if the organization of this ModelCreator is set, False - otherwise. - - See also isSetOrganization(). -"; - - -%feature("docstring") ModelCreator::setFamilyName " - Sets the 'family name' portion of this ModelCreator object. - - Parameter 'familyName' is a string representing the familyName of the - ModelCreator. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ModelCreator::setGivenName " - Sets the 'given name' portion of this ModelCreator object. - - Parameter 'givenName' is a string representing the givenName of the - ModelCreator. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ModelCreator::setEmail " - Sets the 'email' portion of this ModelCreator object. - - Parameter 'email' is a string representing the email of the - ModelCreator. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ModelCreator::setOrganization " - Sets the 'organization' portion of this ModelCreator object. - - Parameter 'organization' is a string representing the organization of - the ModelCreator. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS -"; - - -%feature("docstring") ModelCreator::setOrganisation " - (Alternate spelling) Sets the 'organization' portion of this - ModelCreator object. - - Parameter 'organization' is a string representing the organization of - the ModelCreator. - - Note: - - This function is an alias of setOrganization(string organization). - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - See also setOrganization(). -"; - - -%feature("docstring") ModelCreator::unsetFamilyName " - Unsets the 'family name' portion of this ModelCreator object. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ModelCreator::unsetGivenName " - Unsets the 'given name' portion of this ModelCreator object. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ModelCreator::unsetEmail " - Unsets the 'email' portion of this ModelCreator object. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ModelCreator::unsetOrganization " - Unsets the 'organization' portion of this ModelCreator object. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ModelCreator::unsetOrganisation " - (Alternate spelling) Unsets the 'organization' portion of this - ModelCreator object. - - Note: - - This function is an alias of unsetOrganization(). - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - See also unsetOrganization(). -"; - - -%feature("docstring") ModelCreator::getAdditionalRDF " - Internal implementation method. -"; - - -%feature("docstring") ModelCreator::hasRequiredAttributes " - Predicate returning True if all the required elements for this - ModelCreator object have been set. - - The only required elements for a ModelCreator object are the 'family - name' and 'given name'. - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") ModelCreator::hasBeenModified " - Internal implementation method. -"; - - -%feature("docstring") ModelCreator::resetModifiedFlags " - Internal implementation method. -"; - - -%feature("docstring") ModelHistory " - @ingroup Core Representation of MIRIAM-compliant model history data. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The SBML specification beginning with Level 2 Version 2 defines a - standard approach to recording optional model history and model - creator information in a form that complies with MIRIAM ('Minimum - Information Requested in the Annotation of biochemical Models', - Nature Biotechnology, vol. 23, no. 12, Dec. 2005). LibSBML provides - the ModelHistory class as a convenient high-level interface for - working with model history data. - - Model histories in SBML consist of one or more model creators, a - single date of creation, and one or more modification dates. The - overall XML form of this data takes the following form: - - <dc:creator> - <rdf:Bag> - <rdf:li rdf:parseType=\'Resource\'> - <span style=\'background-color: #d0eed0\'>+++</span> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> - <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> - </vCard:N> - <span style=\'background-color: #d0eed0\'>+++</span> - <span style=\'border-bottom: 2px dotted #888\'><vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL></span> - <span style=\'background-color: #d0eed0\'>+++</span> - <span style=\'border-bottom: 2px dotted #888\'><vCard:ORG rdf:parseType=\'Resource\'></span> - <span style=\'border-bottom: 2px dotted #888\'><vCard:Orgname><span style=\'background-color: #bbb\'>organization name</span></vCard:Orgname></span> - <span style=\'border-bottom: 2px dotted #888\'></vCard:ORG></span> - <span style=\'background-color: #d0eed0\'>+++</span> - </rdf:li> - <span style=\'background-color: #edd\'>...</span> - </rdf:Bag> - </dc:creator> - <dcterms:created rdf:parseType=\'Resource\'> - <dcterms:W3CDTF><span style=\'background-color: #bbb\'>creation date</span></dcterms:W3CDTF> - </dcterms:created> - <dcterms:modified rdf:parseType=\'Resource\'> - <dcterms:W3CDTF><span style=\'background-color: #bbb\'>modification date</span></dcterms:W3CDTF> - </dcterms:modified> - <span style=\'background-color: #edd\'>...</span> - - In the template above, the underlined portions are optional, the - symbol +++ is a placeholder for either no content or valid XML - content that is not defined by the annotation scheme, and the - ellipses ... are placeholders for zero or more elements of the same - form as the immediately preceding element. The various placeholders - for content, namely family name, given name, email address, - organization, creation date, and modification date are data that - can be filled in using the various methods on the ModelHistory class - described below. -"; - - -%feature("docstring") ModelCreator " - @ingroup Core Representation of MIRIAM-compliant model creator data - used in ModelHistory. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - The SBML specification beginning with Level 2 Version 2 defines a - standard approach to recording model history and model creator - information in a form that complies with MIRIAM ('Minimum Information - Requested in the Annotation of biochemical Models', Nature - Biotechnology, vol. 23, no. 12, Dec. 2005). For the model creator, - this form involves the use of parts of the vCard representation. - LibSBML provides the ModelCreator class as a convenience high-level - interface for working with model creator data. Objects of class - ModelCreator can be used to store and carry around creator data - within a program, and the various methods in this object class let - callers manipulate the different parts of the model creator - representation. - - The different parts of a model creator definition - ====================================================================== - - The ModelCreator class mirrors the structure of the MIRIAM model - creator annotations in SBML. The following template illustrates - these different fields when they are written in XML form: - - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> - <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> - </vCard:N> - ... - <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> - ... - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> - </vCard:ORG> - - Each of the separate data values family name, given name, email - address, and organization can be set and retrieved via - corresponding methods in the ModelCreator class. These methods are - documented in more detail below. -"; - - -%feature("docstring") Date " - @ingroup Core Representation of MIRIAM-compliant dates used in - ModelHistory. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - A Date object stores a reasonably complete representation of date and - time. Its purpose is to serve as a way to store dates to be read and - written in the W3C date format used in RDF Dublin Core annotations - within SBML. The W3C date format is a restricted form of ISO 8601, - the international standard for the representation of dates and - times. A time and date value in this W3C format takes the form - YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., 1997-07-16T19:20:30+01:00) where - XHH:ZZ is the time zone offset. The libSBML Date object contains - the following fields to represent these values: - - - * year: a long integer representing the year. This should be a - four-digit number such as 2011. - - * month: a long integer representing the month, with a range of - values of 1-12. The value 1 represents January, and so on. - - * day: a long integer representing the day of the month, with a - range of values of 1-31. - - * hour: a long integer representing the hour on a 24-hour clock, - with a range of values of 0-23. - - * minute: a long integer representing the minute, with a range of - 0-59. - - * second: a long integer representing the second, with a range of - 0-59. - - * sign: a long integer representing the sign of the offset (0 - signifying + and 1 signifying -). See the paragraph below for - further explanations. - - * hours offset: a long integer representing the time zone's hour - offset from GMT. - - * minute offset: a long integer representing the time zone's minute - offset from GMT. - - To illustrate the time zone offset, a value of -05:00 would - correspond to USA Eastern Standard Time. In the Date object, this - would require a value of 1 for the sign field, 5 for the hour offset - and 0 for the minutes offset. - - In the restricted RDF annotations used in SBML, described in Section - 6 of the SBML Level 2 and Level 3 specification documents, date/time - stamps can be used to indicate the time of creation and modification - of a model. The following SBML model fragment illustrates this: - - <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> - <annotation> - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterms=\'http://purl.org/dc/terms/\' - xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > - <rdf:Description rdf:about=\'#_180340\'> - <dc:creator> - <rdf:Bag> - <rdf:li rdf:parseType=\'Resource\'> - <vCard:N rdf:parseType=\'Resource\'> - <vCard:Family>Shapiro</vCard:Family> - <vCard:Given>Bruce</vCard:Given> - </vCard:N> - <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> - <vCard:ORG rdf:parseType=\'Resource\'> - <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> - </vCard:ORG> - </rdf:li> - </rdf:Bag> - </dc:creator> - <dcterms:created rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> - </dcterms:created> - <dcterms:modified rdf:parseType=\'Resource\'> - <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> - </dcterms:modified> - </rdf:Description> - </rdf:RDF> - </annotation> - </model> -"; - - -%feature("docstring") ModelHistory::ModelHistory " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - ModelHistory(ModelHistory orig) - - Copy constructor; creates a copy of this ModelHistory object. - - Parameter 'orig' is the object to copy. - - Throws ValueError: @~ Thrown if the argument 'orig' is None. - - ______________________________________________________________________ - Method variant with the following signature: - - ModelHistory() - - Creates a new ModelHistory object. -"; - - -%feature("docstring") ModelHistory::clone " - Creates and returns a copy of this ModelHistory object - - Returns a (deep) copy of this ModelHistory object. -"; - - -%feature("docstring") ModelHistory::getCreatedDate " - Returns the 'creation date' portion of this ModelHistory object. - - Returns a Date object representing the creation date stored in this - ModelHistory object. -"; - - -%feature("docstring") ModelHistory::getModifiedDate " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - getModifiedDate() - - Returns the 'modified date' portion of this ModelHistory object. - - Note that in the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of 'modified date' values. If this ModelHistory - object contains more than one 'modified date' value in the list, - this method will return the first one in the list. - - Returns a Date object representing the date of modification stored - in this ModelHistory object. - - ______________________________________________________________________ - Method variant with the following signature: - - getModifiedDate(long n) - - Get the nth Date object in the list of 'modified date' values stored - in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of 'modified date' values. - - Returns the nth Date in the list of ModifiedDates of this - ModelHistory. -"; - - -%feature("docstring") ModelHistory::isSetCreatedDate " - Predicate returning True or False depending on whether this - ModelHistory's 'creation date' is set. - - Returns True if the creation date value of this ModelHistory is set, - False otherwise. -"; - - -%feature("docstring") ModelHistory::isSetModifiedDate " - Predicate returning True or False depending on whether this - ModelHistory's 'modified date' is set. - - Returns True if the modification date value of this ModelHistory - object is set, False otherwise. -"; - - -%feature("docstring") ModelHistory::setCreatedDate " - Sets the creation date of this ModelHistory object. - - Parameter 'date' is a Date object representing the date to which the - 'created date' portion of this ModelHistory should be set. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") ModelHistory::setModifiedDate " - Sets the modification date of this ModelHistory object. - - Parameter 'date' is a Date object representing the date to which the - 'modified date' portion of this ModelHistory should be set. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") ModelHistory::addModifiedDate " - Adds a copy of a Date object to the list of 'modified date' values - stored in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of 'modified date' values. - - Parameter 'date' is a Date object representing the 'modified date' - that should be added to this ModelHistory object. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED - - * libsbml.LIBSBML_INVALID_OBJECT -"; - - -%feature("docstring") ModelHistory::getListModifiedDates " - Returns the list of 'modified date' values (as Date objects) stored - in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of 'modified date' values. - - Returns the list of modification dates for this ModelHistory object. -"; - - -%feature("docstring") ModelHistory::getNumModifiedDates " - Get the number of Date objects in this ModelHistory object's list of - 'modified dates'. - - In the MIRIAM format for annotations, there can be multiple - modification dates. The libSBML ModelHistory class supports this by - storing a list of 'modified date' values. - - Returns the number of ModifiedDates in this ModelHistory. -"; - - -%feature("docstring") ModelHistory::addCreator " - Adds a copy of a ModelCreator object to the list of 'model creator' - values stored in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of 'model creator' values. - - Parameter 'mc' is the ModelCreator to add - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_OBJECT - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") ModelHistory::getListCreators " - Returns the list of ModelCreator objects stored in this ModelHistory - object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of 'model creator' values. - - Returns the list of ModelCreator objects. -"; - - -%feature("docstring") ModelHistory::getCreator " - Get the nth ModelCreator object stored in this ModelHistory object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of 'model creator' values. - - Returns the nth ModelCreator object. -"; - - -%feature("docstring") ModelHistory::getNumCreators " - Get the number of ModelCreator objects stored in this ModelHistory - object. - - In the MIRIAM format for annotations, there can be multiple model - creators. The libSBML ModelHistory class supports this by storing a - list of 'model creator' values. - - Returns the number of ModelCreators objects. -"; - - -%feature("docstring") ModelHistory::hasRequiredAttributes " - Predicate returning True if all the required elements for this - ModelHistory object have been set. - - The required elements for a ModelHistory object are 'created name', - 'modified date', and at least one 'model creator'. - - Returns a boolean value indicating whether all the required elements - for this object have been defined. -"; - - -%feature("docstring") ModelHistory::hasBeenModified " - Internal implementation method. -"; - - -%feature("docstring") ModelHistory::resetModifiedFlags " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser " - @ingroup Core Read/write/manipulate RDF annotations stored in SBML - annotation elements. - - This class of objects is defined by libSBML only and has no direct - equivalent in terms of SBML components. This class is not prescribed - by the SBML specifications, although it is used to implement - features defined in SBML. - - RDFAnnotationParser is a libSBML construct used as part of the - libSBML support for annotations conforming to the guidelines - specified by MIRIAM ('Minimum Information Requested in the - Annotation of biochemical Models', Nature Biotechnology, vol. 23, - no. 12, Dec. 2005). Section 6 of the SBML Level 2 and Level 3 - specification documents defines a recommended way of encoding MIRIAM - information using a subset of RDF (Resource Description Format). The - general scheme is as follows. A set of RDF-based annotations - attached to a given SBML <annotation> element are read by - RDFAnnotationParser and converted into a list of CVTerm objects. - There are different versions of the main method, @~ and - RDFAnnotationParser.parseRDFAnnotation(), used depending on whether - the annotation in question concerns the MIRIAM model history or - other MIRIAM resource annotations. A special object class, - ModelHistory, is used to make it easier to manipulate model history - annotations. - - All of the methods on RDFAnnotationParser are static; the class - exists only to encapsulate the annotation and CVTerm parsing and - manipulation functionality. -"; - - -%feature("docstring") RDFAnnotationParser::parseRDFAnnotation " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - parseRDFAnnotation(XMLNodeannotation, ListCVTerms, string metaId = - None, XMLInputStream* stream = None) - - Parses an annotation (given as an XMLNode tree) into a list of - CVTerm objects. - - This is used to take an annotation that has been read into an SBML - model, identify the RDF elements within it, and create a list of - corresponding CVTerm (controlled vocabulary term) objects. - - Parameter 'annotation' is XMLNode containing the annotation. - - Parameter 'CVTerms' is list of CVTerm objects to be created. - Parameter 'stream' is optional XMLInputStream that facilitates error - logging Parameter 'metaId' is optional metaId, if set only the rdf - annotation for this metaId will be returned. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_parseRDFAnnotation(). They are functionally - identical. @~ - - @see RDFAnnotationParser.parseRDFAnnotation() @~ - - ______________________________________________________________________ - Method variant with the following signature: - - parseRDFAnnotation(XMLNodeannotation, string metaId = None, - XMLInputStream* stream = None) - - Parses an annotation into a ModelHistory class instance. - - This is used to take an annotation that has been read into an SBML - model, identify the RDF elements representing model history - information, and create a list of corresponding CVTerm objects. - - Parameter 'annotation' is XMLNode containing the annotation. - Parameter 'stream' is optional XMLInputStream that facilitates error - logging Parameter 'metaId' is optional metaId, if set only the rdf - annotation for this metaId will be returned. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_parseRDFAnnotation(). They are functionally - identical. @~ - - Returns a pointer to the ModelHistory created. -"; - - -%feature("docstring") RDFAnnotationParser::createAnnotation " - Creates a blank annotation and returns its root XMLNode object. - - This creates a completely empty SBML <annotation> element. It is - not attached to any SBML element. An example of how this might be - used is illustrated in the following code fragment. In this - example, suppose that content is an XMLNode object previously - created, containing MIRIAM-style annotations, and that sbmlObject is - an SBML object derived from SBase (e.g., a Model, or a Species, or a - Compartment, etc.). Then: - RDF = RDFAnnotationParser.createRDFAnnotation() # Create RDF annotation XML structure. - success = RDF.addChild(...content...) # Put some content into it. - ... # Check \'success\' return code value. - - annot = RDFAnnotationParser.createAnnotation() # Create <annotation> container. - success = annot.addChild(RDF) # Put the RDF annotation into it. - ... # Check \'success\' return code value. - - success = sbmlObject.setAnnotation(annot) # Set object\'s annotation to what we built. - ... # Check \'success\' return code value. - @~ The SBML specification - contains more information about the format of annotations. We urge - readers to consult Section 6 of the SBML Level 2 (Versions 2-4) and - SBML Level 3 specification documents. - - Returns a pointer to an XMLNode for the annotation - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_createAnnotation(). They are functionally - identical. @~ - - @see RDFAnnotationParser.createRDFAnnotation() @~ -"; - - -%feature("docstring") RDFAnnotationParser::createRDFAnnotation " - Creates a blank RDF element suitable for use in SBML annotations. - - The annotation created by this method has namespace declarations for - all the relevant XML namespaces used in RDF annotations and also has - an empty RDF element. The result is the following XML: - - <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' - xmlns:dc=\'http://purl.org/dc/elements/1.1/\' - xmlns:dcterms=\'http://purl.org/dc/terms/\' - xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' - xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' - xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > - - </rdf:RDF> - - Note that this does not create the containing SBML <annotation> - element; the method RDFAnnotationParser.createAnnotation()@~ is - available for creating the container. - - Returns a pointer to an XMLNode - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_createRDFAnnotation(). They are functionally - identical. @~ - - @see RDFAnnotationParser.createAnnotation() @~ -"; - - -%feature("docstring") RDFAnnotationParser::createCVTerms " - Takes a list of CVTerm objects and creates a the RDF 'Description' - element. - - This essentially takes the given SBML object, reads out the CVTerm - objects attached to it, creates an RDF 'Description' element to hold - the terms, and adds each term with appropriate qualifiers. - - Parameter 'obj' is the SBML object to start from - - Returns the XMLNode tree corresponding to the Description element of - an RDF annotation. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name createRDFDescription(@if - java SBase obj). They are functionally identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::parseCVTerms " - Takes a list of CVTerm objects and creates a complete SBML annotation - around it. - - This essentially takes the given SBML object, reads out the CVTerm - objects attached to it, calls - RDFAnnotationParser.createRDFAnnotation()@~ to create an RDF - annotation to hold the terms, and finally calls - RDFAnnotationParser.createAnnotation()@~ to wrap the result as an - SBML <annotation> element. - - Parameter 'obj' is the SBML object to start from - - Returns the XMLNode tree corresponding to the annotation. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_parseCVTerms(). They are functionally identical. - @~ -"; - - -%feature("docstring") RDFAnnotationParser::parseModelHistory " - Reads the model history and cvTerms stored in 'obj' and creates the - XML structure for an SBML annotation representing that metadata if - there is a model history stored in 'obj'. - - Parameter 'obj' is any SBase object - - Returns the XMLNode corresponding to an annotation containing - MIRIAM-compliant model history and CV term information in RDF format. - - Note: - - If the object does not have a history element stored then None is - returned even if CVTerms are present. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_parseModelHistory(@if java Sbase obj). They are - functionally identical. @endif@~ -"; - - -%feature("docstring") RDFAnnotationParser::parseOnlyModelHistory " - Reads the model history stored in 'obj' and creates the XML - structure for an SBML annotation representing that history. - - Parameter 'obj' is any SBase object - - Returns the XMLNode corresponding to an annotation containing - MIRIAM-compliant model history information in RDF format. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_parseOnlyModelHistory(). They are functionally - identical. @~ -"; - - -%feature("docstring") RDFAnnotationParser::deleteRDFAnnotation " - Deletes any SBML MIRIAM RDF annotation found in the given XMLNode - tree and returns any remaining annotation content. - - The name of the XMLNode given as parameter 'annotation' must be - 'annotation', or else this method returns None. The method will - walk down the XML structure looking for elements that are in the RDF - XML namespace, and remove them if they conform to the syntax of a - History or CVTerm element. - - Parameter 'annotation' is the XMLNode tree within which the RDF - annotation is to be found and deleted - - Returns the XMLNode structure that is left after RDF annotations are - deleted. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @~ -"; - - -%feature("docstring") RDFAnnotationParser::deleteRDFHistoryAnnotation " - Deletes any SBML MIRIAM RDF 'History' annotation found in the given - XMLNode tree and returns any remaining annotation content. - - The name of the XMLNode given as parameter 'annotation' must be - 'annotation', or else this method returns None. The method will - walk down the XML structure looking for elements that are in the RDF - XML namespace, and remove any that conform to the syntax of a - History element. - - Parameter 'annotation' is the XMLNode tree within which the RDF - annotation is to be found and deleted - - Returns the XMLNode structure that is left after RDF annotations are - deleted. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @~ -"; - - -%feature("docstring") RDFAnnotationParser::deleteRDFCVTermAnnotation " - Deletes any SBML MIRIAM RDF 'CVTerm' annotation found in the given - XMLNode tree and returns any remaining annotation content. - - The name of the XMLNode given as parameter 'annotation' must be - 'annotation', or else this method returns None. The method will - walk down the XML structure looking for elements that are in the RDF - XML namespace, and remove any that conform to the syntax of a CVTerm - element. - - Parameter 'annotation' is the XMLNode tree within which the RDF - annotation is to be found and deleted - - Returns the XMLNode structure that is left after RDF annotations are - deleted. - - Note: - - Because this is a static method, the non-C++ language interfaces for - libSBML will contain two variants. One will be a static method on - the class (i.e., RDFAnnotationParser), and the other will be a - standalone top-level function with the name - RDFAnnotationParser_deleteRDFAnnotation(). They are functionally - identical. @~ -"; - - -%feature("docstring") RDFAnnotationParser::hasRDFAnnotation " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::hasAdditionalRDFAnnotation " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::hasCVTermRDFAnnotation " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::hasHistoryRDFAnnotation " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithCVTerms " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithHistory " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::deriveCVTermsFromAnnotation " - Internal implementation method. -"; - - -%feature("docstring") RDFAnnotationParser::deriveHistoryFromAnnotation " - Internal implementation method. -"; - - -%feature("docstring") ISBMLExtensionNamespaces " - @ingroup Core -"; - - -%feature("docstring") SBaseExtensionPoint " - @ingroup Core Representation of an extension point of SBML's package - extension. - - SBaseExtensionPoint represents an element to be extended (extension - point) and the extension point is identified by a combination of a - package name and a typecode of the element. - - For example, an SBaseExtensionPoint object which represents an - extension point of the model element defined in the core package can - be created as follows: - - SBaseExtensionPoint modelextp(\'core\', SBML_MODEL); - - Similarly, an SBaseExtensionPoint object which represents an - extension point of the layout element defined in the layout - extension can be created as follows: - - SBaseExtensionPoint layoutextp(\'layout\', SBML_LAYOUT_LAYOUT); - - SBaseExtensionPoint object is required as one of arguments of the - constructor of SBasePluginCreatorlt;class SBasePluginType, class - SBMLExtensionType> template class to identify an extension poitnt to - which the plugin object created by the creator class is plugged in. - For example, the SBasePluginCreator class which creates a - LayoutModelPlugin object of the layout extension which is plugged in - to the model element of the core package can be created with the - corresponding SBaseExtensionPoint object as follows: - - // std::vector object that contains a list of URI (package versions) supported - // by the plugin object. - std::vector<string> packageURIs; - packageURIs.push_back(getXmlnsL3V1V1()); - packageURIs.push_back(getXmlnsL2()); - - // creates an extension point (model element of the \'core\' package) - SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); - - // creates an SBasePluginCreator object - SBasePluginCreator<LayoutModelPlugin, LayoutExtension> modelPluginCreator(modelExtPoint,packageURIs); - - This kind of code is implemented in init() function of each - SBMLExtension derived classes. -"; - - -%feature("docstring") SBaseExtensionPoint::SBaseExtensionPoint " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBaseExtensionPoint(SBaseExtensionPoint rhs) - - copy constructor - - ______________________________________________________________________ - Method variant with the following signature: - - SBaseExtensionPoint(string pkgName, int typeCode) - - constructor -"; - - -%feature("docstring") SBaseExtensionPoint::clone " - clone -"; - - -%feature("docstring") SBaseExtensionPoint::getPackageName " - Returns the package name of this extension point. -"; - - -%feature("docstring") SBaseExtensionPoint::getTypeCode " - Returns the typecode of this extension point. -"; - - -%feature("docstring") SBasePlugin " - @ingroup Core Representation of a plug-in object of SBML's package - extension. - - Additional attributes and/or elements of a package extension which - are directly contained by some pre-defined element are - contained/accessed by SBasePlugin class which is extended by - package developers for each extension point. The extension point, - which represents an element to be extended, is identified by a - combination of a Package name and a typecode of the element, and is - represented by SBaseExtensionPoint class. - - For example, the layout extension defines * element which is - directly contained in <model> element of the core package. In the - layout package (provided as one of example packages in libSBML-5), - the additional element for the model element is implemented as - ListOfLayouts class (an SBase derived class) and the object is - contained/accessed by a LayoutModelPlugin class (an SBasePlugin - derived class). - - SBasePlugin class defines basic virtual functions for - reading/writing/checking additional attributes and/or top-level - elements which should or must be overridden by subclasses like - SBase class and its derived classes. - - Package developers must implement an SBasePlugin exntended class - for each element to be extended (e.g. SBMLDocument, Model, ...) in - which additional attributes and/or top-level elements of the - package extension are directly contained. - - To implement reading/writing functions for attributes and/or top- - level elements of the SBsaePlugin extended class, package - developers should or must override the corresponding virtual - functions below provided in the SBasePlugin class: - - - * reading elements : <ol> - - * virtual SBase createObject (XMLInputStream& stream) - This function must be overridden if one or more additional elements - are defined. </li> - - * virtual bool readOtherXML (SBase parentObject, XMLInputStream& - stream) This function should be overridden if elements of - annotation, notes, MathML, etc. need to be directly - parsed from the given XMLInputStream object instead of the - SBase.readAnnotation() and/or SBase.readNotes() - functions. - - </li> </ol> </li> - - * reading attributes (must be overridden if additional attributes - are defined) : <ol> - - * virtual void addExpectedAttributes(ExpectedAttributes& - attributes) </li> - - * virtual void readAttributes (XMLAttributes attributes, const - ExpectedAttributes& expectedAttributes)</li> </ol> </li> - - * writing elements (must be overridden if additional elements are - defined) : <ol> - - * virtual void writeElements (XMLOutputStream& stream) const </li> - </ol> </li> - - * writing attributes : <ol> - - * virtual void writeAttributes (XMLOutputStream& stream) const - This function must be overridden if one or more additional attributes - are defined. </li> - - * virtual void writeXMLNS (XMLOutputStream& stream) const - This function must be overridden if one or more additional xmlns - attributes are defined. </li> </ol> </li> - - * checking elements (should be overridden) : <ol> - - * virtual bool hasRequiredElements() const </li> </ol> - </li> - - * checking attributes (should be overridden) : <ol> - - * virtual bool hasRequiredAttributes() const </li> </ol> - </li> - - To implement package-specific creating/getting/manipulating - functions of the SBasePlugin derived class (e.g., - getListOfLayouts(), createLyout(), getLayout(), and etc are - implemented in LayoutModelPlugin class of the layout package), - package developers must newly implement such functions (as they - like) in the derived class. - - SBasePlugin class defines other virtual functions of internal - implementations such as: - - - * virtual void setSBMLDocument(SBMLDocument d) - - * virtual void connectToParent(SBasesbase) - - * virtual void enablePackageInternal(string pkgURI, string - pkgPrefix, bool flag) - - These functions must be overridden by subclasses in which one or more - top-level elements are defined. - - For example, the following three SBasePlugin extended classes are - implemented in the layout extension: - - <ol> - - * SBMLDocumentPlugin class for SBMLDocument element - - - * required attribute is added to SBMLDocument object. - </li> - - ( SBMLDocumentPlugin class is a common SBasePlugin extended class - for SBMLDocument class. Package developers can use this class as-is - if no additional elements/attributes (except for required - attribute) is needed for the SBMLDocument class in their packages, - otherwise package developers must implement a new SBMLDocumentPlugin - derived class.) - - * LayoutModelPlugin class for Model element - - * * element is added to Model object. </li> - - * The following virtual functions for - reading/writing/checking are overridden: (type of - arguments and return values are omitted) - - - * createObject() : (read elements) </li> - - * readOtherXML() : (read elements in annotation of SBML L2) - </li> - - * writeElements() : (write elements) </li> - - </li> - - * The following virtual functions of internal - implementations are overridden: (type of arguments and - return values are omitted) - - - * setSBMLDocument() </li> - - * connectToParent() </li> - - * enablePackageInternal() </li> - - </li> - - * The following creating/getting/manipulating - functions are newly implemented: (type of arguments and - return values are omitted) - - - * getListOfLayouts() </li> - - * getLayout () </li> - - * addLayout() </li> - - * createLayout() </li> - - * removeLayout() </li> - - * getNumLayouts() </li> - - </li> - - </li> - - * LayoutSpeciesReferencePlugin class for SpeciesReference element - (used only for SBML L2V1) - - - * id attribute is internally added to SpeciesReference - object only for SBML L2V1 </li> - - * The following virtual functions for - reading/writing/checking are overridden: (type of arguments - and return values are omitted) </li> - - - * readOtherXML() </li> - - * writeAttributes() </li> - - </li> - - </ol> -"; - - -%feature("docstring") SBasePlugin::getElementNamespace " - Returns the XML namespace (URI) of the package extension of this - plugin object. - - Returns the URI of the package extension of this plugin object. -"; - - -%feature("docstring") SBasePlugin::getPrefix " - Returns the prefix of the package extension of this plugin object. - - Returns the prefix of the package extension of this plugin object. -"; - - -%feature("docstring") SBasePlugin::getPackageName " - Returns the package name of this plugin object. - - Returns the package name of this plugin object. -"; - - -%feature("docstring") SBasePlugin::clone " - Creates and returns a deep copy of this SBasePlugin object. - - Returns a (deep) copy of this SBase object -"; - - -%feature("docstring") SBasePlugin::getElementBySId " - Returns the first child element found that has the given 'id' in the - model-wide SId namespace, or None if no such object is found. - - Parameter 'id' is string representing the id of objects to find - - Returns pointer to the first element found with the given 'id'. -"; - - -%feature("docstring") SBasePlugin::getElementByMetaId " - Returns the first child element it can find with the given 'metaid', - or None if no such object is found. - - Parameter 'metaid' is string representing the metaid of objects to - find - - Returns pointer to the first element found with the given 'metaid'. -"; - - -%feature("docstring") SBasePlugin::getAllElements " - Returns a List of all child SBase objects, including those nested to - an arbitrary depth - - Returns a List of pointers to all children objects. -"; - - -%feature("docstring") SBasePlugin::setSBMLDocument " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::connectToParent " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::enablePackageInternal " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::stripPackage " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::getSBMLDocument " - Returns the parent SBMLDocument of this plugin object. - - Returns the parent SBMLDocument object of this plugin object. -"; - - -%feature("docstring") SBasePlugin::getURI " - Gets the URI to which this element belongs to. For example, all - elements that belong to SBML Level 3 Version 1 Core must would have - the URI 'http://www.sbml.org/sbml/level3/version1/core'; all - elements that belong to Layout Extension Version 1 for SBML Level 3 - Version 1 Core must would have the URI - 'http://www.sbml.org/sbml/level3/version1/layout/version1/' - - Unlike getElementNamespace, this function first returns the URI for - this element by looking into the SBMLNamespaces object of the - document with the its package name. if not found it will return the - result of getElementNamespace - - Returns the URI this elements - - See also getPackageName, getElementNamespace, - SBMLDocument::getSBMLNamespaces, getSBMLDocument. -"; - - -%feature("docstring") SBasePlugin::getParentSBMLObject " - Returns the parent SBase object to which this plugin object - connected. - - Returns the parent SBase object to which this plugin object - connected. -"; - - -%feature("docstring") SBasePlugin::setElementNamespace " - Sets the XML namespace to which this element belongs to. For - example, all elements that belong to SBML Level 3 Version 1 Core - must set the namespace to - 'http://www.sbml.org/sbml/level3/version1/core'; all elements that - belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core - must set the namespace to - 'http://www.sbml.org/sbml/level3/version1/layout/version1/' - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SBasePlugin::getLevel " - Returns the SBML level of the package extension of this plugin - object. - - Returns the SBML level of the package extension of this plugin - object. -"; - - -%feature("docstring") SBasePlugin::getVersion " - Returns the SBML version of the package extension of this plugin - object. - - Returns the SBML version of the package extension of this plugin - object. -"; - - -%feature("docstring") SBasePlugin::getPackageVersion " - Returns the package version of the package extension of this plugin - object. - - Returns the package version of the package extension of this plugin - object. -"; - - -%feature("docstring") SBasePlugin::replaceSIDWithFunction " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::divideAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::multiplyAssignmentsToSIdByFunction " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::hasIdentifierBeginningWith " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::prependStringToAllIdentifiers " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::transformIdentifiers " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::getLine " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::getColumn " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::getSBMLNamespaces " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::logUnknownElement " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::getErrorLog " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::logUnknownAttribute " - Internal implementation method. -"; - - -%feature("docstring") SBasePlugin::logEmptyString " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocumentPlugin " - @ingroup Core Template class for the SBMLDocument Plugin class - needed by all packages. - - Plugin objects for the SBMLDocument element must be this class or - a derived class of this class. Package developers should use - this class as-is if only 'required' attribute is added in - the SBMLDocument element by their packages. Otherwise, - developers must implement a derived class of this class and - use that class as the plugin object for the SBMLDocument element. -"; - - -%feature("docstring") SBMLDocumentPlugin::SBMLDocumentPlugin " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLDocumentPlugin(string &uri, string &prefix, - SBMLNamespacessbmlns) - - Constructor - - Parameter 'uri' is the URI of package Parameter 'prefix' is the - prefix for the given package Parameter 'sbmlns' is the - SBMLNamespaces object for the package - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLDocumentPlugin(SBMLDocumentPlugin orig) - - Copy constructor. Creates a copy of this object. -"; - - -%feature("docstring") SBMLDocumentPlugin::clone " - Creates and returns a deep copy of this SBMLDocumentPlugin object. - - Returns a (deep) copy of this object -"; - - -%feature("docstring") SBMLDocumentPlugin::setRequired " - Sets the bool value of 'required' attribute of corresponding package - in SBMLDocument element. - - Parameter 'value' is the bool value of 'required' attribute of - corresponding package in SBMLDocument element. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE -"; - - -%feature("docstring") SBMLDocumentPlugin::getRequired " - Returns the bool value of 'required' attribute of corresponding - package in SBMLDocument element. - - Returns the bool value of 'required' attribute of corresponding - package in SBMLDocument element. -"; - - -%feature("docstring") SBMLDocumentPlugin::isSetRequired " - Predicate returning True or False depending on whether this - SBMLDocumentPlugin's 'required' attribute has been set. - - Returns True if the 'required' attribute of this SBMLDocument has - been set, False otherwise. -"; - - -%feature("docstring") SBMLDocumentPlugin::unsetRequired " - Unsets the value of the 'required' attribute of this - SBMLDocumentPlugin. - - Returns integer value indicating success/failure of the function. - @~ The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_OPERATION_FAILED -"; - - -%feature("docstring") SBMLDocumentPlugin::isFlatteningImplemented " - Internal implementation method. -"; - - -%feature("docstring") SBMLDocumentPlugin::checkConsistency " - Internal implementation method. -"; - - -%feature("docstring") SBMLExtension " - @ingroup Core The core component of SBML's package extension. - - SBMLExtension class (abstract class) is a core component of package - extension which needs to be extended by package developers. The - class provides functions for getting common attributes of package - extension (e.g., package name, package version, and etc.), - functions for adding (registering) each instantiated - SBasePluginCreator object, and a static function (defined in each - SBMLExtension extended class) for initializing/registering the - package extension when the library of the package is loaded. - - How to implement an SBMLExtension extended class for each package - extension - ====================================================================== - - Package developers must implement an SBMLExtension extended class for - their packages (e.g. GroupsExtension class is implemented for groups - extension). The extended class is implemented based on the following - steps: - - (NOTE: 'src/pacakges/groups/extension/GroupsExtension.{h,cpp}' - and 'src/pacakges/layout/extension/LayoutExtension.{h,cpp}' are - example files in which SBMLExtension derived classes are implemented) - - <ol> - - * Define the following static functions in the extended class: - (examples of groups extension are shown respectively) <ol> - - * A string of package name (label) (The function name must be - 'getPackageName'.) - - string GroupsExtension.getPackageName () - { - static string pkgName = \'groups\'; - return pkgName; - } - </li> - - * Methods returning an integer of Default SBML level, - version, and package version (The method names must be - 'getDefaultLevel()', 'getDefaultVersion()', and - 'getDefaultPackageVersion()' respectively.) - - long GroupsExtension.getDefaultLevel() - { - return 3; - } - long GroupsExtension.getDefaultVersion() - { - return 1; - } - long GroupsExtension.getDefaultPackageVersion() - { - return 1; - } - </li> - - * Methods returning Strings that represent the URI of packages - - string GroupsExtension.getXmlnsL3V1V1 () - { - static string xmlns = \'http://www.sbml.org/sbml/level3/version1/groups/version1\'; - return xmlns; - } - @endverbatim - </li> - <li> <p>Strings that represent the other URI needed in this package (if any) </p> - </li> - </ol> - </li> - - <li> Override the following pure virtual functions - <ul> - <li> <code>virtual string getName () const =0</code>. This function returns the name of the package (e.g., \'layout\', \'groups\'). </li> - <li> <code>virtual long getLevel (string &uri) const =0</code>. This function returns the SBML level with the given URI of this package. </li> - <li> <code>virtual long getVersion (string &uri) const =0</code>. This function returns the SBML version with the given URI of this package. </li> - <li> <code>virtual long getPackageVersion (string &uri) const =0</code>. This function returns the package version with the given URI of this package.</li> - <li> <code>virtual long getURI (long sbmlLevel, long sbmlVersion, long pkgVersion) const =0</code>. - This function returns the URI (namespace) of the package corresponding to the combination of the given sbml level, sbml version, and pacakege version</li> - <li> <code>virtual SBMLExtension clone () const = 0</code>. This function creates and returns a deep copy of this derived object.</li> - </ul> - <p>For example, the above functions are overridden in the groups - package (\'src/packages/groups/extension/GroupsExtension.cpp\') as follows:</p> - @verbatim - string - GroupsExtension.getName() const - { - return getPackageName(); - } - - long - GroupsExtension.getLevel() const - { - if (uri == getXmlnsL3V1V1()) - { - return 3; - } - - return 0; - } - - long - GroupsExtension.getVersion() const - { - if (uri == getXmlnsL3V1V1()) - { - return 1; - } - - return 0; - } - - long - GroupsExtension.getPackageVersion() const - { - if (uri == getXmlnsL3V1V1()) - { - return 1; - } - - return 0; - } - - string - GroupsExtension.getURI() const - { - if (sbmlLevel == 3) - { - if (sbmlVersion == 1) - { - if (pkgVersion == 1) - { - return getXmlnsL3V1V1(); - } - } - } - - static string empty = \'\'; - - return empty; - } - - GroupsExtension* - GroupsExtension.clone () const - { - return new GroupsExtension(*this); - } - - Constructor, copy Constructor, and destructor also must be overridden - if additional data members are defined in the derived class. - - </li> - - * Define typedef and template instantiation code for the package - specific SBMLExtensionNamespaces template class - - <ol> - - * typedef for the package specific SBMLExtensionNamespaces - template class For example, the typedef for GroupsExtension - (defined in the groups package) is implemented in GroupsExtension.h - as follows: - - // GroupsPkgNamespaces is derived from the SBMLNamespaces class and used when creating an object of - // SBase derived classes defined in groups package. - typedef SBMLExtensionNamespaces<GroupsExtension> GroupsPkgNamespaces; - </li> - - * template instantiation code for the above typedef definition in - the implementation file (i.e., *.cpp file). For example, the - template instantiation code for GroupsExtension is implemented in - GroupsExtension.cpp as follows: - - // Instantiate SBMLExtensionNamespaces<GroupsExtension> (GroupsPkgNamespaces) for DLL. - template class LIBSBML_EXTERN SBMLExtensionNamespaces<GroupsExtension>; - - </li> </ol> - - The SBMLExtensionNamespaces template class is a derived class of - SBMLNamespaces and can be used as an argument of constructors - of SBase derived classes defined in the package extensions. For - example, a GroupsPkgNamespaces object can be used when creating a - group object as follows: </P> - - GroupPkgNamespaces gpns(3,1,1); // The arguments are SBML Level, SBML Version, and Groups Package Version. - - Group g = new Group(&gpns); // Creates a group object of L3V1 Groups V1. - - Also, the GroupsPkgNamespaces object can be used when creating an - SBMLDocument object with the groups package as follows: - - GroupsPkgNamespaces gpns(3,1,1); - SBMLDocument doc; - - doc = new SBMLDocument(&gnps); // Creates an SBMLDocument of L3V1 with Groups V1. - - </li> - - * Override the following pure virtual function which returns the - SBMLNamespaces derived object - - virtual SBMLNamespaces getSBMLExtensionNamespaces (string &uri) const =0 - For example, the function is overridden in - GroupsExtension class as follows: - - SBMLNamespaces - GroupsExtension.getSBMLExtensionNamespaces() const - { - GroupsPkgNamespaces* pkgns = None; - if ( uri == getXmlnsL3V1V1()) - { - pkgns = new GroupsPkgNamespaces(3,1,1); - } - return pkgns; - } - </li> - - * Define an enum type for representing the typecode of elements - (SBase extended classes) defined in the package extension - - For example, SBMLGroupsTypeCode_t for groups package is defined - in GroupsExtension.h as follows: - - typedef enum - { - SBML_GROUPS_GROUP = 200 - , SBML_GROUPS_MEMBER = 201 - } SBMLGroupsTypeCode_t; - @endverbatim - - <p> <em>SBML_GROUPS_GROUP</em> corresponds to the Group class (<group>) - and <em>SBML_GROUPS_MEMBER</em> corresponds to the Member (<member>) class, respectively. - - <p> Similarly, SBMLLayoutTypeCode_t - for layout package is defined in LayoutExtension.h as follows: </p> - - @verbatim - typedef enum - { - SBML_LAYOUT_BOUNDINGBOX = 100 - , SBML_LAYOUT_COMPARTMENTGLYPH = 101 - , SBML_LAYOUT_CUBICBEZIER = 102 - , SBML_LAYOUT_CURVE = 103 - , SBML_LAYOUT_DIMENSIONS = 104 - , SBML_LAYOUT_GRAPHICALOBJECT = 105 - , SBML_LAYOUT_LAYOUT = 106 - , SBML_LAYOUT_LINESEGMENT = 107 - , SBML_LAYOUT_POINT = 108 - , SBML_LAYOUT_REACTIONGLYPH = 109 - , SBML_LAYOUT_SPECIESGLYPH = 110 - , SBML_LAYOUT_SPECIESREFERENCEGLYPH = 111 - , SBML_LAYOUT_TEXTGLYPH = 112 - } SBMLLayoutTypeCode_t; - - These enum values are returned by corresponding getTypeCode() - functions. (e.g. SBML_GROUPS_GROUP is returned in - Group.getTypeCode()) - - The value of each typecode can be duplicated between those of - different packages (In the above SBMLayoutTypeCode_t and - SBMLGroupsTypeCode_t types, unique values are assigned to enum - values, but this is not mandatory.) - - Thus, to distinguish the typecodes of different packages, not - only the return value of getTypeCode() function but also that of - getPackageName() function should be checked as follows: - - void example (SBasesb) - { - 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: - .... - } - } - else if (pkgName == \'groups\') { - switch (sb->getTypeCode()) { - case SBML_GROUPS_GROUP: - .... - break; - case SBML_GROUPS_MEMBER: - .... - } - } - ... - } - - </li> - - * Override the following pure virtual function which returns a - string corresponding to the given typecode: - - virtual string SBMLExtension.getStringFromTypeCode() const; - @endverbatim - - <p> For example, the function for groups extension is implemented as follows: </p> - @verbatim - static - string SBML_GROUPS_TYPECODE_STRINGS[] = - { - \'Group\' - , \'Member\' - }; - - string - GroupsExtension.getStringFromTypeCode() const - { - int min = SBML_GROUPS_GROUP; - int max = SBML_GROUPS_MEMBER; - - if ( typeCode < min || typeCode > max) - { - return \'(Unknown SBML Groups Type)\'; - } - - return SBML_GROUPS_TYPECODE_STRINGS[typeCode - min]; - } - @endverbatim - - </li> - - <li> Implements a \'static void init()\' function in the derived class - - <p> In the init() function, initialization code which creates an instance of - the derived class and registering code which registers the instance to - SBMLExtensionRegistry class are implemented. - </p> - - For example, the init() function for groups package is implemented as follows: - @verbatim - void - GroupsExtension.init() - { - //------------------------------------------------------------------------- - // - // 1. Checks if the groups pacakge has already been registered. - // - //------------------------------------------------------------------------- - - if (SBMLExtensionRegistry.getInstance().isRegistered(getPackageName())) - { - // do nothing; - return; - } - - //------------------------------------------------------------------------- - // - // 2. Creates an SBMLExtension derived object. - // - //------------------------------------------------------------------------- - - GroupsExtension groupsExtension; - - //------------------------------------------------------------------------------------- - // - // 3. Creates SBasePluginCreatorBase derived objects required for this - // extension. The derived classes can be instantiated by using the following - // template class. - // - // temaplate<class SBasePluginType> class SBasePluginCreator - // - // The constructor of the creator class has two arguments: - // - // (1) SBaseExtensionPoint : extension point to which the plugin object connected - // (2) std::vector<string> : a std::vector object that contains a list of URI - // (package versions) supported by the plugin object. - // - // For example, two plugin objects (plugged in SBMLDocument and Model elements) are - // required for the groups extension. - // - // Since only \'required\' attribute is used in SBMLDocument by the groups package, and - // the \'required\' flag must always be \'false\', the existing - // SBMLDocumentPluginNotRequired class can be used as-is for the plugin. - // - // Since the lists of supported package versions (currently only L3V1-groups-V1 supported ) - // are equal in the both plugin objects, the same vector object is given to each - // constructor. - // - //--------------------------------------------------------------------------------------- - - std::vector<string> packageURIs; - packageURIs.push_back(getXmlnsL3V1V1()); - - SBaseExtensionPoint sbmldocExtPoint(\'core\',SBML_DOCUMENT); - SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); - - SBasePluginCreator<SBMLDocumentPluginNotRequired, GroupsExtension> sbmldocPluginCreator(sbmldocExtPoint,packageURIs); - SBasePluginCreator<GroupsModelPlugin, GroupsExtension> modelPluginCreator(modelExtPoint,packageURIs); - - //-------------------------------------------------------------------------------------- - // - // 3. Adds the above SBasePluginCreatorBase derived objects to the SBMLExtension derived object. - // - //-------------------------------------------------------------------------------------- - - groupsExtension.addSBasePluginCreator(&sbmldocPluginCreator); - groupsExtension.addSBasePluginCreator(&modelPluginCreator); - - //------------------------------------------------------------------------- - // - // 4. Registers the SBMLExtension derived object to SBMLExtensionRegistry - // - //------------------------------------------------------------------------- - - int result = SBMLExtensionRegistry.getInstance().addExtension(&groupsExtension); - - if (result != LIBSBML_OPERATION_SUCCESS) - { - std::cerr << \'[Error] GroupsExtension.init() failed.\' << std::endl; - } - } - - </li> - - * Instantiate a global SBMLExtensionRegister variable in appropriate - implementation file - - For example, the global variable for the groups extension is - instantiated in GroupsExtension.cpp as follows: - - static SBMLExtensionRegister<GroupsExtension> groupsExtensionRegister; - The init() function is invoked when the global variable - is instantiated, by which initialization and registering the - package extension are performed. </li> - - </ol> -"; - - -%feature("docstring") getNumOfSBasePlugins " - Internal implementation method. -"; - - -%feature("docstring") getNumOfSupportedPackageURI " - Internal implementation method. -"; - - -%feature("docstring") isSupported " - Internal implementation method. -"; - - -%feature("docstring") getSupportedPackageURI " - Internal implementation method. -"; - - -%feature("docstring") clone " - Internal implementation method. -"; - - -%feature("docstring") getName " - Internal implementation method. -"; - - -%feature("docstring") getURI " - Internal implementation method. -"; - - -%feature("docstring") getLevel " - Internal implementation method. -"; - - -%feature("docstring") getVersion " - Internal implementation method. -"; - - -%feature("docstring") getPackageVersion " - Internal implementation method. -"; - - -%feature("docstring") getStringFromTypeCode " - Internal implementation method. -"; - - -%feature("docstring") getSBMLExtensionNamespaces " - Internal implementation method. -"; - - -%feature("docstring") setEnabled " - Internal implementation method. -"; - - -%feature("docstring") isEnabled " - Internal implementation method. -"; - - -%feature("docstring") removeL2Namespaces " - Internal implementation method. -"; - - -%feature("docstring") addL2Namespaces " - Internal implementation method. -"; - - -%feature("docstring") enableL2NamespaceForDocument " - Internal implementation method. -"; - - -%feature("docstring") isInUse " - Internal implementation method. -"; - - -%feature("docstring") getErrorTableIndex " - Internal implementation method. -"; - - -%feature("docstring") SBMLExtensionException::SBMLExtensionException " - constructor -"; - - -%feature("docstring") SBMLExtensionNamespaces " - @ingroup Core Class to store level, version and namespace - information of SBML extension package. -"; - - -%feature("docstring") SBMLExtensionNamespaces::SBMLExtensionNamespaces " - Copy constructor; creates a copy of a SBMLExtensionNamespaces. - - Parameter 'orig' is the SBMLExtensionNamespaces instance to copy. -"; - - -%feature("docstring") SBMLExtensionRegistry " - @ingroup Core Registry class in which extension packages are - registered. -"; - - -%feature("docstring") SBMLExtensionRegistry::getInstance " - Returns an instance (singleton) of the SBMLExtensionRegistry class. - This function needs to be invoked when manipulating the - SBMLExtensionRegistry class. - - Returns the instance of the SBMLExtensionRegistry object. -"; - - -%feature("docstring") SBMLExtensionRegistry::addExtension " - Add the given SBMLExtension to this SBMLExtensionRegistry. - - Parameter 'ext' is the SBMLExtension object to be added. - - Returns integer value indicating success/failure of the function. - The possible values returned by this function are: - - * libsbml.LIBSBML_OPERATION_SUCCESS - - * libsbml.LIBSBML_PKG_CONFLICT - - * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE -"; - - -%feature("docstring") SBMLExtensionRegistry::getExtension " - Returns an SBMLExtension object with the given package URI or package - name (string). - - Parameter 'package' is the URI or name of the package extension - - Returns a clone of the SBMLExtension object with the given package - URI or name. The returned extension is to be freed (i.e.: - deleted) by the caller! -"; - - -%feature("docstring") SBMLExtensionRegistry::removeL2Namespaces " - Remove all L2 Extension namespaces from the namespace list. This will - call all overriden SBMLExtension::removeL2Namespaces methods. -"; - - -%feature("docstring") SBMLExtensionRegistry::addL2Namespaces " - adds all L2 Extension namespaces to the namespace list. This will - call all overriden SBMLExtension::addL2Namespaces methods. -"; - - -%feature("docstring") SBMLExtensionRegistry::enableL2NamespaceForDocument " - Enables all extensions that support serialization / deserialization - with SBML Annotations. -"; - - -%feature("docstring") SBMLExtensionRegistry::disableUnusedPackages " - Goes through all extensions in the list of plugins of the given - document and disables all plugins that are not being used. -"; - - -%feature("docstring") SBMLExtensionRegistry::disablePackage " - Disables the package with the given URI / name. -"; - - -%feature("docstring") SBMLExtensionRegistry::getNumExtension " - Returns the number of SBMLExtension with the given extension point. - - Parameter 'extPoint' is the SBaseExtensionPoint - - Returns the number of SBMLExtension with the given extension point. -"; - - -%feature("docstring") SBMLExtensionRegistry::setEnabled " - Enable/disable the package with the given uri. - - Parameter 'uri' is the URI of the target package. Parameter - 'isEnabled' is the bool value corresponding to enabled (true) or - disabled (false) - - Returns false will be returned if the given bool value is false or - the given package is not registered, otherwise true will be - returned. -"; - - -%feature("docstring") SBMLExtensionRegistry::isEnabled " - Checks if the extension with the given URI is enabled (true) or - disabled (false) - - Parameter 'uri' is the URI of the target package. - - Returns false will be returned if the given package is disabled or - not registered, otherwise true will be returned. -"; - - -%feature("docstring") SBMLExtensionRegistry::isRegistered " - Checks if the extension with the given URI is registered (true) or - not (false) - - Parameter 'uri' is the URI of the target package. - - Returns true will be returned if the package with the given URI is - registered, otherwise false will be returned. -"; - - -%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageNames " - Returns a list of registered packages (such as 'layout', 'fbc' or - 'comp') the list contains char* strings and has to be freed by the - caller. - - Returns the names of the registered packages in a list -"; - - -%feature("docstring") SBMLExtensionRegistry::getNumRegisteredPackages " - Returns the number of registered packages. - - Returns the number of registered packages. -"; - - -%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageName " - Returns the registered package name at the given index - - Parameter 'index' is zero based index of the package name to return - - Returns the package name with the given index or None -"; - - -%feature("docstring") SBMLExtensionRegistry::SBMLExtensionRegistry " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLExtensionRegistry() - - Returns the registered package name at the given index - - Parameter 'index' is zero based index of the package name to return - - Returns the package name with the given index or None - - ______________________________________________________________________ - Method variant with the following signature: - - SBMLExtensionRegistry(SBMLExtensionRegistry orig) - - Returns the registered package name at the given index - - Parameter 'index' is zero based index of the package name to return - - Returns the package name with the given index or None -"; - - -%feature("docstring") OStream " - Wrapper class for the C++ standard streams cout, cerr, and clog. - - A few libSBML methods accept an argument for indicating where to send - text string output. An example is the SBMLDocument.printErrors() - method. However, the methods use C++ style streams and not Java - stream objects. The OStream object exists to bridge the Java and - underlying native implementation. It is a simple wrapper around the - underlying stream object and provides a few basic methods for - manipulating it. -"; - - -%feature("docstring") OFStream " - Wrapper class for the C++ standard file stream ofstream. - - The C++ ofstream ('output file stream') provides an interface for - writing data to files as output streams. This class, OFStream, - wraps the C++ ofstream and provides an OStream interface to it. The - file to be associated with the stream can be specified as a - parameter to the constructors in this class. - - This class may be useful because some libSBML methods accept an - argument for indicating where to send text string output. An - example is the SBMLDocument.printErrors() method. The methods use - C++ style streams and not Java stream objects. The OStream object - exists to bridge the Java and underlying native implementation. It - is a simple wrapper around the underlying stream object and provides - a few basic methods for manipulating it. -"; - - -%feature("docstring") OStringStream " - Wrapper class for the C++ standard stream ostringstream. - - The C++ ostringstream ('output string stream class') provides an - interface to manipulating strings as if they were output streams. - This class class, OStringStream, wraps the ostringstream and - provides an OStream interface to it. - - This class may be useful because some libSBML methods accept an - argument for indicating where to send text string output. An - example is the SBMLDocument.printErrors() method. The methods use - C++ style streams and not Java stream objects. The OStream object - exists to bridge the Java and underlying native implementation. It - is a simple wrapper around the underlying stream object and provides - a few basic methods for manipulating it. -"; - - -%feature("docstring") OStream::OStream " - Creates a new OStream object with one of standard output stream - objects. - - Parameter 'sot' is a value from the StdOSType enumeration(COUT, CERR, - or CLOG) indicating the type of stream to create. -"; - - -%feature("docstring") OStream::get_ostream " - Returns the stream object. - - Returns the stream object -"; - - -%feature("docstring") OStream::endl " - Writes an end-of-line character on this tream. -"; - - -%feature("docstring") OFStream::OFStream " - Creates a new OFStream object for a file. - - This opens the given file 'filename' with the 'is_append' flag - (default is false), and creates an OFStream object instance that - associates the file's content with an OStream object. - - Parameter 'filename' is the name of the file to open Parameter - 'is_append' is whether to open the file for appending (default: - false, meaning overwrite the content instead) - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. -"; - - -%feature("docstring") OFStream::open " - Opens a file and associates this stream object with it. - - This method opens a given file 'filename' with the given 'is_append' - flag (whose default value is false), and associates this stream - object with the file's content. - - Parameter 'filename' is the name of the file to open Parameter - 'is_append' is whether to open the file for appending (default: - false, meaning overwrite the content instead) - - Documentation note: The native C++ implementation of this method - defines a default argument value. In the documentation generated for - different libSBML language bindings, you may or may not see - corresponding arguments in the method declarations. For example, in - Java and C#, a default argument is handled by declaring two separate - methods, with one of them having the argument and the other one - lacking the argument. However, the libSBML documentation will be - identical for both methods. Consequently, if you are reading this - and do not see an argument even though one is described, please look - for descriptions of other variants of this method near where this - one appears in the documentation. -"; - - -%feature("docstring") OFStream::close " - Closes the file currently associated with this stream object. -"; - - -%feature("docstring") OFStream::is_open " - Returns true if this stream object is currently associated with a - file. - - Returns true if the stream object is currently associated with a - file, false otherwise -"; - - -%feature("docstring") OStringStream::OStringStream " - Creates a new OStringStream object -"; - - -%feature("docstring") OStringStream::str " - This method has multiple variants that differ in the arguments they - accept. Each is described separately below. - - ______________________________________________________________________ - Method variant with the following signature: - - str() - - Returns the copy of the string object currently assosiated with - this ostringstream buffer. - - Returns a copy of the string object for this stream - - ______________________________________________________________________ - Method variant with the following signature: - - str(string s) - - Sets string 's' to the string object currently assosiated with this - stream buffer. - - Parameter 's' is the string to write to this stream -"; - - +%feature("docstring") getLibSBMLVersion " + Returns the version number of this copy of libSBML as an integer. + + Returns the libSBML version as an integer; version 1.2.3 becomes + 10203. +"; + + +%feature("docstring") getLibSBMLDottedVersion " + Returns the version number of this copy of libSBML as a string. + + Returns the libSBML version as a string; version 1.2.3 becomes + '1.2.3'. + + See also getLibSBMLVersionString(). +"; + + +%feature("docstring") getLibSBMLVersionString " + Returns the version number of this copy of libSBML as a string + without periods. + + Returns the libSBML version as a string: version 1.2.3 becomes + '10203'. + + See also getLibSBMLDottedVersion(). +"; + + +%feature("docstring") SBMLReader " + @ingroup Core Methods for reading SBML from files and text strings. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The SBMLReader class provides the main interface for reading SBML + content from files and strings. The methods for reading SBML all + return an SBMLDocument object representing the results. + + In the case of failures (such as if the SBML contains errors or a + file cannot be read), the errors will be recorded with the + SBMLErrorLog object kept in the SBMLDocument returned by SBMLReader. + Consequently, immediately after calling a method on SBMLReader, + callers should always check for errors and warnings using the + methods for this purpose provided by SBMLDocument. + + For convenience as well as easy access from other languages besides + C++, this file also defines two global functions, + libsbml.readSBML() and libsbml.readSBMLFromString(). They are + equivalent to creating an SBMLReader object and then calling the + SBMLReader.readSBML() or SBMLReader.readSBMLFromString() methods, + respectively. + + Support for reading compressed files + ====================================================================== + + LibSBML provides support for reading (as well as writing) compressed + SBML files. The process is transparent to the calling application + -- the application does not need to do anything deliberate to invoke + the functionality. If a given SBML filename ends with an extension + for the gzip, zip or bzip2 compression formats (respectively, .gz, + .zip, or .bz2), then the methods SBMLReader.readSBML() and + SBMLWriter.writeSBML() will automatically decompress and compress + the file while writing and reading it. If the filename has no such + extension, it will be read and written uncompressed as normal. + + The compression feature requires that the zlib (for gzip and zip + formats) and/or bzip2 (for bzip2 format) be available on the system + running libSBML, and that libSBML was configured with their support + compiled-in. Please see the libSBML installation instructions @~ for + more information about this. The methods hasZlib()@~ and + hasBzip2()@~ can be used by an application to query at run-time + whether support for the compression libraries is available in the + present copy of libSBML. + + Support for compression is not mandated by the SBML standard, but + applications may find it helpful, particularly when large SBML models + are being communicated across data links of limited bandwidth. +"; + + +%feature("docstring") SBMLReader::SBMLReader " + Creates a new SBMLReader and returns it. + + The libSBML SBMLReader objects offer methods for reading SBML in XML + form from files and text strings. +"; + + +%feature("docstring") SBMLReader::readSBML " + Reads an SBML document from a file. + + This method is identical to SBMLReader.readSBMLFromFile(). + + If the file named 'filename' does not exist or its content is not + valid SBML, one or more errors will be logged with the SBMLDocument + object returned by this method. Callers can use the methods on + SBMLDocument such as SBMLDocument.getNumErrors() and + SBMLDocument.getError() to get the errors. The object returned by + SBMLDocument.getError() is an SBMLError object, and it has methods to + get the error code, category, and severity level of the problem, as + well as a textual description of the problem. The possible severity + levels range from informational messages to fatal errors; see the + documentation for SBMLError for more information. + + If the file 'filename' could not be read, the file-reading error will + appear first. The error code @~ can provide a clue about what + happened. For example, a file might be unreadable (either because + it does not actually exist or because the user does not have the + necessary access priviledges to read it) or some sort of file + operation error may have been reported by the underlying operating + system. Callers can check for these situations using a program + fragment such as the following: + + reader = SBMLReader() + doc = reader.readSBMLFromFile(filename) + + if doc.getNumErrors() > 0: + if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: + # Handle case of unreadable file here. + elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: + # Handle case of other file error here. + else: + # Handle other error cases here. + @~ + + If the given filename ends with the suffix '.gz' (for example, + 'myfile.xml.gz'), the file is assumed to be compressed in gzip + format and will be automatically decompressed upon reading. + Similarly, if the given filename ends with '.zip' or '.bz2', the + file is assumed to be compressed in zip or bzip2 format + (respectively). Files whose names lack these suffixes will be read + uncompressed. Note that if the file is in zip format but the + archive contains more than one file, only the first file in the + archive will be read and the rest ignored. + + To read a gzip/zip file, libSBML needs to be configured and linked + with the zlib library at compile time. It also needs to be linked + with the bzip2 library to read files in bzip2 format. (Both of these + are the default configurations for libSBML.) Errors about unreadable + files will be logged if a compressed filename is given and libSBML + was not linked with the corresponding required library. + + Parameter 'filename' is the name or full pathname of the file to be + read. + + Returns a pointer to the SBMLDocument created from the SBML content. + + Note: + + LibSBML versions 2.x and later versions behave differently in error + handling in several respects. One difference is how early some + errors are caught and whether libSBML continues processing a file in + the face of some early errors. In general, libSBML versions after + 2.x stop parsing SBML inputs sooner than libSBML version 2.x in the + face of XML errors, because the errors may invalidate any further + SBML content. For example, a missing XML declaration at the + beginning of the file was ignored by libSBML 2.x but in version 3.x + and later, it will cause libSBML to stop parsing the rest of the + input altogether. While this behavior may seem more severe and + intolerant, it was necessary in order to provide uniform behavior + regardless of which underlying XML parser (Expat, Xerces, libxml2) + is being used by libSBML. The XML parsers themselves behave + differently in their error reporting, and sometimes libSBML has to + resort to the lowest common denominator. + + See also SBMLError. +"; + + +%feature("docstring") SBMLReader::readSBMLFromFile " + Reads an SBML document from a file. + + This method is identical to SBMLReader.readSBML(). + + If the file named 'filename' does not exist or its content is not + valid SBML, one or more errors will be logged with the SBMLDocument + object returned by this method. Callers can use the methods on + SBMLDocument such as SBMLDocument.getNumErrors() and + SBMLDocument.getError() to get the errors. The object returned by + SBMLDocument.getError() is an SBMLError object, and it has methods to + get the error code, category, and severity level of the problem, as + well as a textual description of the problem. The possible severity + levels range from informational messages to fatal errors; see the + documentation for SBMLError for more information. + + If the file 'filename' could not be read, the file-reading error will + appear first. The error code @~ can provide a clue about what + happened. For example, a file might be unreadable (either because + it does not actually exist or because the user does not have the + necessary access priviledges to read it) or some sort of file + operation error may have been reported by the underlying operating + system. Callers can check for these situations using a program + fragment such as the following: + + reader = SBMLReader() + doc = reader.readSBMLFromFile(filename) + + if doc.getNumErrors() > 0: + if doc.getError(0).getErrorId() == libsbml.XMLFileUnreadable: + # Handle case of unreadable file here. + elif doc.getError(0).getErrorId() == libsbml.XMLFileOperationError: + # Handle case of other file error here. + else: + # Handle other error cases here. + @~ + + If the given filename ends with the suffix '.gz' (for example, + 'myfile.xml.gz'), the file is assumed to be compressed in gzip + format and will be automatically decompressed upon reading. + Similarly, if the given filename ends with '.zip' or '.bz2', the + file is assumed to be compressed in zip or bzip2 format + (respectively). Files whose names lack these suffixes will be read + uncompressed. Note that if the file is in zip format but the + archive contains more than one file, only the first file in the + archive will be read and the rest ignored. + + To read a gzip/zip file, libSBML needs to be configured and linked + with the zlib library at compile time. It also needs to be linked + with the bzip2 library to read files in bzip2 format. (Both of these + are the default configurations for libSBML.) Errors about unreadable + files will be logged if a compressed filename is given and libSBML + was not linked with the corresponding required library. + + Parameter 'filename' is the name or full pathname of the file to be + read. + + Returns a pointer to the SBMLDocument created from the SBML content. + + Note: + + LibSBML versions 2.x and later versions behave differently in error + handling in several respects. One difference is how early some + errors are caught and whether libSBML continues processing a file in + the face of some early errors. In general, libSBML versions after + 2.x stop parsing SBML inputs sooner than libSBML version 2.x in the + face of XML errors, because the errors may invalidate any further + SBML content. For example, a missing XML declaration at the + beginning of the file was ignored by libSBML 2.x but in version 3.x + and later, it will cause libSBML to stop parsing the rest of the + input altogether. While this behavior may seem more severe and + intolerant, it was necessary in order to provide uniform behavior + regardless of which underlying XML parser (Expat, Xerces, libxml2) + is being used by libSBML. The XML parsers themselves behave + differently in their error reporting, and sometimes libSBML has to + resort to the lowest common denominator. + + See also SBMLError, SBMLDocument. +"; + + +%feature("docstring") SBMLReader::readSBMLFromString " + Reads an SBML document from the given XML string. + + This method is flexible with respect to the presence of an XML + declaration at the beginning of the string. In particular, if the + string in 'xml' does not begin with the XML declaration <?xml + version='1.0' encoding='UTF-8'?>, then this method will + automatically prepend the declaration to 'xml'. + + This method will log a fatal error if the content given in the + parameter 'xml' is not SBML. See the method documentation for + SBMLReader.readSBML() for an example of code for testing the + returned error code. + + Parameter 'xml' is a string containing a full SBML model + + Returns a pointer to the SBMLDocument created from the SBML content. + + See also SBMLReader.readSBML(). +"; + + +%feature("docstring") SBMLReader::hasZlib " + Static method; returns True if this copy of libSBML supports + gzip</I> and zip format compression. + + Returns True if libSBML has been linked with the zlib library, False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLReader), and the other will be a standalone + top-level function with the name SBMLReader_hasZlib(). They are + functionally identical. @~ + + @see SBMLReader.hasBzip2() @~ +"; + + +%feature("docstring") SBMLReader::hasBzip2 " + Static method; returns True if this copy of libSBML supports bzip2 + format compression. + + Returns True if libSBML is linked with the bzip2 libraries, False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLReader), and the other will be a standalone + top-level function with the name SBMLReader_hasBzip2(). They are + functionally identical. @~ + + @see SBMLReader.hasZlib() @~ +"; + + +%feature("docstring") SBMLReader::readInternal " + Internal implementation method. +"; + + +%feature("docstring") readSBML " + Reads an SBML document from the given file 'filename'. + + If 'filename' does not exist, or it is not an SBML file, an error + will be logged in the error log of the SBMLDocument object returned + by this method. Calling programs can inspect this error log to + determine the nature of the problem. Please refer to the definition + of SBMLDocument for more information about the error reporting + mechanism. + + Returns a pointer to the SBMLDocument read. +"; + + +%feature("docstring") readSBMLFromFile " + Reads an SBML document from the given file 'filename'. + + If 'filename' does not exist, or it is not an SBML file, an error + will be logged in the error log of the SBMLDocument object returned + by this method. Calling programs can inspect this error log to + determine the nature of the problem. Please refer to the definition + of SBMLDocument for more information about the error reporting + mechanism. + + Returns a pointer to the SBMLDocument read. +"; + + +%feature("docstring") readSBMLFromString " + Reads an SBML document from a string assumed to be in XML format. + + If the string does not begin with XML declaration, + + <?xml version=\'1.0\' encoding=\'UTF-8\'?> + + an XML declaration string will be prepended. + + This method will report an error if the given string 'xml' is not + SBML. The error will be logged in the error log of the SBMLDocument + object returned by this method. Calling programs can inspect this + error log to determine the nature of the problem. Please refer to + the definition of SBMLDocument for more information about the error + reporting mechanism. + + Returns a pointer to the SBMLDocument read. +"; + + +%feature("docstring") SBMLWriter " + @ingroup Core Methods for writing SBML to files and text strings. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The SBMLWriter class is the converse of SBMLReader, and provides the + main interface for serializing SBML models into XML and writing the + result to an output stream or to files and text strings. The methods + for writing SBML all take an SBMLDocument object and a destination. + They return a boolean or integer value to indicate success or + failure. + + Support for writing compressed files + ====================================================================== + + LibSBML provides support for writing (as well as reading) compressed + SBML files. The process is transparent to the calling application + -- the application does not need to do anything deliberate to invoke + the functionality. If a given SBML filename ends with an extension + for the gzip, zip or bzip2 compression formats (respectively, + \".gz\", \".zip\", or \".bz2\"), then the methods + SBMLWriter.writeSBML() and SBMLReader.readSBML() will automatically + compress and decompress the file while writing and reading it. If + the filename has no such extension, it will be written and read + uncompressed as normal. + + The compression feature requires that the zlib (for gzip and zip + formats) and/or bzip2 (for bzip2 format) be available on the system + running libSBML, and that libSBML was configured with their support + compiled-in. Please see the libSBML installation instructions@~ for + more information about this. The methods SBMLWriter.hasZlib() and + SBMLWriter.hasBzip2() can be used by an application to query at run- + time whether support for the compression libraries is available in + the present copy of libSBML. + + Support for compression is not mandated by the SBML standard, but + applications may find it helpful, particularly when large SBML models + are being communicated across data links of limited bandwidth. +"; + + +%feature("docstring") SBMLWriter::SBMLWriter " + Creates a new SBMLWriter. + + The libSBML SBMLWriter objects offer methods for writing SBML in XML + form to files and text strings. +"; + + +%feature("docstring") SBMLWriter::setProgramName " + Sets the name of this program, i.e., the program that is about to + write out the SBMLDocument. + + If the program name and version are set (see + SBMLWriter.setProgramVersion()), the following XML comment, intended + for human consumption, will be written at the beginning of the XML + document: + + <!-- Created by <program name> version <program version> + on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> + + If the program name and version are not set at some point before + calling the writeSBML() methods, no such comment is written out. + + Parameter 'name' is the name of this program (where 'this program' + refers to program in which libSBML is embedded, not libSBML itself!) + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also setProgramVersion(). +"; + + +%feature("docstring") SBMLWriter::setProgramVersion " + Sets the version of this program, i.e., the program that is about to + write out the SBMLDocument. + + If the program version and name are set (see + SBMLWriter.setProgramName()), the following XML comment, intended + for human consumption, will be written at the beginning of the + document: + + <!-- Created by <program name> version <program version> + on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> + + If the program version and name are not set at some point before + calling the writeSBML() methods, no such comment is written out. + + Parameter 'version' is the version of this program (where 'this + program' refers to program in which libSBML is embedded, not libSBML + itself!) + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also setProgramName(). +"; + + +%feature("docstring") SBMLWriter::writeSBML " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + writeSBML(SBMLDocument d, string filename) + + Writes the given SBML document to filename. + + If the given filename ends with the suffix \".gz\" (for example, + \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be + written compressed in gzip format. Similarly, if the given filename + ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the + file to be compressed in zip or bzip2 format (respectively). Files + whose names lack these suffixes will be written uncompressed. + Special considerations for the zip format: If the given filename + ends with \".zip\", the file placed in the zip archive will have the + suffix \".xml\" or \".sbml\". For example, the file in the zip + archive will be named \"test.xml\" if the given filename is + \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the + archive will be \"test.sbml\" if the given filename is + \"test.sbml.zip\". + + Parameter 'd' is the SBML document to be written + + Parameter 'filename' is the name or full pathname of the file where + the SBML is to be written. + + Returns True on success and False if the filename could not be + opened for writing. + + Note: + + To write a gzip/zip file, libSBML needs to be configured and linked + with the zlib library at compile time. It also needs to be linked + with the bzip2 library to write files in bzip2 format. (Both of + these are the default configurations for libSBML.) Errors about + unreadable files will be logged and this method will return false if + a compressed filename is given and libSBML was not linked with the + corresponding required library. + + See also setProgramVersion(), setProgramName(), setProgramVersion(), + setProgramName(). +"; + + +%feature("docstring") SBMLWriter::writeToString " + Internal implementation method. +"; + + +%feature("docstring") SBMLWriter::writeSBMLToFile " + Writes the given SBML document to filename. + + If the given filename ends with the suffix \".gz\" (for example, + \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be + written compressed in gzip format. Similarly, if the given filename + ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the + file to be compressed in zip or bzip2 format (respectively). Files + whose names lack these suffixes will be written uncompressed. + Special considerations for the zip format: If the given filename + ends with \".zip\", the file placed in the zip archive will have the + suffix \".xml\" or \".sbml\". For example, the file in the zip + archive will be named \"test.xml\" if the given filename is + \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the + archive will be \"test.sbml\" if the given filename is + \"test.sbml.zip\". + + Parameter 'd' is the SBML document to be written + + Parameter 'filename' is the name or full pathname of the file where + the SBML is to be written. + + Returns True on success and False if the filename could not be + opened for writing. + + Note: + + To write a gzip/zip file, libSBML needs to be configured and linked + with the zlib library at compile time. It also needs to be linked + with the bzip2 library to write files in bzip2 format. (Both of + these are the default configurations for libSBML.) Errors about + unreadable files will be logged and this method will return false if + a compressed filename is given and libSBML was not linked with the + corresponding required library. + + See also setProgramVersion(), setProgramName(). +"; + + +%feature("docstring") SBMLWriter::writeSBMLToString " + Writes the given SBML document to an in-memory string and returns a + pointer to it. + + The string is owned by the caller and should be freed (with free()) + when no longer needed. + + Parameter 'd' is the SBML document to be written + + Returns the string on success and 0 if one of the underlying parser + components fail. + + See also setProgramVersion(), setProgramName(). +"; + + +%feature("docstring") SBMLWriter::hasZlib " + Predicate returning True if this copy of libSBML has been linked + with the zlib library. + + LibSBML supports reading and writing files compressed with either + bzip2 or zip/gzip compression. The facility depends on libSBML + having been compiled with the necessary support libraries. This + method allows a calling program to inquire whether that is the case + for the copy of libSBML it is using. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLWriter), and the other will be a standalone + top-level function with the name SBMLWriter_hasZlib(). They are + functionally identical. @~ + + Returns True if libSBML is linked with zlib, False otherwise. + + @see SBMLWriter.hasBzip2() @~ +"; + + +%feature("docstring") SBMLWriter::hasBzip2 " + Predicate returning True if this copy of libSBML has been linked + with the bzip2 library. + + LibSBML supports reading and writing files compressed with either + bzip2 or zip/gzip compression. The facility depends on libSBML + having been compiled with the necessary support libraries. This + method allows a calling program to inquire whether that is the case + for the copy of libSBML it is using. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLWriter), and the other will be a standalone + top-level function with the name SBMLWriter_hasZlib(). They are + functionally identical. @~ + + Returns True if libSBML is linked with bzip2, False otherwise. + + @see SBMLWriter.hasZlib() @~ +"; + + +%feature("docstring") writeSBML " + Writes the given SBML document 'd' to the file named by 'filename'. + + This function is identical to . + + If the given filename ends with the suffix \".gz\" (for example, + \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be + written compressed in gzip format. Similarly, if the given filename + ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the + file to be compressed in zip or bzip2 format (respectively). Files + whose names lack these suffixes will be written uncompressed. + Special considerations for the zip format: If the given filename + ends with \".zip\", the file placed in the zip archive will have the + suffix \".xml\" or \".sbml\". For example, the file in the zip + archive will be named \"test.xml\" if the given filename is + \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the + archive will be \"test.sbml\" if the given filename is + \"test.sbml.zip\". + + Parameter 'd' is the SBMLDocument object to be written out in XML + format + + Parameter 'filename' is a string giving the path to a file where the + XML content is to be written. + + Returns 1 on success and 0 (zero) if 'filename' could not be + written. Some possible reasons for failure include (a) being unable + to open the file, and (b) using a filename that indicates a + compressed SBML file (i.e., a filename ending in \".zip\" or + similar) when the compression functionality has not been enabled in + the underlying copy of libSBML. + + @~ + + See also SBMLWriter.hasZlib(), SBMLWriter.hasBzip2(). +"; + + +%feature("docstring") writeSBMLToString " + Writes the given SBML document 'd' to an in-memory string and + returns the string. + + This is a convenience function that uses the + SBMLWriter.writeSBMLToString() method internally, yet does not + require the caller to create an SBMLWriter object first. + + Parameter 'd' is an SBMLDocument object to be written out in XML + format + + Returns the string on success and None if one of the underlying + parser components fail. + + @~ +"; + + +%feature("docstring") writeSBMLToFile " + Writes the given SBML document 'd' to the file 'filename'. + + This is a convenience function that uses the + SBMLWriter.writeSBMLToFile() method internally, yet does not require + the caller to create an SBMLWriter object first. + + If the given filename ends with the suffix \".gz\" (for example, + \"myfile.xml.gz\"), libSBML assumes the caller wants the file to be + written compressed in gzip format. Similarly, if the given filename + ends with \".zip\" or \".bz2\", libSBML assumes the caller wants the + file to be compressed in zip or bzip2 format (respectively). Files + whose names lack these suffixes will be written uncompressed. + Special considerations for the zip format: If the given filename + ends with \".zip\", the file placed in the zip archive will have the + suffix \".xml\" or \".sbml\". For example, the file in the zip + archive will be named \"test.xml\" if the given filename is + \"test.xml.zip\" or \"test.zip\". Similarly, the filename in the + archive will be \"test.sbml\" if the given filename is + \"test.sbml.zip\". + + Parameter 'd' is an SBMLDocument object to be written out in XML + format + + Parameter 'filename' is a string giving the path to a file where the + XML content is to be written. + + Returns 1 on success and 0 (zero) if 'filename' could not be + written. Some possible reasons for failure include (a) being unable + to open the file, and (b) using a filename that indicates a + compressed SBML file (i.e., a filename ending in \".zip\" or + similar) when the compression functionality has not been enabled in + the underlying copy of libSBML. + + @~ + + See also SBMLWriter.hasZlib(), SBMLWriter.hasBzip2(). +"; + + +%feature("docstring") SBMLTypeCode_toString " + This method takes an SBML type code and returns a string representing + the code. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns a human readable name for the given SBML type code. + + Note: + + The caller does not own the returned string and is therefore not + allowed to modify it. +"; + + +%feature("docstring") SBase " + @ingroup Core Implementation of SBase, the base class of most SBML + objects. + + Most components in SBML are derived from a single abstract base type, + SBase. In addition to serving as the parent class for most other + classes of objects in SBML, this base type is designed to allow a + modeler or a software package to attach arbitrary information to each + major element or list in an SBML model. + + SBase has an optional subelement called 'notes'. It is intended to + serve as a place for storing optional information intended to be seen + by humans. An example use of the 'notes' element would be to + contain formatted user comments about the model element in which the + 'notes' element is enclosed. There are certain conditions on the + XHTML content permitted inside the 'notes' element; please consult + the SBML specification document corresponding to the SBML Level and + Version of your model for more information about the requirements + for 'notes' content. + + SBase has another optional subelement called 'annotation'. Whereas + the 'notes' element described above is a container for content to be + shown directly to humans, the 'annotation' element is a container + for optional software-generated content not meant to be shown to + humans. The element's content type is XML type 'any', allowing + essentially arbitrary data content. SBML places only a few + restrictions on the organization of the content; these are intended + to help software tools read and write the data as well as help + reduce conflicts between annotations added by different tools. As is + the case with 'notes', it is important to refer to the SBML + specification document corresponding to the SBML Level and Version + of your model for more information about the requirements for + 'annotation' content. + + It is worth pointing out that the 'annotation' element in the + definition of SBase exists in order that software developers may + attach optional application-specific data to the elements in an SBML + model. However, it is important that this facility not be misused. + In particular, it is critical that data essential to a model + definition or that can be encoded in existing SBML elements is not + stored in 'annotation'. Parameter values, functional dependencies + between model elements, etc., should not be recorded as annotations. + It is crucial to keep in mind the fact that data placed in + annotations can be freely ignored by software applications. If such + data affects the interpretation of a model, then software + interoperability is greatly impeded. + + SBML Level 2 introduced an optional SBase attribute named 'metaid' + for supporting metadata annotations using RDF (Resource Description + Format). The attribute value has the data type XML ID, the XML + identifier type, which means each 'metaid' value must be globally + unique within an SBML file. (Importantly, this uniqueness criterion + applies across any attribute with type XML ID, not just the + 'metaid' attribute used by SBML -- something to be aware of if your + application-specific XML content inside the 'annotation' subelement + happens to use XML ID.) The 'metaid' value serves to identify a + model component for purposes such as referencing that component from + metadata placed within 'annotation' subelements. + + Beginning with SBML Level 2 Version 3, SBase also has an optional + attribute named 'sboTerm' for supporting the use of the Systems + Biology Ontology. In SBML proper, the data type of the attribute is + a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit + integer number; libSBML simplifies the representation by only + storing the 'NNNNNNN' integer portion. Thus, in libSBML, the + 'sboTerm' attribute on SBase has data type int, and SBO identifiers + are stored simply as integers. (For convenience, SBase offers + methods for returning both the integer form and a text-string form + of the SBO identifier.) SBO terms are a type of optional + annotation, and each different class of SBML object derived from + SBase imposes its own requirements about the values permitted for + 'sboTerm'. Please consult the SBML Level 2 Version 4 specification + for more information about the use of SBO and the 'sboTerm' + attribute. + + Finally, note that, in the list of methods on SBase, there is no + public constructor because SBase is an abstract class. The + constructors reside in the subclasses derived from SBase. + + Standard format for annotations linking data resources + ====================================================================== + + SBML Level 2 Versions 2, 3 and 4, and Level 3, define a proposed + regular format for encoding two particular categories of annotations: + (a) references to controlled vocabulary terms and database + identifiers which define and describe biological and biochemical + entities in a model; and (b) descriptions of the provenance of a + model, including its author(s) and modification history. +"; + + +%feature("docstring") SBase::accept " + Accepts the given SBMLVisitor for this SBase object. + + Parameter 'v' is the SBMLVisitor instance to be used + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") SBase::clone " + Creates and returns a deep copy of this SBase object. + + Returns a (deep) copy of this SBase object. +"; + + +%feature("docstring") SBase::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the 'id' attribute value of the + object to find. + + Returns pointer to the first element found with the given identifier. +"; + + +%feature("docstring") SBase::getElementByMetaId " + Returns the first child element it can find with a specific 'metaid' + attribute value, or None if no such object is found. + + The optional attribute named \"metaid\", present on every major SBML + component type, is for supporting metadata annotations using RDF + (Resource Description Format). The attribute value has the data type + XML ID, the XML identifier type, which means each \"metaid\" value + must be globally unique within an SBML file. The latter point is + important, because the uniqueness criterion applies across any + attribute with type ID anywhere in the file, not just the \"metaid\" + attribute used by SBML—something to be aware of if your + application-specific XML content inside the \"annotation\" + subelement happens to use the XML ID type. Although SBML only uses + XML ID for the \"metaid\" attribute, callers should be careful if + they use XML ID's in XML portions of a model that are not defined by + SBML, such as in the application-specific content of the + \"annotation\" subelement. + + Parameter 'metaid' is string representing the 'metaid' attribute + value of the object to find. + + Returns pointer to the first element found with the given meta- + identifier. +"; + + +%feature("docstring") SBase::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth. + + Returns a pointer to a List of pointers to all children objects. +"; + + +%feature("docstring") SBase::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML content (if such exists). + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") SBase::renameMetaIdRefs " + Renames all the meta-identifier attributes on this element. + + In SBML, object \"meta\" identifiers are of the XML data type ID; the + SBML object attribute itself is typically named metaid. All + attributes that hold values referring to values of type ID are of + the XML data type IDREF. They are also sometimes informally referred + to as \"metaid refs\", in analogy to the SBML-defined type SIdRef. + + This method works by looking at all meta-identifier attribute values, + comparing the identifiers to the value of 'oldid'. If any matches + are found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") SBase::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") SBase::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") SBase::divideAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") SBase::multiplyAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") SBase::getElementFromPluginsBySId " + Internal implementation method. +"; + + +%feature("docstring") SBase::getElementFromPluginsByMetaId " + Internal implementation method. +"; + + +%feature("docstring") SBase::hasNonstandardIdentifierBeginningWith " + Internal implementation method. +"; + + +%feature("docstring") SBase::prependStringToAllIdentifiers " + Internal implementation method. +"; + + +%feature("docstring") SBase::transformIdentifiers " + Internal implementation method. +"; + + +%feature("docstring") SBase::getAllElementsFromPlugins " + Returns a List of all child SBase objects contained in SBML package + plug-ins. + + SBML Level 3 consists of a Core definition that can be extended via + optional SBML Level 3 packages. A given model may indicate that it + uses one or more SBML packages, and likewise, a software tool may be + able to support one or more packages. LibSBML does not come + preconfigured with all possible packages included and enabled, in + part because not all package specifications have been finalized. To + support the ability for software systems to enable support for the + Level 3 packages they choose, libSBML features a plug-in mechanism. + Each SBML Level 3 package is implemented in a separate code plug-in + that can be enabled by the application to support working with that + SBML package. A given SBML model may thus contain not only objects + defined by SBML Level 3 Core, but also objects created by libSBML + plug-ins supporting additional Level 3 packages. + + This method walks down the list of all SBML Level 3 packages used by + this object and returns all child objects defined by those packages. + + Returns a pointer to a List of pointers to all children objects from + plug-ins. +"; + + +%feature("docstring") SBase::getMetaId " + Returns the value of the 'metaid' attribute of this object. + + The optional attribute named \"metaid\", present on every major SBML + component type, is for supporting metadata annotations using RDF + (Resource Description Format). The attribute value has the data type + XML ID, the XML identifier type, which means each \"metaid\" value + must be globally unique within an SBML file. The latter point is + important, because the uniqueness criterion applies across any + attribute with type ID anywhere in the file, not just the \"metaid\" + attribute used by SBML—something to be aware of if your + application-specific XML content inside the \"annotation\" + subelement happens to use the XML ID type. Although SBML only uses + XML ID for the \"metaid\" attribute, callers should be careful if + they use XML ID's in XML portions of a model that are not defined by + SBML, such as in the application-specific content of the + \"annotation\" subelement. + + Returns the meta-identifier of this SBML object. + + See also isSetMetaId(), setMetaId(). +"; + + +%feature("docstring") SBase::getId " + Internal implementation method. +"; + + +%feature("docstring") SBase::getName " + Internal implementation method. +"; + + +%feature("docstring") SBase::getNotes " + Returns the content of the 'notes' subelement of this object as a + tree of XMLNode objects. + + The optional SBML element named 'notes', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + 'notes' element would be to contain formatted user comments about the + model element in which the 'notes' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for 'notes', allowing users considerable freedom when adding + comments to their models. + + The format of 'notes' elements must be XHTML 1.0. To help verify + the formatting of 'notes' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate SBML specification + document for the Level and Version of their model for more in-depth + explanations. The SBML Level 2 and 3 specifications have + considerable detail about how 'notes' element content must be + structured. + + The 'notes' element content returned by this method will be in XML + form, but libSBML does not provide an object model specifically for + the content of notes. Callers will need to traverse the XML tree + structure using the facilities available on XMLNode and related + objects. For an alternative method of accessing the notes, see + getNotesString(). + + Returns the content of the 'notes' subelement of this SBML object as + a tree structure composed of XMLNode objects. + + See also getNotesString(), isSetNotes(), setNotes(), setNotes(), + appendNotes(), appendNotes(), unsetNotes(), + SyntaxChecker.hasExpectedXHTMLSyntax(). +"; + + +%feature("docstring") SBase::getNotesString " + Returns the content of the 'notes' subelement of this object as a + string. + + The optional SBML element named 'notes', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + 'notes' element would be to contain formatted user comments about the + model element in which the 'notes' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for 'notes', allowing users considerable freedom when adding + comments to their models. + + The format of 'notes' elements must be XHTML 1.0. To help verify + the formatting of 'notes' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate SBML specification + document for the Level and Version of their model for more in-depth + explanations. The SBML Level 2 and 3 specifications have + considerable detail about how 'notes' element content must be + structured. + + For an alternative method of accessing the notes, see getNotes(), + which returns the content as an XMLNode tree structure. Depending on + an application's needs, one or the other method may be more + convenient. + + Returns the content of the 'notes' subelement of this SBML object as + a string. + + See also getNotes(), isSetNotes(), setNotes(), setNotes(), + appendNotes(), appendNotes(), unsetNotes(), + SyntaxChecker.hasExpectedXHTMLSyntax(). +"; + + +%feature("docstring") SBase::getAnnotation " + Returns the content of the 'annotation' subelement of this object as + a tree of XMLNode objects. + + Whereas the SBML 'notes' subelement is a container for content to be + shown directly to humans, the 'annotation' element is a container for + optional software-generated content not meant to be shown to humans. + Every object derived from SBase can have its own value for + 'annotation'. The element's content type is XML type 'any', + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + The annotations returned by this method will be in XML form. LibSBML + provides an object model and related interfaces for certain specific + kinds of annotations, namely model history information and RDF + content. See the ModelHistory, CVTerm and RDFAnnotationParser + classes for more information about the facilities available. + + Returns the annotation of this SBML object as a tree of XMLNode + objects. + + See also getAnnotationString(), isSetAnnotation(), setAnnotation(), + setAnnotation(), appendAnnotation(), appendAnnotation(), + unsetAnnotation(). +"; + + +%feature("docstring") SBase::getAnnotationString " + Returns the content of the 'annotation' subelement of this object as + a character string. + + Whereas the SBML 'notes' subelement is a container for content to be + shown directly to humans, the 'annotation' element is a container for + optional software-generated content not meant to be shown to humans. + Every object derived from SBase can have its own value for + 'annotation'. The element's content type is XML type 'any', + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + The annotations returned by this method will be in string form. + + Returns the annotation of this SBML object as a character string. + + See also getAnnotation(), isSetAnnotation(), setAnnotation(), + setAnnotation(), appendAnnotation(), appendAnnotation(), + unsetAnnotation(). +"; + + +%feature("docstring") SBase::getNamespaces " + Returns a list of the XML Namespaces declared on this SBML document. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in SBML Level 3) packages used in addition to SBML Level 3 Core. + + Returns the XML Namespaces associated with this SBML object + + See also getLevel(), getVersion(). +"; + + +%feature("docstring") SBase::getSBMLDocument " + Returns the SBMLDocument object containing this object instance. + + LibSBML uses the class SBMLDocument as a top-level container for + storing SBML content and data associated with it (such as warnings + and error messages). An SBML model in libSBML is contained inside + an SBMLDocument object. SBMLDocument corresponds roughly to the + class SBML defined in the SBML Level 3 and Level 2 specifications, + but it does not have a direct correspondence in SBML Level 1. (But, + it is created by libSBML no matter whether the model is Level 1, + Level 2 or Level 3.) + + This method allows the caller to obtain the SBMLDocument for the + current object. + + Returns the parent SBMLDocument object of this SBML object. + + See also getParentSBMLObject(), getModel(). +"; + + +%feature("docstring") SBase::getParentSBMLObject " + Returns the parent SBML object containing this object. + + This returns the immediately-containing object. This method is + convenient when holding an object nested inside other objects in an + SBML model. + + Returns the parent SBML object of this SBML object. + + See also getSBMLDocument(), getModel(). +"; + + +%feature("docstring") SBase::getAncestorOfType " + Returns the first ancestor object that has the given SBML type code. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + This method searches the tree of objects that are parents of this + object, and returns the first one that has the given SBML type code. + If the optional argument 'pkgName' is given, it will cause the search + to be limited to the SBML Level 3 package given. + + Parameter 'type' is the SBML type code of the object sought + + Parameter 'pkgName' is (optional) the short name of an SBML Level 3 + package to which the sought-after object must belong + + Returns the ancestor SBML object of this SBML object that corresponds + to the given SBML object type code, or None if no ancestor exists. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") SBase::getSBOTerm " + Returns the integer portion of the value of the 'sboTerm' attribute + of this object. + + Beginning with SBML Level 2 Version 3, objects derived from SBase + have an optional attribute named 'sboTerm' for supporting the use of + the Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a + seven digit integer number; libSBML simplifies the representation by + only storing the 'NNNNNNN' integer portion. Thus, in libSBML, the + 'sboTerm' attribute on SBase has data type int, and SBO identifiers + are stored simply as integers. (For convenience, libSBML offers + methods for returning both the integer form and a text-string form of + the SBO identifier.) + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for 'sboTerm'. Please consult the SBML Level 2 + Version 4 specification for more information about the use of SBO + and the 'sboTerm' attribute. + + Returns the value of the 'sboTerm' attribute as an integer, or -1 if + the value is not set. +"; + + +%feature("docstring") SBase::getSBOTermID " + Returns the string representation of the 'sboTerm' attribute of this + object. + + Beginning with SBML Level 2 Version 3, objects derived from SBase + have an optional attribute named 'sboTerm' for supporting the use of + the Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a + seven digit integer number; libSBML simplifies the representation by + only storing the 'NNNNNNN' integer portion. Thus, in libSBML, the + 'sboTerm' attribute on SBase has data type int, and SBO identifiers + are stored simply as integers. This method returns the entire SBO + identifier as a text string in the form 'SBO:NNNNNNN'. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for 'sboTerm'. Please consult the SBML Level 2 + Version 4 specification for more information about the use of SBO + and the 'sboTerm' attribute. + + Returns the value of the 'sboTerm' attribute as a string (its value + will be of the form 'SBO:NNNNNNN'), or an empty string if the value + is not set. +"; + + +%feature("docstring") SBase::getSBOTermAsURL " + Returns the identifiers.org URL representation of the 'sboTerm' + attribute of this object. + + This method returns the entire SBO identifier as a text string in + the form 'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN'. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for 'sboTerm'. Please consult the SBML Level 2 + Version 4 specification for more information about the use of SBO + and the 'sboTerm' attribute. + + Returns the value of the 'sboTerm' attribute as an identifiers.org + URL (its value will be of the form + 'http://identifiers.org/biomodels.sbo/SBO:NNNNNNN'), or an empty + string if the value is not set. +"; + + +%feature("docstring") SBase::getLine " + Returns the line number on which this object first appears in the XML + representation of the SBML document. + + Returns the line number of this SBML object. + + Note: + + The line number for each construct in an SBML model is set upon + reading the model. The accuracy of the line number depends on the + correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real line number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100 accurate in all situations. (At this + time, libSBML supports the use of libxml2, Expat and Xerces.) + + See also getColumn(). +"; + + +%feature("docstring") SBase::getColumn " + Returns the column number on which this object first appears in the + XML representation of the SBML document. + + Returns the column number of this SBML object. + + Note: + + The column number for each construct in an SBML model is set upon + reading the model. The accuracy of the column number depends on the + correctness of the XML representation of the model, and on the + particular XML parser library being used. The former limitation + relates to the following problem: if the model is actually invalid + XML, then the parser may not be able to interpret the data correctly + and consequently may not be able to establish the real column number. + The latter limitation is simply that different parsers seem to have + their own accuracy limitations, and out of all the parsers supported + by libSBML, none have been 100 accurate in all situations. (At this + time, libSBML supports the use of libxml2, Expat and Xerces.) + + See also getLine(). +"; + + +%feature("docstring") SBase::getModelHistory " + Returns the ModelHistory object, if any, attached to this object. + + Returns the ModelHistory object attached to this object, or None if + none exist. + + Note: + + In SBML Level 2, model history annotations were only permitted on + the Model element. In SBML Level 3, they are permitted on all SBML + components derived from SBase. +"; + + +%feature("docstring") SBase::isSetMetaId " + Predicate returning True if this object's 'metaid' attribute is set. + + The optional attribute named \"metaid\", present on every major SBML + component type, is for supporting metadata annotations using RDF + (Resource Description Format). The attribute value has the data type + XML ID, the XML identifier type, which means each \"metaid\" value + must be globally unique within an SBML file. The latter point is + important, because the uniqueness criterion applies across any + attribute with type ID anywhere in the file, not just the \"metaid\" + attribute used by SBML—something to be aware of if your + application-specific XML content inside the \"annotation\" + subelement happens to use the XML ID type. Although SBML only uses + XML ID for the \"metaid\" attribute, callers should be careful if + they use XML ID's in XML portions of a model that are not defined by + SBML, such as in the application-specific content of the + \"annotation\" subelement. + + Returns True if the 'metaid' attribute of this SBML object is set, + False otherwise. + + See also getMetaId(), setMetaId(). +"; + + +%feature("docstring") SBase::isSetId " + Internal implementation method. +"; + + +%feature("docstring") SBase::isSetName " + Internal implementation method. +"; + + +%feature("docstring") SBase::isSetNotes " + Predicate returning True if this object's 'notes' subelement exists + and has content. + + The optional SBML element named 'notes', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + 'notes' element would be to contain formatted user comments about the + model element in which the 'notes' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for 'notes', allowing users considerable freedom when adding + comments to their models. + + The format of 'notes' elements must be XHTML 1.0. To help verify + the formatting of 'notes' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate SBML specification + document for the Level and Version of their model for more in-depth + explanations. The SBML Level 2 and 3 specifications have + considerable detail about how 'notes' element content must be + structured. + + Returns True if a 'notes' subelement exists, False otherwise. + + See also getNotes(), getNotesString(), setNotes(), setNotes(), + appendNotes(), appendNotes(), unsetNotes(), + SyntaxChecker.hasExpectedXHTMLSyntax(). +"; + + +%feature("docstring") SBase::isSetAnnotation " + Predicate returning True if this object's 'annotation' subelement + exists and has content. + + Whereas the SBase 'notes' subelement is a container for content to be + shown directly to humans, the 'annotation' element is a container for + optional software-generated content not meant to be shown to humans. + Every object derived from SBase can have its own value for + 'annotation'. The element's content type is XML type 'any', + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + Returns True if a 'annotation' subelement exists, False otherwise. + + See also getAnnotation(), getAnnotationString(), setAnnotation(), + setAnnotation(), appendAnnotation(), appendAnnotation(), + unsetAnnotation(). +"; + + +%feature("docstring") SBase::isSetSBOTerm " + Predicate returning True if this object's 'sboTerm' attribute is + set. + + Returns True if the 'sboTerm' attribute of this SBML object is set, + False otherwise. +"; + + +%feature("docstring") SBase::setMetaId " + Sets the value of the meta-identifier attribute of this object. + + The optional attribute named \"metaid\", present on every major SBML + component type, is for supporting metadata annotations using RDF + (Resource Description Format). The attribute value has the data type + XML ID, the XML identifier type, which means each \"metaid\" value + must be globally unique within an SBML file. The latter point is + important, because the uniqueness criterion applies across any + attribute with type ID anywhere in the file, not just the \"metaid\" + attribute used by SBML—something to be aware of if your + application-specific XML content inside the \"annotation\" + subelement happens to use the XML ID type. Although SBML only uses + XML ID for the \"metaid\" attribute, callers should be careful if + they use XML ID's in XML portions of a model that are not defined by + SBML, such as in the application-specific content of the + \"annotation\" subelement. + + The string 'metaid' is copied. + + Parameter 'metaid' is the identifier string to use as the value of + the 'metaid' attribute + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + See also getMetaId(), isSetMetaId(). +"; + + +%feature("docstring") SBase::isSetModelHistory " + Predicate returning True if this object has a ModelHistory object + attached to it. + + Returns True if the ModelHistory of this object is set, false + otherwise. + + Note: + + In SBML Level 2, model history annotations were only permitted on + the Model element. In SBML Level 3, they are permitted on all SBML + components derived from SBase. +"; + + +%feature("docstring") SBase::setId " + Internal implementation method. +"; + + +%feature("docstring") SBase::setName " + Internal implementation method. +"; + + +%feature("docstring") SBase::setAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setAnnotation(XMLNode annotation) + + Sets the value of the 'annotation' subelement of this SBML object. + + The content of 'annotation' is copied, and any previous content of + this object's 'annotation' subelement is deleted. + + Whereas the SBase 'notes' subelement is a container for content to be + shown directly to humans, the 'annotation' element is a container for + optional software-generated content not meant to be shown to humans. + Every object derived from SBase can have its own value for + 'annotation'. The element's content type is XML type 'any', + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + Call this method will result in any existing content of the + 'annotation' subelement to be discarded. Unless you have taken steps + to first copy and reconstitute any existing annotations into the + 'annotation' that is about to be assigned, it is likely that + performing such wholesale replacement is unfriendly towards other + software applications whose annotations are discarded. An + alternative may be to use SBase.appendAnnotation() or + SBase.appendAnnotation(). + + Parameter 'annotation' is an XML structure that is to be used as the + new content of the 'annotation' subelement of this object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also getAnnotationString(), isSetAnnotation(), setAnnotation(), + appendAnnotation(), appendAnnotation(), unsetAnnotation(), + getAnnotationString(), isSetAnnotation(), setAnnotation(), + appendAnnotation(), appendAnnotation(), unsetAnnotation(). +"; + + +%feature("docstring") SBase::appendAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + appendAnnotation(XMLNode annotation) + + Appends the given 'annotation' to the 'annotation' subelement of this + object. + + Whereas the SBase 'notes' subelement is a container for content to be + shown directly to humans, the 'annotation' element is a container for + optional software-generated content not meant to be shown to humans. + Every object derived from SBase can have its own value for + 'annotation'. The element's content type is XML type 'any', + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + Unlike SBase.setAnnotation() or SBase.setAnnotation(), this method + allows other annotations to be preserved when an application adds its + own data. + + Parameter 'annotation' is an XML structure that is to be copied and + appended to the content of the 'annotation' subelement of this + object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also getAnnotationString(), isSetAnnotation(), setAnnotation(), + setAnnotation(), appendAnnotation(), unsetAnnotation(), + getAnnotationString(), isSetAnnotation(), setAnnotation(), + setAnnotation(), appendAnnotation(), unsetAnnotation(). +"; + + +%feature("docstring") SBase::removeTopLevelAnnotationElement " + Removes the top-level element within the 'annotation' subelement of + this SBML object with the given name and optional URI. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + Calling this method allows a particular annotation element to be + removed whilst the remaining annotations remain intact. + + Parameter 'elementName' is a string representing the name of the top + level annotation element that is to be removed Parameter + 'elementURI' is an optional string that is used to check both the + name and URI of the top level element to be removed Parameter + 'removeEmpty' is if after removing of the element, the annotation is + empty, and the removeEmpty argument is true, the annotation node will + be deleted (default). + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_ANNOTATION_NAME_NOT_FOUND + + * libsbml.LIBSBML_ANNOTATION_NS_NOT_FOUND + + See also replaceTopLevelAnnotationElement(), + replaceTopLevelAnnotationElement(). +"; + + +%feature("docstring") SBase::replaceTopLevelAnnotationElement " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + replaceTopLevelAnnotationElement(XMLNode annotation) + + Replaces the given top-level element within the 'annotation' + subelement of this SBML object and with the annotation element + supplied. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + This method determines the name of the element to be replaced from + the annotation argument. Functionally it is equivalent to calling + removeTopLevelAnnotationElement(name); + appendAnnotation(annotation_with_name); with the exception that the + placement of the annotation element remains the same. + + Parameter 'annotation' is XMLNode representing the replacement top + level annotation + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT + + See also removeTopLevelAnnotationElement(), + replaceTopLevelAnnotationElement(), + removeTopLevelAnnotationElement(), + replaceTopLevelAnnotationElement(). +"; + + +%feature("docstring") SBase::setNotes " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setNotes(string notes, bool addXHTMLMarkup = false) + + Sets the value of the 'notes' subelement of this SBML object to a + copy of the string 'notes'. + + The content of 'notes' is copied, and any existing content of this + object's 'notes' subelement is deleted. + + The optional SBML element named 'notes', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + 'notes' element would be to contain formatted user comments about the + model element in which the 'notes' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for 'notes', allowing users considerable freedom when adding + comments to their models. + + The format of 'notes' elements must be XHTML 1.0. To help verify + the formatting of 'notes' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate SBML specification + document for the Level and Version of their model for more in-depth + explanations. The SBML Level 2 and 3 specifications have + considerable detail about how 'notes' element content must be + structured. + + The following code illustrates a very simple way of setting the notes + using this method. Here, the object being annotated is the whole + SBML document, but that is for illustration purposes only; you could + of course use this same approach to annotate any other SBML + component. @~ + + Parameter 'notes' is an XML string that is to be used as the content + of the 'notes' subelement of this object + + Parameter 'addXHTMLMarkup' is a boolean indicating whether to wrap + the contents of the 'notes' argument with XHTML paragraph + (<code></code>) tags. This is appropriate when the string in + 'notes' does not already containg the appropriate XHTML markup. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + See also getNotesString(), isSetNotes(), setNotes(), appendNotes(), + appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(), + getNotesString(), isSetNotes(), setNotes(), appendNotes(), + appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(). +"; + + +%feature("docstring") SBase::appendNotes " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + appendNotes(string notes) + + Appends the given 'notes' to the 'notes' subelement of this object. + + The content of the parameter 'notes' is copied. + + The optional SBML element named 'notes', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + 'notes' element would be to contain formatted user comments about the + model element in which the 'notes' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for 'notes', allowing users considerable freedom when adding + comments to their models. + + The format of 'notes' elements must be XHTML 1.0. To help verify + the formatting of 'notes' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate SBML specification + document for the Level and Version of their model for more in-depth + explanations. The SBML Level 2 and 3 specifications have + considerable detail about how 'notes' element content must be + structured. + + Parameter 'notes' is an XML string that is to appended to the content + of the 'notes' subelement of this object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + See also getNotesString(), isSetNotes(), setNotes(), setNotes(), + appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(), + getNotesString(), isSetNotes(), setNotes(), setNotes(), + appendNotes(), unsetNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(). +"; + + +%feature("docstring") SBase::setModelHistory " + Sets the ModelHistory of this object. + + The content of 'history' is copied, and this object's existing model + history content is deleted. + + Parameter 'history' is ModelHistory of this object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + In SBML Level 2, model history annotations were only permitted on + the Model element. In SBML Level 3, they are permitted on all SBML + components derived from SBase. +"; + + +%feature("docstring") SBase::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") SBase::connectToParent " + Internal implementation method. +"; + + +%feature("docstring") SBase::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") SBase::setSBOTerm " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setSBOTerm(int value) + + Sets the value of the 'sboTerm' attribute. + + Beginning with SBML Level 2 Version 3, objects derived from SBase + have an optional attribute named 'sboTerm' for supporting the use of + the Systems Biology Ontology. In SBML proper, the data type of the + attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a + seven digit integer number; libSBML simplifies the representation by + only storing the 'NNNNNNN' integer portion. Thus, in libSBML, the + 'sboTerm' attribute on SBase has data type int, and SBO identifiers + are stored simply as integers. + + SBO terms are a type of optional annotation, and each different class + of SBML object derived from SBase imposes its own requirements about + the values permitted for 'sboTerm'. Please consult the SBML Level 2 + Version 4 specification for more information about the use of SBO + and the 'sboTerm' attribute. + + Parameter 'value' is the NNNNNNN integer portion of the SBO + identifier + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + See also setSBOTerm(), setSBOTerm(). +"; + + +%feature("docstring") SBase::setNamespaces " + Sets the namespaces relevant of this SBML object. + + The content of 'xmlns' is copied, and this object's existing + namespace content is deleted. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. + + Parameter 'xmlns' is the namespaces to set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") SBase::unsetMetaId " + Unsets the value of the 'metaid' attribute of this SBML object. + + The optional attribute named \"metaid\", present on every major SBML + component type, is for supporting metadata annotations using RDF + (Resource Description Format). The attribute value has the data type + XML ID, the XML identifier type, which means each \"metaid\" value + must be globally unique within an SBML file. The latter point is + important, because the uniqueness criterion applies across any + attribute with type ID anywhere in the file, not just the \"metaid\" + attribute used by SBML—something to be aware of if your + application-specific XML content inside the \"annotation\" + subelement happens to use the XML ID type. Although SBML only uses + XML ID for the \"metaid\" attribute, callers should be careful if + they use XML ID's in XML portions of a model that are not defined by + SBML, such as in the application-specific content of the + \"annotation\" subelement. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBase::unsetId " + Unsets the value of the 'id' attribute of this SBML object. + + Most (but not all) objects in SBML include two common attributes: + 'id' and 'name'. The identifier given by an object's 'id' attribute + value is used to identify the object within the SBML model + definition. Other objects can refer to the component using this + identifier. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBase::unsetName " + Unsets the value of the 'name' attribute of this SBML object. + + Most (but not all) objects in SBML include two common attributes: + 'id' and 'name'. In contrast to the 'id' attribute, the 'name' + attribute is optional and is not intended to be used for cross- + referencing purposes within a model. Its purpose instead is to + provide a human-readable label for the component. The data type of + 'name' is the type string defined in XML Schema. SBML imposes no + restrictions as to the content of 'name' attributes beyond those + restrictions defined by the string type in XML Schema. + + The recommended practice for handling 'name' is as follows. If a + software tool has the capability for displaying the content of 'name' + attributes, it should display this content to the user as a + component's label instead of the component's 'id'. If the user + interface does not have this capability (e.g., because it cannot + display or use special characters in symbol names), or if the 'name' + attribute is missing on a given component, then the user interface + should display the value of the 'id' attribute instead. (Script + language interpreters are especially likely to display 'id' instead + of 'name'.) + + As a consequence of the above, authors of systems that automatically + generate the values of 'id' attributes should be aware some systems + may display the 'id''s to the user. Authors therefore may wish to + take some care to have their software create 'id' values that are: + (a) reasonably easy for humans to type and read; and (b) likely to + be meaningful, for example by making the 'id' attribute be an + abbreviated form of the name attribute value. + + An additional point worth mentioning is although there are + restrictions on the uniqueness of 'id' values, there are no + restrictions on the uniqueness of 'name' values in a model. This + allows software applications leeway in assigning component + identifiers. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBase::unsetNotes " + Unsets the value of the 'notes' subelement of this SBML object. + + The optional SBML element named 'notes', present on every major SBML + component type, is intended as a place for storing optional + information intended to be seen by humans. An example use of the + 'notes' element would be to contain formatted user comments about the + model element in which the 'notes' element is enclosed. Every object + derived directly or indirectly from type SBase can have a separate + value for 'notes', allowing users considerable freedom when adding + comments to their models. + + The format of 'notes' elements must be XHTML 1.0. To help verify + the formatting of 'notes' content, libSBML provides the static + utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however, + readers are urged to consult the appropriate SBML specification + document for the Level and Version of their model for more in-depth + explanations. The SBML Level 2 and 3 specifications have + considerable detail about how 'notes' element content must be + structured. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also getNotesString(), isSetNotes(), setNotes(), setNotes(), + appendNotes(), appendNotes(), SyntaxChecker.hasExpectedXHTMLSyntax(). +"; + + +%feature("docstring") SBase::unsetAnnotation " + Unsets the value of the 'annotation' subelement of this SBML object. + + Whereas the SBase 'notes' subelement is a container for content to be + shown directly to humans, the 'annotation' element is a container for + optional software-generated content not meant to be shown to humans. + Every object derived from SBase can have its own value for + 'annotation'. The element's content type is XML type 'any', + allowing essentially arbitrary well-formed XML data content. + + SBML places a few restrictions on the organization of the content of + annotations; these are intended to help software tools read and write + the data as well as help reduce conflicts between annotations added + by different tools. Please see the SBML specifications for more + details. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also getAnnotation(), getAnnotationString(), isSetAnnotation(), + setAnnotation(), setAnnotation(), appendAnnotation(), + appendAnnotation(). +"; + + +%feature("docstring") SBase::unsetSBOTerm " + Unsets the value of the 'sboTerm' attribute of this SBML object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") SBase::addCVTerm " + Adds a copy of the given CVTerm object to this SBML object. + + Parameter 'term' is the CVTerm to assign. + + Parameter 'newBag' is if True, creates a new RDF bag with the same + identifier as a previous bag, and if False, adds the term to an + existing RDF bag with the same type of qualifier as the term being + added. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE, if this object lacks a + 'metaid' attribute + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + Since the CV Term uses the 'metaid' attribute of the object as a + reference, if the object has no 'metaid' attribute value set, then + the CVTerm will not be added. + + WARNING: + + The fact that this method copies the object passed to it means that + the caller will be left holding a physically different object + instance than the one contained in this object. Changes made to the + original object instance (such as resetting attribute values) will + not affect the instance added here. In addition, the caller should + make sure to free the original object if it is no longer being used, + or else a memory leak will result. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") SBase::getCVTerms " + Returns a list of CVTerm objects in the annotations of this SBML + object. + + Returns the list of CVTerms for this SBML object. +"; + + +%feature("docstring") SBase::getNumCVTerms " + Returns the number of CVTerm objects in the annotations of this SBML + object. + + Returns the number of CVTerms for this SBML object. +"; + + +%feature("docstring") SBase::getCVTerm " + Returns the nth CVTerm in the list of CVTerms of this SBML object. + + Parameter 'n' is long the index of the CVTerm to retrieve + + Returns the nth CVTerm in the list of CVTerms for this SBML object. +"; + + +%feature("docstring") SBase::unsetCVTerms " + Clears the list of CVTerm objects attached to this SBML object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBase::unsetModelHistory " + Unsets the ModelHistory object attached to this object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + In SBML Level 2, model history annotations were only permitted on + the Model element. In SBML Level 3, they are permitted on all SBML + components derived from SBase. +"; + + +%feature("docstring") SBase::getResourceBiologicalQualifier " + Returns the MIRIAM biological qualifier associated with the given + resource. + + In MIRIAM, qualifiers are an optional means of indicating the + relationship between a model component and its annotations. There + are two broad kinds of annotations: model and biological. The + latter kind is used to qualify the relationship between a model + component and a biological entity which it represents. Examples of + relationships include 'is' and 'has part', but many others are + possible. MIRIAM defines numerous relationship qualifiers to enable + different software tools to qualify biological annotations in the + same standardized way. In libSBML, the MIRIAM controlled-vocabulary + annotations on an SBML model element are represented using lists of + CVTerm objects, and the the MIRIAM biological qualifiers are + represented using values whose names begin with BQB_ in the + interface class libsbml.@~ + + This method searches the controlled-vocabulary annotations (i.e., + the list of CVTerm objects) on the present object, then out of those + that have biological qualifiers, looks for an annotation to the + given 'resource'. If such an annotation is found, it returns the + type of biological qualifier associated with that resource as a + value whose name begins with BQB_ from the interface class + libsbml.@~ + + Parameter 'resource' is string representing the resource; e.g., + 'http://www.geneontology.org/#GO:0005892'. + + Returns the qualifier associated with the resource, or + libsbml.BQB_UNKNOWN if the resource does not exist. + + Note: + + The set of MIRIAM biological qualifiers grows over time, although + relatively slowly. The values are up to date with MIRIAM at the + time of a given libSBML release. The set of values in list of BQB_ + constants defined in libsbml may be expanded in later libSBML + releases, to match the values defined by MIRIAM at that later time. + @~ +"; + + +%feature("docstring") SBase::getResourceModelQualifier " + Returns the MIRIAM model qualifier associated with the given + resource. + + In MIRIAM, qualifiers are an optional means of indicating the + relationship between a model component and its annotations. There + are two broad kinds of annotations: model and biological. The + former kind is used to qualify the relationship between a model + component and another modeling object. An example qualifier is + 'isDerivedFrom', to indicate that a given component of the model is + derived from the modeling object represented by the referenced + resource. MIRIAM defines numerous relationship qualifiers to enable + different software tools to qualify model annotations in the same + standardized way. In libSBML, the MIRIAM controlled-vocabulary + annotations on an SBML model element are represented using lists of + CVTerm objects, and the the MIRIAM model qualifiers are represented + using values whose names begin with BQM_ in the interface class + libsbml.@~ + + This method method searches the controlled-vocabulary annotations + (i.e., the list of CVTerm objects) on the present object, then out of + those that have model qualifiers, looks for an annotation to the + given 'resource'. If such an annotation is found, it returns the + type of type of model qualifier associated with that resource as a + value whose name begins with BQM_ from the interface class + libsbml.@~ + + Parameter 'resource' is string representing the resource; e.g., + 'http://www.geneontology.org/#GO:0005892'. + + Returns the model qualifier type@~ associated with the resource, or + libsbml.BQM_UNKNOWN if the resource does not exist. + + Note: + + The set of MIRIAM model qualifiers grows over time, although + relatively slowly. The values are up to date with MIRIAM at the + time of a given libSBML release. The set of values in list of BQM_ + constants defined in libsbml may be expanded in later libSBML + releases, to match the values defined by MIRIAM at that later time. + @~ +"; + + +%feature("docstring") SBase::getModel " + Returns the Model object in which the current object is located. + + Returns the parent Model of this SBML object. + + See also getParentSBMLObject(), getSBMLDocument(). +"; + + +%feature("docstring") SBase::getLevel " + Returns the SBML Level of the SBMLDocument object containing this + object. + + Returns the SBML level of this SBML object. + + See also getVersion(), getNamespaces(), getPackageVersion(). +"; + + +%feature("docstring") SBase::getVersion " + Returns the Version within the SBML Level of the SBMLDocument object + containing this object. + + Returns the SBML version of this SBML object. + + See also getLevel(), getNamespaces(). +"; + + +%feature("docstring") SBase::getPackageVersion " + Returns the Version of the SBML Level 3 package to which this + element belongs to. + + Returns the version of the SBML Level 3 package to which this + element belongs. The value 0 will be returned if this element + belongs to the SBML Level 3 Core package. + + See also getLevel(), getVersion(). +"; + + +%feature("docstring") SBase::getPackageName " + Returns the name of the SBML Level 3 package in which this element + is defined. + + Returns the name of the SBML package in which this element is + defined. The string \"core\" will be returned if this element is + defined in SBML Level 3 Core. The string \"unknown\" will be + returned if this element is not defined in any SBML package. +"; + + +%feature("docstring") SBase::getTypeCode " + Returns the libSBML type code for this object. + + This method may return the type code of this SBML object, or it may + return libsbml.SBML_UNKNOWN. This is because subclasses of SBase + are not required to implement this method to return a type code. + This method is meant primarily for the LibSBML C interface, in which + class and subclass information is not readily available. + + Returns the SBML object type code@~ of this SBML object or + libsbml.SBML_UNKNOWN (the default). + + See also getElementName(), getPackageName(). +"; + + +%feature("docstring") SBase::getElementName " + Returns the XML element name of this object. + + This is overridden by subclasses to return a string appropriate to + the SBML component. For example, Model defines it as returning + 'model', CompartmentType defines it as returning 'compartmentType', + and so on. +"; + + +%feature("docstring") SBase::toSBML " + Returns a string consisting of a partial SBML corresponding to just + this object. + + Returns the partial SBML that describes this SBML object. + + WARNING: + + This is primarily provided for testing and debugging purposes. It + may be removed in a future version of libSBML. +"; + + +%feature("docstring") SBase::toXMLNode " + Returns this element as an XMLNode. + + Returns this element as an XMLNode. + + WARNING: + + This operation is computationally expensive, because the element has + to be fully serialized to a string and then parsed into the XMLNode + structure. Attempting to convert a large tree structure (e.g., a + large Model) may consume significant computer memory and time. +"; + + +%feature("docstring") SBase::getPlugin " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getPlugin(long n) + + Returns the nth plug-in object (extension interface) for an SBML + Level 3 package extension. + + SBML Level 3 consists of a Core definition that can be extended via + optional SBML Level 3 packages. A given model may indicate that it + uses one or more SBML packages, and likewise, a software tool may be + able to support one or more packages. LibSBML does not come + preconfigured with all possible packages included and enabled, in + part because not all package specifications have been finalized. To + support the ability for software systems to enable support for the + Level 3 packages they choose, libSBML features a plug-in mechanism. + Each SBML Level 3 package is implemented in a separate code plug-in + that can be enabled by the application to support working with that + SBML package. A given SBML model may thus contain not only objects + defined by SBML Level 3 Core, but also objects created by libSBML + plug-ins supporting additional Level 3 packages. + + Parameter 'n' is the index of the plug-in to return + + Returns the plug-in object (the libSBML extension interface) of a + package extension with the given package name or URI. + + ______________________________________________________________________ + Method variant with the following signature: + + getPlugin(string package) + + Returns a plug-in object (extension interface) for an SBML Level 3 + package extension with the given package name or URI. + + SBML Level 3 consists of a Core definition that can be extended via + optional SBML Level 3 packages. A given model may indicate that it + uses one or more SBML packages, and likewise, a software tool may be + able to support one or more packages. LibSBML does not come + preconfigured with all possible packages included and enabled, in + part because not all package specifications have been finalized. To + support the ability for software systems to enable support for the + Level 3 packages they choose, libSBML features a plug-in mechanism. + Each SBML Level 3 package is implemented in a separate code plug-in + that can be enabled by the application to support working with that + SBML package. A given SBML model may thus contain not only objects + defined by SBML Level 3 Core, but also objects created by libSBML + plug-ins supporting additional Level 3 packages. + + Parameter 'package' is the name or URI of the package + + Returns the plug-in object (the libSBML extension interface) of a + package extension with the given package name or URI. +"; + + +%feature("docstring") SBase::getNumPlugins " + Returns the number of plug-in objects (extenstion interfaces) for + SBML Level 3 package extensions known. + + SBML Level 3 consists of a Core definition that can be extended via + optional SBML Level 3 packages. A given model may indicate that it + uses one or more SBML packages, and likewise, a software tool may be + able to support one or more packages. LibSBML does not come + preconfigured with all possible packages included and enabled, in + part because not all package specifications have been finalized. To + support the ability for software systems to enable support for the + Level 3 packages they choose, libSBML features a plug-in mechanism. + Each SBML Level 3 package is implemented in a separate code plug-in + that can be enabled by the application to support working with that + SBML package. A given SBML model may thus contain not only objects + defined by SBML Level 3 Core, but also objects created by libSBML + plug-ins supporting additional Level 3 packages. + + Returns the number of plug-in objects (extension interfaces) of + package extensions known by this instance of libSBML. +"; + + +%feature("docstring") SBase::enablePackage " + Enables or disables the given SBML Level 3 package + + This method enables or disables the specified package on this object + and other objects connected by child-parent links in the same + SBMLDocument object. + + Parameter 'pkgURI' is the URI of the package + + Parameter 'pkgPrefix' is the XML prefix of the package + + Parameter 'flag' is whether to enable (True) or disable (False) the + package + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_PKG_UNKNOWN + + * libsbml.LIBSBML_PKG_VERSION_MISMATCH + + * libsbml.LIBSBML_PKG_CONFLICTED_VERSION +"; + + +%feature("docstring") SBase::disablePackage " + Disables the given SBML Level 3 package + + This method enables or disables the specified package on this object + and other objects connected by child-parent links in the same + SBMLDocument object. + + Parameter 'pkgURI' is the URI of the package + + Parameter 'pkgPrefix' is the XML prefix of the package + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_PKG_UNKNOWN + + * libsbml.LIBSBML_PKG_VERSION_MISMATCH + + * libsbml.LIBSBML_PKG_CONFLICTED_VERSION +"; + + +%feature("docstring") SBase::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") SBase::isPackageURIEnabled " + Predicate returning True if an SBML Level 3 package with the given + URI is enabled with this object. + + Parameter 'pkgURI' is the URI of the package + + Returns True if the given package is enabled within this object, + false otherwise. + + See also isPackageEnabled(). +"; + + +%feature("docstring") SBase::isPackageEnabled " + Predicate returning True if the given SBML Level 3 package is + enabled with this object. + + The search ignores the package version. + + Parameter 'pkgName' is the name of the package + + Returns True if the given package is enabled within this object, + false otherwise. + + See also isPackageURIEnabled(). +"; + + +%feature("docstring") SBase::isPkgURIEnabled " + Predicate returning True if an SBML Level 3 package with the given + URI is enabled with this object. + + Parameter 'pkgURI' is the URI of the package + + Returns True if the given package is enabled within this object, + false otherwise. + + See also isPkgEnabled(). + + DEPRECATED. Replaced in libSBML 5.2.0 by isPackageURIEnabled() +"; + + +%feature("docstring") SBase::isPkgEnabled " + Predicate returning True if the given SBML Level 3 package is + enabled with this object. + + The search ignores the package version. + + Parameter 'pkgName' is the name of the package + + Returns True if the given package is enabled within this object, + false otherwise. + + See also isPkgURIEnabled(). + + DEPRECATED. Replaced in libSBML 5.2.0 by isPackageEnabled() +"; + + +%feature("docstring") SBase::writeExtensionElements " + Internal implementation method. +"; + + +%feature("docstring") SBase::write " + Internal implementation method. +"; + + +%feature("docstring") SBase::writeElements " + Internal implementation method. +"; + + +%feature("docstring") SBase::hasRequiredAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBase::hasRequiredElements " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkCompatibility " + Internal implementation method. +"; + + +%feature("docstring") SBase::setSBMLNamespaces " + Internal implementation method. +"; + + +%feature("docstring") SBase::setSBMLNamespacesAndOwn " + Internal implementation method. +"; + + +%feature("docstring") SBase::getSBMLNamespaces " + Internal implementation method. +"; + + +%feature("docstring") SBase::removeDuplicateAnnotations " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkMathMLNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBase::removeFromParentAndDelete " + Removes this object from its parent. + + If the parent was storing this object as a pointer, it is deleted. + If not, it is simply cleared (as in ListOf objects). This is a pure + virtual method, as every SBase element has different parents, and + therefore different methods of removing itself. Will fail (and not + delete itself) if it has no parent object. This function is designed + to be overridden, but for all objects whose parent is of the class + ListOf, the default implementation will work. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBase::matchesSBMLNamespaces " + Returns True if this object's set of XML namespaces are the same as + the given object's XML namespaces. + + Parameter 'sb' is an object to compare with respect to namespaces + + Returns boolean, True if this object's collection of namespaces is + the same as 'sb's', False otherwise. +"; + + +%feature("docstring") SBase::matchesRequiredSBMLNamespacesForAddition " + Returns True if this object's set of XML namespaces are a subset of + the given object's XML namespaces. + + Parameter 'sb' is an object to compare with respect to namespaces + + Returns boolean, True if this object's collection of namespaces is a + subset of 'sb's', False otherwise. +"; + + +%feature("docstring") SBase::setUserData " + Sets the user data of this element. + + The user data associated with an SBML object can be used by an + application developer to attach custom information to that object in + the model. In case of a deep copy, this attribute will passed as it + is. The attribute will be never interpreted by libSBML. + + Parameter 'userData' is specifies the new user data. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBase::*getUserData " + Returns the user data that has been previously set via setUserData(). + + The user data associated with an SBML object can be used by an + application developer to attach custom information to that object in + the model. In case of a deep copy, this attribute will passed as it + is. The attribute will be never interpreted by libSBML. + + Returns the user data of this node, or None if no user data has been + set. + + @~ +"; + + +%feature("docstring") SBase::getURI " + Gets the namespace URI to which this element belongs to. + + For example, all elements that belong to SBML Level 3 Version 1 Core + must would have the URI + 'http://www.sbml.org/sbml/level3/version1/core'; all elements that + belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core + must would have the URI + 'http://www.sbml.org/sbml/level3/version1/layout/version1/' + + Unlike getElementNamespace(), this function first returns the URI for + this element by looking into the SBMLNamespaces object of the + document with the its package name. if not found it will return the + result of getElementNamespace(). + + Returns the URI of this element + + See also getPackageName(), getElementNamespace(), getSBMLDocument(). +"; + + +%feature("docstring") SBase::getPrefix " + Returns the namespace prefix of this element. +"; + + +%feature("docstring") SBase::setElementText " + When overridden allows SBase elements to use the text included in + between the elements tags. The default implementation does nothing. + + Parameter 'text' is the text string found between the element tags. +"; + + +%feature("docstring") SBase::matchesCoreSBMLNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBase::createObject " + Internal implementation method. +"; + + +%feature("docstring") SBase::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") SBase::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") SBase::getErrorLog " + Internal implementation method. +"; + + +%feature("docstring") SBase::logError " + Internal implementation method. +"; + + +%feature("docstring") SBase::logUnknownAttribute " + Internal implementation method. +"; + + +%feature("docstring") SBase::logUnknownElement " + Internal implementation method. +"; + + +%feature("docstring") SBase::logEmptyString " + Internal implementation method. +"; + + +%feature("docstring") SBase::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBase::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBase::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBase::writeXMLNS " + Internal implementation method. +"; + + +%feature("docstring") SBase::syncAnnotation " + Internal implementation method. +"; + + +%feature("docstring") SBase::reconstructRDFAnnotation " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkOrderAndLogError " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkListOfPopulated " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkUnitSyntax " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkDefaultNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkAnnotation " + Internal implementation method. +"; + + +%feature("docstring") SBase::checkXHTML " + Internal implementation method. +"; + + +%feature("docstring") SBase::loadPlugins " + Internal implementation method. +"; + + +%feature("docstring") SBase::createExtensionObject " + Internal implementation method. +"; + + +%feature("docstring") SBase::setElementNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBase::getElementNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBase::readExtensionAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBase::writeExtensionAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBase::storeUnknownExtAttribute " + Internal implementation method. +"; + + +%feature("docstring") SBase::storeUnknownExtElement " + Internal implementation method. +"; + + +%feature("docstring") SBase::getSBMLPrefix " + Internal implementation method. +"; + + +%feature("docstring") SBase::getRootElement " + Internal implementation method. +"; + + +%feature("docstring") SBase::getHasBeenDeleted " + Internal implementation method. +"; + + +%feature("docstring") SBase::setSBaseFields " + Internal implementation method. +"; + + +%feature("docstring") SBase::readAnnotation " + Internal implementation method. +"; + + +%feature("docstring") SBase::removeDuplicatedResources " + Internal implementation method. +"; + + +%feature("docstring") SBase::addTermToExistingBag " + Internal implementation method. +"; + + +%feature("docstring") SBase::readNotes " + Internal implementation method. +"; + + +%feature("docstring") ListOf " + @ingroup Core Parent class for the various SBML 'ListOfXYZ' classes. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + SBML defines various ListOf___ classes that are containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the attributes and + subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The ListOf class in libSBML is a utility class that serves as the + parent class for implementing the ListOf__ classes. It provides + methods for working generically with the various SBML lists of + objects in a program. LibSBML uses this separate list class rather + than ordinary Python@~ lists, so that it can provide the methods + and features associated with SBase. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") ListOf::ListOf " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOf(SBMLNamespaces sbmlns) + + Creates a new ListOf with SBMLNamespaces object. + + Parameter 'sbmlns' is the set of namespaces that this ListOf should + contain. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOf(long level = SBML_DEFAULT_LEVEL, long version = + SBML_DEFAULT_VERSION) + + Creates a new ListOf object. + + Parameter 'level' is the SBML Level; if not assigned, defaults to the + value of SBML_DEFAULT_LEVEL. + + Parameter 'version' is the Version within the SBML Level; if not + assigned, defaults to the value of SBML_DEFAULT_VERSION. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + ListOf(ListOf orig) + + Copy constructor; creates a copy of this ListOf. + + Parameter 'orig' is the ListOf instance to copy. +"; + + +%feature("docstring") ListOf::accept " + Accepts the given SBMLVisitor. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next item in the list. +"; + + +%feature("docstring") ListOf::clone " + Creates and returns a deep copy of this ListOf. + + Returns a (deep) copy of this ListOf. +"; + + +%feature("docstring") ListOf::append " + Adds item to the end of this ListOf. + + This variant of the method makes a clone of the 'item' handed to it. + This means that when the ListOf is destroyed, the original items will + not be destroyed. + + Parameter 'item' is the item to be added to the list. + + See also appendAndOwn(). +"; + + +%feature("docstring") ListOf::appendAndOwn " + Adds item to the end of this ListOf. + + This variant of the method does not clone the 'item' handed to it; + instead, it assumes ownership of it. This means that when the ListOf + is destroyed, the item will be destroyed along with it. + + Parameter 'item' is the item to be added to the list. + + See also append(). +"; + + +%feature("docstring") ListOf::appendFrom " + Adds a clone of all items in the provided ListOf to this object. + This means that when this ListOf is destroyed, the original items + will not be destroyed. + + Parameter 'list' is A list of items to be added. + + See also append(). +"; + + +%feature("docstring") ListOf::insert " + Inserts the item at the given position of this ListOf + + This variant of the method makes a clone of the 'item' handet to it. + This means that when the ListOf is destroyed, the original items will + not be destroyed. + + Parameter 'location' is the location where to insert the item + Parameter 'item' is the item to be inserted to the list + + See also insertAndOwn(). +"; + + +%feature("docstring") ListOf::insertAndOwn " + Inserts the item at the given position of this ListOf + + This variant of the method makes a clone of the 'item' handet to it. + This means that when the ListOf is destroyed, the original items will + not be destroyed. + + Parameter 'location' is the location where to insert the item + Parameter 'item' is the item to be inserted to the list + + See also insert(). +"; + + +%feature("docstring") ListOf::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get an item from the list. + + Parameter 'n' is the index number of the item to get. + + Returns the nth item in this ListOf items. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOf::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") ListOf::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") ListOf::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") ListOf::clear " + Removes all items in this ListOf object. + + If parameter 'doDelete' is True (default), all items in this ListOf + object are deleted and cleared, and thus the caller doesn't have to + delete those items. Otherwise, all items are just cleared from this + ListOf object and the caller is responsible for deleting all items. + (In that case, pointers to all items should be stored elsewhere + before calling this function.) + + Parameter 'doDelete' is if True (default), all items are deleted and + cleared. Otherwise, all items are just cleared and not deleted. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") ListOf::removeFromParentAndDelete " + Because ListOf objects typically live as object children of their + parent object and not as pointer children, this function clears + itself, but does not attempt to do anything else. If a particular + ListOf subclass does indeed exist as a pointer only, this function + will need to be overridden. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ListOf::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOf items and returns a pointer to + it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOf items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOf::size " + Get the size of this ListOf. + + Returns the number of items in this ListOf items. +"; + + +%feature("docstring") ListOf::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") ListOf::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") ListOf::getTypeCode " + Returns the libSBML type code for this object, namely, SBML_LIST_OF. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOf::getItemTypeCode " + Get the type code of the objects contained in this ListOf. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). +"; + + +%feature("docstring") ListOf::getElementName " + Returns the XML element name of this object, which for ListOf, is + always 'listOf'. + + Returns the XML name of this element. +"; + + +%feature("docstring") ListOf::writeElements " + Internal implementation method. +"; + + +%feature("docstring") ListOf::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") ListOf::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOf::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOf::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOf::isValidTypeForList " + Internal implementation method. +"; + + +%feature("docstring") Model " + @ingroup Core Implementation of SBML's Model construct. + + In an SBML model definition, a single object of class Model serves as + the overall container for the lists of the various model components. + All of the lists are optional, but if a given list container is + present within the model, the list must not be empty; that is, it + must have length one or more. The following are the components and + lists permitted in different Levels and Versions of SBML in version + 5.8.1 of libSBML: + + * In SBML Level 1, the components are: UnitDefinition, + Compartment, Species, Parameter, Rule, and Reaction. Instances of + the classes are placed inside instances of classes + ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, + ListOfParameters, ListOfRules, and ListOfReactions. + + * In SBML Level 2 Version 1, the components are: FunctionDefinition, + UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and + Event. Instances of the classes are placed inside instances of + classes ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, + ListOfReactions, and ListOfEvents. + + * In SBML Level 2 Versions 2, 3 and 4, the components are: + FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType, + Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, + Reaction and Event. Instances of the classes are placed inside + instances of classes ListOfFunctionDefinitions, + ListOfUnitDefinitions, ListOfCompartmentTypes, ListOfSpeciesTypes, + ListOfCompartments, ListOfSpecies, ListOfParameters, + ListOfInitialAssignments, ListOfRules, ListOfConstraints, + ListOfReactions, and ListOfEvents. + + * In SBML Level 3 Version 1, the components are: FunctionDefinition, + UnitDefinition, Compartment, Species, Parameter, InitialAssignment, + Rule, Constraint, Reaction and Event. Instances of the classes are + placed inside instances of classes ListOfFunctionDefinitions, + ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, + ListOfParameters, ListOfInitialAssignments, ListOfRules, + ListOfConstraints, ListOfReactions, and ListOfEvents. + + Although all the lists are optional, there are dependencies between + SBML components such that defining some components requires defining + others. An example is that defining a species requires defining a + compartment, and defining a reaction requires defining a species. + The dependencies are explained in more detail in the SBML + specifications. + + In addition to the above lists and attributes, the Model class in + both SBML Level 2 and Level 3 has the usual two attributes of 'id' + and 'name', and both are optional. As is the case for other SBML + components with 'id' and 'name' attributes, they must be used + according to the guidelines described in the SBML specifications. + (Within the frameworks of SBML Level 2 and Level 3 Version 1 Core, a + Model object identifier has no assigned meaning, but extension + packages planned for SBML Level 3 are likely to make use of this + identifier.) + + Finally, SBML Level 3 has introduced a number of additional Model + attributes. They are discussed in a separate section below. + + Approaches to creating objects using the libSBML API + ====================================================================== + + LibSBML provides two main mechanisms for creating objects: class + constructors (e.g., Species.Species() ), and createObject() + methods (such as Model.createSpecies()) provided by certain Object + classes such as Model. These multiple mechanisms are provided by + libSBML for flexibility and to support different use-cases, but they + also have different implications for the overall model structure. + + In general, the recommended approach is to use the createObject() + methods. These methods both create an object and link it to the + parent in one step. Here is an example: + # Create an SBMLDocument object in Level 3 Version 1 format: + + sbmlDoc = SBMLDocument(3, 1) + + # Create a Model object inside the SBMLDocument object and set + # its identifier. The call to setId() returns a status code + # to indicate whether the assignment was successful. Code 0 + # means success; see the documentation for Model\'s setId() for + # more information. + + model = sbmlDoc.createModel() + model.setId(\"BestModelEver\") + + # Create a Species object inside the Model and set its identifier. + # Again, the setId() returns a status code to indicate whether the + # assignment was successful. Code 0 means success; see the + # documentation for Specie\'s setId() for more information. + + sp = model.createSpecies() + sp.setId(\"BestSpeciesEver\") + @~ + + The createObject() methods return a pointer to the object created, + but they also add the object to the relevant list of object + instances contained in the parent. (These lists become the + <listOfObjects> elements in the finished XML rendition of SBML.) In + the example above, Model.createSpecies() adds the created species + directly to the + + * list in the model. Subsequently, methods called on the species + change the species in the model (which is what is expected in most + situations). + + Consistency and adherence to SBML specifications + ====================================================================== + + To make it easier for applications to do whatever they need, libSBML + version 5.8.1 is relatively lax when it comes to enforcing + correctness and completeness of models during model construction and + editing. Essentially, libSBML will not in most cases check + automatically that a model's components have valid attribute values, + or that the overall model is consistent and free of errors -- even + obvious errors such as duplication of identifiers. This allows + applications great leeway in how they build their models, but it + means that software authors must take deliberate steps to ensure + that the model will be, in the end, valid SBML. These steps include + such things as keeping track of the identifiers used in a model, + manually performing updates in certain situations where an entity is + referenced in more than one place (e.g., a species that is + referenced by multiple SpeciesReference objects), and so on. + + That said, libSBML does provide powerful features for deliberately + performing validation of SBML when an application decides it is time + to do so. The interfaces to these facilities are on the + SBMLDocument class, in the form of + SBMLDocument.checkInternalConsistency() and + SBMLDocument.checkConsistency(). Please refer to the documentation + for SBMLDocument for more information about this. + + While applications may play fast and loose and live like free spirits + during the construction and editing of SBML models, they should + always make sure to call SBMLDocument.checkInternalConsistency() + and/or SBMLDocument.checkConsistency() before writing out the final + version of an SBML model. + + Model attributes introduced in SBML Level 3 + ====================================================================== + + As mentioned above, the Model class has a number of optional + attributes in SBML Level 3 Version 1 Core. These are + 'substanceUnits', 'timeUnits', 'volumeUnits', 'areaUnits', + 'lengthUnits', 'extentUnits', and 'conversionFactor. The following + provide more information about them. + + The 'substanceUnits' attribute + ...................................................................... + + The 'substanceUnits' attribute is used to specify the unit of + measurement associated with substance quantities of Species objects + that do not specify units explicitly. If a given Species object + definition does not specify its unit of substance quantity via the + 'substanceUnits' attribute on the Species object instance, then that + species inherits the value of the Model 'substanceUnits' attribute. + If the Model does not define a value for this attribute, then there + is no unit to inherit, and all species that do not specify + individual 'substanceUnits' attribute values then have no declared + units for their quantities. The SBML Level 3 Version 1 Core + specification provides more details. + + Note that when the identifier of a species appears in a model's + mathematical expressions, the unit of measurement associated with + that identifier is not solely determined by setting 'substanceUnits' + on Model or Species. Please see the discussion about units given in + the documentation for the Species class. + + The 'timeUnits' attribute + ...................................................................... + + The 'timeUnits' attribute on SBML Level 3's Model object is used to + specify the unit in which time is measured in the model. This + attribute on Model is the only way to specify a unit for time in a + model. It is a global attribute; time is measured in the model + everywhere in the same way. This is particularly relevant to + Reaction and RateRule objects in a model: all Reaction and RateRule + objects in SBML define per-time values, and the unit of time is + given by the 'timeUnits' attribute on the Model object instance. If + the Model 'timeUnits' attribute has no value, it means that the unit + of time is not defined for the model's reactions and rate rules. + Leaving it unspecified in an SBML model does not result in an + invalid model in SBML Level 3; however, as a matter of best + practice, we strongly recommend that all models specify units of + measurement for time. + + The 'volumeUnits', 'areaUnits', and 'lengthUnits' attributes + ...................................................................... + + The attributes 'volumeUnits', 'areaUnits' and 'lengthUnits' together + are used to set the units of measurements for the sizes of + Compartment objects in an SBML Level 3 model when those objects do + not otherwise specify units. The three attributes correspond to the + most common cases of compartment dimensions: 'volumeUnits' for + compartments having a 'spatialDimensions' attribute value of '3', + 'areaUnits' for compartments having a 'spatialDimensions' attribute + value of '2', and 'lengthUnits' for compartments having a + 'spatialDimensions' attribute value of '1'. The attributes are not + applicable to compartments whose 'spatialDimensions' attribute + values are not one of '1', '2' or '3'. + + If a given Compartment object instance does not provide a value for + its 'units' attribute, then the unit of measurement of that + compartment's size is inherited from the value specified by the + Model 'volumeUnits', 'areaUnits' or 'lengthUnits' attribute, as + appropriate based on the Compartment object's 'spatialDimensions' + attribute value. If the Model object does not define the relevant + attribute, then there are no units to inherit, and all Compartment + objects that do not set a value for their 'units' attribute then + have no units associated with their compartment sizes. + + The use of three separate attributes is a carry-over from SBML Level + 2. Note that it is entirely possible for a model to define a value + for two or more of the attributes 'volumeUnits', 'areaUnits' and + 'lengthUnits' simultaneously, because SBML models may contain + compartments with different numbers of dimensions. + + The 'extentUnits' attribute + ...................................................................... + + Reactions are processes that occur over time. These processes + involve events of some sort, where a single ``reaction event'' is + one in which some set of entities (known as reactants, products and + modifiers in SBML) interact, once. The extent of a reaction is a + measure of how many times the reaction has occurred, while the time + derivative of the extent gives the instantaneous rate at which the + reaction is occurring. Thus, what is colloquially referred to as + the 'rate of the reaction' is in fact equal to the rate of change of + reaction extent. + + In SBML Level 3, the combination of 'extentUnits' and 'timeUnits' + defines the units of kinetic laws in SBML and establishes how the + numerical value of each KineticLaw object's mathematical formula is + meant to be interpreted in a model. The units of the kinetic laws + are taken to be 'extentUnits' divided by 'timeUnits'. + + Note that this embodies an important principle in SBML Level 3 + models: all reactions in an SBML model must have the same units for + the rate of change of extent. In other words, the units of all + reaction rates in the model must be the same. There is only one + global value for 'extentUnits' and one global value for 'timeUnits'. + + The 'conversionFactor' attribute + ...................................................................... + + The attribute 'conversionFactor' in SBML Level 3's Model object + defines a global value inherited by all Species object instances that + do not define separate values for their 'conversionFactor' + attributes. The value of this attribute must refer to a Parameter + object instance defined in the model. The Parameter object in + question must be a constant; ie it must have its 'constant' + attribute value set to 'true'. + + If a given Species object definition does not specify a conversion + factor via the 'conversionFactor' attribute on Species, then the + species inherits the conversion factor specified by the Model + 'conversionFactor' attribute. If the Model does not define a value + for this attribute, then there is no conversion factor to inherit. + More information about conversion factors is provided in the SBML + Level 3 Version 1 specification. +"; + + +%feature("docstring") Model::Model " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Model(SBMLNamespaces sbmlns) + + Creates a new Model using the given SBMLNamespaces object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Model object to an SBMLDocument (e.g., using + SBMLDocument.setModel()), the SBML XML namespace of the document + overrides the value used when creating the Model object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Model is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Model(long level, long version) + + Creates a new Model using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Model + + Parameter 'version' is a long integer, the SBML Version to assign to + this Model + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Model object to an SBMLDocument (e.g., using + SBMLDocument.setModel()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + Model object via this constructor. This is necessary to ensure that + an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Model is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Model(Model orig) + + Copy constructor; creates a (deep) copy of the given Model object. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Model::accept " + Accepts the given SBMLVisitor for this instance of Constraint. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") Model::clone " + Creates and returns a deep copy of this Model object. + + Returns a (deep) copy of this Model. +"; + + +%feature("docstring") Model::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find. + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") Model::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") Model::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") Model::getId " + Returns the value of the 'id' attribute of this Model. + + Returns the id of this Model. +"; + + +%feature("docstring") Model::getName " + Returns the value of the 'name' attribute of this Model. + + Returns the name of this Model. +"; + + +%feature("docstring") Model::getSubstanceUnits " + Returns the value of the 'substanceUnits' attribute of this Model. + + Returns the substanceUnits of this Model. + + Note: + + The 'substanceUnits' attribute is available in SBML Level 3 but is + not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getTimeUnits " + Returns the value of the 'timeUnits' attribute of this Model. + + Returns the timeUnits of this Model. + + Note: + + The 'timeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getVolumeUnits " + Returns the value of the 'volumeUnits' attribute of this Model. + + Returns the volumeUnits of this Model. + + Note: + + The 'volumeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getAreaUnits " + Returns the value of the 'areaUnits' attribute of this Model. + + Returns the areaUnits of this Model. + + Note: + + The 'areaUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getLengthUnits " + Returns the value of the 'lengthUnits' attribute of this Model. + + Returns the lengthUnits of this Model. + + Note: + + The 'lengthUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getExtentUnits " + Returns the value of the 'extentUnits' attribute of this Model. + + Returns the extentUnits of this Model. + + Note: + + The 'extentUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::getConversionFactor " + Returns the value of the 'conversionFactor' attribute of this Model. + + Returns the conversionFactor of this Model. + + Note: + + The 'conversionFactor' attribute is available in SBML Level 3 but + is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetId " + Predicate returning True if this Model's 'id' attribute is set. + + Returns True if the 'id' attribute of this Model is set, False + otherwise. +"; + + +%feature("docstring") Model::isSetName " + Predicate returning True if this Model's 'name' attribute is set. + + Returns True if the 'name' attribute of this Model is set, False + otherwise. +"; + + +%feature("docstring") Model::isSetSubstanceUnits " + Predicate returning True if this Model's 'substanceUnits' attribute + is set. + + Returns True if the 'substanceUnits' attribute of this Model is set, + False otherwise. + + Note: + + The 'substanceUnits' attribute is available in SBML Level 3 but is + not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetTimeUnits " + Predicate returning True if this Model's 'timeUnits' attribute is + set. + + Returns True if the 'timeUnits' attribute of this Model is set, + False otherwise. + + Note: + + The 'substanceUnits' attribute is available in SBML Level 3 but is + not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetVolumeUnits " + Predicate returning True if this Model's 'volumeUnits' attribute is + set. + + Returns True if the 'volumeUnits' attribute of this Model is set, + False otherwise. + + Note: + + The 'volumeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetAreaUnits " + Predicate returning True if this Model's 'areaUnits' attribute is + set. + + Returns True if the 'areaUnits' attribute of this Model is set, + False otherwise. + + Note: + + The 'areaUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetLengthUnits " + Predicate returning True if this Model's 'lengthUnits' attribute is + set. + + Returns True if the 'lengthUnits' attribute of this Model is set, + False otherwise. + + Note: + + The 'lengthUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetExtentUnits " + Predicate returning True if this Model's 'extentUnits' attribute is + set. + + Returns True if the 'extentUnits' attribute of this Model is set, + False otherwise. + + Note: + + The 'extentUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::isSetConversionFactor " + Predicate returning True if this Model's 'conversionFactor' + attribute is set. + + Returns True if the 'conversionFactor' attribute of this Model is + set, False otherwise. + + Note: + + The 'conversionFactor' attribute is available in SBML Level 3 but + is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setId " + Sets the value of the 'id' attribute of this Model. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Model::setName " + Sets the value of the 'name' attribute of this Model. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Model::setSubstanceUnits " + Sets the value of the 'substanceUnits' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new substanceUnits for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'substanceUnits' attribute is available in SBML Level 3 but is + not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setTimeUnits " + Sets the value of the 'timeUnits' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new timeUnits for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'timeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setVolumeUnits " + Sets the value of the 'volumeUnits' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new volumeUnits for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'volumeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setAreaUnits " + Sets the value of the 'areaUnits' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new areaUnits for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'areaUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setLengthUnits " + Sets the value of the 'lengthUnits' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new lengthUnits for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'lengthUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setExtentUnits " + Sets the value of the 'extentUnits' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new extentUnits for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'extentUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::setConversionFactor " + Sets the value of the 'conversionFactor' attribute of this Model. + + The string in 'units' is copied. + + Parameter 'units' is the new conversionFactor for the Model + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'conversionFactor' attribute is available in SBML Level 3 but + is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetId " + Unsets the value of the 'id' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Model::unsetName " + Unsets the value of the 'name' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Model::unsetSubstanceUnits " + Unsets the value of the 'substanceUnits' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'substanceUnits' attribute is available in SBML Level 3 but is + not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetTimeUnits " + Unsets the value of the 'timeUnits' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'timeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetVolumeUnits " + Unsets the value of the 'volumeUnits' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'volumeUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetAreaUnits " + Unsets the value of the 'areaUnits' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'areaUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetLengthUnits " + Unsets the value of the 'lengthUnits' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'lengthUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetExtentUnits " + Unsets the value of the 'extentUnits' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'extentUnits' attribute is available in SBML Level 3 but is not + present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::unsetConversionFactor " + Unsets the value of the 'conversionFactor' attribute of this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'conversionFactor' attribute is available in SBML Level 3 but + is not present on Model in lower Levels of SBML. +"; + + +%feature("docstring") Model::addFunctionDefinition " + Adds a copy of the given FunctionDefinition object to this Model. + + Parameter 'fd' is the FunctionDefinition to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createFunctionDefinition() + for a method that does not lead to these issues. + + See also createFunctionDefinition(). +"; + + +%feature("docstring") Model::addUnitDefinition " + Adds a copy of the given UnitDefinition object to this Model. + + Parameter 'ud' is the UnitDefinition object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createUnitDefinition() for + a method that does not lead to these issues. + + See also createUnitDefinition(). +"; + + +%feature("docstring") Model::addCompartmentType " + Adds a copy of the given CompartmentType object to this Model. + + Parameter 'ct' is the CompartmentType object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createCompartmentType() + for a method that does not lead to these issues. + + Note: + + The CompartmentType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. + + See also createCompartmentType(). +"; + + +%feature("docstring") Model::addSpeciesType " + Adds a copy of the given SpeciesType object to this Model. + + Parameter 'st' is the SpeciesType object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createSpeciesType() for a + method that does not lead to these issues. + + Note: + + The SpeciesType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. + + See also createSpeciesType(). +"; + + +%feature("docstring") Model::addCompartment " + Adds a copy of the given Compartment object to this Model. + + Parameter 'c' is the Compartment object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createCompartment() for a + method that does not lead to these issues. + + See also createCompartment(). +"; + + +%feature("docstring") Model::addSpecies " + Adds a copy of the given Species object to this Model. + + Parameter 's' is the Species object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createSpecies() for a + method that does not lead to these issues. + + See also createSpecies(). +"; + + +%feature("docstring") Model::addParameter " + Adds a copy of the given Parameter object to this Model. + + Parameter 'p' is the Parameter object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createParameter() for a + method that does not lead to these issues. + + See also createParameter(). +"; + + +%feature("docstring") Model::addInitialAssignment " + Adds a copy of the given InitialAssignment object to this Model. + + Parameter 'ia' is the InitialAssignment object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createInitialAssignment() + for a method that does not lead to these issues. + + See also createInitialAssignment(). +"; + + +%feature("docstring") Model::addRule " + Adds a copy of the given Rule object to this Model. + + Parameter 'r' is the Rule object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see the methods + Model.createAlgebraicRule(), Model.createAssignmentRule() and + Model.createRateRule() for methods that do not lead to these issues. + + See also createAlgebraicRule(), createAssignmentRule(), + createRateRule(). +"; + + +%feature("docstring") Model::addConstraint " + Adds a copy of the given Constraint object to this Model. + + Parameter 'c' is the Constraint object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createConstraint() for a + method that does not lead to these issues. + + See also createConstraint(). +"; + + +%feature("docstring") Model::addReaction " + Adds a copy of the given Reaction object to this Model. + + Parameter 'r' is the Reaction object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createReaction() for a + method that does not lead to these issues. + + See also createReaction(). +"; + + +%feature("docstring") Model::addEvent " + Adds a copy of the given Event object to this Model. + + Parameter 'e' is the Event object to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Model. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Model. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Model.createEvent() for a method + that does not lead to these issues. + + See also createEvent(). +"; + + +%feature("docstring") Model::createFunctionDefinition " + Creates a new FunctionDefinition inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the FunctionDefinition object created + + See also addFunctionDefinition(). +"; + + +%feature("docstring") Model::createUnitDefinition " + Creates a new UnitDefinition inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the UnitDefinition object created + + See also addUnitDefinition(). +"; + + +%feature("docstring") Model::createUnit " + Creates a new Unit object within the last UnitDefinition object + created in this model and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the UnitDefinition was created is not + significant. If a UnitDefinition object does not exist in this + model, a new Unit is not created and None is returned instead. + + Returns the Unit object created + + See also addUnitDefinition(). +"; + + +%feature("docstring") Model::createCompartmentType " + Creates a new CompartmentType inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the CompartmentType object created + + Note: + + The CompartmentType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. + + See also addCompartmentType(). +"; + + +%feature("docstring") Model::createSpeciesType " + Creates a new SpeciesType inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the SpeciesType object created + + Note: + + The SpeciesType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. + + See also addSpeciesType(). +"; + + +%feature("docstring") Model::createCompartment " + Creates a new Compartment inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the Compartment object created + + See also addCompartment(). +"; + + +%feature("docstring") Model::createSpecies " + Creates a new Species inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the Species object created + + See also addSpecies(). +"; + + +%feature("docstring") Model::createParameter " + Creates a new Parameter inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the Parameter object created + + See also addParameter(). +"; + + +%feature("docstring") Model::createInitialAssignment " + Creates a new InitialAssignment inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the InitialAssignment object created + + See also addInitialAssignment(). +"; + + +%feature("docstring") Model::createAlgebraicRule " + Creates a new AlgebraicRule inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the AlgebraicRule object created + + See also addRule(). +"; + + +%feature("docstring") Model::createAssignmentRule " + Creates a new AssignmentRule inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the AssignmentRule object created + + See also addRule(). +"; + + +%feature("docstring") Model::createRateRule " + Creates a new RateRule inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the RateRule object created + + See also addRule(). +"; + + +%feature("docstring") Model::createConstraint " + Creates a new Constraint inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the Constraint object created + + See also addConstraint(). +"; + + +%feature("docstring") Model::createReaction " + Creates a new Reaction inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the Reaction object created + + See also addReaction(). +"; + + +%feature("docstring") Model::createReactant " + Creates a new SpeciesReference object for a reactant inside the last + Reaction object in this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, a new SpeciesReference is not created + and None is returned instead. + + Returns the SpeciesReference object created +"; + + +%feature("docstring") Model::createProduct " + Creates a new SpeciesReference object for a product inside the last + Reaction object in this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, a new SpeciesReference is not created + and None is returned instead. + + Returns the SpeciesReference object created +"; + + +%feature("docstring") Model::createModifier " + Creates a new ModifierSpeciesReference object for a modifier species + inside the last Reaction object in this Model, and returns a pointer + to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, a new ModifierSpeciesReference is not + created and None is returned instead. + + Returns the SpeciesReference object created +"; + + +%feature("docstring") Model::createKineticLaw " + Creates a new KineticLaw inside the last Reaction object created in + this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Reaction object was created and added + to this Model is not significant. It could have been created in a + variety of ways, for example using createReaction(). If a Reaction + does not exist for this model, or a Reaction exists but already has a + KineticLaw, a new KineticLaw is not created and None is returned + instead. + + Returns the KineticLaw object created +"; + + +%feature("docstring") Model::createKineticLawParameter " + Creates a new local Parameter inside the KineticLaw object of the + last Reaction created inside this Model, and returns a pointer to + it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The last KineticLaw object in this Model could have been created in a + variety of ways. For example, it could have been added using + createKineticLaw(), or it could be the result of using + Reaction.createKineticLaw() on the Reaction object created by a + createReaction(). If a Reaction does not exist for this model, or + the last Reaction does not contain a KineticLaw object, a new + Parameter is not created and None is returned instead. + + Returns the Parameter object created +"; + + +%feature("docstring") Model::createKineticLawLocalParameter " + Creates a new LocalParameter inside the KineticLaw object of the last + Reaction created inside this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The last KineticLaw object in this Model could have been created in a + variety of ways. For example, it could have been added using + createKineticLaw(), or it could be the result of using + Reaction.createKineticLaw() on the Reaction object created by a + createReaction(). If a Reaction does not exist for this model, or + the last Reaction does not contain a KineticLaw object, a new + Parameter is not created and None is returned instead. + + Returns the Parameter object created +"; + + +%feature("docstring") Model::createEvent " + Creates a new Event inside this Model and returns it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + Returns the Event object created +"; + + +%feature("docstring") Model::createEventAssignment " + Creates a new EventAssignment inside the last Event object created in + this Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Event object in this model was + created is not significant. It could have been created in a variety + of ways, for example by using createEvent(). If no Event object + exists in this Model object, a new EventAssignment is not created + and None is returned instead. + + Returns the EventAssignment object created +"; + + +%feature("docstring") Model::createTrigger " + Creates a new Trigger inside the last Event object created in this + Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Event object in this model was + created is not significant. It could have been created in a variety + of ways, for example by using createEvent(). If no Event object + exists in this Model object, a new Trigger is not created and None + is returned instead. + + Returns the Trigger object created +"; + + +%feature("docstring") Model::createDelay " + Creates a new Delay inside the last Event object created in this + Model, and returns a pointer to it. + + The SBML Level and Version of the enclosing Model object, as well as + any SBML package namespaces, are used to initialize this object's + corresponding attributes. + + The mechanism by which the last Event object in this model was + created is not significant. It could have been created in a variety + of ways, for example by using createEvent(). If no Event object + exists in this Model object, a new Delay is not created and None is + returned instead. + + Returns the Delay object created +"; + + +%feature("docstring") Model::setAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setAnnotation(XMLNode annotation) + + Sets the value of the 'annotation' subelement of this SBML object to + a copy of 'annotation'. + + Any existing content of the 'annotation' subelement is discarded. + Unless you have taken steps to first copy and reconstitute any + existing annotations into the 'annotation' that is about to be + assigned, it is likely that performing such wholesale replacement is + unfriendly towards other software applications whose annotations are + discarded. An alternative may be to use appendAnnotation(). + + Parameter 'annotation' is an XML structure that is to be used as the + content of the 'annotation' subelement of this object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also appendAnnotation(), appendAnnotation(). +"; + + +%feature("docstring") Model::appendAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + appendAnnotation(XMLNode annotation) + + Appends annotation content to any existing content in the + 'annotation' subelement of this object. + + The content in 'annotation' is copied. Unlike setAnnotation(), this + method allows other annotations to be preserved when an application + adds its own data. + + Parameter 'annotation' is an XML structure that is to be copied and + appended to the content of the 'annotation' subelement of this + object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also setAnnotation(), setAnnotation(). +"; + + +%feature("docstring") Model::getListOfFunctionDefinitions " + Get the ListOfFunctionDefinitions object in this Model. + + Returns the list of FunctionDefinitions for this Model. +"; + + +%feature("docstring") Model::getListOfUnitDefinitions " + Get the ListOfUnitDefinitions object in this Model. + + Returns the list of UnitDefinitions for this Model. +"; + + +%feature("docstring") Model::getListOfCompartmentTypes " + Get the ListOfCompartmentTypes object in this Model. + + Returns the list of CompartmentTypes for this Model. + + Note: + + The CompartmentType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getListOfSpeciesTypes " + Get the ListOfSpeciesTypes object in this Model. + + Returns the list of SpeciesTypes for this Model. + + Note: + + The SpeciesType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getListOfCompartments " + Get the ListOfCompartments object in this Model. + + Returns the list of Compartments for this Model. +"; + + +%feature("docstring") Model::getListOfSpecies " + Get the ListOfSpecies object in this Model. + + Returns the list of Species for this Model. +"; + + +%feature("docstring") Model::getListOfParameters " + Get the ListOfParameters object in this Model. + + Returns the list of Parameters for this Model. +"; + + +%feature("docstring") Model::getListOfInitialAssignments " + Get the ListOfInitialAssignments object in this Model. + + Returns the list of InitialAssignments for this Model. +"; + + +%feature("docstring") Model::getListOfRules " + Get the ListOfRules object in this Model. + + Returns the list of Rules for this Model. +"; + + +%feature("docstring") Model::getListOfConstraints " + Get the ListOfConstraints object in this Model. + + Returns the list of Constraints for this Model. +"; + + +%feature("docstring") Model::getListOfReactions " + Get the ListOfReactions object in this Model. + + Returns the list of Reactions for this Model. +"; + + +%feature("docstring") Model::getListOfEvents " + Get the ListOfEvents object in this Model. + + Returns the list of Events for this Model. +"; + + +%feature("docstring") Model::getFunctionDefinition " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getFunctionDefinition(long n) + + Get the nth FunctionDefinitions object in this Model. + + Returns the nth FunctionDefinition of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getFunctionDefinition(string sid) + + Get a FunctionDefinition object based on its identifier. + + Returns the FunctionDefinition in this Model with the identifier + 'sid' or None if no such FunctionDefinition exists. +"; + + +%feature("docstring") Model::getUnitDefinition " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getUnitDefinition(long n) + + Get the nth UnitDefinition object in this Model. + + Returns the nth UnitDefinition of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getUnitDefinition(string sid) + + Get a UnitDefinition based on its identifier. + + Returns the UnitDefinition in this Model with the identifier 'sid' or + None if no such UnitDefinition exists. +"; + + +%feature("docstring") Model::getCompartmentType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getCompartmentType(long n) + + Get the nth CompartmentType object in this Model. + + Returns the nth CompartmentType of this Model. + + Note: + + The CompartmentType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. + + ______________________________________________________________________ + Method variant with the following signature: + + getCompartmentType(string sid) + + Get a CompartmentType object based on its identifier. + + Returns the CompartmentType in this Model with the identifier 'sid' + or None if no such CompartmentType exists. + + Note: + + The CompartmentType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getSpeciesType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getSpeciesType(long n) + + Get the nth SpeciesType object in this Model. + + Returns the nth SpeciesType of this Model. + + Note: + + The SpeciesType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. + + ______________________________________________________________________ + Method variant with the following signature: + + getSpeciesType(string sid) + + Get a SpeciesType object based on its identifier. + + Returns the SpeciesType in this Model with the identifier 'sid' or + None if no such SpeciesType exists. + + Note: + + The SpeciesType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getCompartment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getCompartment(long n) + + Get the nth Compartment object in this Model. + + Returns the nth Compartment of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getCompartment(string sid) + + Get a Compartment object based on its identifier. + + Returns the Compartment in this Model with the identifier 'sid' or + None if no such Compartment exists. +"; + + +%feature("docstring") Model::getSpecies " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getSpecies(long n) + + Get the nth Species object in this Model. + + Returns the nth Species of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getSpecies(string sid) + + Get a Species object based on its identifier. + + Returns the Species in this Model with the identifier 'sid' or None + if no such Species exists. +"; + + +%feature("docstring") Model::getParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getParameter(long n) + + Get the nth Parameter object in this Model. + + Returns the nth Parameter of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getParameter(string sid) + + Get a Parameter object based on its identifier. + + Returns the Parameter in this Model with the identifier 'sid' or None + if no such Parameter exists. +"; + + +%feature("docstring") Model::getInitialAssignment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getInitialAssignment(string symbol) + + Get an InitialAssignment object based on the symbol to which it + assigns a value. + + Returns the InitialAssignment in this Model with the given 'symbol' + attribute value or None if no such InitialAssignment exists. + + ______________________________________________________________________ + Method variant with the following signature: + + getInitialAssignment(long n) + + Get the nth InitialAssignment object in this Model. + + Returns the nth InitialAssignment of this Model. +"; + + +%feature("docstring") Model::getRule " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getRule(string variable) + + Get a Rule object based on the variable to which it assigns a value. + + Returns the Rule in this Model with the given 'variable' attribute + value or None if no such Rule exists. + + ______________________________________________________________________ + Method variant with the following signature: + + getRule(long n) + + Get the nth Rule object in this Model. + + Returns the nth Rule of this Model. +"; + + +%feature("docstring") Model::getConstraint " + Get the nth Constraint object in this Model. + + Returns the nth Constraint of this Model. +"; + + +%feature("docstring") Model::getReaction " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getReaction(long n) + + Get the nth Reaction object in this Model. + + Returns the nth Reaction of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getReaction(string sid) + + Get a Reaction object based on its identifier. + + Returns the Reaction in this Model with the identifier 'sid' or None + if no such Reaction exists. +"; + + +%feature("docstring") Model::getSpeciesReference " + Get a SpeciesReference object based on its identifier. + + Returns the SpeciesReference in this Model with the identifier 'sid' + or None if no such SpeciesReference exists. +"; + + +%feature("docstring") Model::getModifierSpeciesReference " + Get a ModifierSpeciesReference object based on its identifier. + + Returns the ModifierSpeciesReference in this Model with the + identifier 'sid' or None if no such ModifierSpeciesReference exists. +"; + + +%feature("docstring") Model::getEvent " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getEvent(long n) + + Get the nth Event object in this Model. + + Returns the nth Event of this Model. + + ______________________________________________________________________ + Method variant with the following signature: + + getEvent(string sid) + + Get an Event object based on its identifier. + + Returns the Event in this Model with the identifier 'sid' or None if + no such Event exists. +"; + + +%feature("docstring") Model::getNumFunctionDefinitions " + Get the number of FunctionDefinition objects in this Model. + + Returns the number of FunctionDefinitions in this Model. +"; + + +%feature("docstring") Model::getNumUnitDefinitions " + Get the number of UnitDefinition objects in this Model. + + Returns the number of UnitDefinitions in this Model. +"; + + +%feature("docstring") Model::getNumCompartmentTypes " + Get the number of CompartmentType objects in this Model. + + Returns the number of CompartmentTypes in this Model. + + Note: + + The CompartmentType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getNumSpeciesTypes " + Get the number of SpeciesType objects in this Model. + + Returns the number of SpeciesTypes in this Model. + + Note: + + The SpeciesType object class is only available in SBML Level 2 + Versions 2-4. It is not available in Level 1 nor Level 3. +"; + + +%feature("docstring") Model::getNumCompartments " + Get the number of Compartment objects in this Model. + + Returns the number of Compartments in this Model. +"; + + +%feature("docstring") Model::getNumSpecies " + Get the number of Specie objects in this Model. + + Returns the number of Species in this Model. +"; + + +%feature("docstring") Model::getNumSpeciesWithBoundaryCondition " + Get the number of Species in this Model having their + 'boundaryCondition' attribute value set to True. + + Returns the number of Species in this Model with boundaryCondition + set to true. +"; + + +%feature("docstring") Model::getNumParameters " + Get the number of Parameter objects in this Model. + + Returns the number of Parameters in this Model. Parameters defined + in KineticLaws are not included. +"; + + +%feature("docstring") Model::getNumInitialAssignments " + Get the number of InitialAssignment objects in this Model. + + Returns the number of InitialAssignments in this Model. +"; + + +%feature("docstring") Model::getNumRules " + Get the number of Rule objects in this Model. + + Returns the number of Rules in this Model. +"; + + +%feature("docstring") Model::getNumConstraints " + Get the number of Constraint objects in this Model. + + Returns the number of Constraints in this Model. +"; + + +%feature("docstring") Model::getNumReactions " + Get the number of Reaction objects in this Model. + + Returns the number of Reactions in this Model. +"; + + +%feature("docstring") Model::getNumEvents " + Get the number of Event objects in this Model. + + Returns the number of Events in this Model. +"; + + +%feature("docstring") Model::removeFromParentAndDelete " + Finds this Model's parent SBMLDocument and calls setModel(None) on + it, indirectly deleting itself. Overridden from the SBase function + since the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Model::renameAllIds " + Finds this Model's parent SBMLDocument and calls setModel(None) on + it, indirectly deleting itself. Overridden from the SBase function + since the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Model::renameIDs " + Finds this Model's parent SBMLDocument and calls setModel(None) on + it, indirectly deleting itself. Overridden from the SBase function + since the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Model::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Model::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Model::isBoolean " + Internal implementation method. +"; + + +%feature("docstring") Model::convertL1ToL2 " + Internal implementation method. +"; + + +%feature("docstring") Model::convertL1ToL3 " + Internal implementation method. +"; + + +%feature("docstring") Model::convertL2ToL3 " + Internal implementation method. +"; + + +%feature("docstring") Model::convertL2ToL1 " + Internal implementation method. +"; + + +%feature("docstring") Model::convertL3ToL1 " + Internal implementation method. +"; + + +%feature("docstring") Model::convertL3ToL2 " + Internal implementation method. +"; + + +%feature("docstring") Model::addModifiers " + Internal implementation method. +"; + + +%feature("docstring") Model::addConstantAttribute " + Internal implementation method. +"; + + +%feature("docstring") Model::setSpatialDimensions " + Internal implementation method. +"; + + +%feature("docstring") Model::addDefinitionsForDefaultUnits " + Internal implementation method. +"; + + +%feature("docstring") Model::convertParametersToLocals " + Internal implementation method. +"; + + +%feature("docstring") Model::setSpeciesReferenceConstantValueAndStoichiometry " + Internal implementation method. +"; + + +%feature("docstring") Model::removeMetaId " + Internal implementation method. +"; + + +%feature("docstring") Model::removeSBOTerms " + Internal implementation method. +"; + + +%feature("docstring") Model::removeHasOnlySubstanceUnits " + Internal implementation method. +"; + + +%feature("docstring") Model::removeSBOTermsNotInL2V2 " + Internal implementation method. +"; + + +%feature("docstring") Model::removeDuplicateTopLevelAnnotations " + Internal implementation method. +"; + + +%feature("docstring") Model::removeParameterRuleUnits " + Internal implementation method. +"; + + +%feature("docstring") Model::convertStoichiometryMath " + Internal implementation method. +"; + + +%feature("docstring") Model::assignRequiredValues " + Internal implementation method. +"; + + +%feature("docstring") Model::dealWithModelUnits " + Internal implementation method. +"; + + +%feature("docstring") Model::dealWithStoichiometry " + Internal implementation method. +"; + + +%feature("docstring") Model::dealWithEvents " + Internal implementation method. +"; + + +%feature("docstring") Model::convertToL2Strict " + Internal implementation method. +"; + + +%feature("docstring") Model::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") Model::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") Model::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Model::getElementName " + Returns the XML element name of this object, which for Model, is + always 'model'. + + Returns the name of this element, i.e., 'model'. +"; + + +%feature("docstring") Model::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") Model::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Model::populateListFormulaUnitsData " + Populates the list of FormulaDataUnits with the units derived for + the model. The list contains elements of class FormulaUnitsData. + + The first element of the list refers to the default units of + 'substance per time' derived from the model and has the + unitReferenceId 'subs_per_time'. This facilitates the comparison of + units derived from mathematical formula with the expected units. + + The next elements of the list record the units of the compartments + and species established from either explicitly declared or default + units. + + The next elements record the units of any parameters. + + Subsequent elements of the list record the units derived for each + mathematical expression encountered within the model. + + Note: + + This function is utilised by the Unit Consistency Validator. The + list is populated prior to running the validation and thus the + consistency of units can be checked by accessing the members of the + list and comparing the appropriate data. +"; + + +%feature("docstring") Model::isPopulatedListFormulaUnitsData " + Predicate returning True if the list of FormulaUnitsData is + populated. + + Returns True if the list of FormulaUnitsData is populated, False + otherwise. +"; + + +%feature("docstring") Model::addFormulaUnitsData " + Internal implementation method. +"; + + +%feature("docstring") Model::createFormulaUnitsData " + Internal implementation method. +"; + + +%feature("docstring") Model::getNumFormulaUnitsData " + Internal implementation method. +"; + + +%feature("docstring") Model::getListFormulaUnitsData " + Internal implementation method. +"; + + +%feature("docstring") Model::hasRequiredElements " + Predicate returning True if all the required elements for this Model + object have been set. + + Note: + + The required elements for a Model object are: listOfCompartments (L1 + only); listOfSpecies (L1V1 only); listOfReactions(L1V1 only) + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Model::removeFunctionDefinition " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeFunctionDefinition(long n) + + Removes the nth FunctionDefinition object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the FunctionDefinition object to remove + + Returns the FunctionDefinition object removed. As mentioned above, + the caller owns the returned item. None is returned if the given + index is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeFunctionDefinition(string sid) + + Removes the FunctionDefinition object with the given identifier from + this Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the FunctionDefinition objects in this Model object + have the identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the FunctionDefinition object to + remove + + Returns the FunctionDefinition object removed. As mentioned above, + the caller owns the returned object. None is returned if no + FunctionDefinition object with the identifier exists in this Model + object. +"; + + +%feature("docstring") Model::removeUnitDefinition " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeUnitDefinition(long n) + + Removes the nth UnitDefinition object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the UnitDefinition object to remove + + Returns the UnitDefinition object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeUnitDefinition(string sid) + + Removes the UnitDefinition object with the given identifier from this + Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the UnitDefinition objects in this Model object have + the identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the UnitDefinition object to + remove + + Returns the UnitDefinition object removed. As mentioned above, the + caller owns the returned object. None is returned if no + UnitDefinition object with the identifier exists in this Model + object. +"; + + +%feature("docstring") Model::removeCompartmentType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeCompartmentType(long n) + + Removes the nth CompartmentType object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the CompartmentType object to remove + + Returns the ComapartmentType object removed. As mentioned above, + the caller owns the returned item. None is returned if the given + index is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeCompartmentType(string sid) + + Removes the CompartmentType object with the given identifier from + this Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the CompartmentType objects in this Model object have + the identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the object to remove + + Returns the CompartmentType object removed. As mentioned above, the + caller owns the returned object. None is returned if no + CompartmentType object with the identifier exists in this Model + object. +"; + + +%feature("docstring") Model::removeSpeciesType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeSpeciesType(long n) + + Removes the nth SpeciesType object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the SpeciesType object to remove + + Returns the SpeciesType object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeSpeciesType(string sid) + + Removes the SpeciesType object with the given identifier from this + Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the SpeciesType objects in this Model object have the + identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the SpeciesType object to remove + + Returns the SpeciesType object removed. As mentioned above, the + caller owns the returned object. None is returned if no SpeciesType + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeCompartment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeCompartment(long n) + + Removes the nth Compartment object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Compartment object to remove + + Returns the Compartment object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeCompartment(string sid) + + Removes the Compartment object with the given identifier from this + Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the Compartment objects in this Model object have the + identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the Compartment object to remove + + Returns the Compartment object removed. As mentioned above, the + caller owns the returned object. None is returned if no Compartment + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeSpecies " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeSpecies(long n) + + Removes the nth Species object from this Model object and returns a + pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Species object to remove + + Returns the Species object removed. As mentioned above, the caller + owns the returned item. None is returned if the given index is out + of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeSpecies(string sid) + + Removes the Species object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the Species objects in this Model object have the + identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the Species object to remove + + Returns the Species object removed. As mentioned above, the caller + owns the returned object. None is returned if no Species object with + the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeParameter(long n) + + Removes the nth Parameter object from this Model object and returns + a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Parameter object to remove + + Returns the Parameter object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeParameter(string sid) + + Removes the Parameter object with the given identifier from this + Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the Parameter objects in this Model object have the + identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the Parameter object to remove + + Returns the Parameter object removed. As mentioned above, the + caller owns the returned object. None is returned if no Parameter + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeInitialAssignment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeInitialAssignment(string symbol) + + Removes the InitialAssignment object with the given 'symbol' + attribute from this Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the InitialAssignment objects in this Model object + have the 'symbol' attribute 'symbol', then None is returned. + + Parameter 'symbol' is the 'symbol' attribute of the InitialAssignment + object to remove + + Returns the InitialAssignment object removed. As mentioned above, + the caller owns the returned object. None is returned if no + InitialAssignment object with the 'symbol' attribute exists in this + Model object. + + ______________________________________________________________________ + Method variant with the following signature: + + removeInitialAssignment(long n) + + Removes the nth InitialAssignment object from this Model object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the InitialAssignment object to remove + + Returns the InitialAssignment object removed. As mentioned above, + the caller owns the returned item. None is returned if the given + index is out of range. +"; + + +%feature("docstring") Model::removeRule " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeRule(string variable) + + Removes the Rule object with the given 'variable' attribute from this + Model object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the Rule objects in this Model object have the + 'variable' attribute 'variable', then None is returned. + + Parameter 'variable' is the 'variable' attribute of the Rule object + to remove + + Returns the Rule object removed. As mentioned above, the caller + owns the returned object. None is returned if no Rule object with + the 'variable' attribute exists in this Model object. + + ______________________________________________________________________ + Method variant with the following signature: + + removeRule(long n) + + Removes the nth Rule object from this Model object and returns a + pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Rule object to remove + + Returns the Rule object removed. As mentioned above, the caller + owns the returned item. None is returned if the given index is out + of range. +"; + + +%feature("docstring") Model::removeConstraint " + Removes the nth Constraint object from this Model object and returns + a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Constraint object to remove + + Returns the Constraint object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. +"; + + +%feature("docstring") Model::removeReaction " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeReaction(long n) + + Removes the nth Reaction object from this Model object and returns a + pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Reaction object to remove + + Returns the Reaction object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeReaction(string sid) + + Removes the Reaction object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the Reaction objects in this Model object have the + identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the Reaction object to remove + + Returns the Reaction object removed. As mentioned above, the + caller owns the returned object. None is returned if no Reaction + object with the identifier exists in this Model object. +"; + + +%feature("docstring") Model::removeEvent " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeEvent(long n) + + Removes the nth Event object from this Model object and returns a + pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Event object to remove + + Returns the Event object removed. As mentioned above, the caller + owns the returned item. None is returned if the given index is out + of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeEvent(string sid) + + Removes the Event object with the given identifier from this Model + object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the Event objects in this Model object have the + identifier 'sid', then None is returned. + + Parameter 'sid' is the identifier of the Event object to remove + + Returns the Event object removed. As mentioned above, the caller + owns the returned object. None is returned if no Event object with + the identifier exists in this Model object. +"; + + +%feature("docstring") Model::appendFrom " + Takes the contents of the passed-in Model, makes copies of + everything, and appends those copies to the appropriate places in + this Model. + + This method also calls the appendFrom method on all libSBML plug-in + objects. SBML Level 3 consists of a Core definition that can be + extended via optional SBML Level 3 packages. A given model may + indicate that it uses one or more SBML packages, and likewise, a + software tool may be able to support one or more packages. LibSBML + does not come preconfigured with all possible packages included and + enabled, in part because not all package specifications have been + finalized. To support the ability for software systems to enable + support for the Level 3 packages they choose, libSBML features a + plug-in mechanism. Each SBML Level 3 package is implemented in a + separate code plug-in that can be enabled by the application to + support working with that SBML package. A given SBML model may thus + contain not only objects defined by SBML Level 3 Core, but also + objects created by libSBML plug-ins supporting additional Level 3 + packages. + + Parameter 'model' is the Model to merge with this one. +"; + + +%feature("docstring") Model::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") Model::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") Model::createObject " + Internal implementation method. +"; + + +%feature("docstring") Model::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Model::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Model::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Model::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Model::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Model::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Model::syncAnnotation " + Internal implementation method. +"; + + +%feature("docstring") Model::checkUnitDefinition " + Internal implementation method. +"; + + +%feature("docstring") Model::checkSpeciesReference " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument " + @ingroup Core Container for an SBML document and interface for + global operations on SBML documents. + + LibSBML uses the class SBMLDocument as a top-level container for + storing SBML content and data associated with it (such as warnings + and error messages). The two primary means of reading an SBML + model, SBMLReader.readSBML() and SBMLReader.readSBMLFromString(), + both return a pointer to an SBMLDocument object. From there, + callers can inquire about any errors encountered (e.g., using + SBMLDocument.getNumErrors()), access the Model object, and perform + other actions such as consistency-checking and model translation. + @~ + + When creating fresh models programmatically, the starting point is + typically the creation of an SBMLDocument object instance. The + SBMLDocument constructor accepts arguments for the SBML Level and + Version of the model to be created. After creating the SBMLDocument + object, calling programs then typically call + SBMLDocument.createModel() almost immediately, and then proceed to + call the methods on the Model object to fill out the model's + contents. + + SBMLDocument corresponds roughly to the class Sbml defined in the + SBML Level 2 specification and SBML in the Level 3 specification. + It does not have a direct correspondence in SBML Level 1. (However, + to make matters simpler for applications, libSBML creates an + SBMLDocument no matter whether the model is Level 1, Level 2 or + Level 3.) In its barest form, when written out in XML format for + (e.g.) SBML Level 2 Version 4, the corresponding structure is the + following: + + <sbml xmlns=\'http://www.sbml.org/sbml/level2/version4\' level=\'2\' version=\'4\'> + ... + </sbml> + + SBMLDocument is derived from SBase, and therefore contains the usual + SBase attributes (in SBML Level 2 and Level 3) of 'metaid' and + 'sboTerm', as well as the subelements 'notes' and 'annotation'. It + also contains the attributes 'level' and 'version' indicating the + Level and Version of the SBML data structure. These can be accessed + using the methods defined by the SBase class for that purpose. + + Checking consistency and adherence to SBML specifications + ====================================================================== + + One of the most important features of libSBML is its ability to + perform SBML validation to ensure that a model adheres to the SBML + specification for whatever Level+Version combination the model uses. + SBMLDocument provides the methods for running consistency-checking + and validation rules on the SBML content. + + First, a brief explanation of the rationale is in order. In libSBML + versions up to and including the version 3.3.x series, the + individual methods for creating and setting attributes and other + components were quite lenient, and allowed a caller to compose SBML + entities that might not, in the end, represent valid SBML. This + allowed applications the freedom to do things such as save + incomplete models (which is useful when models are being developed + over long periods of time). In the version 4.x series, libSBML is + somewhat stricter, but still permits structures to be created + independently and the results to be combined in a separate step. In + all these cases, it means that a separate validation step is + necessary when a calling program finally wants to finish a complete + SBML document. + + The primary interface to this validation facility is SBMLDocument's + SBMLDocument.checkInternalConsistency() and + SBMLDocument.checkConsistency(). The former verifies the basic + internal consistency and syntax of an SBML document, and the latter + implements more elaborate validation rules (both those defined by the + SBML specifications, as well as additional rules offered by libSBML). + + The checks performed by SBMLDocument.checkInternalConsistency() are + hardwired and cannot be changed by calling programs, but the + validation performed by SBMLDocument.checkConsistency() is under + program control using the method + SBMLDocument.setConsistencyChecks(). Applications can selectively + disable specific kinds of checks that they may not be interested in, + by calling SBMLDocument.setConsistencyChecks() with appropriate + parameters. @~ + + These methods have slightly different relevance depending on whether + a model is created programmaticaly from scratch, or whether it is + read in from a file or data stream. The following list summarizes + the possible scenarios. + + Scenario 1: Creating a model from scratch. Before writing out the + model, + + * Call SBMLDocument.checkInternalConsistency(), then inquire about + the results by calling SBMLDocument.getNumErrors() + + * Call SBMLDocument.setConsistencyChecks() @~ to configure which + checks will be performed by SBMLDocument.checkConsistency() + + * Call SBMLDocument.checkConsistency(), then inquire about the + results by calling SBMLDocument.getNumErrors() + + Scenario 2: Reading a model from a file or data stream. After + reading the model, + + * Basic consistency checks will have been performed automatically by + libSBML upon reading the content, so you only need to inquire about + the results by using SBMLDocument.getNumErrors() + + * Call SBMLDocument.setConsistencyChecks() @~ to configure which + checks are performed by SBMLDocument.checkConsistency() + + * Call SBMLDocument.checkConsistency(), then inquire about the + results by calling SBMLDocument.getNumErrors() + + @~ + + Converting documents between Levels and Versions of SBML + ====================================================================== + + LibSBML provides facilities for limited translation of SBML between + Levels and Versions of the SBML specifications. The method for doing + is is setLevelAndVersion() . In general, models can be converted + upward without difficulty (e.g., from SBML Level 1 to Level 2, or + from an earlier Version of Level 2 to the latest Version of Level + 2). Sometimes models can be translated downward as well, if they do + not use constructs specific to more advanced Levels of SBML. + + Calling SBMLDocument.setLevelAndVersion() @~ will not necessarily + lead to a successful conversion. The method will return a boolean + value to indicate success or failure. Callers must check the error + log (see next section) attached to the SBMLDocument object after + calling SBMLDocument.setLevelAndVersion() @~ in order to assess + whether any problems arose. + + If an application is interested in translating to a lower Level + and/or Version of SBML within a Level, the following methods allow + for prior assessment of whether there is sufficient compatibility to + make a translation possible: + + * SBMLDocument.checkL1Compatibility(), + + * SBMLDocument.checkL2v1Compatibility(), + + * SBMLDocument.checkL2v2Compatibility(), + + * SBMLDocument.checkL2v3Compatibility(), + + * SBMLDocument.checkL2v4Compatibility(), and + + * SBMLDocument.checkL3v1Compatibility(). + + Some changes between Versions of SBML Level 2 may lead to unexpected + behaviors when attempting conversions in either direction. For + example, SBML Level 2 Version 4 relaxed the requirement for + consistency in units of measurement between expressions annd + quantities in a model. As a result, a model written in Version 4, + if converted to Version 3 with no other changes, may fail validation + as a Version 3 model because Version 3 imposed stricter requirements + on unit consistency. + + Other changes between SBML Level 2 and Level 3 make downward + conversions challenging. In some cases, it means that a model + converted to Level 2 from Level 3 will contain attributes that were + not explicitly given in the Level 3 model, because in Level 2 these + attributes may have been optional or have default values. + + Error handling + ====================================================================== + + Upon reading a model, SBMLDocument logs any problems encountered + while reading the model from the file or data stream. The log + contains objects that record diagnostic information about any + notable issues that arose. Whether the problems are warnings or + errors, they are both reported through a single common interface + involving the object class SBMLError. + + The methods SBMLDocument.getNumErrors(), SBMLDocument.getError() @~ + and SBMLDocument.printErrors() allow callers to interact with the + warnings or errors logged. Alternatively, callers may retrieve the + entire log as an SBMLErrorLog object using the method + SBMLDocument.getErrorLog(). The SBMLErrorLog object provides some + alternative methods for interacting with the set of errors and + warnings. In either case, applications typically should first call + SBMLDocument.getNumErrors() to find out if any issues have been + logged after specific libSBML operations such as the ones discussed + in the sections above. If they have, then an application will + should proceed to inspect the individual reports using either the + direct interfaces on SBMLDocument or using the methods on the + SBMLErrorLog object. + + @~ +"; + + +%feature("docstring") SBMLDocument::getDefaultLevel " + The default SBML Level of new SBMLDocument objects. + + This 'default Level' corresponds to the most recent SBML + specification Level available at the time libSBML version 5.8.1 was + released. For this copy of libSBML, the value is 3. The default + Level is used by SBMLDocument if no Level is explicitly specified at + the time of the construction of an SBMLDocument instance. + + Returns an integer indicating the most recent SBML specification + Level + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLDocument), and the other will be a standalone + top-level function with the name SBMLDocument_getDefaultLevel(). + They are functionally identical. @~ + + @see SBMLDocument.getDefaultVersion() @~ +"; + + +%feature("docstring") SBMLDocument::getDefaultVersion " + The default Version of new SBMLDocument objects. + + This 'default Version' corresponds to the most recent Version within + the most recent Level of SBML available at the time libSBML version + 5.8.1 was released. For this copy of libSBML, the value is 1 + (where the default Level of SBML is 3). The default Version is used + by SBMLDocument if no Version is explicitly specified at the time of + the construction of an SBMLDocument instance. + + Returns an integer indicating the most recent SBML specification + Version + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLDocument), and the other will be a standalone + top-level function with the name SBMLDocument_getDefaultVersion(). + They are functionally identical. @~ + + @see SBMLDocument.getDefaultLevel() @~ +"; + + +%feature("docstring") SBMLDocument::SBMLDocument " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLDocument(SBMLNamespaces sbmlns) + + Creates a new SBMLDocument using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLDocument(long level = 0, long version = 0) + + Creates a new SBMLDocument, optionally with given values for the SBML + Level and Version. + + If both the SBML Level and Version attributes are not specified, the + SBML document is treated as having the latest Level and Version of + SBML as determined by SBMLDocument.getDefaultLevel() and + SBMLDocument.getDefaultVersion(); however, the SBMLDocument object + is otherwise left blank. In particular, the blank SBMLDocument + object has no associated XML attributes, including (but not limited + to) an XML namespace declaration. The XML namespace declaration is + not added until the model is written out, or the method + SBMLDocument.setLevelAndVersion() is called. This may be important + to keep in mind if an application needs to add additional XML + namespace declarations on the <sbml> element. Application writers + should either provide values for 'level' and 'version' on the call + to this constructor, or else call SBMLDocument.setLevelAndVersion() + shortly after creating the SBMLDocument object. + + Parameter 'level' is an integer for the SBML Level + + Parameter 'version' is an integer for the Version within the SBML + Level + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + See also SBMLDocument.setLevelAndVersion(), getDefaultLevel(), + getDefaultVersion(). + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLDocument(SBMLDocument orig) + + Copy constructor; creates a copy of this SBMLDocument. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") SBMLDocument::accept " + Accepts the given SBMLVisitor for this instance of SBMLDocument. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") SBMLDocument::clone " + Creates and returns a deep copy of this SBMLDocument. + + Returns a (deep) copy of this SBMLDocument. +"; + + +%feature("docstring") SBMLDocument::getModel " + Returns the Model object stored in this SBMLDocument. + + It is important to note that this method does not create a Model + instance. The model in the SBMLDocument must have been created at + some prior time, for example using SBMLDocument.createModel() or + SBMLDocument.setModel(). This method returns None if a model does + not yet exist. + + Returns the Model contained in this SBMLDocument. + + See also createModel(). +"; + + +%feature("docstring") SBMLDocument::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") SBMLDocument::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or itself if it has the given 'metaid', or None if no such object is + found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") SBMLDocument::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") SBMLDocument::expandFunctionDefinitions " + Removes FunctionDefinition constructs from the document and expands + any instances of their use within <math> elements. + + For example, suppose a Model contains a FunctionDefinition with + identifier 'f' representing the math expression: f(x, y) = x * y. + Suppose further that there is a reaction in which the <math> element + of the KineticLaw object contains f(s, p), where s and p are other + identifiers defined in the model. The outcome of invoking this + method is that the <math> of the KineticLaw now represents the + expression s * p and the model no longer contains any + FunctionDefinition objects. + + Returns bool True if the transformation was successful, False, + otherwise. + + Note: + + This function will check the consistency of a model before + attemptimg the transformation. If the model is not valid SBML, the + transformation will not be performed and the function will return + false. +"; + + +%feature("docstring") SBMLDocument::expandInitialAssignments " + Removes InitialAssignment constructs from the document and replaces + them with appropriate values. + + For example, suppose a Model contains a InitialAssignment to a symbol + 'k' where 'k' is the identifier of a Parameter. The outcome of + invoking this method is that the 'value' attribute of the Parameter + definition is set to the result calculated using the + InitialAssignment object's <math> formula, and the corresponding + InitialAssignment is then removed from the Model. + + Returns bool True if the transformation was successful, False, + otherwise. + + Note: + + This function will check the consistency of a model before + attemptimg the transformation. If the model is not valid SBML, the + transformation will not be performed and the function will return + false. As part of that process, this method will check that it has + values for any components referred to by the <math> elements of + InitialAssignment objects. In cases where not all of the values + have been declared (e.g., if the mathematical expression refers to + model entities that have no declared values), the InitialAssignment + in question will not be removed and this method will return false. +"; + + +%feature("docstring") SBMLDocument::setLevelAndVersion " + Sets the SBML Level and Version of this SBMLDocument instance, + attempting to convert the model as needed. + + This method is the principal way in libSBML to convert models between + Levels and Versions of SBML. Generally, models can be converted + upward without difficulty (e.g., from SBML Level 1 to Level 2, or + from an earlier Version of Level 2 to the latest Version of Level + 2). Sometimes models can be translated downward as well, if they do + not use constructs specific to more advanced Levels of SBML. + + Before calling this method, callers may check compatibility directly + using the methods SBMLDocument.checkL1Compatibility(), + SBMLDocument.checkL2v1Compatibility(), + SBMLDocument.checkL2v2Compatibility(), + SBMLDocument.checkL2v3Compatibility(), + SBMLDocument.checkL2v4Compatibility(), and + SBMLDocument.checkL3v1Compatibility(). + + The valid combinations of SBML Level and Version as of this release + of libSBML are the following: + + * Level 1 Version 2 + + * Level 2 Version 1 + + * Level 2 Version 2 + + * Level 2 Version 3 + + * Level 2 Version 4 + + * Level 3 Version 1 + + Strict conversion applies the additional criteria that both the + source and the target model must be consistent SBML. Users can + control the consistency checks that are applied using the + SBMLDocument.setConsistencyChecksForConversion() method. If either + the source or the potential target model have validation errors, the + conversion is not performed. When a strict conversion is successful, + the underlying SBML object model is altered to reflect the new level + and version. Thus, information that cannot be converted (e.g. + sboTerms) will be lost. + + Parameter 'level' is the desired SBML Level + + Parameter 'version' is the desired Version within the SBML Level + + Parameter 'strict' is boolean indicating whether to check consistency + of both the source and target model when performing conversion + (defaults to true ) + + Returns True if the level and version of the document were + successfully set to the requested values (which may have required + conversion of the model), False otherwise. + + Note: + + Calling this method will not necessarily lead to a successful + conversion. If the conversion fails, it will be logged in the error + list associated with this SBMLDocument. Callers should consult + getNumErrors() to find out if the conversion succeeded without + problems. For conversions from Level 2 to Level 1, callers can also + check the Level of the model after calling this method to find out + whether it is Level 1. (If the conversion to Level 1 failed, the + Level of this model will be left unchanged.) + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + See also checkL1Compatibility(), checkL2v1Compatibility(), + checkL2v2Compatibility(), checkL2v3Compatibility(), + checkL2v4Compatibility(), checkL3v1Compatibility(), + checkL3v1Compatibility(). +"; + + +%feature("docstring") SBMLDocument::updateSBMLNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::setModel " + Sets the Model for this SBMLDocument to a copy of the given Model. + + Parameter 'm' is the new Model to use. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + See also createModel(), getModel(). +"; + + +%feature("docstring") SBMLDocument::createModel " + Creates a new Model inside this SBMLDocument, and returns a pointer + to it. + + In SBML Level 2, the use of an identifier on a Model object is + optional. This method takes an optional argument, 'sid', for setting + the identifier. If not supplied, the identifier attribute on the + Model instance is not set. + + Parameter 'sid' is the identifier of the new Model to create. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + See also getModel(), SBMLDocument.setModel(). +"; + + +%feature("docstring") SBMLDocument::setLocationURI " + Sets the location of this SBMLDocument. Called automatically when + readSBMLFromFile is used, but may be set manually as well. +"; + + +%feature("docstring") SBMLDocument::getLocationURI " + Get the location of this SBMLDocument. If this document was read + from a file or had its location set manually, that filename or set + location will be returned, otherwise, an empty string is returned. +"; + + +%feature("docstring") SBMLDocument::setConsistencyChecks " + Controls the consistency checks that are performed when + SBMLDocument.checkConsistency() is called. + + This method works by adding or subtracting consistency checks from + the set of all possible checks that SBMLDocument.checkConsistency() + knows how to perform. This method may need to be called multiple + times in order to achieve the desired combination of checks. The + first argument ('category') in a call to this method indicates the + category of consistency/error checks that are to be turned on or + off, and the second argument ('apply', a boolean) indicates whether + to turn it on (value of True) or off (value of False). + + The possible categories (values to the argument 'category') are the + set of constants whose names begin with the characters LIBSBML_CAT_ + in the interface class libsbml. The following are the possible + choices: @~ + + * libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and + consistency of specific SBML language constructs. Performing this + set of checks is highly recommended. With respect to the SBML + specification, these concern failures in applying the validation + rules numbered 2xxxx in the Level 2 Versions 2-4 and Level 3 Version + 1 specifications. + + * libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and + consistency of identifiers used for model entities. An example of + inconsistency would be using a species identifier in a reaction rate + formula without first having declared the species. With respect to + the SBML specification, these concern failures in applying the + validation rules numbered 103xx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement + units associated with quantities in a model. With respect to the + SBML specification, these concern failures in applying the + validation rules numbered 105xx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML + constructs. With respect to the SBML specification, these concern + failures in applying the validation rules numbered 102xx in the + Level 2 Versions 2-4 and Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of + SBO identifiers (if any) used in the model. With respect to the + SBML specification, these concern failures in applying the + validation rules numbered 107xx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of + whether the system of equations implied by a model is mathematically + overdetermined. With respect to the SBML specification, this is + validation rule #10601 in the Level 2 Versions 2-4 and Level 3 + Version 1 specifications. + + * libsbml.LIBSBML_CAT_MODELING_PRACTICE: Additional checks for + recommended good modeling practice. (These are tests performed by + libSBML and do not have equivalent SBML validation rules.) + + By default, all validation checks are applied to the model in an + SBMLDocument object unless SBMLDocument.setConsistencyChecks() is + called to indicate that only a subset should be applied. Further, + this default (i.e., performing all checks) applies separately to + each new SBMLDocument object created. In other words, each time a + model is read using SBMLReader.readSBML(), + SBMLReader.readSBMLFromString(), or the global functions readSBML() + and readSBMLFromString(), a new SBMLDocument is created and for that + document, a call to SBMLDocument.checkConsistency() will default to + applying all possible checks. Calling programs must invoke + SBMLDocument.setConsistencyChecks() for each such new model if they + wish to change the consistency checks applied. + + Parameter 'category' is a value drawn from the set of SBML error + categories@~ indicating the consistency checking/validation to be + turned on or off. + + Parameter 'apply' is a boolean indicating whether the checks + indicated by 'category' should be applied or not. + + See also SBMLDocument.checkConsistency(). +"; + + +%feature("docstring") SBMLDocument::setConsistencyChecksForConversion " + Controls the consistency checks that are performed when + SBMLDocument.setLevelAndVersion() is called. + + This method works by adding or subtracting consistency checks from + the set of all possible checks that may be performed to avoid + conversion to or from an invalid document. This method may need to + be called multiple times in order to achieve the desired + combination of checks. The first argument ('category') in a call to + this method indicates the category of consistency/error checks that + are to be turned on or off, and the second argument ('apply', a + boolean) indicates whether to turn it on (value of True) or off + (value of False). + + The possible categories (values to the argument 'category') are the + set of constants whose names begin with the characters LIBSBML_CAT_ + in the interface class libsbml. The following are the possible + choices: @~ + + * libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and + consistency of specific SBML language constructs. Performing this + set of checks is highly recommended. With respect to the SBML + specification, these concern failures in applying the validation + rules numbered 2xxxx in the Level 2 Versions 2-4 and Level 3 Version + 1 specifications. + + * libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and + consistency of identifiers used for model entities. An example of + inconsistency would be using a species identifier in a reaction rate + formula without first having declared the species. With respect to + the SBML specification, these concern failures in applying the + validation rules numbered 103xx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement + units associated with quantities in a model. With respect to the + SBML specification, these concern failures in applying the + validation rules numbered 105xx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML + constructs. With respect to the SBML specification, these concern + failures in applying the validation rules numbered 102xx in the + Level 2 Versions 2-4 and Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of + SBO identifiers (if any) used in the model. With respect to the + SBML specification, these concern failures in applying the + validation rules numbered 107xx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications. + + * libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of + whether the system of equations implied by a model is mathematically + overdetermined. With respect to the SBML specification, this is + validation rule #10601 in the Level 2 Versions 2-4 and Level 3 + Version 1 specifications. + + * libsbml.LIBSBML_CAT_MODELING_PRACTICE: Additional checks for + recommended good modeling practice. (These are tests performed by + libSBML and do not have equivalent SBML validation rules.) + + By default, all validation checks are applied to the model in an + SBMLDocument object unless SBMLDocument.setConsistencyChecks() is + called to indicate that only a subset should be applied. Further, + this default (i.e., performing all checks) applies separately to + each new SBMLDocument object created. In other words, each time a + model is read using SBMLReader.readSBML(), + SBMLReader.readSBMLFromString(), or the global functions readSBML() + and readSBMLFromString(), a new SBMLDocument is created and for that + document, a call to SBMLDocument.checkConsistency() will default to + applying all possible checks. Calling programs must invoke + SBMLDocument.setConsistencyChecks() for each such new model if they + wish to change the consistency checks applied. + + Parameter 'category' is a value drawn from the set of SBML error + categories@~ indicating the consistency checking/validation to be + turned on or off. + + Parameter 'apply' is a boolean indicating whether the checks + indicated by 'category' should be applied or not. + + See also SBMLDocument.setLevelAndVersion(). +"; + + +%feature("docstring") SBMLDocument::checkConsistency " + Performs consistency checking and validation on this SBML document. + + If this method returns a nonzero value (meaning, one or more + consistency checks have failed for SBML document), the failures may + be due to warnings or errors. Callers should inspect the severity + flag in the individual SBMLError objects returned by + SBMLDocument.getError() to determine the nature of the failures. + + Returns the number of failed checks (errors) encountered. + + See also SBMLDocument.checkInternalConsistency(). +"; + + +%feature("docstring") SBMLDocument::validateSBML " + Performs consistency checking and validation on this SBML document. + + If this method returns a nonzero value (meaning, one or more + consistency checks have failed for SBML document), the failures may + be due to warnings or errors. Callers should inspect the severity + flag in the individual SBMLError objects returned by + SBMLDocument.getError() to determine the nature of the failures. + + Note: + + unlike checkConsistency this method will write the document in + order to determine all errors for the document. This will + also clear the error log. + + Returns the number of failed checks (errors) encountered. + + See also SBMLDocument.checkConsistency(). +"; + + +%feature("docstring") SBMLDocument::checkInternalConsistency " + Performs consistency checking on libSBML's internal representation of + an SBML Model. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. + + The distinction between this method and + SBMLDocument.checkConsistency() is that this method reports on + fundamental syntactic and structural errors that violate the XML + Schema for SBML; by contrast, SBMLDocument.checkConsistency() + performs more elaborate model verifications and also validation + according to the validation rules written in the appendices of the + SBML Level 2 Versions 2-4 specification documents. + + See also SBMLDocument.checkConsistency(). +"; + + +%feature("docstring") SBMLDocument::checkL1Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 1 and can be converted to + Level 1. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v1Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 1 and can be + converted to Level 2 Version 1. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v2Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 2 and can be + converted to Level 2 Version 2. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v3Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 3 and can be + converted to Level 2 Version 3. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL2v4Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 2 Version 4 and can be + converted to Level 2 Version 4. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::checkL3v1Compatibility " + Performs a set of consistency checks on the document to establish + whether it is compatible with SBML Level 3 Version 1 and can be + converted to Level 3 Version 1. + + Callers should query the results of the consistency check by calling + SBMLDocument.getError(). + + Returns the number of failed checks (errors) encountered. +"; + + +%feature("docstring") SBMLDocument::getError " + Returns the nth error or warning encountered during parsing, + consistency checking, or attempted translation of this model. + + Callers can use method XMLError.getSeverity() on the result to assess + the severity of the problem. The possible severity levels range from + informational messages to fatal errors. + + Returns the error or warning indexed by integer 'n', or return None + if n > (getNumErrors() - 1). + + Parameter 'n' is the integer index of the error sought. + + See also SBMLDocument.getNumErrors(). +"; + + +%feature("docstring") SBMLDocument::getNumErrors " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getNumErrors(long severity) + + Returns the number of errors or warnings encountered with the given + severity during parsing, consistency checking, or attempted + translation of this model. + + Parameter 'severity' is the severity of the error sought. + + Returns the number of errors or warnings encountered + + See also SBMLDocument.getError(), SBMLDocument.getError(). +"; + + +%feature("docstring") SBMLDocument::printErrors " + Prints all the errors or warnings encountered trying to parse, + check, or translate this SBML document. + + It prints the text to the stream given by the optional parameter + 'stream'. If no parameter is given, it prints the output to the + standard error stream. + + If no errors have occurred, i.e., getNumErrors() == 0, no output + will be sent to the stream. + + The format of the output is: + + N error(s): + line NNN: (id) message + + Parameter 'stream' is the ostream or ostringstream object indicating + where the output should be printed. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + See also getNumErrors(), getErrorLog(), SBMLDocument.getError(). +"; + + +%feature("docstring") SBMLDocument::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::convert " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also SBMLDocument.getElementName(). +"; + + +%feature("docstring") SBMLDocument::getElementName " + Returns the XML element name of this object, which for SBMLDocument, + is always 'sbml'. + + Returns the name of this element, i.e., 'sbml'. +"; + + +%feature("docstring") SBMLDocument::getErrorLog " + Returns the list of errors or warnings logged during parsing, + consistency checking, or attempted translation of this model. + + Returns the SBMLErrorLog used for this SBMLDocument + + See also SBMLDocument.getNumErrors(). +"; + + +%feature("docstring") SBMLDocument::getNamespaces " + Returns a list of XML Namespaces associated with the XML content of + this SBML document. + + Returns the XML Namespaces associated with this SBML object +"; + + +%feature("docstring") SBMLDocument::enableDefaultNS " + Set/unset default namespace to each top-level element defined in the + given package extension. + + This works by adding a xmlns=\"...\" attribute. No prefix will be + written when writing elements defined in the given package extension + if True is given as second argument. + + Parameter 'package' is the name or URI of the package extension. + Parameter 'flag' is boolean value to indicate whether to write a + namespace prefix. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_PKG_UNKNOWN_VERSION +"; + + +%feature("docstring") SBMLDocument::isEnabledDefaultNS " + Returns True if a default namespace is added to each top-level + element defined in the given package extension, otherwise returns + False. + + This basically checks if the attribute xmlns=\"...\" is present. + + Parameter 'package' is the name or URI of the package extension. + + Returns a boolean +"; + + +%feature("docstring") SBMLDocument::setPackageRequired " + Sets the required attribute value of the given package extension. + + Note: + + The name of package must not be given if the package is not enabled. + + Parameter 'package' is the name or URI of the package extension. + Parameter 'flag' is Boolean value indicating whether the package is + required. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_PKG_UNKNOWN_VERSION +"; + + +%feature("docstring") SBMLDocument::getPackageRequired " + Returns the required attribute of the given package extension. + + Note: + + The name of package must not be given if the package is not enabled. + + Parameter 'package' is the name or URI of the package extension. + + Returns Boolean flag indicating whether the package is flagged as + being required. +"; + + +%feature("docstring") SBMLDocument::isSetPackageRequired " + Returns True if the required attribute of the given package extension + is defined, otherwise returns False. + + Note: + + The name of package must not be given if the package is not enabled. + + Parameter 'package' is the name or URI of the package extension. + + Returns a Boolean +"; + + +%feature("docstring") SBMLDocument::isIgnoredPackage " + Returns True if the given package extension is one of an ignored + packages, otherwise returns False. + + An ignored package is one that is defined to be used in this SBML + document, but the package is not enabled in this copy of libSBML. + + Parameter 'pkgURI' is the URI of the package extension. + + Returns a Boolean, True if the package is being ignored and False + otherwise. +"; + + +%feature("docstring") SBMLDocument::setPkgRequired " + Sets the value of the required attribute for the given package. + + Note: + + The name of package must not be given if the package is not enabled. + + Parameter 'package' is the name or URI of the package extension. + Parameter 'flag' is a Boolean value. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_PKG_UNKNOWN_VERSION + + DEPRECATED. Replaced in libSBML 5.2.0 by setPackageRequired() +"; + + +%feature("docstring") SBMLDocument::getPkgRequired " + Returns the required attribute of the given package extension. + + Note: + + The name of package must not be given if the package is not enabled. + + Parameter 'package' is the name or URI of the package extension. + + Returns a Boolean value indicating whether the package is flagged as + being required in this SBML document. + + DEPRECATED. Replaced in libSBML 5.2.0 by getPackageRequired() +"; + + +%feature("docstring") SBMLDocument::isSetPkgRequired " + Returns True if the required attribute of the given package extension + is defined, otherwise returns False. + + Note: + + The name of package must not be given if the package is not enabled. + + Parameter 'package' is the name or URI of the package extension. + + Returns a Boolean value. + + DEPRECATED. Replaced in libSBML 5.2.0 by isSetPackageRequired() +"; + + +%feature("docstring") SBMLDocument::isIgnoredPkg " + Returns True if the given package extension is one of ignored + packages, otherwise returns False. + + An ignored package is one that is defined to be used in this SBML + document, but the package is not enabled in this copy of libSBML. + + Parameter 'pkgURI' is the URI of the package extension. + + Returns a boolean + + DEPRECATED. Replaced in libSBML 5.2.0 by isIgnoredPackage() +"; + + +%feature("docstring") SBMLDocument::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::writeElements " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::getApplicableValidators " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::getConversionValidators " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::setApplicableValidators " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::setConversionValidators " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::getNumValidators " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::clearValidators " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::addValidator " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::getValidator " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::createObject " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocument::writeXMLNS " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition " + @ingroup Core Implementation of SBML's FunctionDefinition construct. + + The FunctionDefinition structure associates an identifier with a + function definition. This identifier can then be used as the + function called in subsequent MathML content elsewhere in an SBML + model. + + FunctionDefinition has one required attribute, 'id', to give the + function a unique identifier by which other parts of an SBML model + definition can refer to it. A FunctionDefinition instance can also + have an optional 'name' attribute of type string. Identifiers and + names must be used according to the guidelines described in the SBML + specification (e.g., Section 3.3 in the Level 2 Version 4 + specification). + + FunctionDefinition has a required 'math' subelement containing a + MathML expression defining the function body. The content of this + element can only be a MathML 'lambda' element. The 'lambda' element + must begin with zero or more 'bvar' elements, followed by any other + of the elements in the MathML subset allowed in SBML Level 2 except + 'lambda' (i.e., a 'lambda' element cannot contain another 'lambda' + element). This is the only place in SBML where a 'lambda' element + can be used. The function defined by a FunctionDefinition is only + available for use in other MathML elements that follow the + FunctionDefinition definition in the model. (These restrictions + prevent recursive and mutually-recursive functions from being + expressed.) + + A further restriction on the content of 'math' is that it cannot + contain references to variables other than the variables declared to + the 'lambda' itself. That is, the contents of MathML 'ci' elements + inside the body of the 'lambda' can only be the variables declared + by its 'bvar' elements, or the identifiers of other + FunctionDefinition instances in the model. This means must be + written so that all variables or parameters used in the MathML + content are passed to them via their function parameters. In SBML + Level 2, this restriction applies also to the MathML csymbol + elements for time and delay; in SBML Level 3, it additionally applies + to the csymbol element for avogadro. + + Note: + + Function definitions (also informally known as user-defined + functions) were introduced in SBML Level 2. They have purposefully + limited capabilities. A function cannot reference parameters or + other model quantities outside of itself; values must be passed as + parameters to the function. Moreover, recursive and mutually- + recursive functions are not permitted. The purpose of these + limitations is to balance power against complexity of + implementation. With the restrictions as they are, function + definitions could be implemented as textual substitutions -- they + are simply macros. Software implementations therefore do not need + the full function-definition machinery typically associated with + programming languages. + + Another important point to note is FunctionDefinition does not + have a separate attribute for defining the units of the value + returned by the function. The units associated with the function's + return value, when the function is called from within MathML + expressions elsewhere in SBML, are simply the overall units of the + expression in FunctionDefinition's 'math' subelement when applied to + the arguments supplied in the call to the function. Ascertaining + these units requires performing dimensional analysis on the + expression. (Readers may wonder why there is no attribute. The + reason is that having a separate attribute for declaring the units + would not only be redundant, but also lead to the potential for + having conflicting information. In the case of a conflict between + the declared units and those of the value actually returned by the + function, the only logical resolution rule would be to assume that + the correct units are those of the expression anyway.) +"; + + +%feature("docstring") ListOfFunctionDefinitions " + @ingroup Core Implementation of SBML's ListOfFunctionDefinitions + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") FunctionDefinition::FunctionDefinition " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + FunctionDefinition(SBMLNamespaces sbmlns) + + Creates a new FunctionDefinition using the given SBMLNamespaces + object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a FunctionDefinition object to an SBMLDocument + (e.g., using Model.addFunctionDefinition()), the SBML XML namespace + of the document overrides the value used when creating the + FunctionDefinition object via this constructor. This is necessary + to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a FunctionDefinition is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + FunctionDefinition(long level, long version) + + Creates a new FunctionDefinition using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + FunctionDefinition + + Parameter 'version' is a long integer, the SBML Version to assign to + this FunctionDefinition + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a FunctionDefinition object to an SBMLDocument + (e.g., using Model.addFunctionDefinition()), the SBML Level, SBML + Version and XML namespace of the document override the values used + when creating the FunctionDefinition object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a FunctionDefinition is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value + to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + FunctionDefinition(FunctionDefinition orig) + + Copy constructor; creates a copy of this FunctionDefinition. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") FunctionDefinition::accept " + Accepts the given SBMLVisitor for this instance of + FunctionDefinition. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next FunctionDefinition in the list + of function definitions. +"; + + +%feature("docstring") FunctionDefinition::clone " + Creates and returns a deep copy of this FunctionDefinition. + + Returns a (deep) copy of this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getId " + Returns the value of the 'id' attribute of this FunctionDefinition. + + Returns the id of this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getName " + Returns the value of the 'name' attribute of this FunctionDefinition. + + Returns the name of this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getMath " + Get the mathematical formula of this FunctionDefinition. + + Returns an ASTNode, the value of the 'math' subelement of this + FunctionDefinition +"; + + +%feature("docstring") FunctionDefinition::isSetId " + Predicate returning True if this FunctionDefinition's 'id' attribute + is set. + + Returns True if the 'id' attribute of this FunctionDefinition is + set, False otherwise. +"; + + +%feature("docstring") FunctionDefinition::isSetName " + Predicate returning True if this FunctionDefinition's 'name' + attribute is set. + + Returns True if the 'name' attribute of this FunctionDefinition is + set, False otherwise. +"; + + +%feature("docstring") FunctionDefinition::isSetMath " + Predicate returning True if this FunctionDefinition's 'math' + subelement contains a value. + + Returns True if the 'math' for this FunctionDefinition is set, False + otherwise. +"; + + +%feature("docstring") FunctionDefinition::setId " + Sets the value of the 'id' attribute of this FunctionDefinition. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + FunctionDefinition + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") FunctionDefinition::setName " + Sets the value of the 'name' attribute of this FunctionDefinition. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the FunctionDefinition + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") FunctionDefinition::setMath " + Sets the 'math' subelement of this FunctionDefinition to the Abstract + Syntax Tree given in 'math'. + + Parameter 'math' is an AST containing the mathematical expression to + be used as the formula for this FunctionDefinition. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") FunctionDefinition::unsetName " + Unsets the value of the 'name' attribute of this FunctionDefinition. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") FunctionDefinition::getArgument " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getArgument(long n) + + Get the nth argument to this function. + + Callers should first find out the number of arguments to the function + by calling getNumArguments(). + + Parameter 'n' is an integer index for the argument sought. + + Returns the nth argument (bound variable) passed to this + FunctionDefinition. + + See also getNumArguments(). + + ______________________________________________________________________ + Method variant with the following signature: + + getArgument(string name) + + Get the argument named 'name' to this FunctionDefinition. + + Parameter 'name' is the exact name (case-sensitive) of the sought- + after argument + + Returns the argument (bound variable) having the given name, or None + if no such argument exists. +"; + + +%feature("docstring") FunctionDefinition::getBody " + Get the mathematical expression that is the body of this + FunctionDefinition object. + + Returns the body of this FunctionDefinition as an Abstract Syntax + Tree, or None if no body is defined. +"; + + +%feature("docstring") FunctionDefinition::isSetBody " + Predicate returning True if the body of this FunctionDefinition has + set. + + Returns True if the body of this FunctionDefinition is set, False + otherwise. +"; + + +%feature("docstring") FunctionDefinition::getNumArguments " + Get the number of arguments (bound variables) taken by this + FunctionDefinition. + + Returns the number of arguments (bound variables) that must be passed + to this FunctionDefinition. +"; + + +%feature("docstring") FunctionDefinition::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") FunctionDefinition::getElementName " + Returns the XML element name of this object, which for + FunctionDefinition, is always 'functionDefinition'. + + Returns the name of this element, i.e., 'functionDefinition'. +"; + + +%feature("docstring") FunctionDefinition::writeElements " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + FunctionDefinition object have been set. + + Note: + + The required attributes for a FunctionDefinition object are: + + * 'id' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") FunctionDefinition::hasRequiredElements " + Predicate returning True if all the required elements for this + FunctionDefinition object have been set. + + Note: + + The required elements for a FunctionDefinition object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") FunctionDefinition::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") FunctionDefinition::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") FunctionDefinition::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfFunctionDefinitions::ListOfFunctionDefinitions " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfFunctionDefinitions(SBMLNamespaces sbmlns) + + Creates a new ListOfFunctionDefinitions object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfFunctionDefinitions + object to be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfFunctionDefinitions(long level, long version) + + Creates a new ListOfFunctionDefinitions object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfFunctionDefinitions::clone " + Creates and returns a deep copy of this ListOfFunctionDefinitions + instance. + + Returns a (deep) copy of this ListOfFunctionDefinitions. +"; + + +%feature("docstring") ListOfFunctionDefinitions::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfFunctionDefinitions::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., FunctionDefinition objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfFunctionDefinitions::getElementName " + Returns the XML element name of this object. + + For ListOfFunctionDefinitions, the XML element name is + 'listOfFunctionDefinitions'. + + Returns the name of this element, i.e., 'listOfFunctionDefinitions'. +"; + + +%feature("docstring") ListOfFunctionDefinitions::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a FunctionDefinition from the ListOfFunctionDefinitions. + + Parameter 'n' is the index number of the FunctionDefinition to get. + + Returns the nth FunctionDefinition in this ListOfFunctionDefinitions. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfFunctionDefinitions::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfFunctionDefinitions items and + returns a pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfFunctionDefinitions items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfFunctionDefinitions::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfFunctionDefinitions::createObject " + Internal implementation method. +"; + + +%feature("docstring") UnitKind_equals " + Tests for logical equality between two given UNIT_KIND_ code values. + + This function behaves exactly like C's == operator, except for the + following two cases: + + * libsbml.UNIT_KIND_LITER == libsbml.UNIT_KIND_LITRE + + * libsbml.UNIT_KIND_METER == libsbml.UNIT_KIND_METRE + + In the two cases above, C equality comparison would yield False + (because each of the above is a distinct enumeration value), but + this function returns True. + + Parameter 'uk1' is a UNIT_KIND_ value Parameter 'uk2' is a second + UNIT_KIND_ value to compare to 'uk1' + + Returns nonzero (for True) if 'uk1' is logically equivalent to 'uk2', + zero (for False) otherwise. + + Note: + + For more information about the libSBML unit codes, please refer to + the class documentation for Unit. +"; + + +%feature("docstring") UnitKind_forName " + Converts a text string naming a kind of unit to its corresponding + libSBML UNIT_KIND_ constant/enumeration value. + + Parameter 'name' is a string, the name of a predefined base unit in + SBML + + Returns a value the set of UNIT_KIND_ codes defined in class + libsbml, corresponding to the string 'name' (determined in a case- + insensitive manner).@~ + + Note: + + For more information about the libSBML unit codes, please refer to + the class documentation for Unit. +"; + + +%feature("docstring") UnitKind_toString " + Converts a unit code to a text string equivalent. + + Parameter 'uk' is a value from the set of UNIT_KIND_ codes defined + in the class libsbml @~ + + Returns the name corresponding to the given unit code. + + Note: + + For more information about the libSBML unit codes, please refer to + the class documentation for Unit. + + WARNING: + + The string returned is a static data value. The caller does not own + the returned string and is therefore not allowed to modify it. +"; + + +%feature("docstring") UnitKind_isValidUnitKindString " + Predicate for testing whether a given string corresponds to a + predefined libSBML unit code. + + Parameter 'str' is a text string naming a base unit defined by SBML + Parameter 'level' is the Level of SBML Parameter 'version' is the + Version within the Level of SBML + + Returns nonzero (for True) if string is the name of a valid + UNIT_KIND_ value, zero (for False) otherwise. + + Note: + + For more information about the libSBML unit codes, please refer to + the class documentation for Unit. +"; + + +%feature("docstring") Unit " + @ingroup Core Implementation of SBML's Unit construct. + + The SBML unit definition facility uses two classes of objects, + UnitDefinition and Unit. The approach to defining units in SBML is + compositional; for example, meter second^-2 is constructed by + combining a Unit object representing meter with another Unit object + representing second^-2. The combination is wrapped inside a + UnitDefinition, which provides for assigning an identifier and + optional name to the combination. The identifier can then be + referenced from elsewhere in a model. Thus, the UnitDefinition + class is the container, and Unit instances are placed inside + UnitDefinition instances. + + A Unit structure has four attributes named 'kind', 'exponent', + 'scale' and 'multiplier'. It represents a (possibly transformed) + reference to a base unit. The attribute 'kind' on Unit indicates + the chosen base unit. Its value must be one of the text strings + listed below; this list corresponds to SBML Level 3 Version 1 Core: + + amperefaradjouleluxradianvolt avogadrogramkatalmetresecondwatt + becquerelgraykelvinmolesiemensweber + candelahenrykilogramnewtonsievert coulombhertzlitreohmsteradian + dimensionlessitemlumenpascaltesla + + A few small differences exist between the Level 3 list of base units + and the list defined in other Level/Version combinations of SBML. + Specifically, Levels of SBML before Level 3 do not define avogadro; + conversely, Level 2 Version 1 defines Celsius, and Level 1 defines + celsius, meter, and liter, none of which are available in Level 3. + In libSBML, each of the predefined base unit names is represented by + an enumeration value whose name begins with the characters + UNIT_KIND_, discussed in a separate section below. + + The attribute named 'exponent' on Unit represents an exponent on the + unit. In SBML Level 2, the attribute is optional and has a default + value of 1 (one); in SBML Level 3, the attribute is mandatory and + there is no default value. A Unit structure also has an attribute + called 'scale'; its value must be an integer exponent for a power-of- + ten multiplier used to set the scale of the unit. For example, a + unit having a 'kind' value of gram and a 'scale' value of -3 + signifies 10^-3 * gram, or milligrams. In SBML Level 2, the + attribute is optional and has a default value of 0 (zero), because + 10^0 = 1; in SBML Level 3, the attribute is mandatory and has no + default value. Lastly, the attribute named 'multiplier' can be used + to multiply the unit by a real-numbered factor; this enables the + definition of units that are not power-of-ten multiples of SI units. + For instance, a multiplier of 0.3048 could be used to define foot as + a measure of length in terms of a metre. The 'multiplier' attribute + is optional in SBML Level 2, where it has a default value of 1 + (one); in SBML Level 3, the attribute is mandatory and has not + default value. + + <h3>Unit identification codes</h3> @~ + + As discussed above, SBML defines a set of base units which serves as + the starting point for new unit definitions. This set of base units + consists of the SI units and a small number of additional convenience + units. + + In SBML Level 2 Versions before Version 3, there existed an + enumeration of units called UnitKind. In Version 3, this enumeration + was removed and the identifier class UnitSId redefined to include + the previous UnitKind values as reserved symbols. This change has no + net effect on permissible models, their representation or their + syntax. The purpose of the change in the SBML specification was + simply to clean up an inconsistency about the contexts in which + these values were usable. However, libSBML maintains UnitKind in the + form of of a set of static integer constants whose names begin with + the characters UNIT_KIND_. These constants are defined in the class + libsbml. @~ + + As a consequence of the fact that libSBML supports models in all + Levels and Versions of SBML, libSBML's set of UNIT_KIND_ values is a + union of all the possible base unit names defined in the different + SBML specifications. However, not every base unit is allowed in + every Level+Version combination of SBML. Note in particular the + following exceptions: + + * The alternate spelling 'meter' is included in addition to the + official SI spelling 'metre'. This spelling is only permitted in + SBML Level 1 models. + + * The alternate spelling 'liter' is included in addition to the + official SI spelling 'litre'. This spelling is only permitted in + SBML Level 1 models. + + * The unit 'Celsius' is included because of its presence in + specifications of SBML prior to SBML Level 2 Version 3. + + * The unit avogadro was introduced in SBML Level 3, and is only + permitted for use in SBML Level 3 models. + + The table below lists the unit constants defined in libSBML, and + their meanings. @~ + + Enumerator Meaning + --------- --------- + UNIT_KIND_AMPERE The ampere unit. + UNIT_KIND_AVOGADRO 'dimensionless' multiplied by the value of Avogadro's constant. + UNIT_KIND_BECQUEREL The becquerel unit. + UNIT_KIND_CANDELA The candela unit. + UNIT_KIND_CELSIUS The Celsius unit. + UNIT_KIND_COULOMB The coulomb unit. + UNIT_KIND_DIMENSIONLESS A pseudo-unit indicating a dimensionless quantity. + UNIT_KIND_FARAD The farad unit. + UNIT_KIND_GRAM The gram unit. + UNIT_KIND_GRAY The gray unit. + UNIT_KIND_HENRY The henry unit. + UNIT_KIND_HERTZ The hertz unit. + UNIT_KIND_ITEM A pseudo-unit representing a single \"thing\". + UNIT_KIND_JOULE The joule unit. + UNIT_KIND_KATAL The katal unit. + UNIT_KIND_KELVIN The kelvin unit. + UNIT_KIND_KILOGRAM The kilogram unit. + UNIT_KIND_LITER Alternate spelling of litre. + UNIT_KIND_LITRE The litre unit. + UNIT_KIND_LUMEN The lumen unit. + UNIT_KIND_LUX The lux unit. + UNIT_KIND_METER Alternate spelling of metre. + UNIT_KIND_METRE The metre unit. + UNIT_KIND_MOLE The mole unit. + UNIT_KIND_NEWTON The newton unit. + UNIT_KIND_OHM The ohm unit. + UNIT_KIND_PASCAL The pascal unit. + UNIT_KIND_RADIAN The radian unit. + UNIT_KIND_SECOND The second unit. + UNIT_KIND_SIEMENS The siemens unit. + UNIT_KIND_SIEVERT The sievert unit. + UNIT_KIND_STERADIAN The steradian unit. + UNIT_KIND_TESLA The tesla unit. + UNIT_KIND_VOLT The volt unit. + UNIT_KIND_WATT The watt unit. + UNIT_KIND_WEBER The weber unit. + UNIT_KIND_INVALID Marker used by libSBML to indicate an invalid or unset unit. +"; + + +%feature("docstring") ListOfUnits " + @ingroup Core Implementation of SBML's ListOfUnits construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + ListOfUnits is entirely contained within UnitDefinition. +"; + + +%feature("docstring") Unit::Unit " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Unit(SBMLNamespaces sbmlns) + + Creates a new Unit using the given SBMLNamespaces object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Unit object to an SBMLDocument, the SBML XML + namespace of the document overrides the value used when creating the + Unit object via this constructor. This is necessary to ensure that + an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Unit is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Unit(long level, long version) + + Creates a new Unit using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Unit + + Parameter 'version' is a long integer, the SBML Version to assign to + this Unit + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Unit object to an SBMLDocument, the SBML + Level, SBML Version and XML namespace of the document override the + values used when creating the Unit object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a Unit is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Unit(Unit orig) + + Copy constructor; creates a copy of this Unit. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Unit::accept " + Accepts the given SBMLVisitor for this instance of Unit. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next Unit in the list of units + within which this Unit is embedded (i.e., in the ListOfUnits located + in the enclosing UnitDefinition instance). +"; + + +%feature("docstring") Unit::clone " + Creates and returns a deep copy of this Unit. + + Returns a (deep) copy of this Unit. +"; + + +%feature("docstring") Unit::initDefaults " + Initializes the fields of this Unit object to 'typical' default + values. + + The SBML Unit component has slightly different aspects and default + attribute values in different SBML Levels and Versions. This method + sets the values to certain common defaults, based mostly on what they + are in SBML Level 2. Specifically: + + * Sets attribute 'exponent' to 1 + + * Sets attribute 'scale' to 0 + + * Sets attribute 'multiplier' to 1.0 + + The 'kind' attribute is left unchanged. +"; + + +%feature("docstring") Unit::getKind " + Returns the 'kind' of Unit this is. + + Returns the value of the 'kind' attribute of this Unit as a value + from the set of constants whose names begin with UNIT_KIND_ defined + in the class libsbml. @~ +"; + + +%feature("docstring") Unit::getExponent " + Returns the value of the 'exponent' attribute of this unit. + + Returns the 'exponent' value of this Unit, as an integer. +"; + + +%feature("docstring") Unit::getExponentAsDouble " + Returns the value of the 'exponent' attribute of this unit. + + Returns the 'exponent' value of this Unit, as a double. +"; + + +%feature("docstring") Unit::getScale " + Returns the value of the 'scale' attribute of this unit. + + Returns the 'scale' value of this Unit, as an integer. +"; + + +%feature("docstring") Unit::getMultiplier " + Returns the value of the 'multiplier' attribute of this Unit. + + Returns the 'multiplier' value of this Unit, as a double. +"; + + +%feature("docstring") Unit::getOffset " + Returns the value of the 'offset' attribute of this Unit. + + WARNING: + + The 'offset' attribute is only available in SBML Level 2 Version 1. + This attribute is not present in SBML Level 2 Version 2 or above. + When producing SBML models using these later specifications, + modelers and software tools need to account for units with offsets + explicitly. The SBML specification document offers a number of + suggestions for how to achieve this. LibSBML methods such as this + one related to 'offset' are retained for compatibility with earlier + versions of SBML Level 2, but their use is strongly discouraged. + + Returns the 'offset' value of this Unit, as a double. +"; + + +%feature("docstring") Unit::isAmpere " + Predicate for testing whether this Unit is of the kind ampere. + + Returns True if the kind of this Unit is ampere, False otherwise. +"; + + +%feature("docstring") Unit::isAvogadro " + Predicate for testing whether this Unit is of the kind avogadro. + + Returns True if the kind of this Unit is avogadro, False otherwise. + + Note: + + The unit avogadro was introduced in SBML Level 3, and is only + permitted for use in SBML Level 3 models. +"; + + +%feature("docstring") Unit::isBecquerel " + Predicate for testing whether this Unit is of the kind becquerel + + Returns True if the kind of this Unit is becquerel, False otherwise. +"; + + +%feature("docstring") Unit::isCandela " + Predicate for testing whether this Unit is of the kind candela + + Returns True if the kind of this Unit is candela, False otherwise. +"; + + +%feature("docstring") Unit::isCelsius " + Predicate for testing whether this Unit is of the kind Celsius + + Returns True if the kind of this Unit is Celsius, False otherwise. + + WARNING: + + The predefined unit Celsius was removed from the list of predefined + units in SBML Level 2 Version 2 at the same time that the 'offset' + attribute was removed from Unit definitions. LibSBML methods such as + this one related to Celsius are retained in order to support SBML + Level 2 Version 1, but their use is strongly discouraged. +"; + + +%feature("docstring") Unit::isCoulomb " + Predicate for testing whether this Unit is of the kind coulomb + + Returns True if the kind of this Unit is coulomb, False otherwise. +"; + + +%feature("docstring") Unit::isDimensionless " + Predicate for testing whether this Unit is of the kind dimensionless. + + Returns True if the kind of this Unit is dimensionless, False + + otherwise. +"; + + +%feature("docstring") Unit::isFarad " + Predicate for testing whether this Unit is of the kind farad + + Returns True if the kind of this Unit is farad, False otherwise. +"; + + +%feature("docstring") Unit::isGram " + Predicate for testing whether this Unit is of the kind gram + + Returns True if the kind of this Unit is gram, False otherwise. +"; + + +%feature("docstring") Unit::isGray " + Predicate for testing whether this Unit is of the kind gray + + Returns True if the kind of this Unit is gray, False otherwise. +"; + + +%feature("docstring") Unit::isHenry " + Predicate for testing whether this Unit is of the kind henry + + Returns True if the kind of this Unit is henry, False otherwise. +"; + + +%feature("docstring") Unit::isHertz " + Predicate for testing whether this Unit is of the kind hertz + + Returns True if the kind of this Unit is hertz, False otherwise. +"; + + +%feature("docstring") Unit::isItem " + Predicate for testing whether this Unit is of the kind item + + Returns True if the kind of this Unit is item, False otherwise. +"; + + +%feature("docstring") Unit::isJoule " + Predicate for testing whether this Unit is of the kind joule + + Returns True if the kind of this Unit is joule, False otherwise. +"; + + +%feature("docstring") Unit::isKatal " + Predicate for testing whether this Unit is of the kind katal + + Returns True if the kind of this Unit is katal, False otherwise. +"; + + +%feature("docstring") Unit::isKelvin " + Predicate for testing whether this Unit is of the kind kelvin + + Returns True if the kind of this Unit is kelvin, False otherwise. +"; + + +%feature("docstring") Unit::isKilogram " + Predicate for testing whether this Unit is of the kind kilogram + + Returns True if the kind of this Unit is kilogram, False otherwise. +"; + + +%feature("docstring") Unit::isLitre " + Predicate for testing whether this Unit is of the kind litre + + Returns True if the kind of this Unit is litre or 'liter', false + otherwise. +"; + + +%feature("docstring") Unit::isLumen " + Predicate for testing whether this Unit is of the kind lumen + + Returns True if the kind of this Unit is lumen, False otherwise. +"; + + +%feature("docstring") Unit::isLux " + Predicate for testing whether this Unit is of the kind lux + + Returns True if the kind of this Unit is lux, False otherwise. +"; + + +%feature("docstring") Unit::isMetre " + Predicate for testing whether this Unit is of the kind metre + + Returns True if the kind of this Unit is metre or 'meter', false + otherwise. +"; + + +%feature("docstring") Unit::isMole " + Predicate for testing whether this Unit is of the kind mole + + Returns True if the kind of this Unit is mole, False otherwise. +"; + + +%feature("docstring") Unit::isNewton " + Predicate for testing whether this Unit is of the kind newton + + Returns True if the kind of this Unit is newton, False otherwise. +"; + + +%feature("docstring") Unit::isOhm " + Predicate for testing whether this Unit is of the kind ohm + + Returns True if the kind of this Unit is ohm, False otherwise. +"; + + +%feature("docstring") Unit::isPascal " + Predicate for testing whether this Unit is of the kind pascal + + Returns True if the kind of this Unit is pascal, False otherwise. +"; + + +%feature("docstring") Unit::isRadian " + Predicate for testing whether this Unit is of the kind radian + + Returns True if the kind of this Unit is radian, False otherwise. +"; + + +%feature("docstring") Unit::isSecond " + Predicate for testing whether this Unit is of the kind second + + Returns True if the kind of this Unit is second, False otherwise. +"; + + +%feature("docstring") Unit::isSiemens " + Predicate for testing whether this Unit is of the kind siemens + + Returns True if the kind of this Unit is siemens, False otherwise. +"; + + +%feature("docstring") Unit::isSievert " + Predicate for testing whether this Unit is of the kind sievert + + Returns True if the kind of this Unit is sievert, False otherwise. +"; + + +%feature("docstring") Unit::isSteradian " + Predicate for testing whether this Unit is of the kind steradian + + Returns True if the kind of this Unit is steradian, False otherwise. +"; + + +%feature("docstring") Unit::isTesla " + Predicate for testing whether this Unit is of the kind tesla + + Returns True if the kind of this Unit is tesla, False otherwise. +"; + + +%feature("docstring") Unit::isVolt " + Predicate for testing whether this Unit is of the kind volt + + Returns True if the kind of this Unit is volt, False otherwise. +"; + + +%feature("docstring") Unit::isWatt " + Predicate for testing whether this Unit is of the kind watt + + Returns True if the kind of this Unit is watt, False otherwise. +"; + + +%feature("docstring") Unit::isWeber " + Predicate for testing whether this Unit is of the kind weber + + Returns True if the kind of this Unit is weber, False otherwise. +"; + + +%feature("docstring") Unit::isSetKind " + Predicate to test whether the 'kind' attribute of this Unit is set. + + Returns True if the 'kind' attribute of this Unit is set, false + otherwise. +"; + + +%feature("docstring") Unit::isSetExponent " + Predicate to test whether the 'exponent' attribute of this Unit is + set. + + Returns True if the 'exponent' attribute of this Unit is set, False + otherwise. +"; + + +%feature("docstring") Unit::isSetScale " + Predicate to test whether the 'scale' attribute of this Unit is + set. + + Returns True if the 'scale' attribute of this Unit is set, False + otherwise. +"; + + +%feature("docstring") Unit::isSetMultiplier " + Predicate to test whether the 'multiplier' attribute of this Unit + is set. + + Returns True if the 'multiplier' attribute of this Unit is set, + False otherwise. +"; + + +%feature("docstring") Unit::setKind " + Sets the 'kind' attribute value of this Unit. + + Parameter 'kind' is a unit identifier chosen from the set of + constants whose names begin with UNIT_KIND_ in libsbml. @~ + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Unit::setExponent " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setExponent(int value) + + Sets the 'exponent' attribute value of this Unit. + + Parameter 'value' is the integer to which the attribute 'exponent' + should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + ______________________________________________________________________ + Method variant with the following signature: + + setExponent(double value) + + Sets the 'exponent' attribute value of this Unit. + + Parameter 'value' is the double to which the attribute 'exponent' + should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") Unit::setScale " + Sets the 'scale' attribute value of this Unit. + + Parameter 'value' is the integer to which the attribute 'scale' + should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") Unit::setMultiplier " + Sets the 'multipler' attribute value of this Unit. + + Parameter 'value' is the floating-point value to which the attribute + 'multiplier' should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Unit::setOffset " + Sets the 'offset' attribute value of this Unit. + + Parameter 'value' is the float-point value to which the attribute + 'offset' should set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + WARNING: + + The 'offset' attribute is only available in SBML Level 2 Version 1. + This attribute is not present in SBML Level 2 Version 2 or above. + When producing SBML models using these later specifications, + modelers and software tools need to account for units with offsets + explicitly. The SBML specification document offers a number of + suggestions for how to achieve this. LibSBML methods such as this + one related to 'offset' are retained for compatibility with earlier + versions of SBML Level 2, but their use is strongly discouraged. +"; + + +%feature("docstring") Unit::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Unit::getElementName " + Returns the XML element name of this object, which for Unit, is + always 'unit'. + + Returns the name of this element, i.e., 'unit'. +"; + + +%feature("docstring") Unit::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Unit::isBuiltIn " + Predicate to test whether a given string is the name of a predefined + SBML unit. + + Parameter 'name' is a string to be tested against the predefined unit + names + + Parameter 'level' is the Level of SBML for which the determination + should be made. This is necessary because there are a few small + differences in allowed units between SBML Level 1 and Level 2. + + Returns True if 'name' is one of the five SBML predefined unit + identifiers ('substance', 'volume', 'area', 'length' or 'time'), + False otherwise. + + Note: + + The predefined unit identifiers 'length' and 'area' were added in + Level 2 Version 1. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_isBuiltIn(). They are functionally + identical. @~ +"; + + +%feature("docstring") Unit::isUnitKind " + Predicate to test whether a given string is the name of a valid base + unit in SBML (such as 'gram' or 'mole'). + + This method exists because prior to SBML Level 2 Version 3, an + enumeration called UnitKind was defined by SBML. This enumeration + was removed in SBML Level 2 Version 3 and its values were folded + into the space of values of a type called UnitSId. This method + therefore has less significance in SBML Level 2 Version 3 and Level + 2 Version 4, but remains for backward compatibility and support for + reading models in older Versions of Level 2. + + Parameter 'name' is a string to be tested + + Parameter 'level' is a long integer representing the SBML + specification Level + + Parameter 'version' is a long integer representing the SBML + specification Version + + Returns True if name is a valid SBML UnitKind, False otherwise + + Note: + + The allowed unit names differ between SBML Levels 1 and 2 and again + slightly between Level 2 Versions 1 and 2. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_isUnitKind(). They are functionally + identical. @~ +"; + + +%feature("docstring") Unit::areIdentical " + Predicate returning True if two Unit objects are identical. + + Two Unit objects are considered to be identical if they match in all + attributes. (Contrast this to the method areEquivalent(), which + compares Unit objects only with respect to certain attributes.) + + Parameter 'unit1' is the first Unit object to compare Parameter + 'unit2' is the second Unit object to compare + + Returns True if all the attributes of unit1 are identical to the + attributes of unit2, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_areIdentical(). They are functionally + identical. @~ + + @see Unit.areEquivalent() @~ +"; + + +%feature("docstring") Unit::areEquivalent " + Predicate returning True if Unit objects are equivalent. + + Two Unit objects are considered to be equivalent either if (1) both + have a 'kind' attribute value of dimensionless, or (2) their 'kind', + 'exponent' and (for SBML Level 2 Version 1) 'offset' attribute + values are equal. (Contrast this to the method areIdentical(), which + compares Unit objects with respect to all attributes, not just the + 'kind' and 'exponent'.) + + Parameter 'unit1' is the first Unit object to compare Parameter + 'unit2' is the second Unit object to compare + + Returns True if the 'kind' and 'exponent' attributes of unit1 are + identical to the kind and exponent attributes of unit2, False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_areEquivalent(). They are functionally + identical. @~ + + @see Unit.areIdentical() @~ +"; + + +%feature("docstring") Unit::removeScale " + Manipulates the attributes of the Unit to express the unit with the + value of the scale attribute reduced to zero. + + For example, 1 millimetre can be expressed as a Unit with + kind='metre' multiplier='1' scale='-3' exponent='1'. It can also be + expressed as a Unit with kind='metre' multiplier='0.001' scale='0' + exponent='1'. + + Parameter 'unit' is the Unit object to manipulate. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_removeScale(). They are functionally + identical. @~ + + @see Unit.convertToSI() @~ @see Unit.merge() @~ +"; + + +%feature("docstring") Unit::merge " + Merges two Unit objects with the same 'kind' attribute value into a + single Unit. + + For example, the following, + + <unit kind=\'metre\' exponent=\'2\'/> + <unit kind=\'metre\' exponent=\'1\'/> + would be merged to become + + <unit kind=\'metre\' exponent=\'3\'/> + + Parameter 'unit1' is the first Unit object; the result of the + operation is left as a new version of this unit, modified in-place. + + Parameter 'unit2' is the second Unit object to merge with the first + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_merge(). They are functionally + identical. @~ + + @see Unit.convertToSI() @~ @see Unit.removeScale() @~ +"; + + +%feature("docstring") Unit::convertToSI " + Returns a UnitDefinition object containing the given 'unit' converted + to the appropriate SI unit. + + This method exists because some units can be expressed in terms of + others when the same physical dimension is involved. For example, + one hertz is identical to 1 sec^-1, one litre is equivalent to 1 + cubic decametre, and so on. + + Parameter 'unit' is the Unit object to convert to SI + + Returns a UnitDefinition object containing the SI unit. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., Unit), and the other will be a standalone top-level + function with the name Unit_convertToSI(). They are functionally + identical. @~ + + @see Unit.merge() @~ +"; + + +%feature("docstring") Unit::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Unit object have been set. + + Note: + + The required attributes for a Unit object are: + + * 'kind' + + * 'exponent' (required in SBML Level 3; optional in Level 2) + + * 'multiplier' (required in SBML Level 3; optional in Level 2) + + * 'scale' (required in SBML Level 3; optional in Level 2) + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Unit::setExponentUnitChecking " + Internal implementation method. +"; + + +%feature("docstring") Unit::getExponentUnitChecking " + Internal implementation method. +"; + + +%feature("docstring") Unit::isUnitChecking " + Internal implementation method. +"; + + +%feature("docstring") Unit::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Unit::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Unit::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Unit::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Unit::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Unit::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Unit::isL1UnitKind " + Internal implementation method. +"; + + +%feature("docstring") Unit::isL2V1UnitKind " + Internal implementation method. +"; + + +%feature("docstring") Unit::isL2UnitKind " + Internal implementation method. +"; + + +%feature("docstring") Unit::isL3UnitKind " + Internal implementation method. +"; + + +%feature("docstring") Unit::isExplicitlySetExponent " + Internal implementation method. +"; + + +%feature("docstring") Unit::isExplicitlySetMultiplier " + Internal implementation method. +"; + + +%feature("docstring") Unit::isExplicitlySetScale " + Internal implementation method. +"; + + +%feature("docstring") Unit::isExplicitlySetOffset " + Internal implementation method. +"; + + +%feature("docstring") ListOfUnits::ListOfUnits " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfUnits(SBMLNamespaces sbmlns) + + Creates a new ListOfUnits object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfUnits object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfUnits(long level, long version) + + Creates a new ListOfUnits object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfUnits::clone " + Creates and returns a deep copy of this ListOfUnits. + + Returns a (deep) copy of this ListOfUnits. +"; + + +%feature("docstring") ListOfUnits::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfUnits::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Unit objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfUnits::getElementName " + Returns the XML element name of this object. + + For ListOfUnits, the XML element name is 'listOfUnits'. + + Returns the name of this element, i.e., 'listOfUnits'. +"; + + +%feature("docstring") ListOfUnits::get " + Get a Unit from the ListOfUnits. + + Parameter 'n' is the index number of the Unit to get. + + Returns the nth Unit in this ListOfUnits. + + See also size(). +"; + + +%feature("docstring") ListOfUnits::remove " + Removes the nth item from this ListOfUnits items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). +"; + + +%feature("docstring") ListOfUnits::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfUnits::createObject " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition " + @ingroup Core Implementation of SBML's UnitDefinition construct. + + Units of measurement may be supplied in a number of contexts in an + SBML model. The SBML unit definition facility uses two classes of + objects, UnitDefinition and Unit. The approach to defining units in + SBML is compositional; for example, meter second^-2 is constructed + by combining a Unit object representing meter with another Unit + object representing second^-2. The combination is wrapped inside a + UnitDefinition, which provides for assigning an identifier and + optional name to the combination. The identifier can then be + referenced from elsewhere in a model. Thus, the UnitDefinition + class is the container, and Unit instances are placed inside + UnitDefinition instances. + + Two points are worth discussing in the context of SBML units. First, + unit declarations in SBML models are optional. The consequence of + this is that a model must be numerically self-consistent + independently of unit declarations, for the benefit of software + tools that cannot interpret or manipulate units. Unit declarations + in SBML are thus more akin to a type of annotation; they can + indicate intentions, and can be used by model readers for checking + the consistency of the model, labeling simulation output, etc., but + any transformations of values implied by different units must be + incorporated explicitly into a model. + + Second, the vast majority of situations that require new SBML unit + definitions involve simple multiplicative combinations of base units + and factors. An example is moles per litre per second. What + distinguishes these sorts of unit definitions from more complex ones + is that they may be expressed without the use of an additive offset + from a zero point. The use of offsets complicates all unit + definition systems, yet in the domain of SBML, the real-life cases + requiring offsets are few (and in fact, to the best of our + knowledge, only involve temperature). Consequently, the SBML unit + system has been consciously designed to simplify implementation of + unit support for the most common cases in systems biology. The cost + of this simplification is to require units with offsets to be + handled explicitly by the modeler. + + Summary of the UnitDefinition construct + ====================================================================== + + UnitDefinition has two attributes and one subelement. The two + attributes are 'id' and 'name', and the subelement is ListOfUnits. + + The required attribute 'id' and optional attribute 'name' are both + strings. The 'id' attribute is used to give the defined unit a + unique identifier by which other parts of an SBML model definition + can refer to it. The 'name' attribute is intended to be used for + giving the unit definition an optional human-readable name. Please + see the next section for information about the values permitted for + 'id'. + + A UnitDefinition must contain exactly one ListOfUnits, and this list + must contain one or more Unit definitions; see the definitions of + these other object classes for more information about them. The + following example illustrates a complete unit definition (when + written in XML) when they all the pieces are combined together. + This defines 'mmls' to be millimoles per litre per second. + + <listOfUnitDefinitions> + <unitDefinition id=\'mmls\'> + <listOfUnits> + <unit kind=\'mole\' scale=\'-3\'/> + <unit kind=\'litre\' exponent=\'-1\'/> + <unit kind=\'second\' exponent=\'-1\'/> + </listOfUnits> + </unitDefinition> + </listOfUnitDefinitions> + + Special considerations for Unit object identifiers + ====================================================================== + + The attribute 'id' in UnitDefinition cannot be given simply any + value, and the precise details of the values permitted differ + slightly between Levels of SBML: + + + * The 'id' of a UnitDefinition must not contain a value from the + list of SBML's predefined base unit names (i.e., the strings gram, + litre, etc.). In SBML Level 3, this list consists of the following: + + amperefaradjouleluxradianvolt avogadrogramkatalmetresecondwatt + becquerelgraykelvinmolesiemensweber + candelahenrykilogramnewtonsievert coulombhertzlitreohmsteradian + dimensionlessitemlumenpascaltesla + + This list of predefined base units is nearly identical in SBML Level + 2 Version 4, the exception being that Level 2 does not define + avogadro. SBML Level 2 Version 1 (and only this Level+Version + combination) provides an additional predefined unit name, Celsius, + not available in Level 3. Finally, SBML Level 1 Versions 2-3 + provide two more additional predefined unit names, meter and liter. + This is explained in somewhat greater detail in the description of + the Unit class. + + * In SBML Level 2 (all Versions), there is an additional set of + reserved identifiers: substance, volume, area, length, and time. + Using one of these values for the attribute 'id' of a UnitDefinition + has the effect of redefining the model-wide default units for the + corresponding quantities. The list of special unit names in SBML + Level 2 is given in the table below: + + Identifier Possible scalable units Default units substancemole, + item, gram, kilogram, dimensionlessmole volumelitre, cubic metre, + dimensionlesslitre areasquare metre, dimensionlesssquare metre + lengthmetre, dimensionlessmetre timesecond, dimensionlesssecond + + Also, SBML Level 2 imposes two limitations on redefining the + predefined unit substance, volume, area, length, and time: (1) The + UnitDefinition of a predefined SBML unit can only contain a single + Unit object within it. (2) The value of the 'kind' attribute in a + Unit instance must be drawn from one of the values in the second + column of the table above. + + The special unit names substance, volume, area, length, and time are + not defined by SBML Level 3, which uses a different approach to + setting model-wide inherited units. + + + Further comments about SBML's unit definition system + ====================================================================== + + The vast majority of modeling situations requiring new SBML unit + definitions involve simple multiplicative combinations of base units + and factors. An example of this might be moles per litre per + second. What distinguishes these sorts of simpler unit definitions + from more complex ones is that they may be expressed without the use + of an additive offset from a zero point. The use of offsets + complicates all unit definition systems, yet in the domain of SBML + the real-life cases requiring offsets are few (and in fact, to the + best of our knowledge, only involve temperature). Consequently, the + SBML unit system has been consciously designed in a way that + attempts to simplify implementation of unit support for the most + common cases in systems biology. + + As of SBML Level 2 Version 2, Unit no longer has the attribute + called 'offset' introduced in SBML Level 2 Version 1. It turned out + that the general case involving units with offsets was incorrectly + defined, and few (if any) developers even attempted to support + offset-based units in their software. In the development of Level 2 + Version 2, a consensus among SBML developers emerged that a fully + generalized unit scheme is so confusing and complicated that it + actually impedes interoperability. SBML Level 2 Version 2, Version 3 + and Version 4 acknowledge this reality by reducing and simplifying + the unit system, specifically by removing the 'offset' attribute on + Unit and Celsius as a pre-defined unit. + + The following guidelines suggest methods for handling units that do + require the use of zero offsets for their definitions: + + * Handling Celsius. A model in which certain quantities are + temperatures measured in degrees Celsius can be converted + straightforwardly to a model in which those temperatures are in + kelvin. A software tool could do this by performing a + straightforward substitution using the following relationship: T_ + kelvin = T_Celsius + 273.15. In every mathematical formula of the + model where a quantity (call it x) in degrees Celsius appears, + replace x with x_k+ 273.15, where x_k is now in kelvin. An + alternative approach would be to use a FunctionDefinition object + to define a function encapsulating this relationship above and + then using that in the rest of the model as needed. Since Celsius + is a commonly-used unit, software tools could help users by + providing users with the ability to express temperatures in + Celsius in the tools' interfaces, and making substitutions + automatically when writing out the SBML. + + * Other units requiring offsets. One approach to handling other + kinds of units is to use a FunctionDefinition to define a function + encapsulating the necessary mathematical relationship, then + substituting a call to this function wherever the original quantity + appeared in the model. For example, here is a possible definition + for converting Fahrenheit to Celsius degrees: + + <functionDefinition id=\'Fahrenheit_to_kelvin\'> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <lambda> + <bvar><ci> temp_in_fahrenheit </ci></bvar> + <apply> + <divide/> + <apply> + <plus/> + <ci> temp_in_fahrenheit </ci> + <cn> 459.67 </cn> + </apply> + <cn> 1.8 </cn> + </apply> + </lambda> + </math> + </functionDefinition> + + * An alternative approach not requiring the use of function + definitions is to use an AssignmentRule for each variable in + Fahrenheit units. The AssignmentRule could compute the conversion + from Fahrenheit to (say) kelvin, assign its value to a variable + (in Kelvin units), and then that variable could be used elsewhere + in the model. + + * Still another approach is to rewrite the mathematical formulas of + a model to directly incorporate the conversion formula wherever + the original quantity appeared. + + Please consult the SBML specifications for more information about + this and other issues involving units. +"; + + +%feature("docstring") ListOfUnitDefinitions " + @ingroup Core Implementation of SBML's ListOfUnitDefinitions + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") UnitDefinition::UnitDefinition " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + UnitDefinition(SBMLNamespaces sbmlns) + + Creates a new UnitDefinition using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a UnitDefinition object to an SBMLDocument + (e.g., using Model.addUnitDefinition()), the SBML XML namespace of + the document overrides the value used when creating the + UnitDefinition object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a UnitDefinition is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + UnitDefinition(long level, long version) + + Creates a new UnitDefinition using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + UnitDefinition + + Parameter 'version' is a long integer, the SBML Version to assign to + this UnitDefinition + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a UnitDefinition object to an SBMLDocument + (e.g., using Model.addUnitDefinition()), the SBML Level, SBML Version + and XML namespace of the document override the values used when + creating the UnitDefinition object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a UnitDefinition is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + UnitDefinition(UnitDefinition orig) + + Copy constructor; creates a copy of this UnitDefinition. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") UnitDefinition::accept " + Accepts the given SBMLVisitor for this instance of UnitDefinition. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next UnitDefinition in the list of + units within which this UnitDefinition is embedded (i.e., in the + ListOfUnitDefinitions located in the enclosing Model instance). +"; + + +%feature("docstring") UnitDefinition::clone " + Creates and returns a deep copy of this UnitDefinition. + + Returns a (deep) copy of this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find. + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") UnitDefinition::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") UnitDefinition::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") UnitDefinition::getId " + Returns the value of the 'id' attribute of this UnitDefinition. + + Returns the id of this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::getName " + Returns the value of the 'name' attribute of this UnitDefinition. + + Returns the name of this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::isSetId " + Predicate returning True if this UnitDefinition's 'id' attribute is + set. + + Returns True if the 'id' attribute of this UnitDefinition is set, + False otherwise. +"; + + +%feature("docstring") UnitDefinition::isSetName " + Predicate returning True if this UnitDefinition's 'name' attribute + is set. + + Returns True if the 'name' attribute of this UnitDefinition is set, + False otherwise. +"; + + +%feature("docstring") UnitDefinition::setId " + Sets the value of the 'id' attribute of this UnitDefinition. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + UnitDefinition + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") UnitDefinition::setName " + Sets the value of the 'name' attribute of this UnitDefinition. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the UnitDefinition + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") UnitDefinition::unsetName " + Unsets the value of the 'name' attribute of this UnitDefinition. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") UnitDefinition::isVariantOfArea " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier 'area'. + + Returns True if this UnitDefinition is a variant of the predefined + unit area, meaning square metres with only abritrary variations in + scale or multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfLength " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier 'length'. + + Returns True if this UnitDefinition is a variant of the predefined + unit length, meaning metres with only abritrary variations in scale + or multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfSubstance " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier 'substance'. + + Returns True if this UnitDefinition is a variant of the predefined + unit substance, meaning moles or items (and grams or kilograms from + SBML Level 2 Version 2 onwards) with only abritrary variations in + scale or multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfTime " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier 'time'. + + Returns True if this UnitDefinition is a variant of the predefined + unit time, meaning seconds with only abritrary variations in scale or + multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfVolume " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier 'volume'. + + Returns True if this UnitDefinition is a variant of the predefined + unit volume, meaning litre or cubic metre with only abritrary + variations in scale or multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfDimensionless " + Convenience function for testing if a given unit definition is a + variant of the unit 'dimensionless'. + + Returns True if this UnitDefinition is a variant of dimensionless, + meaning dimensionless with only abritrary variations in scale or + multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfMass " + Convenience function for testing if a given unit definition is a + variant of the predefined unit identifier 'mass'. + + Returns True if this UnitDefinition is a variant of mass units, + meaning gram or kilogram with only abritrary variations in scale or + multiplier values; False otherwise. +"; + + +%feature("docstring") UnitDefinition::isVariantOfSubstancePerTime " + Convenience function for testing if a given unit definition is a + variant of the predefined unit 'substance' divided by the predefined + unit 'time'. + + Returns True if this UnitDefinition is a variant of the predefined + unit substance per predefined unit time, meaning it contains two + units one of which is a variant of substance and the other is a + variant of time which an exponent of -1; False otherwise. +"; + + +%feature("docstring") UnitDefinition::addUnit " + Adds a copy of the given Unit to this UnitDefinition. + + Parameter 'u' is the Unit instance to add to this UnitDefinition. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this UnitDefinition. Changes made to the original + object instance (such as resetting attribute values) will not affect + the instance in the UnitDefinition. In addition, the caller should + make sure to free the original object if it is no longer being used, + or else a memory leak will result. Please see + UnitDefinition.createUnit() for a method that does not lead to these + issues. + + See also createUnit(). +"; + + +%feature("docstring") UnitDefinition::createUnit " + Creates a new and empty Unit, adds it to this UnitDefinition's list + of units, and returns it. + + Returns a newly constructed (and empty) Unit instance. + + Note: + + It is worth emphasizing that the attribute 'kind' value of a Unit is + a required attribute for a valid Unit definition. The createUnit() + method does not assign a valid kind to the constructed unit + (instead, it sets the 'kind' to libsbml.UNIT_KIND_INVALID). Callers + are cautioned to set the newly-constructed Unit's kind using + Unit.setKind() soon after calling this method. + + See also addUnit(). +"; + + +%feature("docstring") UnitDefinition::getListOfUnits " + Returns the list of Units for this UnitDefinition instance. Returns + the ListOfUnits value for this UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::getUnit " + Returns a specific Unit instance belonging to this UnitDefinition. + + Parameter 'n' is an integer, the index of the Unit to be returned. + + Returns the nth Unit of this UnitDefinition. + + See also getNumUnits(). +"; + + +%feature("docstring") UnitDefinition::getNumUnits " + Returns the number of Unit objects contained within this + UnitDefinition. + + Returns an integer representing the number of Units in this + UnitDefinition. +"; + + +%feature("docstring") UnitDefinition::removeUnit " + Removes the nth Unit object from this UnitDefinition object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Unit object to remove + + Returns the Unit object removed, or None if the given index is out + of range. +"; + + +%feature("docstring") UnitDefinition::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::getTypeCode " + Returns the libSBML type code for this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") UnitDefinition::getElementName " + Returns the XML element name of this object, which for + UnitDefinition, is always 'unitDefinition'. + + Returns the name of this element, i.e., 'unitDefinition'. +"; + + +%feature("docstring") UnitDefinition::simplify " + Simplifies the UnitDefinition such that any given kind of Unit object + occurs only once in the ListOfUnits. + + For example, the following definition, + + <unitDefinition> + <listOfUnits> + <unit kind=\'metre\' exponent=\'1\'/> + <unit kind=\'metre\' exponent=\'2\'/> + </listOfUnits> + <unitDefinition> + will be simplified to + + <unitDefinition> + <listOfUnits> + <unit kind=\'metre\' exponent=\'3\'/> + </listOfUnits> + <unitDefinition> + + Parameter 'ud' is the UnitDefinition object to be simplified. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_simplify(). They are + functionally identical. @~ +"; + + +%feature("docstring") UnitDefinition::reorder " + Alphabetically orders the Unit objects within the ListOfUnits of a + UnitDefinition. + + Parameter 'ud' is the UnitDefinition object whose units are to be + reordered. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_reorder(). They are + functionally identical. @~ +"; + + +%feature("docstring") UnitDefinition::convertToSI " + Convert a given UnitDefinition into a new UnitDefinition object that + uses SI units. + + Parameter 'ud' is the UnitDefinition object to convert to SI + + Returns a new UnitDefinition object representing the results of the + conversion. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_convertToSI(). They + are functionally identical. @~ +"; + + +%feature("docstring") UnitDefinition::areIdentical " + Predicate returning True if two UnitDefinition objects are + identical. + + For the purposes of performing this comparison, two UnitDefinition + objects are considered identical when they contain identical lists of + Unit objects. Pairs of Unit objects in the lists are in turn + considered identical if they satisfy the predicate + Unit.areIdentical(). The predicate compares every attribute of the + Unit objects. + + Parameter 'ud1' is the first UnitDefinition object to compare + Parameter 'ud2' is the second UnitDefinition object to compare + + Returns True if all the Unit objects in ud1 are identical to the + Unit objects of ud2, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_areIdentical(). They + are functionally identical. @~ + + See also UnitDefinition.areEquivalent(), Unit.areIdentical(). +"; + + +%feature("docstring") UnitDefinition::areEquivalent " + Predicate returning True if two UnitDefinition objects are + equivalent. + + For the purposes of performing this comparison, two UnitDefinition + objects are considered equivalent when they contain equivalent list + of Unit objects. Unit objects are in turn considered equivalent if + they satisfy the predicate Unit.areEquivalent(). The predicate + tests a subset of the objects's attributes. + + Parameter 'ud1' is the first UnitDefinition object to compare + + Parameter 'ud2' is the second UnitDefinition object to compare + + Returns True if all the Unit objects in ud1 are equivalent to the + Unit objects in ud2, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_areEquivalent(). + They are functionally identical. @~ + + See also UnitDefinition.areIdentical(), Unit.areEquivalent(). +"; + + +%feature("docstring") UnitDefinition::areIdenticalSIUnits " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::combine " + Combines two UnitDefinition objects into a single UnitDefinition. + + This takes UnitDefinition objects 'ud1' and 'ud2', and creates a + UnitDefinition object that expresses the product of the units of + 'ud1' and 'ud2'. + + Parameter 'ud1' is the first UnitDefinition object Parameter 'ud2' + is the second UnitDefinition object + + Returns a UnitDefinition which represents the product of the units + of the two argument UnitDefinitions. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_combine(). They are + functionally identical. @~ +"; + + +%feature("docstring") UnitDefinition::printUnits " + Expresses the given definition in a plain-text form. + + For example, UnitDefinition.printUnits() applied to + + <unitDefinition> + <listOfUnits> + <unit kind=\'metre\' exponent=\'1\'/> + <unit kind=\'second\' exponent=\'-2\'/> + </listOfUnits> + <unitDefinition> + will return the string 'metre (exponent = 1, multiplier = + 1, scale = 0) second (exponent = -2, multiplier = 1, scale = 0)' + or, if the optional parameter 'compact' is given the value True, the + string '(1 metre)^1 (1 second)^-2'. This method may be useful for + printing unit information to human users, or in debugging software, + or other situations. + + Parameter 'ud' is the UnitDefinition object Parameter 'compact' is + boolean indicating whether the compact form should be used (defaults + to false) + + Returns a string expressing the unit definition defined by the given + UnitDefinition object 'ud'. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., UnitDefinition), and the other will be a standalone + top-level function with the name UnitDefinition_printUnits(). They + are functionally identical. @~ +"; + + +%feature("docstring") UnitDefinition::writeElements " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + UnitDefinition object have been set. + + Note: + + The required attributes for a UnitDefinition object are: + + * 'id' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") UnitDefinition::hasRequiredElements " + Predicate returning True if all the required elements for this + UnitDefinition object have been set. + + Note: + + The required elements for a Constraint object are: + + * 'listOfUnits' (required in SBML Level 2 only, optional in Level + 3) + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") UnitDefinition::createObject " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") UnitDefinition::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfUnitDefinitions::ListOfUnitDefinitions " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfUnitDefinitions(SBMLNamespaces sbmlns) + + Creates a new ListOfUnitDefinitions object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfUnitDefinitions object to + be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfUnitDefinitions(long level, long version) + + Creates a new ListOfUnitDefinitions object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfUnitDefinitions::clone " + Creates and returns a deep copy of this ListOfUnitDefinitions + instance. + + Returns a (deep) copy of this ListOfUnitDefinitions. +"; + + +%feature("docstring") ListOfUnitDefinitions::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfUnitDefinitions::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., UnitDefinition objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfUnitDefinitions::getElementName " + Returns the XML element name of this object. + + For ListOfUnitDefinitions, the XML element name is + 'listOfUnitDefinitions'. + + Returns the name of this element, i.e., 'listOfUnitDefinitions'. +"; + + +%feature("docstring") ListOfUnitDefinitions::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a UnitDefinition from the ListOfUnitDefinitions. + + Parameter 'n' is the index number of the UnitDefinition to get. + + Returns the nth UnitDefinition in this ListOfUnitDefinitions. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfUnitDefinitions::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. Note + that UnitDefinitions themselves are in the UnitId namespace, not the + SId namespace, so no UnitDefinition object will be returned from this + function (and is the reason we override the base + ListOf::getElementBySId function here). + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") ListOfUnitDefinitions::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfUnitDefinitions items and + returns a pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfUnitDefinitions items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfUnitDefinitions::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfUnitDefinitions::createObject " + Internal implementation method. +"; + + +%feature("docstring") CompartmentType " + @ingroup Core Implementation of SBML's Level 2's CompartmentType + construct. + + SBML Level 2 Versions 2-4 provide the compartment type as a grouping + construct that can be used to establish a relationship between + multiple Compartment objects. A CompartmentType object only has an + identity, and this identity can only be used to indicate that + particular Compartment objects in the model belong to this type. + This may be useful for conveying a modeling intention, such as when + a model contains many similar compartments, either by their + biological function or the reactions they carry. Without a + compartment type construct, it would be impossible within SBML + itself to indicate that all of the compartments share an underlying + conceptual relationship because each SBML compartment must be given + a unique and separate identity. Compartment types have no + mathematical meaning in SBML -- they have no effect on a model's + mathematical interpretation. Simulators and other numerical analysis + software may ignore CompartmentType definitions and references to + them in a model. + + There is no mechanism in SBML Level 2 for representing hierarchies of + compartment types. One CompartmentType instance cannot be the + subtype of another CompartmentType instance; SBML provides no means + of defining such relationships. + + As with other major structures in SBML, CompartmentType has a + mandatory attribute, 'id', used to give the compartment type an + identifier. The identifier must be a text string conforming to the + identifer syntax permitted in SBML. CompartmentType also has an + optional 'name' attribute, of type string. The 'id' and 'name' must + be used according to the guidelines described in the SBML + specification (e.g., Section 3.3 in the Level 2 Version 4 + specification). + + CompartmentType was introduced in SBML Level 2 Version 2. It is not + available in SBML Level 1 nor in Level 3. + + See also Compartment, ListOfCompartmentTypes, SpeciesType, + ListOfSpeciesTypes. +"; + + +%feature("docstring") ListOfCompartmentTypes " + @ingroup Core Implementation of SBML's ListOfCompartmentTypes + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") CompartmentType::CompartmentType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + CompartmentType(SBMLNamespaces sbmlns) + + Creates a new CompartmentType using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the 'id' + (identifier) attribute of a CompartmentType is required to have a + value. Thus, callers are cautioned to assign a value after calling + this constructor. Setting the identifier can be accomplished using + the method setId(). + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a CompartmentType object to an SBMLDocument + (e.g., using Model.addCompartmentType()), the SBML XML namespace of + the document overrides the value used when creating the + CompartmentType object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a CompartmentType is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + CompartmentType(long level, long version) + + Creates a new CompartmentType using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + CompartmentType + + Parameter 'version' is a long integer, the SBML Version to assign to + this CompartmentType + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a CompartmentType object to an SBMLDocument + (e.g., using Model.addCompartmentType()), the SBML Level, SBML + Version and XML namespace of the document override the values used + when creating the CompartmentType object via this constructor. This + is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a CompartmentType is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + CompartmentType(CompartmentType orig) + + Copy constructor; creates a copy of this CompartmentType. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") CompartmentType::accept " + Accepts the given SBMLVisitor for this instance of CompartmentType. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next CompartmentType in the list of + compartment types. +"; + + +%feature("docstring") CompartmentType::clone " + Creates and returns a deep copy of this CompartmentType. + + Returns a (deep) copy of this CompartmentType. +"; + + +%feature("docstring") CompartmentType::getId " + Returns the value of the 'id' attribute of this CompartmentType. + + Returns the id of this CompartmentType. +"; + + +%feature("docstring") CompartmentType::getName " + Returns the value of the 'name' attribute of this CompartmentType. + + Returns the name of this CompartmentType. +"; + + +%feature("docstring") CompartmentType::isSetId " + Predicate returning True if this CompartmentType's 'id' attribute is + set. + + Returns True if the 'id' attribute of this CompartmentType is set, + False otherwise. +"; + + +%feature("docstring") CompartmentType::isSetName " + Predicate returning True if this CompartmentType's 'name' attribute + is set. + + Returns True if the 'name' attribute of this CompartmentTypeType is + set, False otherwise. +"; + + +%feature("docstring") CompartmentType::setId " + Sets the value of the 'id' attribute of this CompartmentType. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + CompartmentType + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") CompartmentType::setName " + Sets the value of the 'name' attribute of this CompartmentType. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the CompartmentType + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") CompartmentType::unsetName " + Unsets the value of the 'name' attribute of this CompartmentType. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") CompartmentType::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") CompartmentType::getElementName " + Returns the XML element name of this object, which for + CompartmentType, is always 'compartmentType'. + + Returns the name of this element, i.e., 'compartmentType'. +"; + + +%feature("docstring") CompartmentType::writeElements " + Internal implementation method. +"; + + +%feature("docstring") CompartmentType::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + CompartmentType object have been set. + + Note: + + The required attributes for a CompartmentType object are: + + * 'id' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") CompartmentType::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") CompartmentType::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") CompartmentType::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") CompartmentType::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfCompartmentTypes::ListOfCompartmentTypes " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfCompartmentTypes(SBMLNamespaces sbmlns) + + Creates a new ListOfCompartmentTypes object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfCompartmentTypes object + to be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfCompartmentTypes(long level, long version) + + Creates a new ListOfCompartmentTypes object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfCompartmentTypes::clone " + Creates and returns a deep copy of this ListOfCompartmentTypes + instance. + + Returns a (deep) copy of this ListOfCompartmentTypes. +"; + + +%feature("docstring") ListOfCompartmentTypes::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfCompartmentTypes::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., CompartmentType objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfCompartmentTypes::getElementName " + Returns the XML element name of this object. + + For ListOfCompartmentTypes, the XML element name is + 'listOfCompartmentTypes'. + + Returns the name of this element, i.e., 'listOfCompartmentTypes'. +"; + + +%feature("docstring") ListOfCompartmentTypes::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a CompartmentType from the ListOfCompartmentTypes. + + Parameter 'n' is the index number of the CompartmentType to get. + + Returns the nth CompartmentType in this ListOfCompartmentTypes. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfCompartmentTypes::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfCompartmentTypes items and + returns a pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfCompartmentTypes items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfCompartmentTypes::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfCompartmentTypes::createObject " + Internal implementation method. +"; + + +%feature("docstring") SpeciesType " + @ingroup Core Implementation of SBML Level 2's SpeciesType + construct. + + The term species type refers to reacting entities independent of + location. These include simple ions (e.g., protons, calcium), simple + molecules (e.g., glucose, ATP), large molecules (e.g., RNA, + polysaccharides, and proteins), and others. + + SBML Level 2 Versions 2-4 provide an explicit SpeciesType class of + object to enable Species objects of the same type to be related + together. SpeciesType is a conceptual construct; the existence of + SpeciesType objects in a model has no effect on the model's + numerical interpretation. Except for the requirement for uniqueness + of species/species type combinations located in compartments, + simulators and other numerical analysis software may ignore + SpeciesType definitions and references to them in a model. + + There is no mechanism in SBML Level 2 for representing hierarchies of + species types. One SpeciesType object cannot be the subtype of + another SpeciesType object; SBML provides no means of defining such + relationships. + + As with other major structures in SBML, SpeciesType has a mandatory + attribute, 'id', used to give the species type an identifier. The + identifier must be a text string conforming to the identifer syntax + permitted in SBML. SpeciesType also has an optional 'name' + attribute, of type string. The 'id' and 'name' must be used + according to the guidelines described in the SBML specification + (e.g., Section 3.3 in the Level 2 Version 4 specification). + + SpeciesType was introduced in SBML Level 2 Version 2. It is not + available in SBML Level 1 nor in Level 3. + + See also Species, ListOfSpeciesTypes, CompartmentType, + ListOfCompartmentTypes. +"; + + +%feature("docstring") ListOfSpeciesTypes " + @ingroup Core Implementation of SBML's ListOfSpeciesTypes construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") SpeciesType::SpeciesType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SpeciesType(SBMLNamespaces sbmlns) + + Creates a new SpeciesType using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the 'id' + (identifier) attribute of a SpeciesType object is required to have a + value. Thus, callers are cautioned to assign a value after calling + this constructor. Setting the identifier can be accomplished using + the method SBase.setId(). + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a SpeciesType object to an SBMLDocument (e.g., + using Model.addSpeciesType()), the SBML XML namespace of the + document overrides the value used when creating the SpeciesType + object via this constructor. This is necessary to ensure that an + SBML document is a consistent structure. Nevertheless, the ability + to supply the values at the time of creation of a SpeciesType is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + SpeciesType(long level, long version) + + Creates a new SpeciesType using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + SpeciesType + + Parameter 'version' is a long integer, the SBML Version to assign to + this SpeciesType + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a SpeciesType object to an SBMLDocument (e.g., + using Model.addSpeciesType()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + SpeciesType object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a SpeciesType is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + SpeciesType(SpeciesType orig) + + Copy constructor; creates a copy of this SpeciesType. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") SpeciesType::accept " + Accepts the given SBMLVisitor for this instance of SpeciesType. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next SpeciesType in the list of + compartment types. +"; + + +%feature("docstring") SpeciesType::clone " + Creates and returns a deep copy of this SpeciesType. + + Returns a (deep) copy of this SpeciesType. +"; + + +%feature("docstring") SpeciesType::getId " + Returns the value of the 'id' attribute of this SpeciesType. + + Returns the id of this SpeciesType. +"; + + +%feature("docstring") SpeciesType::getName " + Returns the value of the 'name' attribute of this SpeciesType. + + Returns the name of this SpeciesType. +"; + + +%feature("docstring") SpeciesType::isSetId " + Predicate returning True if this SpeciesType's 'id' attribute is + set. + + Returns True if the 'id' attribute of this SpeciesType is set, False + otherwise. +"; + + +%feature("docstring") SpeciesType::isSetName " + Predicate returning True if this SpeciesType's 'name' attribute is + set. + + Returns True if the 'name' attribute of this SpeciesType is set, + False otherwise. +"; + + +%feature("docstring") SpeciesType::setId " + Sets the value of the 'id' attribute of this SpeciesType. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + SpeciesType + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SpeciesType::setName " + Sets the value of the 'name' attribute of this SpeciesType. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the SpeciesType + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SpeciesType::unsetName " + Unsets the value of the 'name' attribute of this SpeciesType. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SpeciesType::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") SpeciesType::getElementName " + Returns the XML element name of this object, which for SpeciesType, + is always 'compartmentType'. + + Returns the name of this element, i.e., 'compartmentType'. +"; + + +%feature("docstring") SpeciesType::writeElements " + Internal implementation method. +"; + + +%feature("docstring") SpeciesType::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + SpeciesType object have been set. + + Note: + + The required attributes for a SpeciesType object are: + + * 'id' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") SpeciesType::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesType::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesType::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesType::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpeciesTypes::ListOfSpeciesTypes " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfSpeciesTypes(SBMLNamespaces sbmlns) + + Creates a new ListOfSpeciesTypes object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfSpeciesTypes object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfSpeciesTypes(long level, long version) + + Creates a new ListOfSpeciesTypes object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfSpeciesTypes::clone " + Creates and returns a deep copy of this ListOfSpeciesTypes instance. + + Returns a (deep) copy of this ListOfSpeciesTypes. +"; + + +%feature("docstring") ListOfSpeciesTypes::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfSpeciesTypes::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., SpeciesType objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfSpeciesTypes::getElementName " + Returns the XML element name of this object. + + For ListOfSpeciesTypes, the XML element name is 'listOfSpeciesTypes'. + + Returns the name of this element, i.e., 'listOfSpeciesTypes'. +"; + + +%feature("docstring") ListOfSpeciesTypes::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a SpeciesType from the ListOfSpeciesTypes. + + Parameter 'n' is the index number of the SpeciesType to get. + + Returns the nth SpeciesType in this ListOfSpeciesTypes. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfSpeciesTypes::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfSpeciesTypes items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfSpeciesTypes items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfSpeciesTypes::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpeciesTypes::createObject " + Internal implementation method. +"; + + +%feature("docstring") Compartment " + @ingroup Core Implementation of SBML's Compartment construct. + + A compartment in SBML represents a bounded space in which species are + located. Compartments do not necessarily have to correspond to + actual structures inside or outside of a biological cell. + + It is important to note that although compartments are optional in + the overall definition of Model, every species in an SBML model must + be located in a compartment. This in turn means that if a model + defines any species, the model must also define at least one + compartment. The reason is simply that species represent physical + things, and therefore must exist somewhere. Compartments represent + the somewhere. + + Compartment has one required attribute, 'id', to give the compartment + a unique identifier by which other parts of an SBML model definition + can refer to it. A compartment can also have an optional 'name' + attribute of type string. Identifiers and names must be used + according to the guidelines described in the SBML specifications. + + Compartment also has an optional attribute 'spatialDimensions' that + is used to indicate the number of spatial dimensions possessed by + the compartment. Most modeling scenarios involve compartments with + integer values of 'spatialDimensions' of 3 (i.e., a three- + dimensional compartment, which is to say, a volume), or 2 (a two- + dimensional compartment, a surface), or 1 (a one-dimensional + compartment, a line). In SBML Level 3, the type of this attribute + is double, there are no restrictions on the permitted values of the + 'spatialDimensions' attribute, and there are no default values. In + SBML Level 2, the value must be a positive integer, and the default + value is 3; the permissible values in SBML Level 2 are 3, 2, 1, and 0 + (for a point). + + Another optional attribute on Compartment is 'size', representing the + initial total size of that compartment in the model. The 'size' + attribute must be a floating-point value and may represent a volume + (if the compartment is a three-dimensional one), or an area (if the + compartment is two-dimensional), or a length (if the compartment is + one-dimensional). There is no default value of compartment size in + SBML Level 2 or Level 3. In particular, a missing 'size' value + does not imply that the compartment size is 1. (This is unlike the + definition of compartment 'volume' in SBML Level 1.) When the + compartment's 'spatialDimensions' attribute does not have a value of + 0, a missing value of 'size' for a given compartment signifies that + the value either is unknown, or to be obtained from an external + source, or determined by an InitialAssignment, AssignmentRule, + AlgebraicRule or RateRule elsewhere in the model. In SBML Level 2, + there are additional special requirements on the values of 'size'; + we discuss them in a separate section below. + + The units associated with a compartment's 'size' attribute value may + be set using the optional attribute 'units'. The rules for setting + and using compartment size units differ between SBML Level 2 and + Level 3, and are discussed separately below. + + Finally, the optional Compartment attribute named 'constant' is used + to indicate whether the compartment's size stays constant after + simulation begins. A value of True indicates the compartment's + 'size' cannot be changed by any other construct except + InitialAssignment; a value of false indicates the compartment's + 'size' can be changed by other constructs in SBML. In SBML Level 2, + there is an additional explicit restriction that if + 'spatialDimensions'='0', the value cannot be changed by + InitialAssignment either. Further, in Level 2, 'constant' has a + default value of True. In SBML Level 3, there is no default value + for the 'constant' attribute. + + Additional considerations in SBML Level 2 + ====================================================================== + + In SBML Level 2, the default units of compartment size, and the + kinds of units allowed as values of the attribute 'units', interact + with the number of spatial dimensions of the compartment. The value + of the 'units' attribute of a Compartment object must be one of the + base units (see Unit), or the predefined unit identifiers volume, + area, length or dimensionless, or a new unit defined by a + UnitDefinition object in the enclosing Model, subject to the + restrictions detailed in the following table: + + Restrictions on values permitted for compartment size and units + attributes. Value of spatialDimensions size allowed? units + allowed? Allowable kinds of units Default value of attribute units + \"3\" yes yes units of volume, or dimensionless \"volume\" \"2\" yes + yes units of area, or dimensionless \"area\" \"1\" yes yes units of + length, or dimensionless \"length\" \"0\" no no (no units allowed) + + In SBML Level 2, the units of the compartment size, as defined by the + 'units' attribute or (if 'units' is not set) the default value listed + in the table above, are used in the following ways when the + compartment has a 'spatialDimensions' value greater than 0: + + * The value of the 'units' attribute is used as the units of the + compartment identifier when the identifier appears as a numerical + quantity in a mathematical formula expressed in MathML. + + * The math element of an AssignmentRule or InitialAssignment + referring to this compartment must have identical units. + + * In RateRule objects that set the rate of change of the + compartment's size, the units of the rule's math element must be + identical to the compartment's 'units' attribute divided by the + default time units. (In other words, the units for the rate of + change of compartment size are compartment size/time units. + + * When a Species is to be treated in terms of concentrations or + density, the units of the spatial size portion of the concentration + value (i.e., the denominator in the units formula substance/size) are + those indicated by the value of the 'units' attribute on the + compartment in which the species is located. + + Compartments with 'spatialDimensions'=0 require special treatment in + this framework. As implied above, the 'size' attribute must not have + a value on an SBML Level 2 Compartment object if the + 'spatialDimensions' attribute has a value of 0. An additional + related restriction is that the 'constant' attribute must default to + or be set to True if the value of the 'spatialDimensions' attribute + is 0, because a zero-dimensional compartment cannot ever have a + size. + + If a compartment has no size or dimensional units, how should such a + compartment's identifier be interpreted when it appears in + mathematical formulas? The answer is that such a compartment's + identifier should not appear in mathematical formulas in the first + place -- it has no value, and its value cannot change. Note also + that a zero-dimensional compartment is a point, and species located + at points can only be described in terms of amounts, not spatially- + dependent measures such as concentration. Since SBML KineticLaw + formulas are already in terms of substance/time and not (say) + concentration/time, volume or other factors in principle are not + needed for species located in zero-dimensional compartments. + + Finally, in SBML Level 2 Versions 2-4, each compartment in a model + may optionally be designated as belonging to a particular + compartment type. The optional attribute 'compartmentType' is used + identify the compartment type represented by the Compartment + structure. The 'compartmentType' attribute's value must be the + identifier of a CompartmentType instance defined in the model. If + the 'compartmentType' attribute is not present on a particular + compartment definition, a unique virtual compartment type is assumed + for that compartment, and no other compartment can belong to that + compartment type. The values of 'compartmentType' attributes on + compartments have no effect on the numerical interpretation of a + model. Simulators and other numerical analysis software may ignore + 'compartmentType' attributes. The 'compartmentType' attribute and + the CompartmentType class of objects are not present in SBML Level 3 + Core nor in SBML Level 1. + + Additional considerations in SBML Level 3 + ====================================================================== + + One difference between SBML Level 3 and lower Levels of SBML is that + there are no restrictions on the permissible values of the + 'spatialDimensions' attribute, and there is no default value defined + for the attribute. The value of 'spatialDimensions' does not have + to be an integer, either; this is to allow for the possibility of + representing structures with fractal dimensions. + + The number of spatial dimensions possessed by a compartment cannot + enter into mathematical formulas, and therefore cannot directly + alter the numerical interpretation of a model. However, the value + of 'spatialDimensions' does affect the interpretation of the units + associated with a compartment's size. Specifically, the value of + 'spatialDimensions' is used to select among the Model attributes + 'volumeUnits', 'areaUnits' and 'lengthUnits' when a Compartment + object does not define a value for its 'units' attribute. + + The 'units' attribute may be left unspecified for a given compartment + in a model; in that case, the compartment inherits the unit of + measurement specified by one of the attributes on the enclosing + Model object instance. The applicable attribute on Model depends on + the value of the compartment's 'spatialDimensions' attribute; the + relationship is shown in the table below. If the Model object does + not define the relevant attribute ('volumeUnits', 'areaUnits' or + 'lengthUnits') for a given 'spatialDimensions' value, the unit + associated with that Compartment object's size is undefined. If + both 'spatialDimensions' and 'units' are left unset on a given + Compartment object instance, then no unit can be chosen from among + the Model's 'volumeUnits', 'areaUnits' or 'lengthUnits' attributes + (even if the Model instance provides values for those attributes), + because there is no basis to select between them and there is no + default value of 'spatialDimensions'. Leaving the units of + compartments' sizes undefined in an SBML model does not render the + model invalid; however, as a matter of best practice, we strongly + recommend that all models specify the units of measurement for all + compartment sizes. + + Interpretation of the Compartment \"units\" attribute. Value of + attribute \"spatialDimensions\" Attribute of Model used for + inheriting the unit Recommended candidate units \"3\" \"volumeUnits\" + units of volume, or dimensionless \"2\" \"areaUnits\" units of area, + or dimensionless \"1\" \"lengthUnits\" units of length, or + dimensionless other no units inherited no specific recommendations + + The unit of measurement associated with a compartment's size, as + defined by the 'units' attribute or (if 'units' is not set) the + inherited value from Model according to the table above, is used in + the following ways: + + + * When the identifier of the compartment appears as a numerical + quantity in a mathematical formula expressed in MathML, it represents + the size of the compartment, and the unit associated with the size is + the value of the 'units' attribute. + + * When a Species is to be treated in terms of concentrations or + density, the unit associated with the spatial size portion of the + concentration value (i.e., the denominator in the formula + amount/size) is specified by the value of the 'units' attribute on + the compartment in which the species is located. + + * The 'math' elements of AssignmentRule, InitialAssignment and + EventAssignment objects setting the value of the compartment size + should all have the same units as the unit associated with the + compartment's size. + + * In a RateRule object that defines a rate of change for a + compartment's size, the unit of the rule's 'math' element should be + identical to the compartment's 'units' attribute divided by the + model-wide unit of time. (In other words, {unit of compartment + size}/{unit of time}.) + + + Other aspects of Compartment + ====================================================================== + + In SBML Level 1 and Level 2, Compartment has an optional attribute + named 'outside', whose value can be the identifier of another + Compartment object defined in the enclosing Model object. Doing so + means that the other compartment contains it or is outside of it. + This enables the representation of simple topological relationships + between compartments, for those simulation systems that can make use + of the information (e.g., for drawing simple diagrams of + compartments). It is worth noting that in SBML, there is no + relationship between compartment sizes when compartment positioning + is expressed using the 'outside' attribute. The size of a given + compartment does not in any sense include the sizes of other + compartments having it as the value of their 'outside' attributes. + In other words, if a compartment B has the identifier of compartment + A as its 'outside' attribute value, the size of A does not include + the size of B. The compartment sizes are separate. + + In Level 2, there are two restrictions on the 'outside' attribute. + First, because a compartment with 'spatialDimensions' of 0 has no + size, such a compartment cannot act as the container of any other + compartment except compartments that also have 'spatialDimensions' + values of 0. Second, the directed graph formed by representing + Compartment structures as vertexes and the 'outside' attribute + values as edges must be acyclic. The latter condition is imposed to + prevent a compartment from being contained inside itself. In the + absence of a value for 'outside', compartment definitions in SBML + Level 2 do not have any implied spatial relationships between each + other. +"; + + +%feature("docstring") ListOfCompartments " + @ingroup Core Implementation of SBML Level 2's ListOfCompartments + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Compartment::Compartment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Compartment(SBMLNamespaces sbmlns) + + Creates a new Compartment using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the 'id' + (identifier) attribute of a Compartment is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor. Setting the identifier can be accomplished using the + method setId(). + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Compartment object to an SBMLDocument (e.g., + using Model.addCompartment()), the SBML XML namespace of the + document overrides the value used when creating the Compartment + object via this constructor. This is necessary to ensure that an + SBML document is a consistent structure. Nevertheless, the ability + to supply the values at the time of creation of a Compartment is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Compartment(long level, long version) + + Creates a new Compartment using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Compartment + + Parameter 'version' is a long integer, the SBML Version to assign to + this Compartment + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Compartment object to an SBMLDocument (e.g., + using Model.addCompartment()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + Compartment object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a Compartment is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Compartment(Compartment orig) + + Copy constructor; creates a copy of a Compartment. + + Parameter 'orig' is the Compartment instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Compartment::accept " + Accepts the given SBMLVisitor for this instance of Compartment. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next Compartment in the list of + compartments within which this Compartment is embedded (i.e., the + ListOfCompartments in the parent Model). +"; + + +%feature("docstring") Compartment::clone " + Creates and returns a deep copy of this Compartment object. + + Returns a (deep) copy of this Compartment. +"; + + +%feature("docstring") Compartment::initDefaults " + Initializes the fields of this Compartment object to 'typical' + default values. + + The SBML Compartment component has slightly different aspects and + default attribute values in different SBML Levels and Versions. This + method sets the values to certain common defaults, based mostly on + what they are in SBML Level 2. Specifically: + + * Sets attribute 'spatialDimensions' to 3 + + * Sets attribute 'constant' to True + + * (Applies to Level 1 models only) Sets attribute 'volume' to 1.0 + + * (Applies to Level 3 models only) Sets attribute 'units' to litre +"; + + +%feature("docstring") Compartment::getId " + Returns the value of the 'id' attribute of this Compartment object. + + Returns the id of this Compartment. +"; + + +%feature("docstring") Compartment::getName " + Returns the value of the 'name' attribute of this Compartment object. + + Returns the name of this Compartment. +"; + + +%feature("docstring") Compartment::getCompartmentType " + Get the value of the 'compartmentType' attribute of this Compartment + object. + + Returns the value of the 'compartmentType' attribute of this + Compartment as a string. + + Note: + + The 'compartmentType' attribute is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Compartment::getSpatialDimensions " + Get the number of spatial dimensions of this Compartment object. + + Note: + + In SBML Level 3, the data type of the 'spatialDimensions' attribute + is double, whereas in Level 2, it is integer. LibSBML provides a + separate method for obtaining the value as a double, for models + where it is relevant. + + Returns the value of the 'spatialDimensions' attribute of this + Compartment as a long integereger + + See also getSpatialDimensionsAsDouble(). +"; + + +%feature("docstring") Compartment::getSpatialDimensionsAsDouble " + Get the number of spatial dimensions of this Compartment object as a + double. + + Note: + + In SBML Level 3, the data type of the 'spatialDimensions' attribute + is double, whereas in Level 2, it is integer. To avoid backward + compatibility issues, libSBML provides a separate method for + obtaining the value as a double, for models where it is relevant. + + Returns the value of the 'spatialDimensions' attribute of this + Compartment as a double, or NaN if this model is not in SBML Level 3 + format. + + See also getSpatialDimensions(). +"; + + +%feature("docstring") Compartment::getSize " + Get the size of this Compartment. + + This method is identical to getVolume(). In SBML Level 1, + compartments are always three-dimensional constructs and only have + volumes, whereas in SBML Level 2, compartments may be other than + three-dimensional and therefore the 'volume' attribute is named + 'size' in Level 2. LibSBML provides both getSize()@~ and + getVolume()@~ for easier compatibility between SBML Levels. + + Returns the value of the 'size' attribute ('volume' in Level 1) of + this Compartment as a float-point number. + + See also isSetSize(), getVolume(). +"; + + +%feature("docstring") Compartment::getVolume " + Get the volume of this Compartment. + + This method is identical to getSize(). In SBML Level 1, + compartments are always three-dimensional constructs and only have + volumes, whereas in SBML Level 2, compartments may be other than + three-dimensional and therefore the 'volume' attribute is named + 'size' in Level 2. LibSBML provides both getSize()@~ and + getVolume()@~ for easier compatibility between SBML Levels. + + Returns the value of the 'volume' attribute ('size' in Level 2) of + this Compartment, as a floating-point number. + + Note: + + The attribute 'volume' only exists by that name in SBML Level 1. In + Level 2 and above, the equivalent attribute is named 'size'. + + See also isSetVolume(), getSize(). +"; + + +%feature("docstring") Compartment::getUnits " + Get the units of this compartment's size. + + The value of an SBML compartment's 'units' attribute establishes the + unit of measurement associated with the compartment's size. + + Returns the value of the 'units' attribute of this Compartment, as a + string. An empty string indicates that no units have been assigned + to the value of the size. + + Note: + + There is an important distinction to be made between no units + assigned, and assuming a value without units has any specific unit + such as dimensionless. In SBML, default units are never attributed + to numbers, and numbers without units are not automatically assumed + to have the unit dimensionless. Please consult the relevant SBML + specification document for a more in-depth explanation of this topic + and the SBML unit system. + + See also isSetUnits(), setUnits()@~, getSize(). +"; + + +%feature("docstring") Compartment::getOutside " + Get the identifier, if any, of the compartment that is designated as + being outside of this one. + + Returns the value of the 'outside' attribute of this Compartment. + + Note: + + The 'outside' attribute is defined in SBML Level 1 and Level 2, but + does not exist in SBML Level 3 Version 1 Core. +"; + + +%feature("docstring") Compartment::getConstant " + Get the value of the 'constant' attribute of this Compartment. + + Returns True if this Compartment's size is flagged as being + constant, False otherwise. +"; + + +%feature("docstring") Compartment::isSetId " + Predicate returning True if this Compartment's 'id' attribute is + set. + + Returns True if the 'id' attribute of this Compartment is set, + False otherwise. +"; + + +%feature("docstring") Compartment::isSetName " + Predicate returning True if this Compartment's 'name' attribute is + set. + + Returns True if the 'name' attribute of this Compartment is set, + False otherwise. +"; + + +%feature("docstring") Compartment::isSetCompartmentType " + Predicate returning True if this Compartment's 'compartmentType' + attribute is set. + + Returns True if the 'compartmentType' attribute of this Compartment + is set, False otherwise. + + Note: + + The 'compartmentType' attribute is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Compartment::isSetSize " + Predicate returning True if this Compartment's 'size' attribute is + set. + + This method is similar but not identical to isSetVolume(). The + latter should be used in the context of SBML Level 1 models instead + of isSetSize()@~ because isSetVolume()@~ performs extra processing + to take into account the difference in default values between SBML + Levels 1 and 2. + + Returns True if the 'size' attribute ('volume' in Level 2) of this + Compartment is set, False otherwise. + + See also isSetVolume(), setSize(). +"; + + +%feature("docstring") Compartment::isSetVolume " + Predicate returning True if this Compartment's 'volume' attribute is + set. + + This method is similar but not identical to isSetSize(). The latter + should not be used in the context of SBML Level 1 models because this + method performs extra processing to take into account the difference + in default values between SBML Levels 1 and 2. + + Returns True if the 'volume' attribute ('size' in Level 2 and above) + of this Compartment is set, False otherwise. + + Note: + + The attribute 'volume' only exists by that name in SBML Level 1. In + Level 2 and above, the equivalent attribute is named 'size'. In + SBML Level 1, a compartment's volume has a default value (1.0) and + therefore this method will always return true. In Level 2, a + compartment's size (the equivalent of SBML Level 1's 'volume') is + optional and has no default value, and therefore may or may not be + set. + + See also isSetSize(), setVolume()@~. +"; + + +%feature("docstring") Compartment::isSetUnits " + Predicate returning True if this Compartment's 'units' attribute is + set. + + Returns True if the 'units' attribute of this Compartment is set, + False otherwise. + + Note: + + There is an important distinction to be made between no units + assigned, and assuming a value without units has any specific unit + such as dimensionless. In SBML, default units are never attributed + to numbers, and numbers without units are not automatically assumed + to have the unit dimensionless. Please consult the relevant SBML + specification document for a more in-depth explanation of this topic + and the SBML unit system. +"; + + +%feature("docstring") Compartment::isSetOutside " + Predicate returning True if this Compartment's 'outside' attribute + is set. + + Returns True if the 'outside' attribute of this Compartment is set, + False otherwise. + + Note: + + The 'outside' attribute is defined in SBML Level 1 and Level 2, but + does not exist in SBML Level 3 Version 1 Core. +"; + + +%feature("docstring") Compartment::isSetSpatialDimensions " + Predicate returning True if this Compartment's 'spatialDimensions' + attribute is set. + + Returns True if the 'spatialDimensions' attribute of this + Compartment is set, False otherwise. +"; + + +%feature("docstring") Compartment::isSetConstant " + Predicate returning True if this Compartment's 'constant' attribute + is set. + + Returns True if the 'constant' attribute of this Compartment is set, + False otherwise. +"; + + +%feature("docstring") Compartment::setId " + Sets the value of the 'id' attribute of this Compartment. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + Compartment + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Compartment::setName " + Sets the value of the 'name' attribute of this Compartment. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the Compartment + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Compartment::setCompartmentType " + Sets the 'compartmentType' attribute of this Compartment. + + Parameter 'sid' is the identifier of a CompartmentType object defined + elsewhere in this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The 'compartmentType' attribute is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Compartment::setSpatialDimensions " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setSpatialDimensions(double value) + + Sets the 'spatialDimensions' attribute of this Compartment as a + double. + + Parameter 'value' is a double indicating the number of dimensions of + this compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + ______________________________________________________________________ + Method variant with the following signature: + + setSpatialDimensions(long value) + + Sets the 'spatialDimensions' attribute of this Compartment. + + If 'value' is not one of 0, 1, 2, or 3, this method will have no + effect (i.e., the 'spatialDimensions' attribute will not be set). + + Parameter 'value' is a long integereger indicating the number of + dimensions of this compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Compartment::setSize " + Sets the 'size' attribute (or 'volume' in SBML Level 1) of this + Compartment. + + This method is identical to setVolume()@~ and is provided for + compatibility between SBML Level 1 and Level 2. + + Parameter 'value' is a double representing the size of this + compartment instance in whatever units are in effect for the + compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + Note: + + The attribute 'volume' only exists by that name in SBML Level 1. In + Level 2 and above, the equivalent attribute is named 'size'. +"; + + +%feature("docstring") Compartment::setVolume " + Sets the 'volume' attribute (or 'size' in SBML Level 2) of this + Compartment. + + This method is identical to setVolume()@~ and is provided for + compatibility between SBML Level 1 and Level 2. + + Parameter 'value' is a double representing the volume of this + compartment instance in whatever units are in effect for the + compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + Note: + + The attribute 'volume' only exists by that name in SBML Level 1. In + Level 2 and above, the equivalent attribute is named 'size'. +"; + + +%feature("docstring") Compartment::setUnits " + Sets the 'units' attribute of this Compartment. + + Parameter 'sid' is the identifier of the defined units to use. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Compartment::setOutside " + Sets the 'outside' attribute of this Compartment. + + Parameter 'sid' is the identifier of a compartment that encloses this + one. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'outside' attribute is defined in SBML Level 1 and Level 2, but + does not exist in SBML Level 3 Version 1 Core. +"; + + +%feature("docstring") Compartment::setConstant " + Sets the value of the 'constant' attribute of this Compartment. + + Parameter 'value' is a boolean indicating whether the size/volume of + this compartment should be considered constant (True) or variable + (False) + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Compartment::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Compartment::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Compartment::unsetName " + Unsets the value of the 'name' attribute of this Compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Compartment::unsetCompartmentType " + Unsets the value of the 'compartmentType' attribute of this + Compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The 'compartmentType' attribute is only available in SBML Level 2 + Versions 2-4. + + See also setCompartmentType(), isSetCompartmentType(). +"; + + +%feature("docstring") Compartment::unsetSize " + Unsets the value of the 'size' attribute of this Compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The attribute 'volume' only exists by that name in SBML Level 1. In + Level 2 and above, the equivalent attribute is named 'size'. +"; + + +%feature("docstring") Compartment::unsetVolume " + Unsets the value of the 'volume' attribute of this Compartment. + + In SBML Level 1, a Compartment volume has a default value (1.0) and + therefore should always be set. In Level 2, 'size' is optional with + no default value and as such may or may not be set. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The attribute 'volume' only exists by that name in SBML Level 1. In + Level 2 and above, the equivalent attribute is named 'size'. +"; + + +%feature("docstring") Compartment::unsetUnits " + Unsets the value of the 'units' attribute of this Compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Compartment::unsetOutside " + Unsets the value of the 'outside' attribute of this Compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'outside' attribute is defined in SBML Level 1 and Level 2, but + does not exist in SBML Level 3 Version 1 Core. +"; + + +%feature("docstring") Compartment::unsetSpatialDimensions " + Unsets the value of the 'spatialDimensions' attribute of this + Compartment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + This function is only valid for SBML Level 3. +"; + + +%feature("docstring") Compartment::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this Compartment's designated size. + + Compartments in SBML have an attribute ('units') for declaring the + units of measurement intended for the value of the compartment's + size. In the absence of a value given for this attribute, the units + are inherited from values either defined on the enclosing Model (in + SBML Level 3) or in defaults (in SBML Level 2). This method + returns a UnitDefinition object based on how this compartment's units + are interpreted according to the relevant SBML guidelines, or it + returns None if no units have been declared and no defaults are + defined by the relevant SBML specification. + + Note that unit declarations for Compartment objects are specified in + terms of the identifier of a unit (e.g., using setUnits()), but + this method returns a UnitDefinition object, not a unit identifier. + It does this by constructing an appropriate UnitDefinition. For + SBML Level 2 models, it will do this even when the value of the + 'units' attribute is one of the special SBML Level 2 unit + identifiers 'substance', 'volume', 'area', 'length' or 'time'. + Callers may find this useful in conjunction with the helper methods + provided by the UnitDefinition class for comparing different + UnitDefinition objects. + + Returns a UnitDefinition that expresses the units of this + Compartment, or None if one cannot be constructed. + + Note: + + The libSBML system for unit analysis depends on the model as a + whole. In cases where the Compartment object has not yet been added + to a model, or the model itself is incomplete, unit analysis is not + possible, and consequently this method will return None. + + See also isSetUnits(), getUnits(). +"; + + +%feature("docstring") Compartment::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Compartment::getElementName " + Returns the XML element name of this object, which for Compartment, + is always 'compartment'. + + Returns the name of this element, i.e., 'compartment'. +"; + + +%feature("docstring") Compartment::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Compartment::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Compartment object have been set. + + Note: + + The required attributes for a Compartment object are: + + * 'id' (or 'name' in SBML Level 1) + + * 'constant' (in SBML Level 3 only) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Compartment::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Compartment::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Compartment::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Compartment::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Compartment::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Compartment::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Compartment::isExplicitlySetSpatialDimensions " + Internal implementation method. +"; + + +%feature("docstring") Compartment::isExplicitlySetConstant " + Internal implementation method. +"; + + +%feature("docstring") ListOfCompartments::ListOfCompartments " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfCompartments(SBMLNamespaces sbmlns) + + Creates a new ListOfCompartments object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfCompartments object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfCompartments(long level, long version) + + Creates a new ListOfCompartments object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfCompartments::clone " + Creates and returns a deep copy of this ListOfCompartments instance. + + Returns a (deep) copy of this ListOfCompartments. +"; + + +%feature("docstring") ListOfCompartments::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfCompartments::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Compartment objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfCompartments::getElementName " + Returns the XML element name of this object. + + For ListOfCompartments, the XML element name is 'listOfCompartments'. + + Returns the name of this element, i.e., 'listOfCompartments'. +"; + + +%feature("docstring") ListOfCompartments::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a Compartment from the ListOfCompartments. + + Parameter 'n' is the index number of the Compartment to get. + + Returns the nth Compartment in this ListOfCompartments. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfCompartments::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfCompartments items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfCompartments items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfCompartments::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfCompartments::createObject " + Internal implementation method. +"; + + +%feature("docstring") Species " + @ingroup Core Implementation of SBML's Species construct. + + A species in SBML refers to a pool of entities that (a) are + considered indistinguishable from each other for the purposes of the + model, (b) participate in reactions, and (c) are located in a + specific compartment. The SBML Species object class is intended to + represent these pools. + + As with other major constructs in SBML, Species has a mandatory + attribute, 'id', used to give the species type an identifier in the + model. The identifier must be a text string conforming to the + identifer syntax permitted in SBML. Species also has an optional + 'name' attribute, of type string. The 'id' and 'name' must be used + according to the guidelines described in the SBML specifications. + + The required attribute 'compartment' is used to identify the + compartment in which the species is located. The attribute's value + must be the identifier of an existing Compartment object. It is + important to note that there is no default value for the + 'compartment' attribute on Species; every species in an SBML model + must be assigned a compartment explicitly. (This also implies that + every model with one or more Species objects must define at least + one Compartment object.) + + The initial amount and concentration of a species + ====================================================================== + + The optional attributes 'initialAmount' and 'initialConcentration', + both having a data type of double, can be used to set the initial + quantity of the species in the compartment where the species is + located. These attributes are mutually exclusive; i.e., only one can + have a value on any given instance of a Species object. Missing + 'initialAmount' and 'initialConcentration' values implies that their + values either are unknown, or to be obtained from an external source, + or determined by an InitialAssignment or other SBML construct + elsewhere in the model. + + A species' initial quantity in SBML is set by the 'initialAmount' or + 'initialConcentration' attribute exactly once. If the 'constant' + attribute is True, then the value of the species' quantity is fixed + and cannot be changed except by an InitialAssignment. These methods + differ in that the 'initialAmount' and 'initialConcentration' + attributes can only be used to set the species quantity to a literal + floating-point number, whereas the use of an InitialAssignment + object allows the value to be set using an arbitrary mathematical + expression (which, thanks to MathML's expressiveness, may evaluate + to a rational number). If the species' 'constant' attribute is + False, the species' quantity value may be overridden by an + InitialAssignment or changed by AssignmentRule or AlgebraicRule, and + in addition, for t > 0, it may also be changed by a RateRule, Event + objects, and as a result of being a reactant or product in one or + more Reaction objects. (However, some constructs are mutually + exclusive; see the SBML specifications for the precise details.) It + is not an error to define 'initialAmount' or 'initialConcentration' + on a species and also redefine the value using an InitialAssignment, + but the 'initialAmount' or 'initialConcentration' setting in that + case is ignored. The SBML specifications provide additional + information about the semantics of assignments, rules and values for + simulation time t <= 0. + + SBML Level 2 additionally stipulates that in cases where a species' + compartment has a 'spatialDimensions' value of 0 (zero), the species + cannot have a value for 'initialConcentration' because the concepts + of concentration and density break down when a container has zero + dimensions. + + The units of a species' amount or concentration + ====================================================================== + + When the attribute 'initialAmount' is set, the unit of measurement + associated with the value of 'initialAmount' is specified by the + Species attribute 'substanceUnits'. When the 'initialConcentration' + attribute is set, the unit of measurement associated with this + concentration value is {unit of amount} divided by {unit of size}, + where the {unit of amount} is specified by the Species + 'substanceUnits' attribute, and the {unit of size} is specified by + the 'units' attribute of the Compartment object in which the species + is located. Note that in either case, a unit of amount is involved + and determined by the 'substanceUnits' attribute. Note + <strong>these two attributes alone do not determine the units of the + species when the species identifier appears in a mathematical + expression</strong>; that aspect is determined by the attribute + 'hasOnlySubstanceUnits' discussed below. + + In SBML Level 3, if the 'substanceUnits' attribute is not set on a + given Species object instance, then the unit of amount for that + species is inherited from the 'substanceUnits' attribute on the + enclosing Model object instance. If that attribute on Model is not + set either, then the unit associated with the species' quantity is + undefined. + + In SBML Level 2, if the 'substanceUnits' attribute is not set on a + given Species object instance, then the unit of amount for that + species is taken from the predefined SBML unit identifier + 'substance'. The value assigned to 'substanceUnits' must be chosen + from one of the following possibilities: one of the base unit + identifiers defined in SBML, the built-in unit identifier + 'substance', or the identifier of a new unit defined in the list of + unit definitions in the enclosing Model object. The chosen units + for 'substanceUnits' must be be 'dimensionless', 'mole', 'item', + 'kilogram', 'gram', or units derived from these. + + As noted at the beginning of this section, simply setting + 'initialAmount' or 'initialConcentration' alone does not determine + whether a species identifier represents an amount or a concentration + when it appears elsewhere in an SBML model. The role of the + attribute 'hasOnlySubstanceUnits' is to indicate whether the units + of the species, when the species identifier appears in mathematical + formulas, are intended to be concentration or amount. The attribute + takes on a boolean value. In SBML Level 3, the attribute has no + default value and must always be set in a model; in SBML Level 2, it + has a default value of False. + + The units of the species are used in the following ways: + + * When the species' identifier appears in a MathML formula, it + represents the species' quantity, and the unit of measurement + associated with the quantity is as described above. + + * The 'math' elements of AssignmentRule, InitialAssignment and + EventAssignment objects referring to this species should all have the + same units as the unit of measurement associated with the species + quantity. + + * In a RateRule object that defines the rate of change of the + species' quantity, the unit associated with the rule's 'math' element + should be equal to the unit of the species' quantity divided by the + model-wide unit of time; in other words, {unit of species + quantity}/{unit of time}. + + + The 'constant' and 'boundaryCondition' attributes + ====================================================================== + + The Species object class has two boolean attributes named 'constant' + and 'boundaryCondition', used to indicate whether and how the + quantity of that species can vary during a simulation. In SBML + Level 2 they are optional; in SBML Level 3 they are mandatory. The + following table shows how to interpret the combined values of these + attributes. + + Interpretation of species' constant and boundaryCondition attributes. + constant value boundaryCondition value Can have assignment or + rate rule? Can be reactant or product? Species' quantity can be + changed by true true no yes (never changes) false true yes yes rules + and events true false no no (never changes) false false yes yes + reactions or rules (but not both at the same time), and events + + By default, when a species is a product or reactant of one or more + reactions, its quantity is determined by those reactions. In SBML, + it is possible to indicate that a given species' quantity is not + determined by the set of reactions even when that species occurs as a + product or reactant; i.e., the species is on the boundary of the + reaction system, and its quantity is not determined by the + reactions. The boolean attribute 'boundaryCondition' can be used to + indicate this. A value of False indicates that the species is part + of the reaction system. In SBML Level 2, the attribute has a + default value of False, while in SBML Level 3, it has no default. + + The 'constant' attribute indicates whether the species' quantity can + be changed at all, regardless of whether by reactions, rules, or + constructs other than InitialAssignment. A value of False indicates + that the species' quantity can be changed. (This is also a common + value because the purpose of most simulations is precisely to + calculate changes in species quantities.) In SBML Level 2, the + attribute has a default value of False, while in SBML Level 3, it + has no default. Note that the initial quantity of a species can be + set by an InitialAssignment irrespective of the value of the + 'constant' attribute. + + In practice, a 'boundaryCondition' value of True means a differential + equation derived from the reaction definitions should not be + generated for the species. However, the species' quantity may still + be changed by AssignmentRule, RateRule, AlgebraicRule, Event, and + InitialAssignment constructs if its 'constant' attribute is False. + Conversely, if the species' 'constant' attribute is True, then its + value cannot be changed by anything except InitialAssignment. + + A species having 'boundaryCondition'=False and 'constant'=False can + appear as a product and/or reactant of one or more reactions in the + model. If the species is a reactant or product of a reaction, it + must not also appear as the target of any AssignmentRule or RateRule + object in the model. If instead the species has + 'boundaryCondition'=false and 'constant'=True, then it cannot appear + as a reactant or product, or as the target of any AssignmentRule, + RateRule or EventAssignment object in the model. + + The conversionFactor attribute in SBML Level 3 + ====================================================================== + + In SBML Level 3, Species has an additional optional attribute, + 'conversionFactor', that defines a conversion factor that applies to + a particular species. The value must be the identifier of a + Parameter object instance defined in the model. That Parameter + object must be a constant, meaning its 'constant' attribute must be + set to True. If a given Species object definition defines a value + for its 'conversionFactor' attribute, it takes precedence over any + factor defined by the Model object's 'conversionFactor' attribute. + + The unit of measurement associated with a species' quantity can be + different from the unit of extent of reactions in the model. SBML + Level 3 avoids implicit unit conversions by providing an explicit + way to indicate any unit conversion that might be required. The use + of a conversion factor in computing the effects of reactions on a + species' quantity is explained in detail in the SBML Level 3 + specification document. Because the value of the 'conversionFactor' + attribute is the identifier of a Parameter object, and because + parameters can have units attached to them, the transformation from + reaction extent units to species units can be completely specified + using this approach. + + Note that the unit conversion factor is <strong>only applied when + calculating the effect of a reaction on a species</strong>. It is + not used in any rules or other SBML constructs that affect the + species, and it is also not used when the value of the species is + referenced in a mathematical expression. + + The speciesType attribute in SBML Level 2 Versions 2-4 + ====================================================================== + + In SBML Level 2 Versions 2-4, each species in a model may optionally + be designated as belonging to a particular species type. The + optional attribute 'speciesType' is used to identify the species + type of the chemical entities that make up the pool represented by + the Species objects. The attribute's value must be the identifier + of an existing SpeciesType object in the model. If the + 'speciesType' attribute is not present on a particular species + definition, it means the pool contains chemical entities of a type + unique to that pool; in effect, a virtual species type is assumed + for that species, and no other species can belong to that species + type. The value of 'speciesType' attributes on species have no + effect on the numerical interpretation of a model; simulators and + other numerical analysis software may ignore 'speciesType' + attributes. + + There can be only one species of a given species type in any given + compartment of a model. More specifically, for all Species objects + having a value for the 'speciesType' attribute, the pair <center> + ('speciesType' attribute value, 'compartment' attribute value) + </center> + + must be unique across the set of all Species object in a model. + + The spatialSizeUnits attribute in SBML Level 2 Versions 1-2 + ====================================================================== + + In versions of SBML Level 2 before Version 3, the class Species + included an attribute called 'spatialSizeUnits', which allowed + explicitly setting the units of size for initial concentration. + LibSBML retains this attribute for compatibility with older + definitions of Level 2, but its use is strongly discouraged because + many software tools do no properly interpret this unit declaration + and it is incompatible with all SBML specifications after Level 2 + Version 3. + + Additional considerations for interpreting the numerical value of a + species + ====================================================================== + + Species are unique in SBML in that they have a kind of duality: a + species identifier may stand for either substance amount (meaning, a + count of the number of individual entities) or a concentration or + density (meaning, amount divided by a compartment size). The + previous sections explain the meaning of a species identifier when + it is referenced in a mathematical formula or in rules or other SBML + constructs; however, it remains to specify what happens to a species + when the compartment in which it is located changes in size. + + When a species definition has a 'hasOnlySubstanceUnits' attribute + value of False and the size of the compartment in which the species + is located changes, the default in SBML is to assume that it is the + concentration that must be updated to account for the size change. + This follows from the principle that, all other things held + constant, if a compartment simply changes in size, the size change + does not in itself cause an increase or decrease in the number of + entities of any species in that compartment. In a sense, the + default is that the amount of a species is preserved across + compartment size changes. Upon such size changes, the value of the + concentration or density must be recalculated from the simple + relationship concentration = amount / size if the value of the + concentration is needed (for example, if the species identifier + appears in a mathematical formula or is otherwise referenced in an + SBML construct). There is one exception: if the species' quantity + is determined by an AssignmentRule, RateRule, AlgebraicRule, or an + EventAssignment and the species has a 'hasOnlySubstanceUnits' + attribute value of False, it means that the concentration is + assigned by the rule or event; in that case, the amount must be + calculated when the compartment size changes. (Events also require + additional care in this situation, because an event with multiple + assignments could conceivably reassign both a species quantity and a + compartment size simultaneously. Please refer to the SBML + specifications for the details.) + + Note that the above only matters if a species has a + 'hasOnlySubstanceUnits' attribute value of False, meaning that the + species identifier refers to a concentration wherever the identifier + appears in a mathematical formula. If instead the attribute's value + is True, then the identifier of the species always stands for an + amount wherever it appears in a mathematical formula or is referenced + by an SBML construct. In that case, there is never a question about + whether an assignment or event is meant to affect the amount or + concentration: it is always the amount. + + A particularly confusing situation can occur when the species has + 'constant' attribute value of True in combination with a + 'hasOnlySubstanceUnits' attribute value of False. Suppose this + species is given a value for 'initialConcentration'. Does a + 'constant' value of True mean that the concentration is held + constant if the compartment size changes? No; it is still the + amount that is kept constant across a compartment size change. The + fact that the species was initialized using a concentration value is + irrelevant. +"; + + +%feature("docstring") ListOfSpecies " + @ingroup Core Implementation of SBML Level 2's ListOfSpecies + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Species::Species " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Species(SBMLNamespaces sbmlns) + + Creates a new Species using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the 'id' + (identifier) attribute of a Species is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor. Setting the identifier can be accomplished using the + method Species.setId(). + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Species object to an SBMLDocument (e.g., + using Model.addSpecies()), the SBML XML namespace of the document + overrides the value used when creating the Species object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the values + at the time of creation of a Species is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Species(long level, long version) + + Creates a new Species using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Species + + Parameter 'version' is a long integer, the SBML Version to assign to + this Species + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Species object to an SBMLDocument (e.g., + using Model.addSpecies()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + Species object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Species is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Species(Species orig) + + Copy constructor; creates a copy of this Species object. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Species::accept " + Accepts the given SBMLVisitor for this instance of Species. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") Species::clone " + Creates and returns a deep copy of this Species object. + + Returns a (deep) copy of this Species object. +"; + + +%feature("docstring") Species::initDefaults " + Initializes the fields of this Species object to 'typical' defaults + values. + + The SBML Species component has slightly different aspects and + default attribute values in different SBML Levels and Versions. This + method sets the values to certain common defaults, based mostly on + what they are in SBML Level 2. Specifically: + + * Sets 'boundaryCondition' to False + + * Sets 'constant' to False + + * sets 'hasOnlySubstanceUnits' to False + + * (Applies to Level 3 models only) Sets attribute 'substanceUnits' + to mole +"; + + +%feature("docstring") Species::getId " + Returns the value of the 'id' attribute of this Species object. + + Returns the id of this Species object. +"; + + +%feature("docstring") Species::getName " + Returns the value of the 'name' attribute of this Species object. + + Returns the name of this Species object. +"; + + +%feature("docstring") Species::getSpeciesType " + Get the type of this Species object object. + + Returns the value of the 'speciesType' attribute of this Species as + a string. + + Note: + + The 'speciesType' attribute is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Species::getCompartment " + Get the compartment in which this species is located. + + The compartment is designated by its identifier. + + Returns the value of the 'compartment' attribute of this Species + object, as a string. +"; + + +%feature("docstring") Species::getInitialAmount " + Get the value of the 'initialAmount' attribute. + + Returns the initialAmount of this Species, as a float-point number. +"; + + +%feature("docstring") Species::getInitialConcentration " + Get the value of the 'initialConcentration' attribute. + + Returns the initialConcentration of this Species,, as a float-point + number. + + Note: + + The attribute 'initialConcentration' is only available in SBML Level + 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::getSubstanceUnits " + Get the value of the 'substanceUnits' attribute. + + Returns the value of the 'substanceUnits' attribute of this Species, + as a string. An empty string indicates that no units have been + assigned. + + Note: + + There is an important distinction to be made between no units + assigned, and assuming a value without units has any specific unit + such as dimensionless. In SBML, default units are never attributed + to numbers, and numbers without units are not automatically assumed + to have the unit dimensionless. Please consult the relevant SBML + specification document for a more in-depth explanation of this topic + and the SBML unit system. + + See also isSetSubstanceUnits(), setSubstanceUnits(). +"; + + +%feature("docstring") Species::getSpatialSizeUnits " + Get the value of the 'spatialSizeUnits' attribute. + + Returns the value of the 'spatialSizeUnits' attribute of this Species + object, as a string. + + WARNING: + + In versions of SBML Level 2 before Version 3, the class Species + included an attribute called 'spatialSizeUnits', which allowed + explicitly setting the units of size for initial concentration. + This attribute was removed in SBML Level 2 Version 3. LibSBML + retains this attribute for compatibility with older definitions of + Level 2, but its use is strongly discouraged because it is + incompatible with Level 2 Version 3 and Level 2 Version 4. +"; + + +%feature("docstring") Species::getUnits " + Get the value of the 'units' attribute. + + Returns the units of this Species (L1 only). + + Note: + + The 'units' attribute is defined only in SBML Level 1. In SBML + Level 2 and Level 3, it has been replaced by a combination of + 'substanceUnits' and the units of the Compartment object in which a + species is located. In SBML Level 2 Versions 1-2, an additional + attribute 'spatialSizeUnits' helps determine the units of the + species quantity, but this attribute was removed in later versions + of SBML Level 2. +"; + + +%feature("docstring") Species::getHasOnlySubstanceUnits " + Get the value of the 'hasOnlySubstanceUnits' attribute. + + Returns True if this Species' 'hasOnlySubstanceUnits' attribute + value is nonzero, False otherwise. + + Note: + + The 'hasOnlySubstanceUnits' attribute does not exist in SBML Level + 1. +"; + + +%feature("docstring") Species::getBoundaryCondition " + Get the value of the 'boundaryCondition' attribute. + + Returns True if this Species' 'boundaryCondition' attribute value is + nonzero, False otherwise. +"; + + +%feature("docstring") Species::getCharge " + Get the value of the 'charge' attribute. + + Returns the charge of this Species object. + + Note: + + Beginning in SBML Level 2 Version 2, the 'charge' attribute on + Species is deprecated and in SBML Level 3 it does not exist at all. + Its use strongly discouraged. Its presence is considered a + misfeature in earlier definitions of SBML because its implications + for the mathematics of a model were never defined, and in any case, + no known modeling system ever used it. Instead, models take account + of charge values directly in their definitions of species by (for + example) having separate species identities for the charged and + uncharged versions of the same species. This allows the condition to + affect model mathematics directly. LibSBML retains this method for + easier compatibility with SBML Level 1. +"; + + +%feature("docstring") Species::getConstant " + Get the value of the 'constant' attribute. + + Returns True if this Species's 'constant' attribute value is + nonzero, False otherwise. + + Note: + + The attribute 'constant' is only available in SBML Levels 2 and 3. + It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::getConversionFactor " + Get the value of the 'conversionFactor' attribute. + + Returns the conversionFactor of this Species, as a string. + + Note: + + The 'conversionFactor' attribute was introduced in SBML Level 3. It + does not exist on Species in SBML Levels 1 and 2. +"; + + +%feature("docstring") Species::isSetId " + Predicate returning True if this Species object's 'id' attribute is + set. + + Returns True if the 'id' attribute of this Species is set, False + otherwise. +"; + + +%feature("docstring") Species::isSetName " + Predicate returning True if this Species object's 'name' attribute + is set. + + Returns True if the 'name' attribute of this Species is set, False + otherwise. +"; + + +%feature("docstring") Species::isSetSpeciesType " + Predicate returning True if this Species object's 'speciesType' + attribute is set. + + Returns True if the 'speciesType' attribute of this Species is set, + False otherwise. + + Note: + + The 'speciesType' attribute is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Species::isSetCompartment " + Predicate returning True if this Species object's 'compartment' + attribute is set. + + Returns True if the 'compartment' attribute of this Species is set, + False otherwise. +"; + + +%feature("docstring") Species::isSetInitialAmount " + Predicate returning True if this Species object's 'initialAmount' + attribute is set. + + Returns True if the 'initialAmount' attribute of this Species is + set, False otherwise. + + Note: + + In SBML Level 1, Species' 'initialAmount' is required and therefore + should always be set. (However, in Level 1, the attribute has no + default value either, so this method will not return True until a + value has been assigned.) In SBML Level 2, 'initialAmount' is + optional and as such may or may not be set. +"; + + +%feature("docstring") Species::isSetInitialConcentration " + Predicate returning True if this Species object's + 'initialConcentration' attribute is set. + + Returns True if the 'initialConcentration' attribute of this Species + is set, False otherwise. + + Note: + + The attribute 'initialConcentration' is only available in SBML Level + 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::isSetSubstanceUnits " + Predicate returning True if this Species object's 'substanceUnits' + attribute is set. + + Returns True if the 'substanceUnits' attribute of this Species is + set, False otherwise. +"; + + +%feature("docstring") Species::isSetSpatialSizeUnits " + Predicate returning True if this Species object's 'spatialSizeUnits' + attribute is set. + + Returns True if the 'spatialSizeUnits' attribute of this Species is + set, False otherwise. + + WARNING: + + In versions of SBML Level~2 before Version 3, the class Species + included an attribute called 'spatialSizeUnits', which allowed + explicitly setting the units of size for initial concentration. This + attribute was removed in SBML Level 2 Version 3. LibSBML retains + this attribute for compatibility with older definitions of Level 2, + but its use is strongly discouraged because it is incompatible with + Level 2 Version 3 and Level 2 Version 4. +"; + + +%feature("docstring") Species::isSetUnits " + Predicate returning True if this Species object's 'units' attribute + is set. + + Returns True if the 'units' attribute of this Species is set, False + otherwise. +"; + + +%feature("docstring") Species::isSetCharge " + Predicate returning True if this Species object's 'charge' attribute + is set. + + Returns True if the 'charge' attribute of this Species is set, False + otherwise. + + Note: + + Beginning in SBML Level 2 Version 2, the 'charge' attribute on + Species in SBML is deprecated and in SBML Level 3 it does not exist + at all. Its use strongly discouraged. Its presence is considered a + misfeature in earlier definitions of SBML because its implications + for the mathematics of a model were never defined, and in any case, + no known modeling system ever used it. Instead, models take account + of charge values directly in their definitions of species by (for + example) having separate species identities for the charged and + uncharged versions of the same species. This allows the condition to + affect model mathematics directly. LibSBML retains this method for + easier compatibility with SBML Level 1. +"; + + +%feature("docstring") Species::isSetConversionFactor " + Predicate returning True if this Species object's 'conversionFactor' + attribute is set. + + Returns True if the 'conversionFactor' attribute of this Species is + set, False otherwise. + + Note: + + The 'conversionFactor' attribute was introduced in SBML Level 3. It + does not exist on Species in SBML Levels 1 and 2. +"; + + +%feature("docstring") Species::isSetBoundaryCondition " + Predicate returning True if this Species object's + 'boundaryCondition' attribute is set. + + Returns True if the 'boundaryCondition' attribute of this Species is + set, False otherwise. +"; + + +%feature("docstring") Species::isSetHasOnlySubstanceUnits " + Predicate returning True if this Species object's + 'hasOnlySubstanceUnits' attribute is set. + + Returns True if the 'hasOnlySubstanceUnits' attribute of this Species + is set, False otherwise. + + Note: + + The 'hasOnlySubstanceUnits' attribute does not exist in SBML Level + 1. +"; + + +%feature("docstring") Species::isSetConstant " + Predicate returning True if this Species object's 'constant' + attribute is set. + + Returns True if the 'constant' attribute of this Species is set, + False otherwise. + + Note: + + The attribute 'constant' is only available in SBML Levels 2 and 3. + It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::setId " + Sets the value of the 'id' attribute of this Species object. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + Species + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Species::setName " + Sets the value of the 'name' attribute of this Species object. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the Species + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Species::setSpeciesType " + Sets the 'speciesType' attribute of this Species object. + + Parameter 'sid' is the identifier of a SpeciesType object defined + elsewhere in this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The 'speciesType' attribute is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Species::setCompartment " + Sets the 'compartment' attribute of this Species object. + + Parameter 'sid' is the identifier of a Compartment object defined + elsewhere in this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Species::setInitialAmount " + Sets the 'initialAmount' attribute of this Species and marks the + field as set. + + This method also unsets the 'initialConcentration' attribute. + + Parameter 'value' is the value to which the 'initialAmount' attribute + should be set. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") Species::setInitialConcentration " + Sets the 'initialConcentration' attribute of this Species and marks + the field as set. + + This method also unsets the 'initialAmount' attribute. + + Parameter 'value' is the value to which the 'initialConcentration' + attribute should be set. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attribute 'initialConcentration' is only available in SBML Level + 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::setSubstanceUnits " + Sets the 'substanceUnits' attribute of this Species object. + + Parameter 'sid' is the identifier of the unit to use. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Species::setSpatialSizeUnits " + (SBML Level 2 Versions 1-2) Sets the 'spatialSizeUnits' attribute of + this Species object. + + Parameter 'sid' is the identifier of the unit to use. + + WARNING: + + In versions of SBML Level~2 before Version 3, the class Species + included an attribute called 'spatialSizeUnits', which allowed + explicitly setting the units of size for initial concentration. This + attribute was removed in SBML Level 2 Version 3. LibSBML retains + this attribute for compatibility with older definitions of Level 2, + but its use is strongly discouraged because it is incompatible with + Level 2 Version 3 and Level 2 Version 4. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Species::setUnits " + (SBML Level 1 only) Sets the units of this Species object. + + Parameter 'sname' is the identifier of the unit to use. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Species::setHasOnlySubstanceUnits " + Sets the 'hasOnlySubstanceUnits' attribute of this Species object. + + Parameter 'value' is boolean value for the 'hasOnlySubstanceUnits' + attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The 'hasOnlySubstanceUnits' attribute does not exist in SBML Level + 1. +"; + + +%feature("docstring") Species::setBoundaryCondition " + Sets the 'boundaryCondition' attribute of this Species object. + + Parameter 'value' is boolean value for the 'boundaryCondition' + attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") Species::setCharge " + Sets the 'charge' attribute of this Species object. + + Parameter 'value' is an integer to which to set the 'charge' to. + + Note: + + Beginning in SBML Level 2 Version 2, the 'charge' attribute on + Species in SBML is deprecated and its use strongly discouraged, and + it does not exist in SBML Level 3 at all. Its presence is + considered a misfeature in earlier definitions of SBML because its + implications for the mathematics of a model were never defined, and + in any case, no known modeling system ever used it. Instead, models + take account of charge values directly in their definitions of + species by (for example) having separate species identities for the + charged and uncharged versions of the same species. This allows the + condition to affect model mathematics directly. LibSBML retains this + method for easier compatibility with SBML Level 1. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Species::setConstant " + Sets the 'constant' attribute of this Species object. + + Parameter 'value' is a boolean value for the 'constant' attribute + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attribute 'constant' is only available in SBML Levels 2 and 3. + It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::setConversionFactor " + Sets the value of the 'conversionFactor' attribute of this Species + object. + + The string in 'sid' is copied. + + Parameter 'sid' is the new conversionFactor for the Species + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'conversionFactor' attribute was introduced in SBML Level 3. It + does not exist on Species in SBML Levels 1 and 2. +"; + + +%feature("docstring") Species::unsetName " + Unsets the value of the 'name' attribute of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Species::unsetSpeciesType " + Unsets the 'speciesType' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The attribute 'speciesType' is only available in SBML Level 2 + Versions 2-4. +"; + + +%feature("docstring") Species::unsetInitialAmount " + Unsets the 'initialAmount' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Species::unsetInitialConcentration " + Unsets the 'initialConcentration' attribute value of this Species + object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The attribute 'initialConcentration' is only available in SBML Level + 2 and 3. It does not exist on Species in Level 1. +"; + + +%feature("docstring") Species::unsetSubstanceUnits " + Unsets the 'substanceUnits' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Species::unsetSpatialSizeUnits " + Unsets the 'spatialSizeUnits' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + WARNING: + + In versions of SBML Level~2 before Version 3, the class Species + included an attribute called 'spatialSizeUnits', which allowed + explicitly setting the units of size for initial concentration. This + attribute was removed in SBML Level 2 Version 3. LibSBML retains + this attribute for compatibility with older definitions of Level 2, + but its use is strongly discouraged because it is incompatible with + Level 2 Version 3 and Level 2 Version 4. +"; + + +%feature("docstring") Species::unsetUnits " + Unsets the 'units' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Species::unsetCharge " + Unsets the 'charge' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + Beginning in SBML Level 2 Version 2, the 'charge' attribute on + Species in SBML is deprecated and its use strongly discouraged, and + it does not exist in SBML Level 3 at all. Its presence is + considered a misfeature in earlier definitions of SBML because its + implications for the mathematics of a model were never defined, and + in any case, no known modeling system ever used it. Instead, models + take account of charge values directly in their definitions of + species by (for example) having separate species identities for the + charged and uncharged versions of the same species. This allows the + condition to affect model mathematics directly. LibSBML retains this + method for easier compatibility with SBML Level 1. +"; + + +%feature("docstring") Species::unsetConversionFactor " + Unsets the 'conversionFactor' attribute value of this Species object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'conversionFactor' attribute was introduced in SBML Level 3. It + does not exist on Species in SBML Levels 1 and 2. +"; + + +%feature("docstring") Species::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this Species' amount or concentration. + + Species in SBML have an attribute ('substanceUnits') for declaring + the units of measurement intended for the species' amount or + concentration (depending on which one applies). In the absence of a + value given for 'substanceUnits', the units are taken from the + enclosing Model's definition of 'substance' or 'substance'/(size of + the compartment) in which the species is located, or finally, if + these are not redefined by the Model, the relevant SBML default units + for those quantities. Following that procedure, the method + getDerivedUnitDefinition()@~ returns a UnitDefinition based on the + interpreted units of this species's amount or concentration. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + Note also that unit declarations for Species are in terms of the + identifier of a unit, but this method returns a UnitDefinition + object, not a unit identifier. It does this by constructing an + appropriate UnitDefinition. Callers may find this particularly + useful when used in conjunction with the helper methods on + UnitDefinition for comparing different UnitDefinition objects. + + In SBML Level 2 specifications prior to Version 3, Species includes + an additional attribute named 'spatialSizeUnits', which allows + explicitly setting the units of size for initial concentration. The + getDerivedUnitDefinition()@~ takes this into account for models + expressed in SBML Level 2 Versions 1 and 2. + + Returns a UnitDefinition that expresses the units of this Species, + or None if one cannot be constructed. + + See also getSubstanceUnits(). +"; + + +%feature("docstring") Species::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Species::getElementName " + Returns the XML element name of this object, which for Species, is + always 'species'. + + Returns the name of this element, i.e., 'species'. +"; + + +%feature("docstring") Species::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Species::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Species object have been set. + + Note: + + The required attributes for a Species object are: + + * 'id' (or 'name' in SBML Level 1) + + * 'compartment' + + * 'initialAmount' (required in SBML Level 1 only; optional + otherwise) + + * 'hasOnlySubstanceUnits' (required in SBML Level 3; optional in + SBML Level 2) + + * 'boundaryCondition' (required in SBML Level 3; optional in Levels + 1 and 2) + + * 'constant' (required in SBML Level 3; optional in SBML Level 2) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Species::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Species::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Species::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Species::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Species::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Species::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Species::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Species::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Species::isExplicitlySetBoundaryCondition " + Internal implementation method. +"; + + +%feature("docstring") Species::isExplicitlySetConstant " + Internal implementation method. +"; + + +%feature("docstring") Species::isExplicitlySetHasOnlySubsUnits " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpecies::ListOfSpecies " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfSpecies(SBMLNamespaces sbmlns) + + Creates a new ListOfSpecies object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfSpecies object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfSpecies(long level, long version) + + Creates a new ListOfSpecies object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfSpecies::clone " + Creates and returns a deep copy of this ListOfSpeciess instance. + + Returns a (deep) copy of this ListOfSpeciess. +"; + + +%feature("docstring") ListOfSpecies::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfSpecies::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Species objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfSpecies::getElementName " + Returns the XML element name of this object. + + For ListOfSpeciess, the XML element name is 'listOfSpeciess'. + + Returns the name of this element, i.e., 'listOfSpeciess'. +"; + + +%feature("docstring") ListOfSpecies::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a Species from the ListOfSpecies. + + Parameter 'n' is the index number of the Species to get. + + Returns the nth Species in this ListOfSpecies. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfSpecies::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfSpeciess items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfSpeciess items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfSpecies::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpecies::createObject " + Internal implementation method. +"; + + +%feature("docstring") Parameter " + @ingroup Core Implementation of SBML's Parameter construct. + + A Parameter is used in SBML to define a symbol associated with a + value; this symbol can then be used in mathematical formulas in a + model. By default, parameters have constant value for the duration + of a simulation, and for this reason are called parameters instead + of variables in SBML, although it is crucial to understand that SBML + parameters represent both concepts. Whether a given SBML parameter + is intended to be constant or variable is indicated by the value of + its 'constant' attribute. + + SBML's Parameter has a required attribute, 'id', that gives the + parameter a unique identifier by which other parts of an SBML model + definition can refer to it. A parameter can also have an optional + 'name' attribute of type string. Identifiers and names must be used + according to the guidelines described in the SBML specifications. + + The optional attribute 'value' determines the value (of type double) + assigned to the parameter. A missing value for 'value' implies that + the value either is unknown, or to be obtained from an external + source, or determined by an initial assignment. The unit of + measurement associated with the value of the parameter can be + specified using the optional attribute 'units'. Here we only + mention briefly some notable points about the possible unit choices, + but readers are urged to consult the SBML specification documents + for more information: + + + * In SBML Level 3, there are no constraints on the units that can + be assigned to parameters in a model; there are also no units to + inherit from the enclosing Model object (unlike the case for, e.g., + Species and Compartment). + + * In SBML Level 2, the value assigned to the parameter's 'units' + attribute must be chosen from one of the following possibilities: one + of the base unit identifiers defined in SBML; one of the built-in + unit identifiers 'substance', 'time', 'volume', 'area' or 'length'; + or the identifier of a new unit defined in the list of unit + definitions in the enclosing Model structure. There are no + constraints on the units that can be chosen from these sets. There + are no default units for parameters. + + The Parameter structure has another boolean attribute named + 'constant' that is used to indicate whether the parameter's value + can vary during a simulation. (In SBML Level 3, the attribute is + mandatory and must be given a value; in SBML Levels below Level 3, + the attribute is optional.) A value of True indicates the + parameter's value cannot be changed by any construct except + InitialAssignment. Conversely, if the value of 'constant' is False, + other constructs in SBML, such as rules and events, can change the + value of the parameter. + + SBML Level 3 uses a separate object class, LocalParameter, for + parameters that are local to a Reaction's KineticLaw. In Levels + prior to SBML Level 3, the Parameter class is used both for + definitions of global parameters, as well as reaction-local + parameters stored in a list within KineticLaw objects. Parameter + objects that are local to a reaction (that is, those defined within + the KineticLaw structure of a Reaction) cannot be changed by rules + and therefore are implicitly always constant; consequently, in SBML + Level 2, parameter definitions within Reaction structures should not + have their 'constant' attribute set to False. + + What if a global parameter has its 'constant' attribute set to False, + but the model does not contain any rules, events or other constructs + that ever change its value over time? Although the model may be + suspect, this situation is not strictly an error. A value of False + for 'constant' only indicates that a parameter can change value, not + that it must. + + As with all other major SBML components, Parameter is derived from + SBase, and the methods defined on SBase are available on Parameter. + + Note: + + The use of the term parameter in SBML sometimes leads to confusion + among readers who have a particular notion of what something called + 'parameter' should be. It has been the source of heated debate, but + despite this, no one has yet found an adequate replacement term that + does not have different connotations to different people and hence + leads to confusion among some subset of users. Perhaps it would + have been better to have two constructs, one called constants and + the other called variables. The current approach in SBML is simply + more parsimonious, using a single Parameter construct with the + boolean flag 'constant' indicating which flavor it is. In any case, + readers are implored to look past their particular definition of a + parameter and simply view SBML's Parameter as a single mechanism for + defining both constants and (additional) variables in a model. (We + write additional because the species in a model are usually + considered to be the central variables.) After all, software tools + are not required to expose to users the actual names of particular + SBML constructs, and thus tools can present to their users whatever + terms their designers feel best matches their target audience. + + See also ListOfParameters. +"; + + +%feature("docstring") ListOfParameters " + @ingroup Core Implementation of SBML's ListOfParameters construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Parameter::Parameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Parameter(SBMLNamespaces sbmlns) + + Creates a new Parameter using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the 'id' + (identifier) attribute of a Parameter is required to have a value. + Thus, callers are cautioned to assign a value after calling this + constructor if no identifier is provided as an argument. Setting the + identifier can be accomplished using the method setId(). + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Parameter object to an SBMLDocument (e.g., + using Model.addParameter()), the SBML XML namespace of the document + overrides the value used when creating the Parameter object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a Parameter is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value + to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Parameter(long level, long version) + + Creates a new Parameter using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Parameter + + Parameter 'version' is a long integer, the SBML Version to assign to + this Parameter + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Parameter object to an SBMLDocument (e.g., + using Model.addParameter()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + Parameter object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Parameter + is an important aid to producing valid SBML. Knowledge of the + intented SBML Level and Version determine whether it is valid to + assign a particular value to an attribute, or whether it is valid to + add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Parameter(Parameter orig) + + Copy constructor; creates a copy of a Parameter. + + Parameter 'orig' is the Parameter instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Parameter::accept " + Accepts the given SBMLVisitor for this instance of Parameter. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), indicating whether the + Visitor would like to visit the next Parameter object in the list of + parameters within which the present object is embedded. +"; + + +%feature("docstring") Parameter::clone " + Creates and returns a deep copy of this Parameter. + + Returns a (deep) copy of this Parameter. +"; + + +%feature("docstring") Parameter::initDefaults " + Initializes the fields of this Parameter object to 'typical' defaults + values. + + The SBML Parameter component has slightly different aspects and + default attribute values in different SBML Levels and Versions. Many + SBML object classes defined by libSBML have an initDefaults() method + to set the values to certain common defaults, based mostly on what + they are in SBML Level 2. In the case of Parameter, this method + only sets the value of the 'constant' attribute to True. + + See also getConstant(), isSetConstant(), setConstant(). +"; + + +%feature("docstring") Parameter::getId " + Returns the value of the 'id' attribute of this Parameter. + + Returns the id of this Parameter. +"; + + +%feature("docstring") Parameter::getName " + Returns the value of the 'name' attribute of this Parameter. + + Returns the name of this Parameter. +"; + + +%feature("docstring") Parameter::getValue " + Gets the numerical value of this Parameter. + + Returns the value of the 'value' attribute of this Parameter, as a + number of type double. + + Note: + + It is crucial that callers not blindly call Parameter.getValue() + without first using Parameter.isSetValue() to determine whether a + value has ever been set. Otherwise, the value return by + Parameter.getValue() may not actually represent a value assigned to + the parameter. The reason is simply that the data type double in a + program always has some value. A separate test is needed to + determine whether the value is a true model value, or uninitialized + data in a computer's memory location. + + See also isSetValue(), setValue(), getUnits(). +"; + + +%feature("docstring") Parameter::getUnits " + Gets the units defined for this Parameter. + + The value of an SBML parameter's 'units' attribute establishes the + unit of measurement associated with the parameter's value. + + Returns the value of the 'units' attribute of this Parameter, as a + string. An empty string indicates that no units have been assigned. + + Note: + + There is an important distinction to be made between no units + assigned, and assuming a value without units has any specific unit + such as dimensionless. In SBML, default units are never attributed + to numbers, and numbers without units are not automatically assumed + to have the unit dimensionless. Please consult the relevant SBML + specification document for a more in-depth explanation of this topic + and the SBML unit system. + + See also isSetUnits(), setUnits(), getValue(). +"; + + +%feature("docstring") Parameter::getConstant " + Gets the value of the 'constant' attribute of this Parameter + instance. + + Returns True if this Parameter is declared as being constant, False + otherwise. + + Note: + + Readers who view the documentation for LocalParameter may be + confused about the presence of this method. LibSBML derives + LocalParameter from Parameter; however, this does not precisely match + the object hierarchy defined by SBML Level 3, where LocalParameter + is derived directly from SBase and not Parameter. We believe this + arrangement makes it easier for libSBML users to program + applications that work with both SBML Level 2 and SBML Level 3, but + programmers should also keep in mind this difference exists. A + side-effect of libSBML's scheme is that certain methods on + LocalParameter that are inherited from Parameter do not actually have + relevance to LocalParameter objects. An example of this is the + methods pertaining to Parameter's attribute 'constant' (i.e., + isSetConstant(), setConstant(), and getConstant()). + + See also isSetConstant(), setConstant(). +"; + + +%feature("docstring") Parameter::isSetId " + Predicate returning True if this Parameter's 'id' attribute is set. + + Returns True if the 'id' attribute of this Parameter is set, False + otherwise. +"; + + +%feature("docstring") Parameter::isSetName " + Predicate returning True if this Parameter's 'name' attribute is + set. + + Returns True if the 'name' attribute of this Parameter is set, False + otherwise. +"; + + +%feature("docstring") Parameter::isSetValue " + Predicate returning True if the 'value' attribute of this Parameter + is set. + + In SBML definitions after SBML Level 1 Version 1, parameter values + are optional and have no defaults. If a model read from a file does + not contain a setting for the 'value' attribute of a parameter, its + value is considered unset; it does not default to any particular + value. Similarly, when a Parameter object is created in libSBML, it + has no value until given a value. The Parameter.isSetValue() method + allows calling applications to determine whether a given parameter's + value has ever been set. + + In SBML Level 1 Version 1, parameters are required to have values + and therefore, the value of a Parameter should always be set. In + Level 1 Version 2 and beyond, the value is optional and as such, the + 'value' attribute may or may not be set. + + Returns True if the value of this Parameter is set, False otherwise. + + See also getValue(), setValue(). +"; + + +%feature("docstring") Parameter::isSetUnits " + Predicate returning True if the 'units' attribute of this Parameter + is set. + + Returns True if the 'units' attribute of this Parameter is set, + False otherwise. + + Note: + + There is an important distinction to be made between no units + assigned, and assuming a value without units has any specific unit + such as dimensionless. In SBML, default units are never attributed + to numbers, and numbers without units are not automatically assumed + to have the unit dimensionless. Please consult the relevant SBML + specification document for a more in-depth explanation of this topic + and the SBML unit system. +"; + + +%feature("docstring") Parameter::isSetConstant " + Predicate returning True if the 'constant' attribute of this + Parameter is set. + + Returns True if the 'constant' attribute of this Parameter is set, + False otherwise. + + Note: + + Readers who view the documentation for LocalParameter may be + confused about the presence of this method. LibSBML derives + LocalParameter from Parameter; however, this does not precisely match + the object hierarchy defined by SBML Level 3, where LocalParameter + is derived directly from SBase and not Parameter. We believe this + arrangement makes it easier for libSBML users to program + applications that work with both SBML Level 2 and SBML Level 3, but + programmers should also keep in mind this difference exists. A + side-effect of libSBML's scheme is that certain methods on + LocalParameter that are inherited from Parameter do not actually have + relevance to LocalParameter objects. An example of this is the + methods pertaining to Parameter's attribute 'constant' (i.e., + isSetConstant(), setConstant(), and getConstant()). + + See also getConstant(), setConstant(). +"; + + +%feature("docstring") Parameter::setId " + Sets the value of the 'id' attribute of this Parameter. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + Parameter + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Parameter::setName " + Sets the value of the 'name' attribute of this Parameter. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the Parameter + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Parameter::setValue " + Sets the 'value' attribute of this Parameter to the given double + value and marks the attribute as set. + + Parameter 'value' is a double, the value to assign + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") Parameter::setUnits " + Sets the 'units' attribute of this Parameter to a copy of the given + units identifier 'units'. + + Parameter 'units' is a string, the identifier of the units to assign + to this Parameter instance + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Parameter::setConstant " + Sets the 'constant' attribute of this Parameter to the given boolean + 'flag'. + + Parameter 'flag' is a boolean, the value for the 'constant' attribute + of this Parameter instance + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + Readers who view the documentation for LocalParameter may be + confused about the presence of this method. LibSBML derives + LocalParameter from Parameter; however, this does not precisely match + the object hierarchy defined by SBML Level 3, where LocalParameter + is derived directly from SBase and not Parameter. We believe this + arrangement makes it easier for libSBML users to program + applications that work with both SBML Level 2 and SBML Level 3, but + programmers should also keep in mind this difference exists. A + side-effect of libSBML's scheme is that certain methods on + LocalParameter that are inherited from Parameter do not actually have + relevance to LocalParameter objects. An example of this is the + methods pertaining to Parameter's attribute 'constant' (i.e., + isSetConstant(), setConstant(), and getConstant()). + + See also getConstant(), isSetConstant(). +"; + + +%feature("docstring") Parameter::unsetName " + Unsets the value of the 'name' attribute of this Parameter. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Parameter::unsetValue " + Unsets the 'value' attribute of this Parameter instance. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + In SBML Level 1 Version 1, parameters are required to have values + and therefore, the value of a Parameter should always be set. In + SBML Level 1 Version 2 and beyond, the value is optional and as + such, the 'value' attribute may or may not be set. +"; + + +%feature("docstring") Parameter::unsetUnits " + Unsets the 'units' attribute of this Parameter instance. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Parameter::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this Parameter's value. + + Parameters in SBML have an attribute ('units') for declaring the + units of measurement intended for the parameter's value. No + defaults are defined by SBML in the absence of a definition for + 'units'. This method returns a UnitDefinition object based on the + units declared for this Parameter using its 'units' attribute, or it + returns None if no units have been declared. + + Note that unit declarations for Parameter objects are specified in + terms of the identifier of a unit (e.g., using setUnits()), but this + method returns a UnitDefinition object, not a unit identifier. It + does this by constructing an appropriate UnitDefinition.For SBML + Level 2 models, it will do this even when the value of the 'units' + attribute is one of the special SBML Level 2 unit identifiers + 'substance', 'volume', 'area', 'length' or 'time'. Callers may find + this useful in conjunction with the helper methods provided by the + UnitDefinition class for comparing different UnitDefinition objects. + + Returns a UnitDefinition that expresses the units of this + Parameter, or None if one cannot be constructed. + + Note: + + The libSBML system for unit analysis depends on the model as a + whole. In cases where the Parameter object has not yet been added to + a model, or the model itself is incomplete, unit analysis is not + possible, and consequently this method will return None. + + See also isSetUnits(). +"; + + +%feature("docstring") Parameter::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Parameter::getElementName " + Returns the XML element name of this object, which for Parameter, is + always 'parameter'. + + Returns the name of this element, i.e., 'parameter'. +"; + + +%feature("docstring") Parameter::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Parameter::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Parameter object have been set. + + Note: + + The required attributes for a Parameter object are: + + * 'id' (or 'name' in SBML Level 1) + + * 'value' (required in Level 1, optional otherwise) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Parameter::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Parameter::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Parameter::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Parameter::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Parameter::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Parameter::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Parameter::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Parameter::isExplicitlySetConstant " + Internal implementation method. +"; + + +%feature("docstring") ListOfParameters::ListOfParameters " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfParameters(SBMLNamespaces sbmlns) + + Creates a new ListOfParameters object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfParameters object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfParameters(long level, long version) + + Creates a new ListOfParameters object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfParameters::clone " + Creates and returns a deep copy of this ListOfParameters instance. + + Returns a (deep) copy of this ListOfParameters. +"; + + +%feature("docstring") ListOfParameters::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfParameters::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Parameter objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfParameters::getElementName " + Returns the XML element name of this object. + + For ListOfParameters, the XML element name is 'listOfParameters'. + + Returns the name of this element, i.e., 'listOfParameters'. +"; + + +%feature("docstring") ListOfParameters::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Returns the Parameter object located at position 'n' within this + ListOfParameters instance. + + Parameter 'n' is the index number of the Parameter to get. + + Returns the nth Parameter in this ListOfParameters. If the index 'n' + is out of bounds for the length of the list, then None is returned. + + See also size(), get(), get(), size(). +"; + + +%feature("docstring") ListOfParameters::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfParameters, and returns a + pointer to it. + + Parameter 'n' is the index of the item to remove + + Returns the item removed. The caller owns the returned object and is + responsible for deleting it. If the index number 'n' is out of + bounds for the length of the list, then None is returned. + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes the first Parameter object in this ListOfParameters matching + the given identifier, and returns a pointer to it. + + Parameter 'sid' is the identifier of the item to remove. + + Returns the item removed. The caller owns the returned object and is + responsible for deleting it. If none of the items have an identifier + matching 'sid', then None is returned. +"; + + +%feature("docstring") ListOfParameters::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfParameters::createObject " + Internal implementation method. +"; + + +%feature("docstring") LocalParameter " + @ingroup Core Implementation of SBML Level 3's LocalParameter + construct. + + LocalParameter has been introduced in SBML Level 3 to serve as the + object class for parameter definitions that are intended to be local + to a Reaction. Objects of class LocalParameter never appear at the + Model level; they are always contained within ListOfLocalParameters + lists which are in turn contained within KineticLaw objects. + + Like its global Parameter counterpart, the LocalParameter object + class is used to define a symbol associated with a value; this + symbol can then be used in a model's mathematical formulas (and + specifically, for LocalParameter, reaction rate formulas). Unlike + Parameter, the LocalParameter class does not have a 'constant' + attribute: local parameters within reactions are always constant. + + LocalParameter has one required attribute, 'id', to give the + parameter a unique identifier by which other parts of an SBML model + definition can refer to it. A parameter can also have an optional + 'name' attribute of type string. Identifiers and names must be used + according to the guidelines described in the SBML specifications. + + The optional attribute 'value' determines the value (of type double) + assigned to the parameter. A missing value for 'value' implies that + the value either is unknown, or to be obtained from an external + source, or determined by an initial assignment. The unit of + measurement associated with the value of the parameter can be + specified using the optional attribute 'units'. Here we only + mention briefly some notable points about the possible unit choices, + but readers are urged to consult the SBML specification documents + for more information: + + + * In SBML Level 3, there are no constraints on the units that can + be assigned to parameters in a model; there are also no units to + inherit from the enclosing Model object. + + * In SBML Level 2, the value assigned to the parameter's 'units' + attribute must be chosen from one of the following possibilities: one + of the base unit identifiers defined in SBML; one of the built-in + unit identifiers 'substance', 'time', 'volume', 'area' or 'length'; + or the identifier of a new unit defined in the list of unit + definitions in the enclosing Model structure. There are no + constraints on the units that can be chosen from these sets. There + are no default units for local parameters. + + As with all other major SBML components, LocalParameter is derived + from SBase, and the methods defined on SBase are available on + LocalParameter. + + WARNING: + + LibSBML derives LocalParameter from Parameter; however, this does + not precisely match the object hierarchy defined by SBML Level 3, + where LocalParameter is derived directly from SBase and not + Parameter. We believe this arrangement makes it easier for libSBML + users to program applications that work with both SBML Level 2 and + SBML Level 3, but programmers should also keep in mind this + difference exists. A side-effect of libSBML's scheme is that certain + methods on LocalParameter that are inherited from Parameter do not + actually have relevance to LocalParameter objects. An example of + this is the methods pertaining to Parameter's attribute 'constant' + (i.e., isSetConstant(), setConstant(), and getConstant()). + + See also ListOfLocalParameters, KineticLaw. +"; + + +%feature("docstring") ListOfLocalParameters " + @ingroup Core Implementation of SBML Level 3's ListOfLocalParameters + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + ListOfLocalParameters is a subsidiary object class used only within + KineticLaw in SBML Level 3. It is not defined in SBML Levels 1-2. + In Level 3, a KineticLaw object can have a single object of class + ListOfLocalParameters containing a set of local parameters used in + that kinetic law definition. + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") LocalParameter::LocalParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + LocalParameter(SBMLNamespaces sbmlns) + + Creates a new LocalParameter object with the given SBMLNamespaces + object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + It is worth emphasizing that although this constructor does not take + an identifier argument, in SBML Level 2 and beyond, the 'id' + (identifier) attribute of a LocalParameter is required to have a + value. Thus, callers are cautioned to assign a value after calling + this constructor if no identifier is provided as an argument. + Setting the identifier can be accomplished using the method + setId(). + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a LocalParameter object to an SBMLDocument + (e.g., using KineticLaw.addLocalParameter()), the SBML XML namespace + of the document overrides the value used when creating the + LocalParameter object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a LocalParameter is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + LocalParameter(long level, long version) + + Creates a new LocalParameter object with the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + LocalParameter. + + Parameter 'version' is a long integer, the SBML Version to assign to + this LocalParameter. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a LocalParameter object to an SBMLDocument + (e.g., using KineticLaw.addLocalParameter()), the SBML Level, SBML + Version and XML namespace of the document override the values used + when creating the LocalParameter object via this constructor. This + is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a LocalParameter is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + LocalParameter(LocalParameter orig) + + Copy constructor; creates a copy of a given LocalParameter object. + + Parameter 'orig' is the LocalParameter instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + LocalParameter(Parameter orig) + + Copy constructor; creates a LocalParameter object by copying the + attributes of a given Parameter object. + + Parameter 'orig' is the Parameter instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") LocalParameter::accept " + Accepts the given SBMLVisitor for this instance of LocalParameter. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next LocalParameter in the list of + parameters within which this LocalParameter is embedded (i.e., either + the list of parameters in the parent Model or the list of parameters + in the enclosing KineticLaw). +"; + + +%feature("docstring") LocalParameter::clone " + Creates and returns a deep copy of this LocalParameter. + + Returns a (deep) copy of this LocalParameter. +"; + + +%feature("docstring") LocalParameter::getDerivedUnitDefinition " + Constructs and returns a UnitDefinition that corresponds to the units + of this LocalParameter's value. + + LocalParameters in SBML have an attribute ('units') for declaring the + units of measurement intended for the parameter's value. No + defaults are defined by SBML in the absence of a definition for + 'units'. This method returns a UnitDefinition object based on the + units declared for this LocalParameter using its 'units' attribute, + or it returns None if no units have been declared. + + Note that unit declarations for LocalParameter objects are specified + in terms of the identifier of a unit (e.g., using setUnits()), but + this method returns a UnitDefinition object, not a unit identifier. + It does this by constructing an appropriate UnitDefinition. For + SBML Level 2 models, it will do this even when the value of the + 'units' attribute is one of the predefined SBML units 'substance', + 'volume', 'area', 'length' or 'time'. Callers may find this useful + in conjunction with the helper methods provided by the + UnitDefinition class for comparing different UnitDefinition objects. + + Returns a UnitDefinition that expresses the units of this + LocalParameter, or None if one cannot be constructed. + + Note: + + The libSBML system for unit analysis depends on the model as a + whole. In cases where the LocalParameter object has not yet been + added to a model, or the model itself is incomplete, unit analysis is + not possible, and consequently this method will return None. + + See also isSetUnits(). +"; + + +%feature("docstring") LocalParameter::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") LocalParameter::getElementName " + Returns the XML element name of this object, which for + LocalParameter, is always 'localParameter'. + + Returns the name of this element, i.e., 'localParameter'. +"; + + +%feature("docstring") LocalParameter::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + LocalParameter object have been set. + + Note: + + The required attributes for a LocalParameter object are: + + * 'id' + + * 'value' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") LocalParameter::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") LocalParameter::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") LocalParameter::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") LocalParameter::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfLocalParameters::ListOfLocalParameters " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfLocalParameters(SBMLNamespaces sbmlns) + + Creates a new ListOfLocalParameters object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfLocalParameters object to + be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfLocalParameters(long level, long version) + + Creates a new ListOfLocalParameters object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfLocalParameters::clone " + Creates and returns a deep copy of this ListOfLocalParameters object. + + Returns a (deep) copy of this ListOfLocalParameters. +"; + + +%feature("docstring") ListOfLocalParameters::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfLocalParameters::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., LocalParameter objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfLocalParameters::getElementName " + Returns the XML element name of this object. + + For ListOfLocalParameters, the XML element name is + 'listOfLocalParameters'. + + Returns the name of this element, i.e., 'listOfLocalParameters'. +"; + + +%feature("docstring") ListOfLocalParameters::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Returns the LocalParameter object located at position 'n' within this + ListOfLocalParameters instance. + + Parameter 'n' is the index number of the LocalParameter to get. + + Returns the item at position 'n'. The caller owns the returned + object and is responsible for deleting it. If the index number 'n' + is out of bounds for the length of the list, then None is returned. + + See also size(), get(), get(), size(). +"; + + +%feature("docstring") ListOfLocalParameters::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. Note + that LocalParameters, while they use the SId namespace, are not in + the model-wide SId namespace, so no LocalParameter object will be + returned from this function (and is the reason we override the base + ListOf::getElementBySId function here). + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") ListOfLocalParameters::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfLocalParameters, and returns a + pointer to it. + + Parameter 'n' is the index of the item to remove. + + Returns the item removed. The caller owns the returned object and is + responsible for deleting it. If the index number 'n' is out of + bounds for the length of the list, then None is returned. + + See also size(), remove(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes the first LocalParameter object in this ListOfLocalParameters + matching the given identifier, and returns a pointer to it. + + Parameter 'sid' is the identifier of the item to remove. + + Returns the item removed. The caller owns the returned object and is + responsible for deleting it. If none of the items have an identifier + matching 'sid', then None is returned. +"; + + +%feature("docstring") ListOfLocalParameters::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfLocalParameters::createObject " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment " + @ingroup Core Implementation of SBML's InitialAssignment construct. + + SBML Level 2 Versions 2-4 and SBML Level 3 provide two ways of + assigning initial values to entities in a model. The simplest and + most basic is to set the values of the appropriate attributes in the + relevant components; for example, the initial value of a model + parameter (whether it is a constant or a variable) can be assigned + by setting its 'value' attribute directly in the model definition. + However, this approach is not suitable when the value must be + calculated, because the initial value attributes on different + components such as species, compartments, and parameters are single + values and not mathematical expressions. In those situations, the + InitialAssignment construct can be used; it permits the calculation + of the value of a constant or the initial value of a variable from + the values of other quantities in a model. + + As explained below, the provision of InitialAssignment does not mean + that models necessarily must use this construct when defining initial + values of quantities in a model. If a value can be set directly + using the relevant attribute of a component in a model, then that + approach may be more efficient and more portable to other software + tools. InitialAssignment should be used when the other mechanism is + insufficient for the needs of a particular model. + + The InitialAssignment construct has some similarities to + AssignmentRule. The main differences are: (a) an InitialAssignment + can set the value of a constant whereas an AssignmentRule cannot, + and (b) unlike AssignmentRule, an InitialAssignment definition only + applies up to and including the beginning of simulation time, i.e., + t <= 0, while an AssignmentRule applies at all times. + + InitialAssignment has a required attribute, 'symbol', whose value + must follow the guidelines for identifiers described in the SBML + specification (e.g., Section 3.3 in the Level 2 Version 4 + specification). The value of this attribute in an InitialAssignment + object can be the identifier of a Compartment, Species or global + Parameter elsewhere in the model. The InitialAssignment defines the + initial value of the constant or variable referred to by the 'symbol' + attribute. (The attribute's name is 'symbol' rather than 'variable' + because it may assign values to constants as well as variables in a + model.) Note that an initial assignment cannot be made to reaction + identifiers, that is, the 'symbol' attribute value of an + InitialAssignment cannot be an identifier that is the 'id' attribute + value of a Reaction object in the model. This is identical to a + restriction placed on rules. + + InitialAssignment also has a required 'math' subelement that contains + a MathML expression used to calculate the value of the constant or + the initial value of the variable. The units of the value computed + by the formula in the 'math' subelement should (in SBML Level 2 + Version 4 and in SBML Level 3) or must (in previous Versions) be + identical to be the units associated with the identifier given in + the 'symbol' attribute. (That is, the units are the units of the + species, compartment, or parameter, as appropriate for the kind of + object identified by the value of 'symbol'.) + + InitialAssignment was introduced in SBML Level 2 Version 2. It is + not available in SBML Level 2 Version 1 nor in any version of Level + 1. + + Semantics of Initial Assignments + ====================================================================== + + The value calculated by an InitialAssignment object overrides the + value assigned to the given symbol by the object defining that + symbol. For example, if a compartment's 'size' attribute is set in + its definition, and the model also contains an InitialAssignment + having that compartment's identifier as its 'symbol' attribute + value, then the interpretation is that the 'size' assigned in the + Compartment object should be ignored and the value assigned based on + the computation defined in the InitialAssignment. Initial + assignments can take place for Compartment, Species and global + Parameter objects regardless of the value of their 'constant' + attribute. + + The actions of all InitialAssignment objects are in general terms + the same, but differ in the precise details depending on the type of + variable being set: + + * In the case of a species, an InitialAssignment sets the + referenced species' initial quantity (concentration or amount of + substance) to the value determined by the formula in the 'math' + subelement. The overall units of the formula should (in SBML + Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) + be the same as the units specified for the species. + + * In the case of a compartment, an InitialAssignment sets the + referenced compartment's initial size to the size determined by the + formula in 'math'. The overall units of the formula should (in SBML + Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) + be the same as the units specified for the size of the compartment. + + * In the case of a parameter, an InitialAssignment sets the + referenced parameter's initial value to that determined by the + formula in 'math'. The overall units of the formula should (in SBML + Level 2 Version 4 and SBML Level 3) or must (in previous Versions) be + the same as the units defined for the parameter. + + In the context of a simulation, initial assignments establish values + that are in effect prior to and including the start of simulation + time, i.e., t <= 0. Section 3.4.8 in the SBML Level 2 Version 4 + and SBML Level 3 Version 1 Core specifications provides information + about the interpretation of assignments, rules, and entity values + for simulation time up to and including the start time t = 0; this + is important for establishing the initial conditions of a simulation + if the model involves expressions containing the delay 'csymbol'. + + There cannot be two initial assignments for the same symbol in a + model; that is, a model must not contain two or more + InitialAssignment objects that both have the same identifier as + their 'symbol' attribute value. A model must also not define + initial assignments and assignment rules for the same entity. That + is, there cannot be both an InitialAssignment and an AssignmentRule + for the same symbol in a model, because both kinds of constructs + apply prior to and at the start of simulated time -- allowing both + to exist for a given symbol would result in indeterminism). + + The ordering of InitialAssignment objects is not significant. The + combined set of InitialAssignment, AssignmentRule and KineticLaw + objects form a set of assignment statements that must be considered + as a whole. The combined set of assignment statements should not + contain algebraic loops: a chain of dependency between these + statements should terminate. (More formally, consider the directed + graph of assignment statements where nodes are a model's assignment + statements and directed arcs exist for each occurrence of a symbol + in an assignment statement 'math' attribute. The directed arcs in + this graph start from the statement assigning the symbol and end at + the statement that contains the symbol in their math elements. Such + a graph must be acyclic.) + + Finally, it is worth being explicit about the expected behavior in + the following situation. Suppose (1) a given symbol has a value x + assigned to it in its definition, and (2) there is an initial + assignment having the identifier as its 'symbol' value and + reassigning the value to y, and (3) the identifier is also used in + the mathematical formula of a second initial assignment. What value + should the second initial assignment use? It is y, the value + assigned to the symbol by the first initial assignment, not whatever + value was given in the symbol's definition. This follows directly + from the behavior described above: if an InitialAssignment object + exists for a given symbol, then the symbol's value is overridden by + that initial assignment. +"; + + +%feature("docstring") ListOfInitialAssignments " + @ingroup Core Implementation of SBML's ListOfInitialAssignments + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") InitialAssignment::InitialAssignment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + InitialAssignment(SBMLNamespaces sbmlns) + + Creates a new InitialAssignment using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a InitialAssignment object to an SBMLDocument + (e.g., using Model.addInitialAssignment()), the SBML XML namespace + of the document overrides the value used when creating the + InitialAssignment object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a InitialAssignment is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + InitialAssignment(long level, long version) + + Creates a new InitialAssignment using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + InitialAssignment + + Parameter 'version' is a long integer, the SBML Version to assign to + this InitialAssignment + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a InitialAssignment object to an SBMLDocument + (e.g., using Model.addInitialAssignment()), the SBML Level, SBML + Version and XML namespace of the document override the values used + when creating the InitialAssignment object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a InitialAssignment is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value + to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + InitialAssignment(InitialAssignment orig) + + Copy constructor; creates a copy of this InitialAssignment. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") InitialAssignment::accept " + Accepts the given SBMLVisitor for this instance of InitialAssignment. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next InitialAssignment in the list + of compartment types. +"; + + +%feature("docstring") InitialAssignment::clone " + Creates and returns a deep copy of this InitialAssignment. + + Returns a (deep) copy of this InitialAssignment. +"; + + +%feature("docstring") InitialAssignment::getSymbol " + Get the value of the 'symbol' attribute of this InitialAssignment. + + Returns the identifier string stored as the 'symbol' attribute value + in this InitialAssignment. +"; + + +%feature("docstring") InitialAssignment::getMath " + Get the mathematical formula of this InitialAssignment. + + Returns an ASTNode, the value of the 'math' subelement of this + InitialAssignment +"; + + +%feature("docstring") InitialAssignment::isSetSymbol " + Predicate returning True if this InitialAssignment's 'symbol' + attribute is set. + + Returns True if the 'symbol' attribute of this InitialAssignment is + set, False otherwise. +"; + + +%feature("docstring") InitialAssignment::isSetMath " + Predicate returning True if this InitialAssignment's 'math' + subelement contains a value. + + Returns True if the 'math' for this InitialAssignment is set, False + otherwise. +"; + + +%feature("docstring") InitialAssignment::setSymbol " + Sets the 'symbol' attribute value of this InitialAssignment. + + Parameter 'sid' is the identifier of a Species, Compartment or + Parameter object defined elsewhere in this Model. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") InitialAssignment::setMath " + Sets the 'math' subelement of this InitialAssignment. + + The AST passed in 'math' is copied. + + Parameter 'math' is an AST containing the mathematical expression to + be used as the formula for this InitialAssignment. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") InitialAssignment::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units of + measurement assumed for the 'math' expression of this + InitialAssignment. + + The units are calculated based on the mathematical expression in the + InitialAssignment and the model quantities referenced by <ci> + elements used within that expression. The + getDerivedUnitDefinition()@~ method returns the calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + WARNING: + + Note that it is possible the 'math' expression in the + InitialAssignment contains pure numbers or parameters with undeclared + units. In those cases, it is not possible to calculate the units of + the overall expression without making assumptions. LibSBML does not + make assumptions about the units, and getDerivedUnitDefinition()@~ + only returns the units as far as it is able to determine them. For + example, in an expression X + Y, if X has unambiguously-defined + units and Y does not, it will return the units of X. <strong>It is + important that callers also invoke the method</strong> + containsUndeclaredUnits()@~ <strong>to determine whether this + situation holds</strong>. Callers may wish to take suitable actions + in those scenarios. + + Returns a UnitDefinition that expresses the units of the math + expression of this InitialAssignment, or None if one cannot be + constructed. + + See also containsUndeclaredUnits(). +"; + + +%feature("docstring") InitialAssignment::containsUndeclaredUnits " + Predicate returning True if the math expression of this + InitialAssignment contains parameters/numbers with undeclared units. + + Returns True if the math expression of this InitialAssignment + includes parameters/numbers with undeclared units, False otherwise. + + Note: + + A return value of True indicates that the UnitDefinition returned by + getDerivedUnitDefinition()@~ may not accurately represent the units + of the expression. + + See also getDerivedUnitDefinition(). +"; + + +%feature("docstring") InitialAssignment::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") InitialAssignment::getElementName " + Returns the XML element name of this object, which for + InitialAssignment, is always 'initialAssignment'. + + Returns the name of this element, i.e., 'initialAssignment'. +"; + + +%feature("docstring") InitialAssignment::writeElements " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + InitialAssignment object have been set. + + Note: + + The required attributes for an InitialAssignment object are: + + * 'symbol' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") InitialAssignment::hasRequiredElements " + Predicate returning True if all the required elements for this + InitialAssignment object have been set. + + Note: + + The required elements for a InitialAssignment object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") InitialAssignment::getId " + Predicate returning True if all the required elements for this + InitialAssignment object have been set. + + Note: + + The required elements for a InitialAssignment object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") InitialAssignment::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") InitialAssignment::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") InitialAssignment::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::divideAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::multiplyAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") InitialAssignment::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfInitialAssignments::ListOfInitialAssignments " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfInitialAssignments(SBMLNamespaces sbmlns) + + Creates a new ListOfInitialAssignments object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfInitialAssignments object + to be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfInitialAssignments(long level, long version) + + Creates a new ListOfInitialAssignments object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfInitialAssignments::clone " + Creates and returns a deep copy of this ListOfInitialAssignments + instance. + + Returns a (deep) copy of this ListOfInitialAssignments. +"; + + +%feature("docstring") ListOfInitialAssignments::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfInitialAssignments::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., InitialAssignment objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfInitialAssignments::getElementName " + Returns the XML element name of this object. + + For ListOfInitialAssignments, the XML element name is + 'listOfInitialAssignments'. + + Returns the name of this element, i.e., 'listOfInitialAssignments'. +"; + + +%feature("docstring") ListOfInitialAssignments::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a InitialAssignment from the ListOfInitialAssignments. + + Parameter 'n' is the index number of the InitialAssignment to get. + + Returns the nth InitialAssignment in this ListOfInitialAssignments. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfInitialAssignments::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfInitialAssignments items and + returns a pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfInitialAssignments items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfInitialAssignments::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. Note + that InitialAssignments do not actually have IDs, though the libsbml + interface pretends that they do: no initial assignment is returned + by this function. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") ListOfInitialAssignments::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfInitialAssignments::createObject " + Internal implementation method. +"; + + +%feature("docstring") Rule " + @ingroup Core Implementation of SBML's Rule construct. + + In SBML, rules provide additional ways to define the values of + variables in a model, their relationships, and the dynamical + behaviors of those variables. They enable encoding relationships + that cannot be expressed using Reaction nor InitialAssignment + objects alone. + + The libSBML implementation of rules mirrors the SBML Level 3 Version + 1 Core definition (which is in turn is very similar to the Level 2 + Version 4 definition), with Rule being the parent class of three + subclasses as explained below. The Rule class itself cannot be + instantiated by user programs and has no constructor; only the + subclasses AssignmentRule, AlgebraicRule and RateRule can be + instantiated directly. + + General summary of SBML rules + ====================================================================== + + In SBML Level 3 as well as Level 2, rules are separated into three + subclasses for the benefit of model analysis software. The three + subclasses are based on the following three different possible + functional forms (where x is a variable, f is some arbitrary function + returning a numerical result, V is a vector of variables that does + not include x, and W is a vector of variables that may include x): + + Algebraic: left-hand side is zero 0 = f(W) + Assignment: left-hand side is a scalar x = f(V) + Rate: left-hand side is a rate-of-change dx/dt = f(W) + + In their general form given above, there is little to distinguish + between assignment and algebraic rules. They are treated as separate + cases for the following reasons: + + * Assignment rules can simply be evaluated to calculate intermediate + values for use in numerical methods. They are statements of equality + that hold at all times. (For assignments that are only performed + once, see InitialAssignment.) + + * SBML needs to place restrictions on assignment rules, for example + the restriction that assignment rules cannot contain algebraic + loops. + + * Some simulators do not contain numerical solvers capable of solving + unconstrained algebraic equations, and providing more direct forms + such as assignment rules may enable those simulators to process + models they could not process if the same assignments were put in + the form of general algebraic equations; + + * Those simulators that can solve these algebraic equations make a + distinction between the different categories listed above; and + + * Some specialized numerical analyses of models may only be + applicable to models that do not contain algebraic rules. + + The approach taken to covering these cases in SBML is to define an + abstract Rule structure containing a subelement, 'math', to hold the + right-hand side expression, then to derive subtypes of Rule that add + attributes to distinguish the cases of algebraic, assignment and rate + rules. The 'math' subelement must contain a MathML expression + defining the mathematical formula of the rule. This MathML formula + must return a numerical value. The formula can be an arbitrary + expression referencing the variables and other entities in an SBML + model. + + Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, + RateRule) inherit the the 'math' subelement and other fields from + SBase. The AssignmentRule and RateRule classes add an additional + attribute, 'variable'. See the definitions of AssignmentRule, + AlgebraicRule and RateRule for details about the structure and + interpretation of each one. + + Additional restrictions on SBML rules + ====================================================================== + + An important design goal of SBML rule semantics is to ensure that a + model's simulation and analysis results will not be dependent on when + or how often rules are evaluated. To achieve this, SBML needs to + place two restrictions on rule use. The first concerns algebraic + loops in the system of assignments in a model, and the second + concerns overdetermined systems. + + A model must not contain algebraic loops + ...................................................................... + + The combined set of InitialAssignment, AssignmentRule and KineticLaw + objects in a model constitute a set of assignment statements that + should be considered as a whole. (A KineticLaw object is counted as + an assignment because it assigns a value to the symbol contained in + the \"id\" attribute of the Reaction object in which it is defined.) + This combined set of assignment statements must not contain + algebraic loops -- dependency chains between these statements must + terminate. To put this more formally, consider a directed graph in + which nodes are assignment statements and directed arcs exist for + each occurrence of an SBML species, compartment or parameter symbol + in an assignment statement's \"math\" subelement. Let the directed + arcs point from the statement assigning the symbol to the statements + that contain the symbol in their \"math\" subelement expressions. + This graph must be acyclic. + + SBML does not specify when or how often rules should be evaluated. + Eliminating algebraic loops ensures that assignment statements can be + evaluated any number of times without the result of those evaluations + changing. As an example, consider the set of equations x = x + 1, y + = z + 200 and z = y + 100. If this set of equations were + interpreted as a set of assignment statements, it would be invalid + because the rule for x refers to x (exhibiting one type of loop), + and the rule for y refers to z while the rule for z refers back to y + (exhibiting another type of loop). Conversely, the following set of + equations would constitute a valid set of assignment statements: x = + 10, y = z + 200, and z = x + 100. + + A model must not be overdetermined + ...................................................................... + + An SBML model must not be overdetermined; that is, a model must not + define more equations than there are unknowns in a model. An SBML + model that does not contain AlgebraicRule structures cannot be + overdetermined. + + LibSBML implements the static analysis procedure described in + Appendix B of the SBML Level 3 Version 1 Core specification for + assessing whether a model is overdetermined. + + (In summary, assessing whether a given continuous, deterministic, + mathematical model is overdetermined does not require dynamic + analysis; it can be done by analyzing the system of equations + created from the model. One approach is to construct a bipartite + graph in which one set of vertices represents the variables and the + other the set of vertices represents the equations. Place edges + between vertices such that variables in the system are linked to the + equations that determine them. For algebraic equations, there will + be edges between the equation and each variable occurring in the + equation. For ordinary differential equations (such as those defined + by rate rules or implied by the reaction rate definitions), there + will be a single edge between the equation and the variable + determined by that differential equation. A mathematical model is + overdetermined if the maximal matchings of the bipartite graph + contain disconnected vertexes representing equations. If one + maximal matching has this property, then all the maximal matchings + will have this property; i.e., it is only necessary to find one + maximal matching.) + + Rule types for SBML Level 1 + ====================================================================== + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 + for distinguishing rules; specifically, it uses an attribute whose + value is drawn from an enumeration of 3 values. LibSBML supports + this using methods that work with the enumeration values @~ listed + below. + + * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. + + * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. + + * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or + not yet set. +"; + + +%feature("docstring") ListOfRules " + @ingroup Core Implementation of SBML's ListOfRules construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 3 and later versions of + SBML Level 2 as well): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Rule::accept " + Accepts the given SBMLVisitor for this instance of Rule. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next Rule object in the list of + rules within which the present object is embedded. +"; + + +%feature("docstring") Rule::clone " + Creates and returns a deep copy of this Rule. + + Returns a (deep) copy of this Rule. +"; + + +%feature("docstring") Rule::getFormula " + Returns the mathematical expression of this Rule in text-string form. + + The text string is produced by SBML_formulaToString(); please + consult the documentation for that function to find out more about + the format of the text-string formula. + + Returns the formula text string for this Rule. + + Note: + + The attribute 'formula' is specific to SBML Level 1; in higher + Levels of SBML, it has been replaced with a subelement named 'math'. + However, libSBML provides a unified interface to the underlying math + expression and this method can be used for models of all Levels of + SBML. + + See also getMath(). +"; + + +%feature("docstring") Rule::getMath " + Get the mathematical formula of this Rule as an ASTNode tree. + + Returns an ASTNode, the value of the 'math' subelement of this Rule. + + Note: + + The subelement 'math' is present in SBML Levels 2 and 3. In SBML + Level 1, the equivalent construct is the attribute named 'formula'. + LibSBML provides a unified interface to the underlying math + expression and this method can be used for models of all Levels of + SBML. + + See also getFormula(). +"; + + +%feature("docstring") Rule::getVariable " + Get the value of the 'variable' attribute of this Rule object. + + In SBML Level 1, the different rule types each have a different name + for the attribute holding the reference to the object constituting + the left-hand side of the rule. (E.g., for SBML Level 1's + SpeciesConcentrationRule the attribute is 'species', for + CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 + and 3, the only two types of Rule objects with a left-hand side + object reference are AssignmentRule and RateRule, and both of them + use the same name for attribute: 'variable'. In order to make it + easier for application developers to work with all Levels of SBML, + libSBML uses a uniform name for all of such attributes, and it is + 'variable', regardless of whether Level 1 rules or Level 2-3 rules + are being used. + + Returns the identifier string stored as the 'variable' attribute + value in this Rule, or None if this object is an AlgebraicRule + object. +"; + + +%feature("docstring") Rule::getUnits " + Returns the units for the mathematical formula of this Rule. + + Returns the identifier of the units for the expression of this Rule. + + Note: + + The attribute 'units' exists on SBML Level 1 ParameterRule objects + only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::isSetFormula " + Predicate returning True if this Rule's mathematical expression is + set. + + This method is equivalent to isSetMath(). This version is present + for easier compatibility with SBML Level 1, in which mathematical + formulas were written in text-string form. + + Returns True if the mathematical formula for this Rule is set, False + otherwise. + + Note: + + The attribute 'formula' is specific to SBML Level 1; in higher + Levels of SBML, it has been replaced with a subelement named 'math'. + However, libSBML provides a unified interface to the underlying math + expression and this method can be used for models of all Levels of + SBML. + + See also isSetMath(). +"; + + +%feature("docstring") Rule::isSetMath " + Predicate returning True if this Rule's mathematical expression is + set. + + This method is equivalent to isSetFormula(). + + Returns True if the formula (or equivalently the math) for this Rule + is set, False otherwise. + + Note: + + The subelement 'math' is present in SBML Levels 2 and 3. In SBML + Level 1, the equivalent construct is the attribute named 'formula'. + LibSBML provides a unified interface to the underlying math + expression and this method can be used for models of all Levels of + SBML. + + See also isSetFormula(). +"; + + +%feature("docstring") Rule::isSetVariable " + Predicate returning True if this Rule's 'variable' attribute is set. + + In SBML Level 1, the different rule types each have a different name + for the attribute holding the reference to the object constituting + the left-hand side of the rule. (E.g., for SBML Level 1's + SpeciesConcentrationRule the attribute is 'species', for + CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 + and 3, the only two types of Rule objects with a left-hand side + object reference are AssignmentRule and RateRule, and both of them + use the same name for attribute: 'variable'. In order to make it + easier for application developers to work with all Levels of SBML, + libSBML uses a uniform name for all such attributes, and it is + 'variable', regardless of whether Level 1 rules or Level 2-3 rules + are being used. + + Returns True if the 'variable' attribute value of this Rule is set, + False otherwise. +"; + + +%feature("docstring") Rule::isSetUnits " + Predicate returning True if this Rule's 'units' attribute is set. + + Returns True if the units for this Rule is set, False otherwise + + Note: + + The attribute 'units' exists on SBML Level 1 ParameterRule objects + only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::setFormula " + Sets the 'math' subelement of this Rule to an expression in text- + string form. + + This is equivalent to setMath(ASTNode math). The provision of using + text-string formulas is retained for easier SBML Level 1 + compatibility. The formula is converted to an ASTNode internally. + + Parameter 'formula' is a mathematical formula in text-string form. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + The attribute 'formula' is specific to SBML Level 1; in higher + Levels of SBML, it has been replaced with a subelement named 'math'. + However, libSBML provides a unified interface to the underlying math + expression and this method can be used for models of all Levels of + SBML. + + See also setMath(). +"; + + +%feature("docstring") Rule::setMath " + Sets the 'math' subelement of this Rule to a copy of the given + ASTNode. + + Parameter 'math' is the ASTNode structure of the mathematical + formula. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + The subelement 'math' is present in SBML Levels 2 and 3. In SBML + Level 1, the equivalent construct is the attribute named 'formula'. + LibSBML provides a unified interface to the underlying math + expression and this method can be used for models of all Levels of + SBML. + + See also setFormula(). +"; + + +%feature("docstring") Rule::setVariable " + Sets the 'variable' attribute value of this Rule object. + + In SBML Level 1, the different rule types each have a different name + for the attribute holding the reference to the object constituting + the left-hand side of the rule. (E.g., for SBML Level 1's + SpeciesConcentrationRule the attribute is 'species', for + CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 + and 3, the only two types of Rule objects with a left-hand side + object reference are AssignmentRule and RateRule, and both of them + use the same name for attribute: 'variable'. In order to make it + easier for application developers to work with all Levels of SBML, + libSBML uses a uniform name for all such attributes, and it is + 'variable', regardless of whether Level 1 rules or Level 2-3 rules + are being used. + + Parameter 'sid' is the identifier of a Compartment, Species or + Parameter elsewhere in the enclosing Model object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Rule::setUnits " + Sets the units for this Rule. + + Parameter 'sname' is the identifier of the units + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attribute 'units' exists on SBML Level 1 ParameterRule objects + only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::unsetUnits " + Unsets the 'units' for this Rule. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attribute 'units' exists on SBML Level 1 ParameterRule objects + only. It is not present in SBML Levels 2 and 3. +"; + + +%feature("docstring") Rule::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units of + measurement assumed for the 'math' expression of this Rule. + + The units are calculated based on the mathematical expression in the + Rule and the model quantities referenced by <ci> elements used + within that expression. The getDerivedUnitDefinition() method + returns the calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + WARNING: + + Note that it is possible the 'math' expression in the Rule contains + pure numbers or parameters with undeclared units. In those cases, + it is not possible to calculate the units of the overall expression + without making assumptions. LibSBML does not make assumptions about + the units, and getDerivedUnitDefinition() only returns the units as + far as it is able to determine them. For example, in an expression + X + Y, if X has unambiguously-defined units and Y does not, it will + return the units of X. <strong>It is important that callers also + invoke the method</strong> containsUndeclaredUnits()@~ <strong>to + determine whether this situation holds</strong>. Callers may wish + to take suitable actions in those scenarios. + + Returns a UnitDefinition that expresses the units of the math + expression of this Rule, or None if one cannot be constructed. + + See also containsUndeclaredUnits(). +"; + + +%feature("docstring") Rule::containsUndeclaredUnits " + Predicate returning True if the math expression of this Rule + contains parameters/numbers with undeclared units. + + Returns True if the math expression of this Rule includes + parameters/numbers with undeclared units, False otherwise. + + Note: + + A return value of True indicates that the UnitDefinition returned by + getDerivedUnitDefinition() may not accurately represent the units of + the expression. + + See also getDerivedUnitDefinition(). +"; + + +%feature("docstring") Rule::getType " + Get the type of rule this is. + + Returns the rule type (a value drawn from the enumeration RuleType_t) + of this Rule. The value will be either libsbml.RULE_TYPE_RATE or + libsbml.RULE_TYPE_SCALAR. + + Note: + + The attribute 'type' on Rule objects is present only in SBML Level + 1. In SBML Level 2 and later, the type has been replaced by + subclassing the Rule object. +"; + + +%feature("docstring") Rule::isAlgebraic " + Predicate returning True if this Rule is an AlgebraicRule. + + Returns True if this Rule is an AlgebraicRule, False otherwise. +"; + + +%feature("docstring") Rule::isAssignment " + Predicate returning True if this Rule is an AssignmentRule. + + Returns True if this Rule is an AssignmentRule, False otherwise. +"; + + +%feature("docstring") Rule::isCompartmentVolume " + Predicate returning True if this Rule is an CompartmentVolumeRule or + equivalent. + + This libSBML method works for SBML Level 1 models (where there is + such a thing as an explicit CompartmentVolumeRule), as well as other + Levels of SBML. For Levels above Level 1, this method checks the + symbol being affected by the rule, and returns True if the symbol is + the identifier of a Compartment object defined in the model. + + Returns True if this Rule is a CompartmentVolumeRule, False + otherwise. +"; + + +%feature("docstring") Rule::isParameter " + Predicate returning True if this Rule is an ParameterRule or + equivalent. + + This libSBML method works for SBML Level 1 models (where there is + such a thing as an explicit ParameterRule), as well as other Levels + of SBML. For Levels above Level 1, this method checks the symbol + being affected by the rule, and returns True if the symbol is the + identifier of a Parameter object defined in the model. + + Returns True if this Rule is a ParameterRule, False otherwise. +"; + + +%feature("docstring") Rule::isRate " + Predicate returning True if this Rule is a RateRule (SBML Levels + 2-3) or has a 'type' attribute value of 'rate' (SBML Level 1). + + Returns True if this Rule is a RateRule (Level 2) or has type 'rate' + (Level 1), False otherwise. +"; + + +%feature("docstring") Rule::isScalar " + Predicate returning True if this Rule is an AssignmentRule (SBML + Levels 2-3) or has a 'type' attribute value of 'scalar' (SBML Level + 1). + + Returns True if this Rule is an AssignmentRule (Level 2) or has type + 'scalar' (Level 1), False otherwise. +"; + + +%feature("docstring") Rule::isSpeciesConcentration " + Predicate returning True if this Rule is a SpeciesConcentrationRule + or equivalent. + + This libSBML method works for SBML Level 1 models (where there is + such a thing as an explicit SpeciesConcentrationRule), as well as + other Levels of SBML. For Levels above Level 1, this method checks + the symbol being affected by the rule, and returns True if the + symbol is the identifier of a Species object defined in the model. + + Returns True if this Rule is a SpeciesConcentrationRule, False + otherwise. +"; + + +%feature("docstring") Rule::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Rule::getL1TypeCode " + Returns the SBML Level 1 type code for this Rule object. + + This method only applies to SBML Level 1 model objects. If this is + not an SBML Level 1 rule object, this method will return + libsbml.SBML_UNKNOWN. + + Returns the SBML Level 1 type code for this Rule (namely, + libsbml.SBML_COMPARTMENT_VOLUME_RULE, libsbml.SBML_PARAMETER_RULE, + libsbml.SBML_SPECIES_CONCENTRATION_RULE, or libsbml.SBML_UNKNOWN). +"; + + +%feature("docstring") Rule::getElementName " + Returns the XML element name of this object + + The returned value can be any of a number of different strings, + depending on the SBML Level in use and the kind of Rule object this + is. The rules as of libSBML version 5.8.1 are the following: + + * (Level 2 and 3) RateRule: returns 'rateRule' + + * (Level 2 and 3) AssignmentRule: returns 'assignmentRule' + + * (Level 2 and 3) AlgebraicRule: returns 'algebraicRule' + + * (Level 1 Version 1) SpecieConcentrationRule: returns + 'specieConcentrationRule' + + * (Level 1 Version 2) SpeciesConcentrationRule: returns + 'speciesConcentrationRule' + + * (Level 1) CompartmentVolumeRule: returns 'compartmentVolumeRule' + + * (Level 1) ParameterRule: returns 'parameterRule' + + * Unknown rule type: returns 'unknownRule' + + Beware that the last ('unknownRule') is not a valid SBML element + name. + + Returns the name of this element +"; + + +%feature("docstring") Rule::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Rule::setL1TypeCode " + Sets the SBML Level 1 type code for this Rule. + + Parameter 'type' is the SBML Level 1 type code for this Rule. The + allowable values are libsbml.SBML_COMPARTMENT_VOLUME_RULE, + libsbml.SBML_PARAMETER_RULE, and + libsbml.SBML_SPECIES_CONCENTRATION_RULE. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE if given 'type' value is + not one of the above. +"; + + +%feature("docstring") Rule::hasRequiredElements " + Predicate returning True if all the required elements for this Rule + object have been set. + + The only required element for a Rule object is the 'math' subelement. + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Rule::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Rule object have been set. + + The required attributes for a Rule object depend on the type of Rule + it is. For AssignmentRule and RateRule objects (and SBML + Level 1's SpeciesConcentrationRule, CompartmentVolumeRule, and + ParameterRule objects), the required attribute is 'variable'; for + AlgebraicRule objects, there is no required attribute. + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Rule::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Rule::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Rule::getInternalId " + Internal implementation method. +"; + + +%feature("docstring") Rule::setInternalId " + Internal implementation method. +"; + + +%feature("docstring") Rule::getId " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Rule::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") Rule::divideAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") Rule::multiplyAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") Rule::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") Rule::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Rule::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Rule::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Rule::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Rule::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Rule::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfRules::ListOfRules " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfRules(SBMLNamespaces sbmlns) + + Creates a new ListOfRules object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfRules object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfRules(long level, long version) + + Creates a new ListOfRules object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfRules::clone " + Creates and returns a deep copy of this ListOfRules instance. + + Returns a (deep) copy of this ListOfRules. +"; + + +%feature("docstring") ListOfRules::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfRules::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Rule objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfRules::getElementName " + Returns the XML element name of this object. + + For ListOfRules, the XML element name is 'listOfRules'. + + Returns the name of this element, i.e., 'listOfRules'. +"; + + +%feature("docstring") ListOfRules::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a Rule from the ListOfRules. + + Parameter 'n' is the index number of the Rule to get. + + Returns the nth Rule in this ListOfRules. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfRules::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfRules items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfRules items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfRules::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. Note + that AssignmentRules and RateRules do not actually have IDs, but the + libsbml interface pretends that they do: no assignment rule or rate + rule is returned by this function. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") ListOfRules::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfRules::createObject " + Internal implementation method. +"; + + +%feature("docstring") ListOfRules::isValidTypeForList " + Internal implementation method. +"; + + +%feature("docstring") AlgebraicRule " + @ingroup Core Implementation of SBML's AlgebraicRule construct. + + The rule type AlgebraicRule is derived from the parent class Rule. + It is used to express equations that are neither assignments of + model variables nor rates of change. AlgebraicRule does not add any + attributes to the basic Rule; its role is simply to distinguish this + case from the other cases. + + In the context of a simulation, algebraic rules are in effect at all + times, t >= 0. For purposes of evaluating expressions that involve + the delay 'csymbol' (see the SBML specification), algebraic rules + are considered to apply also at t <= 0. Please consult the relevant + SBML specification for additional information about the semantics of + assignments, rules, and entity values for simulation time t <= 0. + + An SBML model must not be overdetermined. The ability to define + arbitrary algebraic expressions in an SBML model introduces the + possibility that a model is mathematically overdetermined by the + overall system of equations constructed from its rules, reactions + and events. Therefore, if an algebraic rule is introduced in a + model, for at least one of the entities referenced in the rule's + 'math' element the value of that entity must not be completely + determined by other constructs in the model. This means that at + least this entity must not have the attribute 'constant'=True and + there must also not be a rate rule or assignment rule for it. + Furthermore, if the entity is a Species object, its value must not + be determined by reactions, which means that it must either have the + attribute 'boundaryCondition'=True or else not be involved in any + reaction at all. These restrictions are explained in more detail in + the SBML specification documents. + + In SBML Levels 2 and 3, Reaction object identifiers can be + referenced in the 'math' expression of an algebraic rule, but + reaction rates can never be determined by algebraic rules. This is + true even when a reaction does not contain a KineticLaw element. + (In such cases of missing KineticLaw elements, the model is valid + but incomplete; the rates of reactions lacking kinetic laws are + simply undefined, and not determined by the algebraic rule.) + + General summary of SBML rules + ====================================================================== + + In SBML Level 3 as well as Level 2, rules are separated into three + subclasses for the benefit of model analysis software. The three + subclasses are based on the following three different possible + functional forms (where x is a variable, f is some arbitrary function + returning a numerical result, V is a vector of variables that does + not include x, and W is a vector of variables that may include x): + + Algebraic: left-hand side is zero 0 = f(W) + Assignment: left-hand side is a scalar x = f(V) + Rate: left-hand side is a rate-of-change dx/dt = f(W) + + In their general form given above, there is little to distinguish + between assignment and algebraic rules. They are treated as separate + cases for the following reasons: + + * Assignment rules can simply be evaluated to calculate intermediate + values for use in numerical methods. They are statements of equality + that hold at all times. (For assignments that are only performed + once, see InitialAssignment.) + + * SBML needs to place restrictions on assignment rules, for example + the restriction that assignment rules cannot contain algebraic + loops. + + * Some simulators do not contain numerical solvers capable of solving + unconstrained algebraic equations, and providing more direct forms + such as assignment rules may enable those simulators to process + models they could not process if the same assignments were put in + the form of general algebraic equations; + + * Those simulators that can solve these algebraic equations make a + distinction between the different categories listed above; and + + * Some specialized numerical analyses of models may only be + applicable to models that do not contain algebraic rules. + + The approach taken to covering these cases in SBML is to define an + abstract Rule structure containing a subelement, 'math', to hold the + right-hand side expression, then to derive subtypes of Rule that add + attributes to distinguish the cases of algebraic, assignment and rate + rules. The 'math' subelement must contain a MathML expression + defining the mathematical formula of the rule. This MathML formula + must return a numerical value. The formula can be an arbitrary + expression referencing the variables and other entities in an SBML + model. + + Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, + RateRule) inherit the the 'math' subelement and other fields from + SBase. The AssignmentRule and RateRule classes add an additional + attribute, 'variable'. See the definitions of AssignmentRule, + AlgebraicRule and RateRule for details about the structure and + interpretation of each one. + + Additional restrictions on SBML rules + ====================================================================== + + An important design goal of SBML rule semantics is to ensure that a + model's simulation and analysis results will not be dependent on when + or how often rules are evaluated. To achieve this, SBML needs to + place two restrictions on rule use. The first concerns algebraic + loops in the system of assignments in a model, and the second + concerns overdetermined systems. + + A model must not contain algebraic loops + ...................................................................... + + The combined set of InitialAssignment, AssignmentRule and KineticLaw + objects in a model constitute a set of assignment statements that + should be considered as a whole. (A KineticLaw object is counted as + an assignment because it assigns a value to the symbol contained in + the \"id\" attribute of the Reaction object in which it is defined.) + This combined set of assignment statements must not contain + algebraic loops -- dependency chains between these statements must + terminate. To put this more formally, consider a directed graph in + which nodes are assignment statements and directed arcs exist for + each occurrence of an SBML species, compartment or parameter symbol + in an assignment statement's \"math\" subelement. Let the directed + arcs point from the statement assigning the symbol to the statements + that contain the symbol in their \"math\" subelement expressions. + This graph must be acyclic. + + SBML does not specify when or how often rules should be evaluated. + Eliminating algebraic loops ensures that assignment statements can be + evaluated any number of times without the result of those evaluations + changing. As an example, consider the set of equations x = x + 1, y + = z + 200 and z = y + 100. If this set of equations were + interpreted as a set of assignment statements, it would be invalid + because the rule for x refers to x (exhibiting one type of loop), + and the rule for y refers to z while the rule for z refers back to y + (exhibiting another type of loop). Conversely, the following set of + equations would constitute a valid set of assignment statements: x = + 10, y = z + 200, and z = x + 100. + + A model must not be overdetermined + ...................................................................... + + An SBML model must not be overdetermined; that is, a model must not + define more equations than there are unknowns in a model. An SBML + model that does not contain AlgebraicRule structures cannot be + overdetermined. + + LibSBML implements the static analysis procedure described in + Appendix B of the SBML Level 3 Version 1 Core specification for + assessing whether a model is overdetermined. + + (In summary, assessing whether a given continuous, deterministic, + mathematical model is overdetermined does not require dynamic + analysis; it can be done by analyzing the system of equations + created from the model. One approach is to construct a bipartite + graph in which one set of vertices represents the variables and the + other the set of vertices represents the equations. Place edges + between vertices such that variables in the system are linked to the + equations that determine them. For algebraic equations, there will + be edges between the equation and each variable occurring in the + equation. For ordinary differential equations (such as those defined + by rate rules or implied by the reaction rate definitions), there + will be a single edge between the equation and the variable + determined by that differential equation. A mathematical model is + overdetermined if the maximal matchings of the bipartite graph + contain disconnected vertexes representing equations. If one + maximal matching has this property, then all the maximal matchings + will have this property; i.e., it is only necessary to find one + maximal matching.) + + Rule types for SBML Level 1 + ====================================================================== + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 + for distinguishing rules; specifically, it uses an attribute whose + value is drawn from an enumeration of 3 values. LibSBML supports + this using methods that work with the enumeration values @~ listed + below. + + * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. + + * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. + + * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or + not yet set. +"; + + +%feature("docstring") AlgebraicRule::AlgebraicRule " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + AlgebraicRule(SBMLNamespaces sbmlns) + + Creates a new AlgebraicRule using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a AlgebraicRule object to an SBMLDocument + (e.g., using Model.addRule(), the SBML XML namespace of the + document overrides the value used when creating the AlgebraicRule + object via this constructor. This is necessary to ensure that an + SBML document is a consistent structure. Nevertheless, the ability + to supply the values at the time of creation of a AlgebraicRule is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + AlgebraicRule(long level, long version) + + Creates a new AlgebraicRule using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + AlgebraicRule + + Parameter 'version' is a long integer, the SBML Version to assign to + this AlgebraicRule + + Throws ValueError: Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of an AlgebraicRule object to an SBMLDocument + (e.g., using Model.addRule()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + AlgebraicRule object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a AlgebraicRule is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. +"; + + +%feature("docstring") AlgebraicRule::clone " + Creates and returns a deep copy of this Rule. + + Returns a (deep) copy of this Rule. +"; + + +%feature("docstring") AlgebraicRule::accept " + Accepts the given SBMLVisitor for this instance of AlgebraicRule. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next AlgebraicRule object in the + list of rules within which the present object is embedded. +"; + + +%feature("docstring") AlgebraicRule::setInternalIdOnly " + Internal implementation method. +"; + + +%feature("docstring") AlgebraicRule::getInternalIdOnly " + Internal implementation method. +"; + + +%feature("docstring") AlgebraicRule::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + AlgebraicRule object have been set. + + Note: + + In SBML Levels 2-3, there is no required attribute for an + AlgebraicRule object. For Level 1, the only required attribute is + 'formula'. + + Returns True if the required attributes have been set, False + otherwise. +"; + + +%feature("docstring") AssignmentRule " + @ingroup Core Implementation of SBML's AssignmentRule construct. + + The rule type AssignmentRule is derived from the parent class Rule. + It is used to express equations that set the values of variables. + The left-hand side (the attribute named 'variable') of an assignment + rule can refer to the identifier of a Species, SpeciesReference (in + SBML Level 3), Compartment, or Parameter object in the model (but + not a Reaction). The entity identified must have its 'constant' + attribute set to False. The effects of an AssignmentRule are in + general terms the same, but differ in the precise details depending + on the type of variable being set: + + * In the case of a species, an AssignmentRule sets the referenced + species' quantity (whether a 'concentration' or 'amount') to the + value determined by the formula in the MathML subelement 'math'. The + unit associated with the value produced by the 'math' formula should + (in SBML Level 2 Version 4 and in SBML Level 3) or must (in SBML + releases prior to Level 2 version 4) be equal to the unit associated + with the species' quantity. Restrictions: There must not be both an + AssignmentRule 'variable' attribute and a SpeciesReference 'species' + attribute having the same value, unless the referenced Species + object has its 'boundaryCondition' attribute set to True. In other + words, an assignment rule cannot be defined for a species that is + created or destroyed in a reaction unless that species is defined as + a boundary condition in the model. + + * (For SBML Level 3 only) In the case of a species reference, an + AssignmentRule sets the stoichiometry of the referenced reactant or + product to the value determined by the formula in 'math'. The unit + associated with the value produced by the 'math' formula should be + consistent with the unit 'dimensionless', because reactant and + product stoichiometries in reactions are dimensionless quantities. + + * In the case of a compartment, an AssignmentRule sets the + referenced compartment's size to the value determined by the formula + in the 'math' subelement of the AssignmentRule object. The overall + units of the formula in 'math' should (in SBML Level 2 Version 4 + and in SBML Level 3) or must (in SBML releases prior to Level 2 + version 4) be the same as the units of the size of the compartment. + + * In the case of a parameter, an AssignmentRule sets the referenced + parameter's value to that determined by the formula in the 'math' + subelement of the AssignmentRule object. The overall units of the + formula in the 'math' subelement should (in SBML Level 2 Version 4 + and in SBML Level 3) or must (in SBML releases prior to Level 2 + version 4) be the same as the units defined for the parameter. + + In the context of a simulation, assignment rules are in effect at all + times, t >= 0. For purposes of evaluating expressions that involve + the delay 'csymbol' (see the SBML Level 2 specification), assignment + rules are considered to apply also at t <= 0. Please consult the + relevant SBML specification for additional information about the + semantics of assignments, rules, and entity values for simulation + time t <= 0. + + A model must not contain more than one AssignmentRule or RateRule + object having the same value of 'variable'; in other words, in the + set of all assignment rules and rate rules in an SBML model, each + variable appearing in the left-hand sides can only appear once. + This simply follows from the fact that an indeterminate system would + result if a model contained more than one assignment rule for the + same variable or both an assignment rule and a rate rule for the + same variable. + + Similarly, a model must also not contain both an AssignmentRule and + an InitialAssignment for the same variable, because both kinds of + constructs apply prior to and at the start of simulation time, i.e., + t <= 0. If a model contained both an initial assignment and an + assignment rule for the same variable, an indeterminate system would + result. + + The value calculated by an AssignmentRule object overrides the value + assigned to the given symbol by the object defining that symbol. For + example, if a Compartment object's 'size' attribute value is set in + its definition, and the model also contains an AssignmentRule object + having that compartment's 'id' as its 'variable' value, then the + 'size' assigned in the Compartment object definition is ignored and + the value assigned based on the computation defined in the + AssignmentRule. This does not mean that a definition for a given + symbol can be omitted if there is an AssignmentRule object for it. + For example, there must be a Parameter definition for a given + parameter if there is an AssignmentRule for that parameter. It is + only a question of which value definition takes precedence. + + General summary of SBML rules + ====================================================================== + + In SBML Level 3 as well as Level 2, rules are separated into three + subclasses for the benefit of model analysis software. The three + subclasses are based on the following three different possible + functional forms (where x is a variable, f is some arbitrary function + returning a numerical result, V is a vector of variables that does + not include x, and W is a vector of variables that may include x): + + Algebraic: left-hand side is zero 0 = f(W) + Assignment: left-hand side is a scalar x = f(V) + Rate: left-hand side is a rate-of-change dx/dt = f(W) + + In their general form given above, there is little to distinguish + between assignment and algebraic rules. They are treated as separate + cases for the following reasons: + + * Assignment rules can simply be evaluated to calculate intermediate + values for use in numerical methods. They are statements of equality + that hold at all times. (For assignments that are only performed + once, see InitialAssignment.) + + * SBML needs to place restrictions on assignment rules, for example + the restriction that assignment rules cannot contain algebraic + loops. + + * Some simulators do not contain numerical solvers capable of solving + unconstrained algebraic equations, and providing more direct forms + such as assignment rules may enable those simulators to process + models they could not process if the same assignments were put in + the form of general algebraic equations; + + * Those simulators that can solve these algebraic equations make a + distinction between the different categories listed above; and + + * Some specialized numerical analyses of models may only be + applicable to models that do not contain algebraic rules. + + The approach taken to covering these cases in SBML is to define an + abstract Rule structure containing a subelement, 'math', to hold the + right-hand side expression, then to derive subtypes of Rule that add + attributes to distinguish the cases of algebraic, assignment and rate + rules. The 'math' subelement must contain a MathML expression + defining the mathematical formula of the rule. This MathML formula + must return a numerical value. The formula can be an arbitrary + expression referencing the variables and other entities in an SBML + model. + + Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, + RateRule) inherit the the 'math' subelement and other fields from + SBase. The AssignmentRule and RateRule classes add an additional + attribute, 'variable'. See the definitions of AssignmentRule, + AlgebraicRule and RateRule for details about the structure and + interpretation of each one. + + Additional restrictions on SBML rules + ====================================================================== + + An important design goal of SBML rule semantics is to ensure that a + model's simulation and analysis results will not be dependent on when + or how often rules are evaluated. To achieve this, SBML needs to + place two restrictions on rule use. The first concerns algebraic + loops in the system of assignments in a model, and the second + concerns overdetermined systems. + + A model must not contain algebraic loops + ...................................................................... + + The combined set of InitialAssignment, AssignmentRule and KineticLaw + objects in a model constitute a set of assignment statements that + should be considered as a whole. (A KineticLaw object is counted as + an assignment because it assigns a value to the symbol contained in + the \"id\" attribute of the Reaction object in which it is defined.) + This combined set of assignment statements must not contain + algebraic loops -- dependency chains between these statements must + terminate. To put this more formally, consider a directed graph in + which nodes are assignment statements and directed arcs exist for + each occurrence of an SBML species, compartment or parameter symbol + in an assignment statement's \"math\" subelement. Let the directed + arcs point from the statement assigning the symbol to the statements + that contain the symbol in their \"math\" subelement expressions. + This graph must be acyclic. + + SBML does not specify when or how often rules should be evaluated. + Eliminating algebraic loops ensures that assignment statements can be + evaluated any number of times without the result of those evaluations + changing. As an example, consider the set of equations x = x + 1, y + = z + 200 and z = y + 100. If this set of equations were + interpreted as a set of assignment statements, it would be invalid + because the rule for x refers to x (exhibiting one type of loop), + and the rule for y refers to z while the rule for z refers back to y + (exhibiting another type of loop). Conversely, the following set of + equations would constitute a valid set of assignment statements: x = + 10, y = z + 200, and z = x + 100. + + A model must not be overdetermined + ...................................................................... + + An SBML model must not be overdetermined; that is, a model must not + define more equations than there are unknowns in a model. An SBML + model that does not contain AlgebraicRule structures cannot be + overdetermined. + + LibSBML implements the static analysis procedure described in + Appendix B of the SBML Level 3 Version 1 Core specification for + assessing whether a model is overdetermined. + + (In summary, assessing whether a given continuous, deterministic, + mathematical model is overdetermined does not require dynamic + analysis; it can be done by analyzing the system of equations + created from the model. One approach is to construct a bipartite + graph in which one set of vertices represents the variables and the + other the set of vertices represents the equations. Place edges + between vertices such that variables in the system are linked to the + equations that determine them. For algebraic equations, there will + be edges between the equation and each variable occurring in the + equation. For ordinary differential equations (such as those defined + by rate rules or implied by the reaction rate definitions), there + will be a single edge between the equation and the variable + determined by that differential equation. A mathematical model is + overdetermined if the maximal matchings of the bipartite graph + contain disconnected vertexes representing equations. If one + maximal matching has this property, then all the maximal matchings + will have this property; i.e., it is only necessary to find one + maximal matching.) + + Rule types for SBML Level 1 + ====================================================================== + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 + for distinguishing rules; specifically, it uses an attribute whose + value is drawn from an enumeration of 3 values. LibSBML supports + this using methods that work with the enumeration values @~ listed + below. + + * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. + + * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. + + * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or + not yet set. +"; + + +%feature("docstring") AssignmentRule::AssignmentRule " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + AssignmentRule(SBMLNamespaces sbmlns) + + Creates a new AssignmentRule using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a AssignmentRule object to an SBMLDocument + (e.g., using Model.addRule(), the SBML XML namespace of the + document overrides the value used when creating the AssignmentRule + object via this constructor. This is necessary to ensure that an + SBML document is a consistent structure. Nevertheless, the ability + to supply the values at the time of creation of a AssignmentRule is + an important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + AssignmentRule(long level, long version) + + Creates a new AssignmentRule using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + AssignmentRule + + Parameter 'version' is a long integer, the SBML Version to assign to + this AssignmentRule + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of an AssignmentRule object to an SBMLDocument + (e.g., using Model.addRule(), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + AssignmentRule object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a AssignmentRule is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. +"; + + +%feature("docstring") AssignmentRule::clone " + Creates and returns a deep copy of this Rule. + + Returns a (deep) copy of this Rule. +"; + + +%feature("docstring") AssignmentRule::accept " + Accepts the given SBMLVisitor for this instance of AssignmentRule. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next AssignmentRule object in the + list of rules within which the present object is embedded. +"; + + +%feature("docstring") AssignmentRule::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + AssignmentRule object have been set. + + Note: + + In SBML Levels 2-3, the only required attribute for an + AssignmentRule object is 'variable'. For Level 1, where the + equivalent attribute is known by different names ('compartment', + 'species', or 'name', depending on the type of object), there is an + additional required attribute called 'formula'. + + Returns True if the required attributes have been set, False + otherwise. +"; + + +%feature("docstring") AssignmentRule::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") RateRule " + @ingroup Core Implementation of SBML's RateRule construct. + + The rule type RateRule is derived from the parent class Rule. It is + used to express equations that determine the rates of change of + variables. The left-hand side (the 'variable' attribute) can refer + to the identifier of a species, compartment, or parameter (but not a + reaction). The entity identified must have its 'constant' attribute + set to False. The effects of a RateRule are in general terms the + same, but differ in the precise details depending on which variable + is being set: + + * In the case of a species, a RateRule sets the rate of change + of the species' quantity (concentration or amount of substance) to + the value determined by the formula in the 'math' subelement of the + RateRule object. The overall units of the formula in 'math' should + (in SBML Level 2 Version 4 and in SBML Level 3) or must (in SBML + releases prior to Level 2 version 4) be equal to the unit of species + quantity divided by the model-wide unit of time. Restrictions: + There must not be both a RateRule 'variable' attribute and a + SpeciesReference 'species' attribute having the same value, unless + that species has its 'boundaryCondition' attribute is set to True. + This means a rate rule cannot be defined for a species that is + created or destroyed in a reaction, unless that species is defined + as a boundary condition in the model. + + * (For SBML Level 3 only) In the case of a species reference, a + RateRule sets the rate of change of the stoichiometry of the + referenced reactant or product to the value determined by the + formula in 'math'. The unit associated with the value produced by + the 'math' formula should be consistent with the unit + 'dimensionless' divided by the model-wide unit of time. + + * In the case of a compartment, a RateRule sets the rate of change + of the compartment's size to the value determined by the formula in + the 'math' subelement of the RateRule object. The overall units of + the formula should (in SBML Level 2 Version 4 and in SBML Level 3) + or must (in SBML releases prior to Level 2 version 4) be the units + of the compartment's size divided by the model-wide unit of time. + + * In the case of a parameter, a RateRule sets the rate of change of + the parameter's value to that determined by the formula in the + 'math' subelement of the RateRule object. The overall units of the + formula should (in SBML Level 2 Version 4 and in SBML Level 3) or + must (in SBML releases prior to Level 2 version 4) be the Parameter + object's 'unit' attribute value divided by the model-wide unit of + time. + + In the context of a simulation, rate rules are in effect for + simulation time t < 0. Please consult the relevant SBML + specification for additional information about the semantics of + assignments, rules, and entity values for simulation time t <= 0. + + As mentioned in the description of AssignmentRule, a model must not + contain more than one RateRule or AssignmentRule object having the + same value of 'variable'; in other words, in the set of all + assignment rules and rate rules in an SBML model, each variable + appearing in the left-hand sides can only appear once. This simply + follows from the fact that an indeterminate system would result if a + model contained more than one assignment rule for the same variable + or both an assignment rule and a rate rule for the same variable. + + General summary of SBML rules + ====================================================================== + + In SBML Level 3 as well as Level 2, rules are separated into three + subclasses for the benefit of model analysis software. The three + subclasses are based on the following three different possible + functional forms (where x is a variable, f is some arbitrary function + returning a numerical result, V is a vector of variables that does + not include x, and W is a vector of variables that may include x): + + Algebraic: left-hand side is zero 0 = f(W) + Assignment: left-hand side is a scalar x = f(V) + Rate: left-hand side is a rate-of-change dx/dt = f(W) + + In their general form given above, there is little to distinguish + between assignment and algebraic rules. They are treated as separate + cases for the following reasons: + + * Assignment rules can simply be evaluated to calculate intermediate + values for use in numerical methods. They are statements of equality + that hold at all times. (For assignments that are only performed + once, see InitialAssignment.) + + * SBML needs to place restrictions on assignment rules, for example + the restriction that assignment rules cannot contain algebraic + loops. + + * Some simulators do not contain numerical solvers capable of solving + unconstrained algebraic equations, and providing more direct forms + such as assignment rules may enable those simulators to process + models they could not process if the same assignments were put in + the form of general algebraic equations; + + * Those simulators that can solve these algebraic equations make a + distinction between the different categories listed above; and + + * Some specialized numerical analyses of models may only be + applicable to models that do not contain algebraic rules. + + The approach taken to covering these cases in SBML is to define an + abstract Rule structure containing a subelement, 'math', to hold the + right-hand side expression, then to derive subtypes of Rule that add + attributes to distinguish the cases of algebraic, assignment and rate + rules. The 'math' subelement must contain a MathML expression + defining the mathematical formula of the rule. This MathML formula + must return a numerical value. The formula can be an arbitrary + expression referencing the variables and other entities in an SBML + model. + + Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, + RateRule) inherit the the 'math' subelement and other fields from + SBase. The AssignmentRule and RateRule classes add an additional + attribute, 'variable'. See the definitions of AssignmentRule, + AlgebraicRule and RateRule for details about the structure and + interpretation of each one. + + Additional restrictions on SBML rules + ====================================================================== + + An important design goal of SBML rule semantics is to ensure that a + model's simulation and analysis results will not be dependent on when + or how often rules are evaluated. To achieve this, SBML needs to + place two restrictions on rule use. The first concerns algebraic + loops in the system of assignments in a model, and the second + concerns overdetermined systems. + + A model must not contain algebraic loops + ...................................................................... + + The combined set of InitialAssignment, AssignmentRule and KineticLaw + objects in a model constitute a set of assignment statements that + should be considered as a whole. (A KineticLaw object is counted as + an assignment because it assigns a value to the symbol contained in + the \"id\" attribute of the Reaction object in which it is defined.) + This combined set of assignment statements must not contain + algebraic loops -- dependency chains between these statements must + terminate. To put this more formally, consider a directed graph in + which nodes are assignment statements and directed arcs exist for + each occurrence of an SBML species, compartment or parameter symbol + in an assignment statement's \"math\" subelement. Let the directed + arcs point from the statement assigning the symbol to the statements + that contain the symbol in their \"math\" subelement expressions. + This graph must be acyclic. + + SBML does not specify when or how often rules should be evaluated. + Eliminating algebraic loops ensures that assignment statements can be + evaluated any number of times without the result of those evaluations + changing. As an example, consider the set of equations x = x + 1, y + = z + 200 and z = y + 100. If this set of equations were + interpreted as a set of assignment statements, it would be invalid + because the rule for x refers to x (exhibiting one type of loop), + and the rule for y refers to z while the rule for z refers back to y + (exhibiting another type of loop). Conversely, the following set of + equations would constitute a valid set of assignment statements: x = + 10, y = z + 200, and z = x + 100. + + A model must not be overdetermined + ...................................................................... + + An SBML model must not be overdetermined; that is, a model must not + define more equations than there are unknowns in a model. An SBML + model that does not contain AlgebraicRule structures cannot be + overdetermined. + + LibSBML implements the static analysis procedure described in + Appendix B of the SBML Level 3 Version 1 Core specification for + assessing whether a model is overdetermined. + + (In summary, assessing whether a given continuous, deterministic, + mathematical model is overdetermined does not require dynamic + analysis; it can be done by analyzing the system of equations + created from the model. One approach is to construct a bipartite + graph in which one set of vertices represents the variables and the + other the set of vertices represents the equations. Place edges + between vertices such that variables in the system are linked to the + equations that determine them. For algebraic equations, there will + be edges between the equation and each variable occurring in the + equation. For ordinary differential equations (such as those defined + by rate rules or implied by the reaction rate definitions), there + will be a single edge between the equation and the variable + determined by that differential equation. A mathematical model is + overdetermined if the maximal matchings of the bipartite graph + contain disconnected vertexes representing equations. If one + maximal matching has this property, then all the maximal matchings + will have this property; i.e., it is only necessary to find one + maximal matching.) + + Rule types for SBML Level 1 + ====================================================================== + + SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 + for distinguishing rules; specifically, it uses an attribute whose + value is drawn from an enumeration of 3 values. LibSBML supports + this using methods that work with the enumeration values @~ listed + below. + + * libsbml.RULE_TYPE_RATE: Indicates the rule is a 'rate' rule. + + * libsbml.RULE_TYPE_SCALAR: Indicates the rule is a 'scalar' rule. + + * libsbml.RULE_TYPE_INVALID: Indicates the rule type is unknown or + not yet set. +"; + + +%feature("docstring") RateRule::RateRule " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + RateRule(SBMLNamespaces sbmlns) + + Creates a new RateRule using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a RateRule object to an SBMLDocument (e.g., + using Model.addRule(), the SBML XML namespace of the document + overrides the value used when creating the RateRule object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a RateRule is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + RateRule(long level, long version) + + Creates a new RateRule using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + RateRule + + Parameter 'version' is a long integer, the SBML Version to assign to + this RateRule + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a RateRule object to an SBMLDocument (e.g., + using Model.addRule(), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + RateRule object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a RateRule + is an important aid to producing valid SBML. Knowledge of the + intented SBML Level and Version determine whether it is valid to + assign a particular value to an attribute, or whether it is valid to + add an object to an existing SBMLDocument. +"; + + +%feature("docstring") RateRule::clone " + Creates and returns a deep copy of this Rule. + + Returns a (deep) copy of this Rule. +"; + + +%feature("docstring") RateRule::accept " + Accepts the given SBMLVisitor. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next RateRule object in the list of + rules within which the present object is embedded. +"; + + +%feature("docstring") RateRule::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + RateRule object have been set. + + Note: + + In SBML Levels 2-3, the only required attribute for a RateRule + object is 'variable'. For Level 1, where the equivalent attribute + is known by different names ('compartment', 'species', or 'name', + depending on the type of object), there is an additional required + attribute called 'formula'. + + Returns True if the required attributes have been set, False + otherwise. +"; + + +%feature("docstring") RateRule::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Constraint " + @ingroup Core Implementation of SBML's Constraint construct. + + The Constraint object class was introduced in SBML Level 2 Version 2 + as a mechanism for stating the assumptions under which a model is + designed to operate. The constraints are statements about + permissible values of different quantities in a model. Constraints + are not used to compute dynamical values for simulation or analysis, + but rather, they serve an advisory role for simulation/analysis + tools. + + SBML's Constraint object class has one required attribute, 'id', to + give the parameter a unique identifier by which other parts of an + SBML model definition can refer to it. A Constraint object can also + have an optional 'name' attribute of type string. Identifiers and + names must be used according to the guidelines described in the SBML + specification (e.g., Section 3.3 in the Level 2 Version 4 + specification). + + Constraint has one required subelement, 'math', containing a MathML + formula defining the condition of the constraint. This formula must + return a boolean value of True when the model is a valid state. The + formula can be an arbitrary expression referencing the variables and + other entities in an SBML model. The evaluation of 'math' and + behavior of constraints are described in more detail below. + + A Constraint structure also has an optional subelement called + 'message'. This can contain a message in XHTML format that may be + displayed to the user when the condition of the formula in the + 'math' subelement evaluates to a value of False. Software tools are + not required to display the message, but it is recommended that they + do so as a matter of best practice. The XHTML content within a + 'message' subelement must follow the same restrictions as for the + 'notes' element on SBase described in in the SBML Level 2 + specification; please consult the SBML specification document + corresponding to the SBML Level and Version of your model for more + information about the requirements for 'notes' content. + + Constraint was introduced in SBML Level 2 Version 2. It is not + available in earlier versions of Level 2 nor in any version of Level + 1. + + Semantics of Constraints + ====================================================================== + + In the context of a simulation, a Constraint has effect at all times + t >= 0. Each Constraint's 'math' subelement is first evaluated + after any InitialAssignment definitions in a model at t = 0 and can + conceivably trigger at that point. (In other words, a simulation + could fail a constraint immediately.) + + Constraint structures cannot and should not be used to compute the + dynamical behavior of a model as part of, for example, simulation. + Constraints may be used as input to non-dynamical analysis, for + instance by expressing flux constraints for flux balance analysis. + + The results of a simulation of a model containing a constraint are + invalid from any simulation time at and after a point when the + function given by the 'math' subelement returns a value of False. + Invalid simulation results do not make a prediction of the behavior + of the biochemical reaction network represented by the model. The + precise behavior of simulation tools is left undefined with respect + to constraints. If invalid results are detected with respect to a + given constraint, the 'message' subelement may optionally be + displayed to the user. The simulation tool may also halt the + simulation or clearly delimit in output data the simulation time + point at which the simulation results become invalid. + + SBML does not impose restrictions on duplicate Constraint definitions + or the order of evaluation of Constraint objects in a model. It is + possible for a model to define multiple constraints all with the same + mathematical expression. Since the failure of any constraint + indicates that the model simulation has entered an invalid state, a + system is not required to attempt to detect whether other + constraints in the model have failed once any one constraint has + failed. +"; + + +%feature("docstring") ListOfConstraints " + @ingroup Core Implementation of SBML's ListOfConstraints construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Constraint::Constraint " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Constraint(SBMLNamespaces sbmlns) + + Creates a new Constraint using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Constraint object to an SBMLDocument (e.g., + using Model.addConstraint()), the SBML XML namespace of the document + overrides the value used when creating the Constraint object via + this constructor. This is necessary to ensure that an SBML document + is a consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a Constraint is an important aid + to producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value + to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Constraint(long level, long version) + + Creates a new Constraint using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Constraint + + Parameter 'version' is a long integer, the SBML Version to assign to + this Constraint + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Constraint object to an SBMLDocument (e.g., + using Model.addConstraint()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + Constraint object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Constraint + is an important aid to producing valid SBML. Knowledge of the + intented SBML Level and Version determine whether it is valid to + assign a particular value to an attribute, or whether it is valid to + add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Constraint(Constraint orig) + + Copy constructor; creates a copy of this Constraint. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Constraint::accept " + Accepts the given SBMLVisitor for this instance of Constraint. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next Constraint in the list of + constraints within which this Constraint is embedded (i.e., in the + ListOfConstraints located in the enclosing Model instance). +"; + + +%feature("docstring") Constraint::clone " + Creates and returns a deep copy of this Constraint. + + Returns a (deep) copy of this Constraint. +"; + + +%feature("docstring") Constraint::getMessage " + Get the message, if any, associated with this Constraint + + Returns the message for this Constraint, as an XMLNode. +"; + + +%feature("docstring") Constraint::getMessageString " + Get the message string, if any, associated with this Constraint + + Returns the message for this Constraint, as a string. +"; + + +%feature("docstring") Constraint::getMath " + Get the mathematical expression of this Constraint + + Returns the math for this Constraint, as an ASTNode. +"; + + +%feature("docstring") Constraint::isSetMessage " + Predicate returning True if a message is defined for this + Constraint. + + Returns True if the message of this Constraint is set, False + otherwise. +"; + + +%feature("docstring") Constraint::isSetMath " + Predicate returning True if a mathematical formula is defined for + this Constraint. + + Returns True if the 'math' subelement for this Constraint is set, + False otherwise. +"; + + +%feature("docstring") Constraint::setMessage " + Sets the message of this Constraint. + + The XMLNode tree passed in 'xhtml' is copied. + + Parameter 'xhtml' is an XML tree containing XHTML content. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") Constraint::setMath " + Sets the mathematical expression of this Constraint to a copy of the + AST given as 'math'. + + Parameter 'math' is an ASTNode expression to be assigned as the + 'math' subelement of this Constraint + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") Constraint::unsetMessage " + Unsets the 'message' subelement of this Constraint. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Constraint::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Constraint::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Constraint::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") Constraint::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Constraint::getElementName " + Returns the XML element name of this object, which for Constraint, is + always 'constraint'. + + Returns the name of this element, i.e., 'constraint'. +"; + + +%feature("docstring") Constraint::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Constraint::hasRequiredElements " + Predicate returning True if all the required elements for this + Constraint object have been set. + + Note: + + The required elements for a Constraint object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Constraint::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") Constraint::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Constraint::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Constraint::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Constraint::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Constraint::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfConstraints::ListOfConstraints " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfConstraints(SBMLNamespaces sbmlns) + + Creates a new ListOfConstraints object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfConstraints object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfConstraints(long level, long version) + + Creates a new ListOfConstraints object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfConstraints::clone " + Creates and returns a deep copy of this ListOfConstraints instance. + + Returns a (deep) copy of this ListOfConstraints. +"; + + +%feature("docstring") ListOfConstraints::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfConstraints::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Constraint objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfConstraints::getElementName " + Returns the XML element name of this object. + + For ListOfConstraints, the XML element name is 'listOfConstraints'. + + Returns the name of this element, i.e., 'listOfConstraints'. +"; + + +%feature("docstring") ListOfConstraints::get " + Get a Constraint from the ListOfConstraints. + + Parameter 'n' is the index number of the Constraint to get. + + Returns the nth Constraint in this ListOfConstraints. + + See also size(). +"; + + +%feature("docstring") ListOfConstraints::remove " + Removes the nth item from this ListOfConstraints items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). +"; + + +%feature("docstring") ListOfConstraints::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfConstraints::createObject " + Internal implementation method. +"; + + +%feature("docstring") Reaction " + @ingroup Core Implementation of SBML's Reaction construct. + + A reaction represents any transformation, transport or binding + process, typically a chemical reaction, that can change the quantity + of one or more species. In SBML, a reaction is defined primarily in + terms of the participating reactants and products (and their + corresponding stoichiometries), along with optional modifier + species, an optional rate at which the reaction takes place, and + optional parameters. + + As with other major object in SBML, Reaction has a mandatory + attribute, 'id', used to give the compartment type an identifier. + The identifier must be a text string conforming to the identifer + syntax permitted in SBML. In SBML Level 2 and Level 3, the reaction + 'id' identifier can be used in mathematical formulas elsewhere in an + SBML model to represent the rate of that reaction; this usage is + explained below. Reaction also has an optional 'name' attribute, of + type string. The 'id' and 'name' must be used according to the + guidelines described in the SBML specification. + + The species participating as reactants, products, and/or modifiers in + a reaction are declared using lists of SpeciesReference and/or + ModifierSpeciesReference instances stored in subelements + 'listOfReactants', 'listOfProducts' and 'listOfModifiers'. Certain + restrictions are placed on the appearance of species in reaction + definitions: + + * The ability of a species to appear as a reactant or product of + any reaction in a model is governed by certain flags in that + species' definition; see the definition of Species for more + information. + + * Any species appearing in the mathematical formula of the + subelement 'kineticLaw' (described below) of a Reaction must be + declared in at least one of that Reaction's lists of reactants, + products, and/or modifiers. Put another way, it is an error for a + reaction's kinetic law formula to refer to species that have not + been declared for that reaction. + + * A reaction definition can contain an empty list of reactants or + an empty list of products, but it must have at least one reactant or + product; in other words, a reaction without any reactant or product + species is not permitted. (This restriction does not apply to + modifier species, which remain optional in all cases.) + + A reaction can contain up to one KineticLaw object in a subelement + named 'kineticLaw'. It defines the speed at which the process + defined by the reaction takes place. The description of KineticLaw + provides more details about its use. Note that although the + inclusion of a KineticLaw object in an instance of a Reaction + component is optional, there is no useful default that can be + substituted in place of a missing rate expression in a reaction. + Moreover, a reaction's rate cannot be defined in any other way in + SBML -- InitialAssignment, AssignmentRule, RateRule, AlgebraicRule, + Event, and other constructs in SBML cannot be used to set the + reaction rate separately. Nevertheless, for some modeling + applications, reactions without any defined rate can be perfectly + acceptable. + + Reaction also has a boolean attribute named 'reversible' for + indicating whether the reaction is reversible. This attribute is + optional in SBML Level 2, with a default of True; it is mandatory in + SBML Level 3 (with no default value). To say that a reaction is + reversible is to say it can proceed in either the forward or the + reverse direction. Although the reversibility of a reaction can + sometimes be deduced by inspecting its rate expression, this is not + always the case, especially for complicated expressions. Moreover, + the need in SBML to allow rate expressions (i.e., KineticLaw) to be + optional leads to the need for a separate flag indicating + reversibility. Note that labeling a reaction as irreversible is an + assertion that the reaction always proceeds in the given forward + direction. (Why else would it be flagged as irreversible?) This + implies the rate expression in the KineticLaw always has a non- + negative value during simulations. Software tools could provide a + means of optionally testing that this condition holds. The presence + of reversibility information in two places (i.e., the rate + expression and the 'reversible' attribute on Reaction) leaves open + the possibility that a model could contain contradictory + information, but the creation of such a model would be an error on + the part of the software generating it. + + The Reaction object class has another boolean attribute called + 'fast'. This attribute is optional in SBML Level 2, with a default + of false; it is mandatory in SBML Level 3 (with no default value). + It is used to indicate that a reaction occurs on a vastly faster + time scale than others in a system. Readers are directed to the + SBML Level 2 Version 4 specification, which provides more detail + about the conditions under which a reaction can be considered to be + fast in this sense. The attribute's default value is False. SBML + Level 1 and Level 2 Version 1 incorrectly claimed that software + tools could ignore this attribute if they did not implement support + for the corresponding concept; however, further research in SBML has + revealed that this is not true, and 'fast' cannot be ignored if it + is set to True. SBML Level 2 Versions 2-4 therefore stipulate that + if a model has any reactions with 'fast' set to True, a software + tool must be able to respect the attribute or else indicate to the + user that it does not have the capacity to do so. Analysis software + cannot ignore the value of the 'fast' attribute because doing so may + lead to different results as compared to a software system that does + make use of 'fast'. + + In SBML Level 3 Version 1, the Reaction object has an additional + optional attribute named 'compartment', whose value must be the + identifier of a compartment defined in the enclosing Model object. + The 'compartment' attribute can be used to indicate the compartment + in which the reaction is assumed to take place. If the attribute is + present, its value must be the identifier of a Compartment object + defined in the enclosing Model object. Similar to the 'reversible' + attribute, the value of the 'compartment' attribute has no direct + impact on the construction of mathematical equations for the SBML + model. When a kinetic law is given for a reaction, the compartment + location may already be implicit in the kinetic law (although this + cannot always be guaranteed). Nevertheless, software tools may find + the 'compartment' attribute value useful for such purposes as + analyzing the structure of the model, guiding the modeler in + constructing correct rate formulas, and visualization purposes. + + Readers are urged to read the SBML specification for more details + about the proper use of Reaction. +"; + + +%feature("docstring") ListOfReactions " + @ingroup Core Implementation of SBML's ListOfReactions construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Reaction::Reaction " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Reaction(SBMLNamespaces sbmlns) + + Creates a new Reaction using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Reaction object to an SBMLDocument (e.g., + using Model.addReaction()), the SBML XML namespace of the document + overrides the value used when creating the Reaction object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a Reaction is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Reaction(long level, long version) + + Creates a new Reaction using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Reaction + + Parameter 'version' is a long integer, the SBML Version to assign to + this Reaction + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Reaction object to an SBMLDocument (e.g., + using Model.addReaction()), the SBML Level, SBML Version and XML + namespace of the document override the values used when creating the + Reaction object via this constructor. This is necessary to ensure + that an SBML document is a consistent structure. Nevertheless, the + ability to supply the values at the time of creation of a Reaction + is an important aid to producing valid SBML. Knowledge of the + intented SBML Level and Version determine whether it is valid to + assign a particular value to an attribute, or whether it is valid to + add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Reaction(Reaction orig) + + Copy constructor; creates a copy of this Reaction. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Reaction::accept " + Accepts the given SBMLVisitor for this instance of Reaction. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") Reaction::clone " + Creates and returns a deep copy of this Reaction. + + Returns a (deep) copy of this Reaction. +"; + + +%feature("docstring") Reaction::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find. + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") Reaction::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") Reaction::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") Reaction::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Reaction::initDefaults " + Initializes the fields of this Reaction object to 'typical' default + values. + + The SBML Reaction component has slightly different aspects and + default attribute values in different SBML Levels and Versions. This + method sets the values to certain common defaults, based mostly on + what they are in SBML Level 2. Specifically: + + * Sets the 'reversible' attribute to True + + * Sets the 'fast' attribute to False + + * Marks the 'fast' attribute as not having been set + + WARNING: + + The 'fast' attribute must be used with care. SBML definitions + before SBML Level 2 Version 2 incorrectly indicated that software + tools could ignore this attribute if they did not implement support + for the corresponding concept; however, further research in SBML has + revealed that this is not true, and 'fast' cannot be ignored if it + is set to True. Beginning with SBML Level 2 Versions 2, the SBML + specifications therefore stipulate that if a model has any reactions + with 'fast' set to true, a software tool must be able to respect the + attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML specifications, + which provides more detail about the conditions under which a + reaction can be considered to be fast in this sense. +"; + + +%feature("docstring") Reaction::getId " + Returns the value of the 'id' attribute of this Reaction. + + Returns the id of this Reaction. +"; + + +%feature("docstring") Reaction::getName " + Returns the value of the 'name' attribute of this Reaction. + + Returns the name of this Reaction. +"; + + +%feature("docstring") Reaction::getKineticLaw " + Returns the KineticLaw object contained in this Reaction. + + Returns the KineticLaw instance. +"; + + +%feature("docstring") Reaction::getReversible " + Returns the value of the 'reversible' attribute on the Reaction as a + boolean value. + + Returns the reversibility status of this Reaction. +"; + + +%feature("docstring") Reaction::getFast " + Returns the value of the 'fast' attribute of this Reaction. + + Returns the 'fast' status of this Reaction. + + WARNING: + + SBML definitions before SBML Level 2 Version 2 incorrectly indicated + that software tools could ignore this attribute if they did not + implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and 'fast' + cannot be ignored if it is set to True. SBML Level 2 Versions 2, 3 + and 4 therefore stipulate that if a model has any reactions with + 'fast' set to True, a software tool must be able to respect the + attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML Level 2 Version + 4 specification, which provides more detail about the conditions + under which a reaction can be considered to be fast in this sense. +"; + + +%feature("docstring") Reaction::getCompartment " + (SBML Level 3 only) Returns the value of the 'compartment' attribute + on the Reaction. + + Returns the compartment of this Reaction. + + Note: + + The 'compartment' attribute is available in SBML Level 3 Version 1 + Core, but is not present on Reaction in lower Levels of SBML. +"; + + +%feature("docstring") Reaction::isSetId " + Predicate returning True if this Reaction's 'id' attribute is set. + + Returns True if the 'id' attribute of this Reaction is set, False + otherwise. +"; + + +%feature("docstring") Reaction::isSetName " + Predicate returning True if this Reaction's 'name' attribute is set. + + Returns True if the 'name' attribute of this Reaction is set, False + otherwise. +"; + + +%feature("docstring") Reaction::isSetKineticLaw " + Predicate returning True if this Reaction contains a kinetic law + object. + + Returns True if a KineticLaw is present in this Reaction,, False + otherwise. +"; + + +%feature("docstring") Reaction::isSetFast " + Predicate returning True if the value of the 'fast' attribute on + this Reaction. + + Returns True if the 'fast' attribute is true, False otherwise. + + WARNING: + + SBML definitions before SBML Level 2 Version 2 incorrectly indicated + that software tools could ignore this attribute if they did not + implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and 'fast' + cannot be ignored if it is set to True. SBML Level 2 Versions 2, 3 + and 4 therefore stipulate that if a model has any reactions with + 'fast' set to True, a software tool must be able to respect the + attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML Level 2 Version + 4 specification, which provides more detail about the conditions + under which a reaction can be considered to be fast in this sense. + Note also that in SBML Level 1, 'fast' is defined as optional with a + default of False, which means it is effectively always set. +"; + + +%feature("docstring") Reaction::isSetCompartment " + Predicate returning True if this Reaction's 'compartment' attribute + is set. + + Returns True if the 'compartment' attribute of this Reaction is set, + False otherwise. + + Note: + + The 'compartment' attribute is available in SBML Level 3 Version 1 + Core, but is not present on Reaction in lower Levels of SBML. +"; + + +%feature("docstring") Reaction::isSetReversible " + Predicate returning True if this Reaction's 'reversible' attribute + is set. + + Returns True if the 'reversible' attribute of this Reaction is set, + False otherwise. +"; + + +%feature("docstring") Reaction::setId " + Sets the value of the 'id' attribute of this Reaction. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + Reaction + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Reaction::setName " + Sets the value of the 'name' attribute of this Reaction. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the Reaction + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Reaction::setKineticLaw " + Sets the 'kineticLaw' subelement of this Reaction to a copy of the + given KineticLaw object. + + Parameter 'kl' is the KineticLaw object to use. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH +"; + + +%feature("docstring") Reaction::setReversible " + Sets the value of the 'reversible' attribute of this Reaction. + + Parameter 'value' is the value of the 'reversible' attribute. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") Reaction::setFast " + Sets the value of the 'fast' attribute of this Reaction. + + Parameter 'value' is the value of the 'fast' attribute. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + WARNING: + + SBML definitions before SBML Level 2 Version 2 incorrectly indicated + that software tools could ignore this attribute if they did not + implement support for the corresponding concept; however, further + research in SBML has revealed that this is not true, and 'fast' + cannot be ignored if it is set to True. SBML Level 2 Versions 2, 3 + and 4 therefore stipulate that if a model has any reactions with + 'fast' set to True, a software tool must be able to respect the + attribute or else indicate to the user that it does not have the + capacity to do so. Readers are directed to the SBML Level 2 Version + 4 specification, which provides more detail about the conditions + under which a reaction can be considered to be fast in this sense. +"; + + +%feature("docstring") Reaction::setCompartment " + Sets the value of the 'compartment' attribute of this Reaction. + + The string 'sid' is copied. + + Parameter 'sid' is the string to use as the compartment of this + Reaction + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The 'compartment' attribute is available in SBML Level 3 Version 1 + Core, but is not present on Reaction in lower Levels of SBML. +"; + + +%feature("docstring") Reaction::unsetName " + Unsets the value of the 'name' attribute of this Reaction. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Reaction::unsetKineticLaw " + Unsets the 'kineticLaw' subelement of this Reaction. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Reaction::unsetFast " + Unsets the value of the 'fast' attribute of this Reaction. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + WARNING: + + In SBML Level 1, 'fast' is optional with a default of false, which + means it is effectively always set (and reset to False if this + method is called). Further, SBML definitions before SBML Level 2 + Version 2 incorrectly indicated that software tools could ignore + this attribute if they did not implement support for the + corresponding concept; however, further research in SBML has revealed + that this is not true, and 'fast' cannot be ignored if it is set to + True. SBML Level 2 Versions 2, 3 and 4 therefore stipulate that if + a model has any reactions with 'fast' set to True, a software tool + must be able to respect the attribute or else indicate to the user + that it does not have the capacity to do so. Readers are directed + to the SBML Level 2 Version 4 specification, which provides more + detail about the conditions under which a reaction can be considered + to be fast in this sense. +"; + + +%feature("docstring") Reaction::unsetCompartment " + Unsets the value of the 'compartment' attribute of this Reaction. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The 'compartment' attribute is available in SBML Level 3 Version 1 + Core, but is not present on Reaction in lower Levels of SBML. +"; + + +%feature("docstring") Reaction::addReactant " + Adds a given SpeciesReference object as a reactant in this Reaction. + + The SpeciesReference instance in 'sr' is copied. + + Parameter 'sr' is a SpeciesReference object referring to a Species in + the enclosing Model + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Reaction. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Reaction. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Reaction.createReactant() for a + method that does not lead to these issues. + + See also createReactant(). +"; + + +%feature("docstring") Reaction::addProduct " + Adds a given SpeciesReference object as a product in this Reaction. + + The SpeciesReference instance in 'sr' is copied. + + Parameter 'sr' is a SpeciesReference object referring to a Species in + the enclosing Model + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Reaction. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Reaction. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Reaction.createProduct() for a + method that does not lead to these issues. + + See also createProduct(). +"; + + +%feature("docstring") Reaction::addModifier " + Adds a given ModifierSpeciesReference object as a product in this + Reaction. + + The ModifierSpeciesReference instance in 'msr' is copied. + + Parameter 'msr' is a ModifierSpeciesReference object referring to a + Species in the enclosing Model + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Reaction. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Reaction. In addition, the caller should make sure + to free the original object if it is no longer being used, or else a + memory leak will result. Please see Reaction.createModifier() for a + method that does not lead to these issues. + + See also createModifier(). +"; + + +%feature("docstring") Reaction::createReactant " + Creates a new SpeciesReference, adds it to this Reaction's list of + reactants, and returns it. + + Returns a new SpeciesReference object. +"; + + +%feature("docstring") Reaction::createProduct " + Creates a new SpeciesReference, adds it to this Reaction's list of + products, and returns it. + + Returns a new SpeciesReference object. +"; + + +%feature("docstring") Reaction::createModifier " + Creates a new ModifierSpeciesReference, adds it to this Reaction's + list of modifiers and returns it. + + Returns a new ModifierSpeciesReference object. +"; + + +%feature("docstring") Reaction::createKineticLaw " + Creates a new KineticLaw object, installs it as this Reaction's + 'kineticLaw' subelement, and returns it. + + If this Reaction had a previous KineticLaw, it will be destroyed. + + Returns the new KineticLaw object +"; + + +%feature("docstring") Reaction::getListOfReactants " + Returns the list of reactants in this Reaction object. + + Returns the ListOfSpeciesReferences containing the references to the + species acting as reactants in this reaction +"; + + +%feature("docstring") Reaction::getListOfProducts " + Returns the list of products in this Reaction object. + + Returns the ListOfSpeciesReferences containing the references to the + species acting as products in this reaction +"; + + +%feature("docstring") Reaction::getListOfModifiers " + Returns the list of modifiers in this Reaction object. + + Returns the ListOfSpeciesReferences containing the references to the + species acting as modifiers in this reaction +"; + + +%feature("docstring") Reaction::getReactant " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getReactant(string species) + + Returns the reactant species (as a SpeciesReference object) having + a specific identifier in this Reaction. + + Parameter 'species' is the identifier of the reactant Species + ('species' attribute of the reactant SpeciesReference object) + + Returns a SpeciesReference object, or None if no species with the + given identifier 'species' appears as a reactant in this Reaction. + + ______________________________________________________________________ + Method variant with the following signature: + + getReactant(long n) + + Returns the nth reactant species (as a SpeciesReference object) in + the list of reactants in this Reaction. + + Callers should first call getNumReactants() to find out how many + reactants there are, to avoid using an invalid index number. + + Parameter 'n' is the index of the reactant sought. + + Returns the nth reactant (as a SpeciesReference object) of this + Reaction. +"; + + +%feature("docstring") Reaction::getProduct " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getProduct(string species) + + Returns the product species (as a SpeciesReference object) having a + specific identifier in this Reaction. + + Parameter 'species' is the identifier of the product Species + ('species' attribute of the product SpeciesReference object) + + Returns a SpeciesReference object, or None if no species with the + given identifier 'species' appears as a product in this Reaction. + + ______________________________________________________________________ + Method variant with the following signature: + + getProduct(long n) + + Returns the nth product species (as a SpeciesReference object) in + the list of products in this Reaction. + + Callers should first call getNumProducts() to find out how many + products there are, to avoid using an invalid index number. + + Parameter 'n' is the index of the product sought. + + Returns the nth product (as a SpeciesReference object) of this + Reaction. +"; + + +%feature("docstring") Reaction::getModifier " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getModifier(string species) + + Returns the modifier species (as a ModifierSpeciesReference object) + having a specific identifier in this Reaction. + + Parameter 'species' is the identifier of the modifier Species + ('species' attribute of the ModifierSpeciesReference object) + + Returns a ModifierSpeciesReference object, or None if no species with + the given identifier 'species' appears as a modifier in this + Reaction. + + ______________________________________________________________________ + Method variant with the following signature: + + getModifier(long n) + + Returns the nth modifier species (as a ModifierSpeciesReference + object) in the list of modifiers of this Reaction. + + Callers should first call getNumModifiers() to find out how many + modifiers there are, to avoid using an invalid index number. + + Parameter 'n' is the index of the modifier species sought + + Returns the nth modifier (as a ModifierSpeciesReference object) of + this Reaction. +"; + + +%feature("docstring") Reaction::getNumReactants " + Returns the number of reactant species in this Reaction. + + Returns the number of reactants in this Reaction. +"; + + +%feature("docstring") Reaction::getNumProducts " + Returns the number of product species in this Reaction. + + Returns the number of products in this Reaction. +"; + + +%feature("docstring") Reaction::getNumModifiers " + Returns the number of modifier species in this Reaction. + + Returns the number of modifiers in this Reaction. +"; + + +%feature("docstring") Reaction::removeReactant " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeReactant(string species) + + Removes the reactant species (SpeciesReference object) having the + given 'species' attribute in this Reaction and returns a pointer + to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'species' is the 'species' attribute of the reactant + SpeciesReference object + + Returns the removed reactant SpeciesReference object, or None if no + reactant SpeciesReference object with the given 'species' attribute + 'species' exists in this Reaction. + + ______________________________________________________________________ + Method variant with the following signature: + + removeReactant(long n) + + Removes the nth reactant species (SpeciesReference object) in the + list of reactants in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. The caller should first call getNumReactants() to find out how + many reactants there are, to avoid using an invalid index number. + + Parameter 'n' is the index of the reactant SpeciesReference object to + remove + + Returns the removed reactant SpeciesReference object, or None if the + given index is out of range. +"; + + +%feature("docstring") Reaction::removeProduct " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeProduct(string species) + + Removes the product species (SpeciesReference object) having the + given 'species' attribute in this Reaction and returns a pointer + to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'species' is the 'species' attribute of the product + SpeciesReference object + + Returns the removed product SpeciesReference object, or None if no + product SpeciesReference object with the given 'species' attribute + 'species' exists in this Reaction. + + ______________________________________________________________________ + Method variant with the following signature: + + removeProduct(long n) + + Removes the nth product species (SpeciesReference object) in the list + of products in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. The caller should first call getNumProducts() to find out how + many products there are, to avoid using an invalid index number. + + Parameter 'n' is the index of the product SpeciesReference object to + remove + + Returns the removed product SpeciesReference object, or None if the + given index is out of range. +"; + + +%feature("docstring") Reaction::removeModifier " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeModifier(string species) + + Removes the modifier species (ModifierSpeciesReference object) having + the given 'species' attribute in this Reaction and returns a pointer + to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'species' is the 'species' attribute of the + ModifierSpeciesReference object + + Returns the removed ModifierSpeciesReference object, or None if no + ModifierSpeciesReference object with the given 'species' attribute + 'species' exists in this Reaction. + + ______________________________________________________________________ + Method variant with the following signature: + + removeModifier(long n) + + Removes the nth modifier species (ModifierSpeciesReference object) in + the list of modifiers in this Reaction and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. The caller should first call getNumModifiers() to find out how + many modifiers there are, to avoid using an invalid index number. + + Parameter 'n' is the index of the ModifierSpeciesReference object to + remove + + Returns the removed ModifierSpeciesReference object, or None if the + given index is out of range. +"; + + +%feature("docstring") Reaction::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") Reaction::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") Reaction::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") Reaction::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Reaction::getElementName " + Returns the XML element name of this object, which for Reaction, is + always 'reaction'. + + Returns the name of this element, i.e., 'reaction'. +"; + + +%feature("docstring") Reaction::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Reaction::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Reaction object have been set. + + Note: + + The required attributes for a Reaction object are: + + * 'id' (or 'name' in SBML Level 1) + + * 'fast' (in Level 3 only, where it is defined as a required + attribute) + + * 'reversible' (in Level 3 only, where it is defined as a required + attribute) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Reaction::createObject " + Internal implementation method. +"; + + +%feature("docstring") Reaction::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Reaction::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Reaction::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") Reaction::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Reaction::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Reaction::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Reaction::isExplicitlySetReversible " + Internal implementation method. +"; + + +%feature("docstring") Reaction::isExplicitlySetFast " + Internal implementation method. +"; + + +%feature("docstring") ListOfReactions::ListOfReactions " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfReactions(SBMLNamespaces sbmlns) + + Creates a new ListOfReactions object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfReactions object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfReactions(long level, long version) + + Creates a new ListOfReactions object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfReactions::clone " + Creates and returns a deep copy of this ListOfReactions instance. + + Returns a (deep) copy of this ListOfReactions. +"; + + +%feature("docstring") ListOfReactions::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfReactions::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Reaction objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfReactions::getElementName " + Returns the XML element name of this object + + For ListOfReactions, the XML element name is 'listOfReactions'. + + Returns the name of this element, i.e., 'listOfReactions'. +"; + + +%feature("docstring") ListOfReactions::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a Reaction from the ListOfReactions. + + Parameter 'n' is the index number of the Reaction to get. + + Returns the nth Reaction in this ListOfReactions. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfReactions::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfReactions items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfReactions items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfReactions::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfReactions::createObject " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw " + @ingroup Core Implementation of SBML's KineticLaw construct. + + An object of class KineticLaw is used to describe the rate at which + the process defined by a given Reaction takes place. KineticLaw has + subelements called 'math' (for MathML content) and 'listOfParameters' + (of class ListOfParameters), in addition to the attributes and + subelements it inherits from SBase. + + KineticLaw's 'math' subelement for holding a MathML formula defines + the rate of the reaction. The formula may refer to other entities + in a model as well as local parameter definitions within the scope + of the Reaction (see below). It is important to keep in mind, + however, that the only Species identifiers that can be used in this + formula are those declared in the lists of reactants, products and + modifiers in the Reaction structure. (In other words, before a + species can be referenced in the KineticLaw, it must be declared in + one of those lists.) + + KineticLaw provides a way to define local parameters whose + identifiers can be used in the 'math' formula of that KineticLaw + instance. Prior to SBML Level 3, these parameter definitions are + stored inside a 'listOfParameters' subelement containing Parameter + objects; in SBML Level 3, this is achieved using a specialized + object class called LocalParameter and the containing subelement is + called 'listOfLocalParameters'. In both cases, the parameters so + defined are only visible within the KineticLaw; they cannot be + accessed outside. A local parameter within one reaction is not + visible from within another reaction, nor is it visible to any other + construct outside of the KineticLaw in which it is defined. In + addition, another important feature is that if such a Parameter (or + in Level 3, LocalParameter) object has the same identifier as + another object in the scope of the enclosing Model, the definition + inside the KineticLaw takes precedence. In other words, within the + KineticLaw's 'math' formula, references to local parameter + identifiers <strong>shadow any identical global + identifiers</strong>. + + The values of local parameters defined within KineticLaw objects + cannot change. In SBML Level 3, this quality is built into the + LocalParameter construct. In Level 2, where the same kind of + Parameter object class is used as for global parameters, the + Parameter objects' 'constant' attribute must always have a value of + True (either explicitly or left to its default value). + + A warning about identifier shadowing + ====================================================================== + + A common misconception is that different classes of objects (e.g., + species, compartments, parameters) in SBML have different identifier + scopes. They do not. The implication is that if a KineticLaw's + local parameter definition uses an identifier identical to any other + identifier defined in the model outside the KineticLaw, even if the + other identifier does not belong to a parameter type of object, the + local parameter's identifier takes precedence within that + KineticLaw's 'math' formula. It is not an error in SBML for + identifiers to shadow each other this way, but can lead to confusing + and subtle errors. + + SBML Level/Version differences + ====================================================================== + + In SBML Level 2 Version 1, the SBML specification included two + additional attributes on KineticLaw called 'substanceUnits' and + 'timeUnits'. They were removed beginning with SBML Level 2 Version + 2 because further research determined they introduced many problems. + The most significant problem was that their use could easily lead to + the creation of valid models whose reactions nevertheless could not + be integrated into a system of equations without outside knowledge + for converting the quantities used. Examination of real-life models + revealed that a common reason for using 'substanceUnits' on + KineticLaw was to set the units of all reactions to the same set of + substance units, something that is better achieved by using + UnitDefinition to redefine 'substance' for the whole Model. + + As mentioned above, in SBML Level 2 Versions 2-4, local parameters + are of class Parameter. In SBML Level 3, the class of object is + LocalParameter. +"; + + +%feature("docstring") KineticLaw::KineticLaw " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + KineticLaw(SBMLNamespaces sbmlns) + + Creates a new KineticLaw using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a KineticLaw object to an SBMLDocument (e.g., + using Reaction.setKineticLaw()), the SBML XML namespace of the + document overrides the value used when creating the KineticLaw + object via this constructor. This is necessary to ensure that an + SBML document is a consistent structure. Nevertheless, the ability + to supply the values at the time of creation of a KineticLaw is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + KineticLaw(long level, long version) + + Creates a new KineticLaw using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + KineticLaw + + Parameter 'version' is a long integer, the SBML Version to assign to + this KineticLaw + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a KineticLaw object to an SBMLDocument (e.g., + using Reaction.setKineticLaw()), the SBML Level, SBML Version and + XML namespace of the document override the values used when creating + the KineticLaw object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a KineticLaw is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + KineticLaw(KineticLaw orig) + + Copy constructor; creates a copy of this KineticLaw. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") KineticLaw::accept " + Accepts the given SBMLVisitor for this instance of KineticLaw. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") KineticLaw::clone " + Creates and returns a deep copy of this KineticLaw object. + + Returns a (deep) copy of this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find. + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") KineticLaw::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") KineticLaw::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") KineticLaw::getFormula " + Returns the mathematical formula for this KineticLaw object and + return it as as a text string. + + This is fundamentally equivalent to getMath(). This variant is + provided principally for compatibility compatibility with SBML Level + 1. + + Returns a string representing the formula of this KineticLaw. + + Note: + + SBML Level 1 uses a text-string format for mathematical formulas. + SBML Level 2 uses MathML, an XML format for representing + mathematical expressions. LibSBML provides an Abstract Syntax Tree + API for working with mathematical expressions; this API is more + powerful than working with formulas directly in text form, and ASTs + can be translated into either MathML or the text-string syntax. The + libSBML methods that accept text-string formulas directly (such as + this constructor) are provided for SBML Level 1 compatibility, but + developers are encouraged to use the AST mechanisms. + + See also getMath(). +"; + + +%feature("docstring") KineticLaw::getMath " + Returns the mathematical formula for this KineticLaw object and + return it as as an AST. + + This is fundamentally equivalent to getFormula(). The latter is + provided principally for compatibility compatibility with SBML Level + 1, which represented mathematical formulas in text-string form. + + Returns the ASTNode representation of the mathematical formula. + + See also getFormula(). +"; + + +%feature("docstring") KineticLaw::getTimeUnits " + (SBML Level 2 Version 1 only) Returns the value of the 'timeUnits' + attribute of this KineticLaw object. + + Returns the 'timeUnits' attribute value. + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::getSubstanceUnits " + (SBML Level 2 Version 1 only) Returns the value of the + 'substanceUnits' attribute of this KineticLaw object. + + Returns the 'substanceUnits' attribute value. + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::isSetFormula " + Predicate returning True if this KineticLaw's 'formula' attribute is + set. + + This is functionally identical to the method isSetMath(). It is + provided in order to mirror the parallel between getFormula()@~ and + getMath(). + + Returns True if the formula (meaning the math subelement) of this + KineticLaw is set, False otherwise. + + Note: + + SBML Level 1 uses a text-string format for mathematical formulas. + SBML Level 2 uses MathML, an XML format for representing + mathematical expressions. LibSBML provides an Abstract Syntax Tree + API for working with mathematical expressions; this API is more + powerful than working with formulas directly in text form, and ASTs + can be translated into either MathML or the text-string syntax. The + libSBML methods that accept text-string formulas directly (such as + this constructor) are provided for SBML Level 1 compatibility, but + developers are encouraged to use the AST mechanisms. + + See also isSetMath(). +"; + + +%feature("docstring") KineticLaw::isSetMath " + Predicate returning True if this Kinetic's 'math' subelement is set. + + This is identical to the method isSetFormula(). It is provided in + order to mirror the parallel between getFormula()@~ and getMath(). + + Returns True if the formula (meaning the math subelement) of this + KineticLaw is set, False otherwise. + + See also isSetFormula(). +"; + + +%feature("docstring") KineticLaw::isSetTimeUnits " + (SBML Level 2 Version 1 only) Predicate returning True if this + SpeciesReference's 'timeUnits' attribute is set. + + Returns True if the 'timeUnits' attribute of this KineticLaw object + is set, False otherwise. + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::isSetSubstanceUnits " + (SBML Level 2 Version 1 only) Predicate returning True if this + SpeciesReference's 'substanceUnits' attribute is set. + + Returns True if the 'substanceUnits' attribute of this KineticLaw + object is set, False otherwise. + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::setFormula " + Sets the mathematical expression of this KineticLaw instance to the + given 'formula'. + + The given 'formula' string is copied. Internally, libSBML stores the + mathematical expression as an ASTNode. + + Parameter 'formula' is the mathematical expression to use, + represented in text-string form. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + SBML Level 1 uses a text-string format for mathematical formulas. + SBML Level 2 uses MathML, an XML format for representing + mathematical expressions. LibSBML provides an Abstract Syntax Tree + API for working with mathematical expressions; this API is more + powerful than working with formulas directly in text form, and ASTs + can be translated into either MathML or the text-string syntax. The + libSBML methods that accept text-string formulas directly (such as + this constructor) are provided for SBML Level 1 compatibility, but + developers are encouraged to use the AST mechanisms. + + See also setMath(). +"; + + +%feature("docstring") KineticLaw::setMath " + Sets the mathematical expression of this KineticLaw instance to a + copy of the given ASTNode. + + This is fundamentally identical to getFormula(). The latter is + provided principally for compatibility compatibility with SBML Level + 1, which represented mathematical formulas in text-string form. + + Parameter 'math' is an ASTNode representing a formula tree. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + See also setFormula(). +"; + + +%feature("docstring") KineticLaw::setTimeUnits " + (SBML Level 2 Version 1 only) Sets the 'timeUnits' attribute of this + KineticLaw object to a copy of the identifier in 'sid'. + + Parameter 'sid' is the identifier of the units to use. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::setSubstanceUnits " + (SBML Level 2 Version 1 only) Sets the 'substanceUnits' attribute of + this KineticLaw object to a copy of the identifier given in 'sid'. + + Parameter 'sid' is the identifier of the units to use. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::unsetTimeUnits " + (SBML Level 2 Version 1 only) Unsets the 'timeUnits' attribugte of + this KineticLaw object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::unsetSubstanceUnits " + (SBML Level 2 Version 1 only) Unsets the 'substanceUnits' attribute + of this KineticLaw object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attributes 'timeUnits' and 'substanceUnits' are present only in + SBML Level 2 Version 1. In SBML Level 2 Version 2, the 'timeUnits' + and 'substanceUnits' attributes were removed. For compatibility + with new versions of SBML, users are cautioned to avoid these + attributes. +"; + + +%feature("docstring") KineticLaw::addParameter " + Adds a copy of the given Parameter object to the list of local + parameters in this KineticLaw. + + Parameter 'p' is the Parameter to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this KineticLaw. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the KineticLaw. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see createParameter()@~ for + a method that does not lead to these issues. + + See also createParameter(). +"; + + +%feature("docstring") KineticLaw::addLocalParameter " + Adds a copy of the given LocalParameter object to the list of local + parameters in this KineticLaw. + + Parameter 'p' is the LocalParameter to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this KineticLaw. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the KineticLaw. In addition, the caller should make + sure to free the original object if it is no longer being used, or + else a memory leak will result. Please see createParameter()@~ for + a method that does not lead to these issues. + + See also createLocalParameter(). +"; + + +%feature("docstring") KineticLaw::createParameter " + Creates a new Parameter object, adds it to this KineticLaw's list of + local parameters, and returns the Parameter object created. + + Returns a new Parameter object instance + + See also addParameter(). +"; + + +%feature("docstring") KineticLaw::createLocalParameter " + Creates a new LocalParameter object, adds it to this KineticLaw's + list of local parameters, and returns the LocalParameter object + created. + + Returns a new LocalParameter object instance + + See also addLocalParameter(). +"; + + +%feature("docstring") KineticLaw::getListOfParameters " + Returns the list of local parameters in this KineticLaw object. + + Returns the list of Parameters for this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getListOfLocalParameters " + Returns the list of local parameters in this KineticLaw object. + + Returns the list of LocalParameters for this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getParameter(long n) + + Returns the nth Parameter object in the list of local parameters in + this KineticLaw instance. + + Parameter 'n' is the index of the Parameter object sought + + Returns the nth Parameter of this KineticLaw. + + ______________________________________________________________________ + Method variant with the following signature: + + getParameter(string sid) + + Returns a local parameter based on its identifier. + + Parameter 'sid' is the identifier of the Parameter being sought. + + Returns the Parameter object in this KineticLaw instace having the + given 'id', or None if no such Parameter exists. +"; + + +%feature("docstring") KineticLaw::getLocalParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getLocalParameter(long n) + + Returns the nth LocalParameter object in the list of local parameters + in this KineticLaw instance. + + Parameter 'n' is the index of the LocalParameter object sought + + Returns the nth LocalParameter of this KineticLaw. + + ______________________________________________________________________ + Method variant with the following signature: + + getLocalParameter(string sid) + + Returns a local parameter based on its identifier. + + Parameter 'sid' is the identifier of the LocalParameter being sought. + + Returns the LocalParameter object in this KineticLaw instace having + the given 'id', or None if no such LocalParameter exists. +"; + + +%feature("docstring") KineticLaw::getNumParameters " + Returns the number of local parameters in this KineticLaw instance. + + Returns the number of Parameters in this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getNumLocalParameters " + Returns the number of local parameters in this KineticLaw instance. + + Returns the number of LocalParameters in this KineticLaw. +"; + + +%feature("docstring") KineticLaw::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units of + measurement assumed for the 'math' expression of this KineticLaw. + + The units are calculated based on the mathematical expression in the + KineticLaw and the model quantities referenced by <ci> elements used + within that expression. The getDerivedUnitDefinition()@~ method + returns the calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + WARNING: + + Note that it is possible the 'math' expression in the KineticLaw + contains pure numbers or parameters with undeclared units. In those + cases, it is not possible to calculate the units of the overall + expression without making assumptions. LibSBML does not make + assumptions about the units, and getDerivedUnitDefinition()@~ only + returns the units as far as it is able to determine them. For + example, in an expression X + Y, if X has unambiguously-defined + units and Y does not, it will return the units of X. <strong>It is + important that callers also invoke the method</strong> + containsUndeclaredUnits()@~ <strong>to determine whether this + situation holds</strong>. Callers may wish to take suitable actions + in those scenarios. + + Returns a UnitDefinition that expresses the units of the math + expression of this KineticLaw, or None if one cannot be constructed. + + See also containsUndeclaredUnits(). +"; + + +%feature("docstring") KineticLaw::containsUndeclaredUnits " + Predicate returning True if the math expression of this KineticLaw + contains parameters/numbers with undeclared units. + + Returns True if the math expression of this KineticLaw includes + parameters/numbers with undeclared units, False otherwise. + + Note: + + A return value of True indicates that the UnitDefinition returned by + getDerivedUnitDefinition()@~ may not accurately represent the units + of the expression. + + See also getDerivedUnitDefinition(). +"; + + +%feature("docstring") KineticLaw::removeParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeParameter(long n) + + Removes the nth Parameter object in the list of local parameters in + this KineticLaw instance and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the Parameter object to remove + + Returns the Parameter object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeParameter(string sid) + + Removes a Parameter object with the given identifier in the list of + local parameters in this KineticLaw instance and returns a pointer to + it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'sid' is the identifier of the Parameter to remove + + Returns the Parameter object removed. As mentioned above, the + caller owns the returned object. None is returned if no Parameter + object with the identifier exists in this KineticLaw instance. +"; + + +%feature("docstring") KineticLaw::removeLocalParameter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeLocalParameter(long n) + + Removes the nth LocalParameter object in the list of local parameters + in this KineticLaw instance and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the LocalParameter object to remove + + Returns the LocalParameter object removed. As mentioned above, the + caller owns the returned item. None is returned if the given index + is out of range. + + ______________________________________________________________________ + Method variant with the following signature: + + removeLocalParameter(string sid) + + Removes a LocalParameter object with the given identifier in the list + of local parameters in this KineticLaw instance and returns a + pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'sid' is the identifier of the LocalParameter to remove + + Returns the LocalParameter object removed. As mentioned above, the + caller owns the returned object. None is returned if no + LocalParameter object with the identifier exists in this KineticLaw + instance. +"; + + +%feature("docstring") KineticLaw::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") KineticLaw::getElementName " + Returns the XML element name of this object, which for Species, is + always 'kineticLaw'. + + Returns the name of this element, i.e., 'kineticLaw'. +"; + + +%feature("docstring") KineticLaw::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::writeElements " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + KineticLaw object have been set. + + Note: + + The required attributes for a KineticLaw object are: + + * 'formula' (SBML Level 1 only) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") KineticLaw::hasRequiredElements " + Predicate returning True if all the required elements for this + KineticLaw object have been set. + + Note: + + The required elements for a KineticLaw object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") KineticLaw::removeFromParentAndDelete " + Finds this KineticLaw's Reaction parent and calls unsetKineticLaw() + on it, indirectly deleting itself. Overridden from the SBase + function since the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") KineticLaw::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") KineticLaw::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") KineticLaw::getInternalId " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::setInternalId " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::divideAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::multiplyAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::createObject " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") KineticLaw::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference " + @ingroup Core Implementation of SBML's SimpleSpeciesReference + construct. + + As mentioned in the description of Reaction, every species that + enters into a given reaction must appear in that reaction's lists of + reactants, products and/or modifiers. In an SBML model, all species + that may participate in any reaction are listed in the + 'listOfSpecies' element of the top-level Model object. Lists of + products, reactants and modifiers in Reaction objects do not + introduce new species, but rather, they refer back to those listed + in the model's top-level 'listOfSpecies'. For reactants and + products, the connection is made using SpeciesReference objects; for + modifiers, it is made using ModifierSpeciesReference objects. + SimpleSpeciesReference is an abstract type that serves as the parent + class of both SpeciesReference and ModifierSpeciesReference. It is + used simply to hold the attributes and elements that are common to + the latter two structures. + + The SimpleSpeciesReference structure has a mandatory attribute, + 'species', which must be a text string conforming to the identifer + syntax permitted in SBML. This attribute is inherited by the + SpeciesReference and ModifierSpeciesReference subclasses derived from + SimpleSpeciesReference. The value of the 'species' attribute must be + the identifier of a species defined in the enclosing Model. The + species is thereby declared as participating in the reaction being + defined. The precise role of that species as a reactant, product, + or modifier in the reaction is determined by the subclass of + SimpleSpeciesReference (i.e., either SpeciesReference or + ModifierSpeciesReference) in which the identifier appears. + + SimpleSpeciesReference also contains an optional attribute, 'id', + allowing instances to be referenced from other structures. No SBML + structures currently do this; however, such structures are + anticipated in future SBML Levels. +"; + + +%feature("docstring") SimpleSpeciesReference::SimpleSpeciesReference " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SimpleSpeciesReference(long level, long version) + + Creates a new SimpleSpeciesReference using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + SimpleSpeciesReference + + Parameter 'version' is a long integer, the SBML Version to assign to + this SimpleSpeciesReference + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + ______________________________________________________________________ + Method variant with the following signature: + + SimpleSpeciesReference(SimpleSpeciesReference orig) + + Copy constructor; creates a copy of this SimpleSpeciesReference. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") SimpleSpeciesReference::accept " + Accepts the given SBMLVisitor. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") SimpleSpeciesReference::getId " + Returns the value of the 'id' attribute of this + SimpleSpeciesReference. + + Returns the id of this SimpleSpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::getName " + Returns the value of the 'name' attribute of this + SimpleSpeciesReference. + + Returns the name of this SimpleSpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::getSpecies " + Get the value of the 'species' attribute. + + Returns the value of the attribute 'species' for this + SimpleSpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::isSetId " + Predicate returning True if this SimpleSpeciesReference's 'id' + attribute is set. + + Returns True if the 'id' attribute of this SimpleSpeciesReference is + set, False otherwise. +"; + + +%feature("docstring") SimpleSpeciesReference::isSetName " + Predicate returning True if this SimpleSpeciesReference's 'name' + attribute is set. + + Returns True if the 'name' attribute of this SimpleSpeciesReference + is set, False otherwise. +"; + + +%feature("docstring") SimpleSpeciesReference::isSetSpecies " + Predicate returning True if this SimpleSpeciesReference's 'species' + attribute is set. + + Returns True if the 'species' attribute of this + SimpleSpeciesReference is set, False otherwise. +"; + + +%feature("docstring") SimpleSpeciesReference::setSpecies " + Sets the 'species' attribute of this SimpleSpeciesReference. + + The identifier string passed in 'sid' is copied. + + Parameter 'sid' is the identifier of a species defined in the + enclosing Model's ListOfSpecies. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SimpleSpeciesReference::setId " + Sets the value of the 'id' attribute of this SimpleSpeciesReference. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + SimpleSpeciesReference + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") SimpleSpeciesReference::setName " + Sets the value of the 'name' attribute of this + SimpleSpeciesReference. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the SimpleSpeciesReference + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") SimpleSpeciesReference::unsetId " + Unsets the value of the 'id' attribute of this + SimpleSpeciesReference. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SimpleSpeciesReference::unsetName " + Unsets the value of the 'name' attribute of this + SimpleSpeciesReference. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SimpleSpeciesReference::isModifier " + Predicate returning True if this is a ModifierSpeciesReference. + + Returns True if this SimpleSpeciesReference's subclass is + ModiferSpeciesReference, False if it is a plain SpeciesReference. +"; + + +%feature("docstring") SimpleSpeciesReference::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") SimpleSpeciesReference::hasRequiredAttributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") SimpleSpeciesReference::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference " + @ingroup Core Implementation of SBML's SpeciesReference construct. + + The Reaction structure provides a way to express which species act as + reactants and which species act as products in a reaction. In a + given reaction, references to those species acting as reactants + and/or products are made using instances of SpeciesReference + structures in a Reaction object's lists of reactants and products. + + A species can occur more than once in the lists of reactants and + products of a given Reaction instance. The effective stoichiometry + for a species in a reaction is the sum of the stoichiometry values + given on the SpeciesReference object in the list of products minus + the sum of stoichiometry values given on the SpeciesReference + objects in the list of reactants. A positive value indicates the + species is effectively a product and a negative value indicates the + species is effectively a reactant. SBML places no restrictions on + the effective stoichiometry of a species in a reaction; for example, + it can be zero. In the following SBML fragment, the two reactions + have the same effective stoichiometry for all their species: + + <reaction id=\'x\'> + <listOfReactants> + <speciesReference species=\'a\'/> + <speciesReference species=\'a\'/> + <speciesReference species=\'b\'/> + </listOfReactants> + <listOfProducts> + <speciesReference species=\'c\'/> + <speciesReference species=\'b\'/> + </listProducts> + </reaction> + <reaction id=\'y\'> + <listOfReactants> + <speciesReference species=\'a\' stoichiometry=\'2\'/> + </listOfReactants> + <listOfProducts> + <speciesReference species=\'c\'/> + </listProducts> + </reaction> + + The precise structure of SpeciesReference differs between SBML Level + 2 and Level 3. We discuss the two variants in separate sections + below. + + SpeciesReference in SBML Level 2 + ====================================================================== + + The mandatory 'species' attribute of SpeciesReference must have as + its value the identifier of an existing species defined in the + enclosing Model. The species is thereby designated as a reactant or + product in the reaction. Which one it is (i.e., reactant or + product) is indicated by whether the SpeciesReference appears in the + Reaction's 'reactant' or 'product' lists. + + Product and reactant stoichiometries can be specified using either + 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. + The 'stoichiometry' attribute is of type double and should contain + values greater than zero (0). The 'stoichiometryMath' element is + implemented as an element containing a MathML expression. These two + are mutually exclusive; only one of 'stoichiometry' or + 'stoichiometryMath' should be defined in a given SpeciesReference + instance. When neither the attribute nor the element is present, + the value of 'stoichiometry' in the SpeciesReference instance + defaults to 1. + + For maximum interoperability, the 'stoichiometry' attribute should be + used in preference to 'stoichiometryMath' when a species' + stoichiometry is a simple scalar number (integer or decimal). When + the stoichiometry is a rational number, or when it is a more + complicated formula, 'stoichiometryMath' must be used. The MathML + expression in 'stoichiometryMath' may also refer to identifiers of + entities in a model (except reaction identifiers). However, the + only species identifiers that can be used in 'stoichiometryMath' are + those referenced in the Reaction list of reactants, products and + modifiers. + + The following is a simple example of a species reference for species + X0, with stoichiometry 2, in a list of reactants within a reaction + having the identifier J1: + + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\' stoichiometry=\'2\'> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + + The following is a more complex example of a species reference for + species X0, with a stoichiometry formula consisting of the parameter + x: + + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\'> + <stoichiometryMath> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <ci>x</ci> + </math> + </stoichiometryMath> + </speciesReference> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + + SpeciesReference in SBML Level 3 + ====================================================================== + + In Level 2's definition of a reaction, the stoichiometry attribute of + a SpeciesReference is actually a combination of two factors, the + standard biochemical stoichiometry and a conversion factor that may + be needed to translate the units of the species quantity to the + units of the reaction rate. Unfortunately, Level 2 offers no direct + way of decoupling these two factors, or for explicitly indicating + the units. The only way to do it in Level 2 is to use the + StoichiometryMath object associated with SpeciesReferences, and to + reference SBML Parameter objects from within the StoichiometryMath + formula. This works because Parameter offers a way to attach units + to a numerical value, but the solution is indirect and awkward for + something that should be a simple matter. Moreover, the question of + how to properly encode stoichiometries in SBML reactions has caused + much confusion among implementors of SBML software. + + SBML Level 3 approaches this problem differently. It (1) extends + the the use of the SpeciesReference identifier to represent the value + of the 'stoichiometry' attribute, (2) makes the 'stoichiometry' + attribute optional, (3) removes StoichiometryMath, and (4) adds a + new 'constant' boolean attribute on SpeciesReference. + + As in Level 2, the 'stoichiometry' attribute is of type double and + should contain values greater than zero (0). A missing + 'stoichiometry' implies that the stoichiometry is either unknown, or + to be obtained from an external source, or determined by an + InitialAssignment object or other SBML construct elsewhere in the + model. + + A species reference's stoichiometry is set by its 'stoichiometry' + attribute exactly once. If the SpeciesReference object's 'constant' + attribute has the value True, then the stoichiometry is fixed and + cannot be changed except by an InitialAssignment object. These two + methods of setting the stoichiometry (i.e., using 'stoichiometry' + directly, or using InitialAssignment) differ in that the + 'stoichiometry' attribute can only be set to a literal floating- + point number, whereas InitialAssignment allows the value to be set + using an arbitrary mathematical expression. (As an example, the + approach could be used to set the stoichiometry to a rational number + of the form p/q, where p and q are integers, something that is + occasionally useful in the context of biochemical reaction + networks.) If the species reference's 'constant' attribute has the + value False, the species reference's value may be overridden by an + InitialAssignment or changed by AssignmentRule or AlgebraicRule, and + in addition, for simulation time t > 0, it may also be changed by a + RateRule or Event objects. (However, some of these constructs are + mutually exclusive; see the SBML Level 3 Version 1 Core specifiation + for more details.) It is not an error to define 'stoichiometry' on + a species reference and also redefine the stoichiometry using an + InitialAssignment, but the 'stoichiometry' attribute in that case is + ignored. + + The value of the 'id' attribute of a SpeciesReference can be used as + the content of a <ci> element in MathML formulas elsewhere in the + model. When the identifier appears in a MathML <ci> element, it + represents the stoichiometry of the corresponding species in the + reaction where the SpeciesReference object instance appears. More + specifically, it represents the value of the 'stoichiometry' + attribute on the SpeciesReference object. + + In SBML Level 3, the unit of measurement associated with the value of + a species' stoichiometry is always considered to be dimensionless. + This has the following implications: + + + * When a species reference's identifier appears in mathematical + formulas elsewhere in the model, the unit associated with that value + is dimensionless. + + * The units of the 'math' elements of AssignmentRule, + InitialAssignment and EventAssignment objects setting the + stoichiometry of the species reference should be dimensionless. + + * If a species reference's identifier is the subject of a RateRule, + the unit associated with the RateRule object's value should be + dimensionless/time, where time is the model-wide unit of time set on + the Model object. +"; + + +%feature("docstring") ListOfSpeciesReferences " + @ingroup Core Implementation of SBML's ListOfSpeciesReferences + construct. + + The ListOfSpeciesReferences class is used to store lists of reactants + and products in a Reaction object. + + As with the various other ListOf___ classes in SBML, the + ListOfSpeciesReferences is merely a container used for organizing + instances of other objects, in this case SpeciesReference objects. + ListOfSpeciesReferences is derived from the abstract class SBase, and + inherit the various attributes and subelements of SBase, such as + 'metaid' as and 'annotation'. The ListOf___ classes do not add any + attributes of their own. +"; + + +%feature("docstring") SpeciesReference::SpeciesReference " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SpeciesReference(SBMLNamespaces sbmlns) + + Creates a new SpeciesReference using the given SBMLNamespaces object + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Note: + + Upon the addition of a SpeciesReference object to a Model (e.g., + using Reaction.addReactant() or Reaction.addProduct()), the SBML + Level, SBML Version and XML namespace of the document override the + values used when creating the SpeciesReference object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a SpeciesReference is an important + aid to producing valid SBML. Knowledge of the intented SBML Level + and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + SpeciesReference(long level, long version) + + Creates a new SpeciesReference using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + SpeciesReference + + Parameter 'version' is a long integer, the SBML Version to assign to + this SpeciesReference + + Note: + + Upon the addition of a SpeciesReference object to a Model (e.g., + using Reaction.addReactant() or Reaction.addProduct()), the SBML + Level, SBML Version and XML namespace of the document override the + values used when creating the SpeciesReference object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a SpeciesReference is an important + aid to producing valid SBML. Knowledge of the intented SBML Level + and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add an object to an + existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + SpeciesReference(SpeciesReference orig) + + Copy constructor; creates a copy of this SpeciesReference. + + Parameter 'orig' is the SpeciesReference instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") SpeciesReference::accept " + Accepts the given SBMLVisitor. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") SpeciesReference::clone " + Creates and returns a deep copy of this SpeciesReference instance. + + Returns a (deep) copy of this SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::initDefaults " + Initializes the fields of this SpeciesReference object to 'typical' + default values. + + The SBML SpeciesReference component has slightly different aspects + and default attribute values in different SBML Levels and Versions. + This method sets the values to certain common defaults, based mostly + on what they are in SBML Level 2. Specifically: + + * Sets attribute 'stoichiometry' to 1.0 + + * (Applies to Level 1 models only) Sets attribute 'denominator' to + 1 + + See also getDenominator(), setDenominator(), getStoichiometry(), + setStoichiometry(), getStoichiometryMath(), setStoichiometryMath(). +"; + + +%feature("docstring") SpeciesReference::getStoichiometry " + Get the value of the 'stoichiometry' attribute. + + In SBML Level 2, product and reactant stoichiometries can be + specified using either 'stoichiometry' or 'stoichiometryMath' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The 'stoichiometry' + attribute is of type double and should contain values greater than + zero (0). The 'stoichiometryMath' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of 'stoichiometry' in + the SpeciesReference instance defaults to 1. For maximum + interoperability between different software tools, the + 'stoichiometry' attribute should be used in preference to + 'stoichiometryMath' when a species' stoichiometry is a simple scalar + number (integer or decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the 'stoichiometry' attribute. + + Returns the value of the (scalar) 'stoichiometry' attribute of this + SpeciesReference. + + See also getStoichiometryMath(). +"; + + +%feature("docstring") SpeciesReference::getStoichiometryMath " + Get the content of the 'stoichiometryMath' subelement as an ASTNode + tree. + + The 'stoichiometryMath' element exists only in SBML Level 2. There, + product and reactant stoichiometries can be specified using either + 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. + The former is to be used when a stoichiometry is simply a scalar + number, while the latter is for occasions when it needs to be a + rational number or it needs to reference other mathematical + expressions. The 'stoichiometry' attribute is of type double and + should contain values greater than zero (0). The + 'stoichiometryMath' element is implemented as an element containing + a MathML expression. These two are mutually exclusive; only one of + 'stoichiometry' or 'stoichiometryMath' should be defined in a given + SpeciesReference instance. When neither the attribute nor the + element is present, the value of 'stoichiometry' in the + SpeciesReference instance defaults to 1. For maximum + interoperability between different software tools, the + 'stoichiometry' attribute should be used in preference to + 'stoichiometryMath' when a species' stoichiometry is a simple scalar + number (integer or decimal). + + Returns the content of the 'stoichiometryMath' subelement of this + SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::getDenominator " + Get the value of the 'denominator' attribute, for the case of a + rational-numbered stoichiometry or a model in SBML Level 1. + + The 'denominator' attribute is only actually written out in the case + of an SBML Level 1 model. In SBML Level 2, rational-number + stoichiometries are written as MathML elements in the + 'stoichiometryMath' subelement. However, as a convenience to users, + libSBML allows the creation and manipulation of rational-number + stoichiometries by supplying the numerator and denominator directly + rather than having to manually create an ASTNode structure. LibSBML + will write out the appropriate constructs (either a combination of + 'stoichiometry' and 'denominator' in the case of SBML Level 1, or a + 'stoichiometryMath' subelement in the case of SBML Level 2). + + Returns the value of the 'denominator' attribute of this + SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::getConstant " + Get the value of the 'constant' attribute. + + Returns the value of the 'constant' attribute of this + SpeciesReference. +"; + + +%feature("docstring") SpeciesReference::isSetStoichiometryMath " + Predicate returning True if this SpeciesReference's + 'stoichiometryMath' subelement is set + + Returns True if the 'stoichiometryMath' subelement of this + SpeciesReference is set, False otherwise. +"; + + +%feature("docstring") SpeciesReference::isSetConstant " + Predicate returning True if this SpeciesReference's 'constant' + attribute is set + + Returns True if the 'constant' attribute of this SpeciesReference is + set, False otherwise. +"; + + +%feature("docstring") SpeciesReference::isSetStoichiometry " + Predicate returning True if this SpeciesReference's 'stoichiometry' + attribute is set. + + Returns True if the 'stoichiometry' attribute of this + SpeciesReference is set, False otherwise. +"; + + +%feature("docstring") SpeciesReference::setStoichiometry " + Sets the value of the 'stoichiometry' attribute of this + SpeciesReference. + + In SBML Level 2, product and reactant stoichiometries can be + specified using either 'stoichiometry' or 'stoichiometryMath' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The 'stoichiometry' + attribute is of type double and should contain values greater than + zero (0). The 'stoichiometryMath' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of 'stoichiometry' in + the SpeciesReference instance defaults to 1. For maximum + interoperability between different software tools, the + 'stoichiometry' attribute should be used in preference to + 'stoichiometryMath' when a species' stoichiometry is a simple scalar + number (integer or decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the 'stoichiometry' attribute. + + Parameter 'value' is the new value of the 'stoichiometry' attribute + + Note: + + In SBML Level 2, the 'stoichiometryMath' subelement of this + SpeciesReference object will be unset because the 'stoichiometry' + attribute and the stoichiometryMath' subelement are mutually + exclusive. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") SpeciesReference::setStoichiometryMath " + Sets the 'stoichiometryMath' subelement of this SpeciesReference. + + The Abstract Syntax Tree in 'math' is copied. + + In SBML Level 2, product and reactant stoichiometries can be + specified using either 'stoichiometry' or 'stoichiometryMath' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The 'stoichiometry' + attribute is of type double and should contain values greater than + zero (0). The 'stoichiometryMath' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of 'stoichiometry' in + the SpeciesReference instance defaults to 1. For maximum + interoperability between different software tools, the + 'stoichiometry' attribute should be used in preference to + 'stoichiometryMath' when a species' stoichiometry is a simple scalar + number (integer or decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the 'stoichiometry' attribute. + + Parameter 'math' is the StoichiometryMath expression that is to be + copied as the content of the 'stoichiometryMath' subelement. + + Note: + + In SBML Level 2, the 'stoichiometry' attribute of this + SpeciesReference object will be unset (isSetStoichiometry() will + return False although getStoichiometry() will return 1.0) if the + given math is not null because the 'stoichiometry' attribute and the + stoichiometryMath' subelement are mutually exclusive. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH +"; + + +%feature("docstring") SpeciesReference::setDenominator " + Set the value of the 'denominator' attribute, for the case of a + rational-numbered stoichiometry or a model in SBML Level 1. + + The 'denominator' attribute is only actually written out in the case + of an SBML Level 1 model. In SBML Level 2, rational-number + stoichiometries are written as MathML elements in the + 'stoichiometryMath' subelement. However, as a convenience to users, + libSBML allows the creation and manipulation of rational-number + stoichiometries by supplying the numerator and denominator directly + rather than having to manually create an ASTNode structure. LibSBML + will write out the appropriate constructs (either a combination of + 'stoichiometry' and 'denominator' in the case of SBML Level 1, or a + 'stoichiometryMath' subelement in the case of SBML Level 2). + + Parameter 'value' is the scalar value + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") SpeciesReference::setConstant " + Sets the 'constant' attribute of this SpeciesReference to the given + boolean 'flag'. + + Parameter 'flag' is a boolean, the value for the 'constant' attribute + of this SpeciesReference instance + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") SpeciesReference::unsetStoichiometryMath " + Unsets the 'stoichiometryMath' subelement of this SpeciesReference. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + In SBML Level 2, product and reactant stoichiometries can be + specified using either 'stoichiometry' or 'stoichiometryMath' in a + SpeciesReference object. The former is to be used when a + stoichiometry is simply a scalar number, while the latter is for + occasions when it needs to be a rational number or it needs to + reference other mathematical expressions. The 'stoichiometry' + attribute is of type double and should contain values greater than + zero (0). The 'stoichiometryMath' element is implemented as an + element containing a MathML expression. These two are mutually + exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should + be defined in a given SpeciesReference instance. When neither the + attribute nor the element is present, the value of 'stoichiometry' in + the SpeciesReference instance defaults to 1. For maximum + interoperability between different software tools, the + 'stoichiometry' attribute should be used in preference to + 'stoichiometryMath' when a species' stoichiometry is a simple scalar + number (integer or decimal). + + In SBML Level 3, there is no StoichiometryMath, and SpeciesReference + objects have only the 'stoichiometry' attribute. + + Note: + + In SBML Level 2, the 'stoichiometry' attribute of this + SpeciesReference object will be reset to a default value (1.0) if + the 'stoichiometry' attribute has not been set. +"; + + +%feature("docstring") SpeciesReference::unsetStoichiometry " + Unsets the 'stoichiometry' attribute of this SpeciesReference. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + In SBML Level 1, the 'stoichiometry' attribute of this + SpeciesReference object will be just reset to a default value (1.0) + and isSetStoichiometry() will still return True. In SBML Level 2, + the 'stoichiometry' attribute of this object will be unset (which + will result in isSetStoichiometry() returning False, although + getStoichiometry() will return 1.0) if the 'stoichiometryMath' + subelement is set, otherwise the attribute will be just reset to the + default value (1.0) (and isSetStoichiometry() will still return + True). In SBML Level 3, the 'stoichiometry' attribute of this + object will be set to NaN and isSetStoichiometry() will return + False. +"; + + +%feature("docstring") SpeciesReference::createStoichiometryMath " + Creates a new, empty StoichiometryMath object, adds it to this + SpeciesReference, and returns it. + + Returns the newly created StoichiometryMath object instance + + See also Reaction.addReactant(), Reaction.addProduct(). +"; + + +%feature("docstring") SpeciesReference::setAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setAnnotation(XMLNode annotation) + + Sets the value of the 'annotation' subelement of this SBML object to + a copy of 'annotation'. + + Any existing content of the 'annotation' subelement is discarded. + Unless you have taken steps to first copy and reconstitute any + existing annotations into the 'annotation' that is about to be + assigned, it is likely that performing such wholesale replacement is + unfriendly towards other software applications whose annotations are + discarded. An alternative may be to use appendAnnotation(). + + Parameter 'annotation' is an XML structure that is to be used as the + content of the 'annotation' subelement of this object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also appendAnnotation(), appendAnnotation(), appendAnnotation(), + appendAnnotation(). +"; + + +%feature("docstring") SpeciesReference::appendAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + appendAnnotation(XMLNode annotation) + + Appends annotation content to any existing content in the + 'annotation' subelement of this object. + + The content in 'annotation' is copied. Unlike + SpeciesReference.setAnnotation(), this method allows other + annotations to be preserved when an application adds its own data. + + Parameter 'annotation' is an XML structure that is to be copied and + appended to the content of the 'annotation' subelement of this + object + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also setAnnotation(), setAnnotation(), setAnnotation(), + setAnnotation(). +"; + + +%feature("docstring") SpeciesReference::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") SpeciesReference::getElementName " + Returns the XML element name of this object, which for + SpeciesReference, is always 'speciesReference'. + + Returns the name of this element, i.e., 'speciesReference'. +"; + + +%feature("docstring") SpeciesReference::writeElements " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::sortMath " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + SpeciesReference object have been set. + + Note: + + The required attributes for a SpeciesReference object are: + + * 'species' + + * 'constant' (only available SBML Level 3) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") SpeciesReference::createObject " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::readL1Attributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::syncAnnotation " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::isExplicitlySetStoichiometry " + Internal implementation method. +"; + + +%feature("docstring") SpeciesReference::isExplicitlySetDenominator " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpeciesReferences::ListOfSpeciesReferences " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfSpeciesReferences(SBMLNamespaces sbmlns) + + Creates a new ListOfSpeciesReferences object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfSpeciesReferences object + to be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfSpeciesReferences(long level, long version) + + Creates a new, empty ListOfSpeciesReferences object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfSpeciesReferences::clone " + Creates and returns a deep copy of this ListOfSpeciesReferences + instance. + + Returns a (deep) copy of this ListOfSpeciesReferences. +"; + + +%feature("docstring") ListOfSpeciesReferences::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfSpeciesReferences::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., SpeciesReference objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfSpeciesReferences::getElementName " + Returns the XML element name of this object. + + For ListOfSpeciesReferences, the XML element name is + 'listOfSpeciesReferences'. + + Returns the name of this element, i.e., 'listOfSpeciesReferences'. +"; + + +%feature("docstring") ListOfSpeciesReferences::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a SpeciesReference from the ListOfSpeciesReferences. + + Parameter 'n' is the index number of the SpeciesReference to get. + + Returns the nth SpeciesReference in this ListOfSpeciesReferences. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfSpeciesReferences::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfSpeciesReferences items and + returns a pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfSpeciesReferences items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfSpeciesReferences::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpeciesReferences::setType " + Internal implementation method. +"; + + +%feature("docstring") ListOfSpeciesReferences::createObject " + Internal implementation method. +"; + + +%feature("docstring") ModifierSpeciesReference " + @ingroup Core Implementation of SBML's ModifierSpeciesReference + construct. + + Sometimes a species appears in the kinetic rate formula of a reaction + but is itself neither created nor destroyed in that reaction (for + example, because it acts as a catalyst or inhibitor). In SBML, all + such species are simply called modifiers without regard to the + detailed role of those species in the model. The Reaction structure + provides a way to express which species act as modifiers in a given + reaction. This is the purpose of the list of modifiers available in + Reaction. The list contains instances of ModifierSpeciesReference + structures. + + The ModifierSpeciesReference structure inherits the mandatory + attribute 'species' and optional attributes 'id' and 'name' from the + parent class SimpleSpeciesReference. See the description of + SimpleSpeciesReference for more information about these. + + The value of the 'species' attribute must be the identifier of a + species defined in the enclosing Model; this species is designated + as a modifier for the current reaction. A reaction may have any + number of modifiers. It is permissible for a modifier species to + appear simultaneously in the list of reactants and products of the + same reaction where it is designated as a modifier, as well as to + appear in the list of reactants, products and modifiers of other + reactions in the model. +"; + + +%feature("docstring") ModifierSpeciesReference::ModifierSpeciesReference " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ModifierSpeciesReference(SBMLNamespaces sbmlns) + + Creates a new ModifierSpeciesReference using the given SBMLNamespaces + object 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Note: + + Upon the addition of a ModifierSpeciesReference object to an + SBMLDocument (e.g., using Reaction.addModifier()), the SBML XML + namespace of the document overrides the value used when creating the + ModifierSpeciesReference object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a ModifierSpeciesReference is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + ModifierSpeciesReference(long level, long version) + + Creates a new ModifierSpeciesReference using the given SBML 'level' + and 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + ModifierSpeciesReference + + Parameter 'version' is a long integer, the SBML Version to assign to + this ModifierSpeciesReference + + Note: + + Upon the addition of a ModifierSpeciesReference object to an + SBMLDocument (e.g., using Reaction.addModifier()), the SBML Level, + SBML Version and XML namespace of the document override the values + used when creating the ModifierSpeciesReference object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a ModifierSpeciesReference is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. +"; + + +%feature("docstring") ModifierSpeciesReference::accept " + Accepts the given SBMLVisitor. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") ModifierSpeciesReference::clone " + Creates and returns a deep copy of this ModifierSpeciesReference + instance. + + Returns a (deep) copy of this ModifierSpeciesReference. +"; + + +%feature("docstring") ModifierSpeciesReference::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ModifierSpeciesReference::getElementName " + Returns the XML element name of this object, which for Species, is + always 'modifierSpeciesReference'. + + Returns the name of this element, i.e., 'modifierSpeciesReference'. +"; + + +%feature("docstring") ModifierSpeciesReference::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + ModifierSpeciesReference object have been set. + + Note: + + The required attributes for a ModifierSpeciesReference object are: + species +"; + + +%feature("docstring") Event " + @ingroup Core Implementation of SBML's Event construct. + + An SBML Event object defines when the event can occur, the variables + that are affected by it, how the variables are affected, and the + event's relationship to other events. The effect of the event can + optionally be delayed after the occurrence of the condition which + invokes it. + + The operation of Event is divided into two phases (even when the + event is not delayed): one when the event is triggered, and the + other when the event is executed. Trigger objects define the + conditions for triggering an event, Delay objects define when the + event is actually executed, EventAssignment objects define the + effects of executing the event, and (in SBML Level 3) Priority + objects influence the order of EventAssignment performance in cases + of simultaneous events. Please consult the descriptions of Trigger, + Delay, EventAssignment and Priority for more information. + + SBML Level/Version differences + ====================================================================== + + SBML Level 3 + ...................................................................... + + SBML Level 3 introduces several changes to the structure and + components of Events compared to SBML Level 2. These changes fall + into two main categories: changes to what is optional or required, + and additions of new attributes and elements. + + * The attribute 'useValuesFromTriggerTime' on Event is mandatory + (it was optional in Level 2); + + * Event's 'listOfEventAssignments' element (of class + ListOfEventAssignments) is optional (it was mandatory in Level 2); + + * Event's 'priority' element (of class Priority) is new in Level + 3; and + + * The Trigger object gains new mandatory attributes (described as + part of the definition of Trigger). + + The changes to the attributes of Event are described below; the + changes to Trigger and Priority are described in their respective + sections. + + SBML Level 2 + ...................................................................... + + In SBML Level 2 versions before Version 4, the semantics of Event + time delays were defined such that the expressions in the event's + assignments were always evaluated at the time the event was + triggered. This definition made it difficult to define an event + whose assignment formulas were meant to be evaluated at the time the + event was executed (i.e., after the time period defined by the value + of the Delay element). In SBML Level 2 Version 4 and in Level 3, + the attribute 'useValuesFromTriggerTime' on Event allows a model to + indicate the time at which the event's assignments are intended the + values of the assignment formulas are computed at the moment the + event is triggered, not after the delay. If + 'useValuesFromTriggerTime'=false, it means that the formulas in the + event's assignments are to be computed after the delay, at the time + the event is executed. + + The definition of Event in SBML Level 2 Versions 1 and 2 includes an + additional attribute called 'timeUnits', which allowed the time units + of the Delay to be set explicitly. Later Versions of SBML Level 2 + as well as SBML Level 3 do not define this attribute. LibSBML + supports this attribute for compatibility with previous versions of + SBML Level 2; however, if a model in SBML Level 3 or Level 2 + Versions 3-4 format sets the attribute, the consistency-checking + method SBMLDocument.checkConsistency() will report an error. + + The attribute 'useValuesFromTriggerTime' was introduced in SBML + Level 2 Version 4. Models defined in prior Versions of SBML Level 2 + cannot use this attribute, and SBMLDocument.checkConsistency() will + report an error if they do. + + Semantics of events in SBML Level 3 Version 1 + ====================================================================== + + The detailed semantics of events are described in the specification + documents for each SBML Level/Version. Here we include the + description from the SBML Level 1 Version 1. Any transition of a + Trigger object's 'math' formula from the value false to True will + cause the enclosing Event object to trigger. Such a transition is + not possible at the very start of a simulation (i.e., at time t = 0) + unless the Trigger object's 'initialValue' attribute has a value of + False; this defines the value of the trigger formula to be False + immediately prior to the start of simulation, thereby giving it the + potential to change in value from False to True when the formula is + evaluated at t = 0. If 'initialValue'=True, then the trigger + expression cannot transition from False to True at t = 0 but may do + so at some time t > 0. + + Consider an Event object definition <EM>E</EM> with delay d in which + the Trigger object's 'math' formula makes a transition in value from + False to True at times t_1 and t_2. The EventAssignment within the + Event object will have effect at t_1 + d and t_2 + d irrespective + of the relative times of t_1 and t_2. For example, events can + 'overlap' so that t_1 < t_2 < t_1 + d still causes an event + assignments to occur at t_1 + d and t_2 + d. + + It is entirely possible for two events to be executed simultaneously, + and it is possible for events to trigger other events (i.e., an event + assignment can cause an event to trigger). This leads to several + points: + + + * A software package should retest all event triggers after + executing an event assignment in order to account for the + possibility that the assignment causes another event trigger to + transition from False to True. This check should be made after each + individual Event object's execution, even when several events are to + be executed simultaneously. + + * Any Event object whose Trigger 'persistent' attribute has the + value False must have its trigger expression reevaluated + continuously between when the event is triggered and when it is + executed. If its trigger expression ever evaluates to False, it + must be removed from the queue of events pending execution and + treated as any other event whose trigger expression evaluates to + False. + + * Although the precise time at which events are executed is not + resolved beyond the given execution point in simulated time, it is + assumed that the order in which the events occur is resolved. This + order can be significant in determining the overall outcome of a + given simulation. When an event <EM>X</EM> triggers another event + <EM>Y</EM> and event <EM>Y</EM> has zero delay, then event + <EM>Y</EM> is added to the existing set of simultaneous events that + are pending execution. Events <EM>X</EM> and <EM>Y</EM> form a + cascade of events at the same point in simulation time. An event + such as <EM>Y</EM> may have a special priority if it contains a + Priority subobject. + + * All events in a model are open to being in a cascade. The + position of an event in the event queue does not affect whether it + can be in the cascade: event <EM>Y</EM> can be triggered whether it + is before or after <EM>X</EM> in the queue of events pending + execution. A cascade of events can be potentially infinite (never + terminate); when this occurs a simulator should indicate this has + occurred -- it is incorrect for a simulator to break a cascade + arbitrarily and continue the simulation without at least indicating + that the infinite cascade occurred. + + * Simultaneous events having no defined priorities are executed in + an undefined order. This does not mean that the behavior of the + simulation is completely undefined; merely that the order of + execution of these particular events is undefined. A given + simulator may use any algorithm to choose an order as long as every + event is executed exactly once. + + * Events with defined priorities are executed in the order implied + by their Priority 'math' formula values, with events having higher + priorities being executed ahead of events with lower priorities, and + events with identical priorities being executed in a random order + with respect to one another (as determined at run-time by some + random algorithm equivalent to coin-flipping). Newly-triggered + events that are to be executed immediately (i.e., if they define no + delays) should be inserted into the queue of events pending + execution according to their priorities: events with higher priority + values value must be inserted ahead of events with lower priority + values and after any pending events with even higher priorities, and + inserted randomly among pending events with the same priority + values. Events without Priority objects must be inserted into the + queue in some fashion, but the algorithm used to place it in the + queue is undefined. Similarly, there is no restriction on the order + of a newly-inserted event with a defined Priority with respect to + any other pending Event without a defined Priority. + + * A model variable that is the target of one or more event + assignments can change more than once when simultaneous events are + processed at some time point t. The model's behavior (output) for + such a variable is the value of the variable at the end of + processing all the simultaneous events at time t. + + See also Trigger, Priority, Delay, EventAssignment. +"; + + +%feature("docstring") ListOfEvents " + @ingroup Core Implementation of SBML's ListOfEvents construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + The relationship between the lists and the rest of an SBML model is + illustrated by the following (for SBML Level 2 Version 4): + + <?xml version=\"1.0\" encoding=\"UTF-8\"?> + <sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" + level=\"3\" version=\"1\"> + <model id=\"My_Model\"> + <listOfFunctionDefinitions> + <functionDefinition> ... </functionDefinition> + </listOfFunctionDefinitions> + <listOfUnitDefinitions> + <unitDefinition> ... </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment> ... </compartment> + </listOfCompartments> + <listOfSpecies> + <species> ... </species> + </listOfSpecies> + <listOfParameters> + <parameter> ... </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment> ... </initialAssignment> + </listOfInitialAssignments> + <listOfRules> + ... elements of subclasses of Rule ... + </listOfRules> + <listOfConstraints> + <constraint> ... </constraint> + </listOfConstraints> + <listOfReactions> + <reaction> ... </reaction> + </listOfReactions> + <listOfEvents> + <event> ... </event> + </listOfEvents> + </model> + </sbml> + + Readers may wonder about the motivations for using the ListOf___ + containers. A simpler approach in XML might be to place the + components all directly at the top level of the model definition. + The choice made in SBML is to group them within XML elements named + after ListOfClassname, in part because it helps organize the + components. More importantly, the fact that the container classes + are derived from SBase means that software tools can add information + about the lists themselves into each list container's 'annotation'. + + See also ListOfFunctionDefinitions, ListOfUnitDefinitions, + ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, + ListOfSpecies, ListOfParameters, ListOfInitialAssignments, + ListOfRules, ListOfConstraints, ListOfReactions, ListOfEvents. +"; + + +%feature("docstring") Event::Event " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Event(SBMLNamespaces sbmlns) + + Creates a new Event using the given SBMLNamespaces object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of an Event object to an SBMLDocument (e.g., using + Model.addEvent()), the SBML XML namespace of the document overrides + the value used when creating the Event object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a Event is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Event(long level, long version) + + Creates a new Event using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Event + + Parameter 'version' is a long integer, the SBML Version to assign to + this Event + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of an Event object to an SBMLDocument (e.g., using + Model.addEvent()), the SBML Level, SBML Version and XML namespace of + the document override the values used when creating the Event object + via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of an Event is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + Event(Event orig) + + Copy constructor; creates a copy of this Event. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Event::accept " + Accepts the given SBMLVisitor for this instance of Event. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next Event in the list of events + within which this Event is embedded. +"; + + +%feature("docstring") Event::clone " + Creates and returns a deep copy of this Event. + + Returns a (deep) copy of this Event. +"; + + +%feature("docstring") Event::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") Event::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") Event::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth. + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") Event::getId " + Returns the value of the 'id' attribute of this Event. + + Returns the id of this Event. +"; + + +%feature("docstring") Event::getName " + Returns the value of the 'name' attribute of this Event. + + Returns the name of this Event. +"; + + +%feature("docstring") Event::getTrigger " + Get the event trigger portion of this Event. + + Returns the Trigger object of this Event. +"; + + +%feature("docstring") Event::getDelay " + Get the assignment delay portion of this Event, if there is one. + + Returns the delay of this Event if one is defined, or None if none + is defined. +"; + + +%feature("docstring") Event::getPriority " + (SBML Level 3 only) Get the event priority portion of this Event. + + Returns the Priority object of this Event. + + Note: + + The element 'priority' is available in SBML Level 3 Version 1 Core, + but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::getTimeUnits " + Get the value of the 'timeUnits' attribute of this Event, if it has + one. + + Returns the value of the attribute 'timeUnits' as a string. + + WARNING: + + Definitions of Event in SBML Level 2 Versions 1 and 2 included the + additional attribute called 'timeUnits', but it was removed in SBML + Level 2 Version 3. LibSBML supports this attribute for + compatibility with previous versions of SBML Level 2, but its use is + discouraged since models in Level 2 Versions 3 and 4 cannot contain + it. If a Version 3 or 4 model sets the attribute, the consistency- + checking method SBMLDocument.checkConsistency() will report an + error. +"; + + +%feature("docstring") Event::getUseValuesFromTriggerTime " + Get the value of the 'useValuesFromTriggerTime' attribute of this + Event. + + The optional Delay on Event means there are two times to consider + when computing the results of an event: the time at which the event + is triggered, and the time at which assignments are executed. It + is also possible to distinguish between the time at which the + EventAssignment's expression is calculated, and the time at which + the assignment is made: the expression could be evaluated at the + same time the assignments are performed, i.e., when the event is + executed, but it could also be defined to be evaluated at the time + the event is triggered. + + In SBML Level 2 versions prior to Version 4, the semantics of Event + time delays were defined such that the expressions in the event's + assignments were always evaluated at the time the event was + triggered. This definition made it difficult to define an event + whose assignment formulas were meant to be evaluated at the time the + event was executed (i.e., after the time period defined by the value + of the Delay element). In SBML Level 2 Version 4, the attribute + 'useValuesFromTriggerTime' on Event allows a model to indicate the + time at which the event's assignments are intended to be evaluated. + In SBML Level 2, the attribute has a default value of True, which + corresponds to the interpretation of event assignments prior to + Version 4: the values of the assignment formulas are computed at the + moment the event is triggered, not after the delay. If + 'useValuesFromTriggerTime'=False, it means that the formulas in the + event's assignments are to be computed after the delay, at the time + the event is executed. In SBML Level 3, the attribute is mandatory, + not optional, and all events must specify a value for it. + + Returns the value of the attribute 'useValuesFromTriggerTime' as a + boolean. + + WARNING: + + The attribute 'useValuesFromTriggerTime' was introduced in SBML + Level 2 Version 4. It is not valid in models defined using SBML + Level 2 versions prior to Version 4. If a Level 2 Version 1-3 model + sets the attribute, the consistency-checking method + SBMLDocument.checkConsistency() will report an error. +"; + + +%feature("docstring") Event::isSetId " + Predicate returning True if this Event's 'id' attribute is set. + + Returns True if the 'id' attribute of this Event is set, False + otherwise. +"; + + +%feature("docstring") Event::isSetName " + Predicate returning True if this Event's 'name' attribute is set. + + Returns True if the 'name' attribute of this Event is set, False + otherwise. +"; + + +%feature("docstring") Event::isSetTrigger " + Predicate for testing whether the trigger for this Event is set. + + Returns True if the trigger of this Event is set, False otherwise. +"; + + +%feature("docstring") Event::isSetDelay " + Predicate for testing whether the delay for this Event is set. + + Returns True if the delay of this Event is set, False otherwise. +"; + + +%feature("docstring") Event::isSetPriority " + (SBML Level 3 only) Predicate for testing whether the priority for + this Event is set. + + Returns True if the priority of this Event is set, False otherwise. + + Note: + + The element 'priority' is available in SBML Level 3 Version 1 Core, + but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::isSetTimeUnits " + Predicate for testing whether the 'timeUnits' attribute of this Event + is set. + + Returns True if the 'timeUnits' attribute of this Event is set, + False otherwise. + + WARNING: + + Definitions of Event in SBML Level 2 Versions 1 and 2 included the + additional attribute called 'timeUnits', but it was removed in SBML + Level 2 Version 3. LibSBML supports this attribute for + compatibility with previous versions of SBML Level 2, but its use is + discouraged since models in Level 2 Versions 3 and 4 cannot contain + it. If a Version 3 or 4 model sets the attribute, the consistency- + checking method SBMLDocument.checkConsistency() will report an + error. +"; + + +%feature("docstring") Event::isSetUseValuesFromTriggerTime " + Predicate for testing whether the 'useValuesFromTriggerTime' + attribute of this Event is set. + + Returns True if the 'useValuesFromTriggerTime' attribute of this + Event is set, False otherwise. + + Note: + + In SBML Level 2, this attribute is optional and has a default value + of True, whereas in Level 3 Version 1, this optional is mandatory + and has no default value. +"; + + +%feature("docstring") Event::setId " + Sets the value of the 'id' attribute of this Event. + + The string 'sid' is copied. Note that SBML has strict requirements + for the syntax of identifiers. The following is a summary of the + definition of the SBML identifier type SId, which defines the + permitted syntax of identifiers. We express the syntax using an + extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Parameter 'sid' is the string to use as the identifier of this + Event + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Event::setName " + Sets the value of the 'name' attribute of this Event. + + The string in 'name' is copied. + + Parameter 'name' is the new name for the Event + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Event::setTrigger " + Sets the trigger definition of this Event to a copy of the given + Trigger object instance. + + Parameter 'trigger' is the Trigger object instance to use. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH +"; + + +%feature("docstring") Event::setDelay " + Sets the delay definition of this Event to a copy of the given Delay + object instance. + + Parameter 'delay' is the Delay object instance to use + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH +"; + + +%feature("docstring") Event::setPriority " + (SBML Level 3 only) Sets the priority definition of this Event to a + copy of the given Priority object instance. + + Parameter 'priority' is the Priority object instance to use + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The element 'priority' is available in SBML Level 3 Version 1 Core, + but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::setTimeUnits " + Sets the 'timeUnits' attribute of this Event to a copy of 'sid'. + + Parameter 'sid' is the identifier of the time units to use. + + WARNING: + + Definitions of Event in SBML Level 2 Versions 1 and 2 included the + additional attribute called 'timeUnits', but it was removed in SBML + Level 2 Version 3. LibSBML supports this attribute for + compatibility with previous versions of SBML Level 2, but its use is + discouraged since models in Level 2 Versions 3 and 4 cannot contain + it. If a Version 3 or 4 model sets the attribute, the consistency- + checking method SBMLDocument.checkConsistency() will report an + error. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") Event::setUseValuesFromTriggerTime " + Sets the 'useValuesFromTriggerTime' attribute of this Event to a + 'value'. + + The optional Delay on Event means there are two times to consider + when computing the results of an event: the time at which the event + is triggered, and the time at which assignments are executed. It + is also possible to distinguish between the time at which the + EventAssignment's expression is calculated, and the time at which + the assignment is made: the expression could be evaluated at the + same time the assignments are performed, i.e., when the event is + executed, but it could also be defined to be evaluated at the time + the event is triggered. + + In SBML Level 2 versions prior to Version 4, the semantics of Event + time delays were defined such that the expressions in the event's + assignments were always evaluated at the time the event was + triggered. This definition made it difficult to define an event + whose assignment formulas were meant to be evaluated at the time the + event was executed (i.e., after the time period defined by the value + of the Delay element). In SBML Level 2 Version 4, the attribute + 'useValuesFromTriggerTime' on Event allows a model to indicate the + time at which the event's assignments are intended to be evaluated. + In SBML Level 2, the attribute has a default value of True, which + corresponds to the interpretation of event assignments prior to + Version 4: the values of the assignment formulas are computed at the + moment the event is triggered, not after the delay. If + 'useValuesFromTriggerTime'=False, it means that the formulas in the + event's assignments are to be computed after the delay, at the time + the event is executed. In SBML Level 3, the attribute is mandatory, + not optional, and all events must specify a value for it. + + Parameter 'value' is the value of useValuesFromTriggerTime to use. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + WARNING: + + The attribute 'useValuesFromTriggerTime' was introduced in SBML + Level 2 Version 4. It is not valid in models defined using SBML + Level 2 versions prior to Version 4. If a Version 1- 3 model sets + the attribute, the consistency-checking method + SBMLDocument.checkConsistency() will report an error. +"; + + +%feature("docstring") Event::unsetId " + Unsets the value of the 'id' attribute of this Event. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Event::unsetName " + Unsets the value of the 'name' attribute of this Event. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Event::unsetDelay " + Unsets the Delay of this Event. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Event::unsetPriority " + (SBML Level 3 only) Unsets the Priority of this Event. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The element 'priority' is available in SBML Level 3 Version 1 Core, + but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::unsetTrigger " + Unsets the Trigger of this Event. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + The element 'priority' is available in SBML Level 3 Version 1 Core, + but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::unsetTimeUnits " + Unsets the 'timeUnits' attribute of this Event. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED + + WARNING: + + Definitions of Event in SBML Level 2 Versions 1 and 2 included the + attribute called 'timeUnits', but it was removed in SBML Level 2 + Version 3. LibSBML supports this attribute for compatibility with + previous versions of SBML Level 2, but its use is discouraged since + models in Level 2 Version 3 and Version 4 cannot contain it. If a + Version 3 or 4 model sets this attribute, the consistency-checking + method SBMLDocument.checkConsistency() will report an error. +"; + + +%feature("docstring") Event::addEventAssignment " + Appends a copy of the given EventAssignment to this Event. + + Parameter 'ea' is the EventAssignment object to add. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_LEVEL_MISMATCH + + * libsbml.LIBSBML_VERSION_MISMATCH + + * libsbml.LIBSBML_DUPLICATE_OBJECT_ID + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + This method should be used with some caution. The fact that this + method copies the object passed to it means that the caller will be + left holding a physically different object instance than the one + contained in this Event. Changes made to the original object + instance (such as resetting attribute values) will not affect the + instance in the Event. In addition, the caller should make sure to + free the original object if it is no longer being used, or else a + memory leak will result. Please see Event.createEventAssignment() + for a method that does not lead to these issues. + + See also createEventAssignment(). +"; + + +%feature("docstring") Event::createEventAssignment " + Creates a new, empty EventAssignment, adds it to this Event's list of + event assignments and returns the EventAssignment. + + Returns the newly created EventAssignment object instance + + See also addEventAssignment(). +"; + + +%feature("docstring") Event::createTrigger " + Creates a new, empty Trigger, adds it to this Event and returns the + Trigger. + + Returns the newly created Trigger object instance +"; + + +%feature("docstring") Event::createDelay " + Creates a new, empty Delay, adds it to this Event and returns the + Delay. + + Returns the newly created Delay object instance +"; + + +%feature("docstring") Event::createPriority " + (SBML Level 3 only) Creates a new, empty Priority, adds it to this + Event and returns the Priority. + + Returns the newly created Priority object instance + + Note: + + The element 'priority' is available in SBML Level 3 Version 1 Core, + but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Event::getListOfEventAssignments " + Returns the list of event assignments for this Event. + + Returns the list of EventAssignments for this Event. +"; + + +%feature("docstring") Event::getEventAssignment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getEventAssignment(string variable) + + Return the event assignment indicated by the given 'variable'. + + Parameter 'variable' is a string, the identifier of the variable + whose EventAssignment is being sought. + + Returns the EventAssignment for the given 'variable', or None if no + such EventAssignment exits. + + ______________________________________________________________________ + Method variant with the following signature: + + getEventAssignment(long n) + + Return a specific EventAssignment object of this Event. + + Parameter 'n' is an integer, the index of the EventAssignment object + to return + + Returns the nth EventAssignment of this Event. +"; + + +%feature("docstring") Event::getNumEventAssignments " + Returns the number of EventAssignment objects attached to this + Event. + + Returns the number of EventAssignments in this Event. +"; + + +%feature("docstring") Event::removeEventAssignment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeEventAssignment(string variable) + + Removes the EventAssignment object with the given 'variable' + attribute from this Event object and returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. If none of the EventAssignment objects in this Event object have + the 'variable' attribute 'variable', then None is returned. + + Parameter 'variable' is the 'variable' attribute of the + EventAssignment object to remove + + Returns the EventAssignment object removed. As mentioned above, the + caller owns the returned object. None is returned if no + EventAssignment object with the 'variable' attribute exists in this + Event object. + + ______________________________________________________________________ + Method variant with the following signature: + + removeEventAssignment(long n) + + Removes the nth EventAssignment object from this Event object and + returns a pointer to it. + + The caller owns the returned object and is responsible for deleting + it. + + Parameter 'n' is the index of the EventAssignment object to remove + + Returns the EventAssignment object removed. As mentioned above, + the caller owns the returned item. None is returned if the given + index is out of range. +"; + + +%feature("docstring") Event::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") Event::connectToChild " + Internal implementation method. +"; + + +%feature("docstring") Event::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") Event::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Event::getElementName " + Returns the XML element name of this object, which for Event, is + always 'event'. + + Returns the name of this element, i.e., 'event'. +"; + + +%feature("docstring") Event::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Event::setInternalIdOnly " + Internal implementation method. +"; + + +%feature("docstring") Event::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Event object have been set. + + Note: + + The required attributes for a Event object are: + + * 'useValuesfromTriggerTime' (required in SBML Level 3) +"; + + +%feature("docstring") Event::hasRequiredElements " + Predicate returning True if all the required elements for this Event + object have been set. + + Note: + + The required elements for a Event object are: + + * 'trigger' + + * 'listOfEventAssignments' (required in SBML Level 2, optional in + Level 3) +"; + + +%feature("docstring") Event::createObject " + Internal implementation method. +"; + + +%feature("docstring") Event::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Event::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Event::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Event::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Event::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Event::isExplicitlySetUVFTT " + Internal implementation method. +"; + + +%feature("docstring") ListOfEvents::ListOfEvents " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfEvents(SBMLNamespaces sbmlns) + + Creates a new ListOfEvents object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfEvents object to be + created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfEvents(long level, long version) + + Creates a new ListOfEvents object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfEvents::clone " + Creates and returns a deep copy of this ListOfEvents. + + Returns a (deep) copy of this ListOfEvents. +"; + + +%feature("docstring") ListOfEvents::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfEvents::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., Event objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfEvents::getElementName " + Returns the XML element name of this object. + + For ListOfEvents, the XML element name is 'listOfEvents'. + + Returns the name of this element, i.e., 'listOfEvents'. +"; + + +%feature("docstring") ListOfEvents::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a Event from the ListOfEvents. + + Parameter 'n' is the index number of the Event to get. + + Returns the nth Event in this ListOfEvents. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfEvents::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfEvents items and returns a + pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfEvents items with the given identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfEvents::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfEvents::createObject " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment " + @ingroup Core Implementation of SBML's EventAssignment construct for + Event. + + Event contains an optional element called 'listOfEventAssignments', + of class ListOfEventAssignments. In every instance of an event + definition in a model, the object's 'listOfEventAssignments' element + must have a non-empty list of one or more 'eventAssignment' elements + of class EventAssignment. The object class EventAssignment has one + required attribute, 'variable', and a required element, 'math'. + Being derived from SBase, it also has all the usual attributes and + elements of its parent class. + + An Event object defines when the event can occur, the variables that + are affected by the event, and how the variables are affected. The + purpose of the EventAssignment object class is to define how + variables are affected by an Event. In SBML Level 2, every Event + object instance must have a nonempty list of event assignments; in + SBML Level 3, the list of assignments is optional. + + The operation of an Event is divided into two phases (regardless of + whether a delay is involved): one phase when the event is triggered, + and the other when the event is executed. EventAssignment objects + are interpreted when an event is executed. The effects are described + below. + + The attribute 'variable' + ====================================================================== + + The EventAssignment attribute 'variable' must be the identifier of an + existing Compartment, Species, SpeciesReference, or Parameter + instance defined in the model. When the event is executed, the value + of the model component identified by 'variable' is changed by the + EventAssignment to the value computed by the 'math' element; that is, + a species' quantity, species reference's stoichiometry, + compartment's size or parameter's value are reset to the value + computed by 'math'. + + Certain restrictions are placed on what can appear in 'variable': + + * The object identified by the value of the EventAssignment + attribute 'variable' must not have its 'constant' attribute set to + or default to True. (Constants cannot be affected by events.) + + * The 'variable' attribute must not contain the identifier of a + reaction; only species, species references, compartment and parameter + values may be set by an Event. + + * The value of every 'variable' attribute must be unique among the + set of EventAssignment structures within a given Event structure. + In other words, a single event cannot have multiple EventAssignment + objects assigning the same variable. (All of them would be + performed at the same time when that particular Event triggers, + resulting in indeterminacy.) However, separate Event instances can + refer to the same variable. + + * A variable cannot be assigned a value in an EventAssignment object + instance and also be assigned a value by an AssignmentRule; i.e., the + value of an EventAssignment's 'variable' attribute cannot be the same + as the value of a AssignmentRule' 'variable' attribute. (Assignment + rules hold at all times, therefore it would be inconsistent to also + define an event that reassigns the value of the same variable.) + + Note that the time of assignment of the object identified by the + value of the 'variable' attribute is always the time at which the + Event is executed, not when it is triggered. The timing is + controlled by the optional Delay in an Event. The time of + assignment is not affected by the 'useValuesFromTriggerTime' + attribute on Eventmdash;that attribute affects the time at which the + EventAssignment's 'math' expression is evaluated. In other words, + SBML allows decoupling the time at which the 'variable' is assigned + from the time at which its value expression is calculated. + + The 'math' subelement in an EventAssignment + ====================================================================== + + The MathML expression contained in an EventAssignment defines the new + value of the variable being assigned by the Event. + + As mentioned above, the time at which the expression in 'math' is + evaluated is determined by the attribute 'useValuesFromTriggerTime' + on Event. If the attribute value is True, the expression must be + evaluated when the event is triggered; more precisely, the values of + identifiers occurring in MathML <ci> elements in the + EventAssignment's 'math' expression are the values they have at the + point when the event triggered. If, instead, + 'useValuesFromTriggerTime''s value is False, it means the values at + execution time should be used; that is, the values of identifiers + occurring in MathML <ci> elements in the EventAssignment's 'math' + expression are the values they have at the point when the event + executed. + + SBML Level/Version differences + ====================================================================== + + Between Version 4 and previous versions of SBML Level 2, the + requirements regarding the matching of units between an + EvengAssignment's formula and the units of the object identified by + the 'variable' attribute changed. Previous versions required + consistency, but in SBML Level 2 Version 4 and in SBML Level 3, unit + consistency is only recommended. More precisely: + + + * In the case of a species, an EventAssignment sets the referenced + species' quantity (concentration or amount of substance) to the value + determined by the formula in the EventAssignment's 'math' subelement. + The units of the 'math' formula should (in SBML Level 2 Version 4 + and in Level 3) or must (in previous Versions of Level 2) be + identical to the units of the species. + + * (SBML Level 3 only.) In the case of a species reference, an + EventAssignment sets the stoichiometry of the reactant or product + referenced by the SpeciesReference object to the value determined by + the formula in the 'math' element. The unit associated with the + value produced by the 'math' formula should be dimensionless, + because reactant and product stoichiometries in reactions are + dimensionless quantities. + + * In the case of a compartment, an EventAssignment sets the + referenced compartment's size to the size determined by the formula + in the 'math' subelement of the EventAssignment. The overall units + of the formula should (in SBML Level 2 Version 4 and in Level 3) or + must (in previous Versions of Level 2) be identical to the units + specified for the size of the compartment identified by the + EventAssignment's 'variable' attribute. + + * In the case of a parameter, an EventAssignment sets the referenced + parameter's value to that determined by the formula in 'math'. The + overall units of the formula should (in SBML Level 2 Version 4 and + Level 3) or must (in previous Versions of Level 2) be identical to + the units defined for the parameter. + + Note that the formula placed in the 'math' element has no assumed + units. The consistency of the units of the formula, and the units + of the entity which the assignment affects, must be explicitly + established just as in the case of the value of the Delay subelement. + An approach similar to the one discussed in the context of Delay may + be used for the formula of an EventAssignment. + + See also Event. +"; + + +%feature("docstring") ListOfEventAssignments " + @ingroup Core Implementation of SBML's ListOfEventAssignments + construct. + + The various ListOf___ classes in SBML are merely containers used for + organizing the main components of an SBML model. All are derived + from the abstract class SBase, and inherit the various attributes + and subelements of SBase, such as 'metaid' as and 'annotation'. The + ListOf___ classes do not add any attributes of their own. + + ListOfEventAssignments is entirely contained within Event. +"; + + +%feature("docstring") EventAssignment::EventAssignment " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + EventAssignment(SBMLNamespaces sbmlns) + + Creates a new EventAssignment using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a EventAssignment object to an SBMLDocument + (e.g., using Event.addEventAssignment()), the SBML XML namespace of + the document overrides the value used when creating the + EventAssignment object via this constructor. This is necessary to + ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a EventAssignment is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add an object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + EventAssignment(long level, long version) + + Creates a new EventAssignment using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + EventAssignment + + Parameter 'version' is a long integer, the SBML Version to assign to + this EventAssignment + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a EventAssignment object to an SBMLDocument + (e.g., using Event.addEventAssignment()), the SBML Level, SBML + Version and XML namespace of the document override the values used + when creating the EventAssignment object via this constructor. This + is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a EventAssignment is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + EventAssignment(EventAssignment orig) + + Copy constructor; creates a copy of this EventAssignment. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") EventAssignment::accept " + Accepts the given SBMLVisitor for this instance of EventAssignment. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(), which indicates whether the + Visitor would like to visit the next EventAssignment in the list + within which this EventAssignment is embedded (i.e., in the + ListOfEventAssignments located in the enclosing Event instance). +"; + + +%feature("docstring") EventAssignment::clone " + Creates and returns a deep copy of this EventAssignment. + + Returns a (deep) copy of this EventAssignment. +"; + + +%feature("docstring") EventAssignment::getVariable " + Get the value of this EventAssignment's 'variable' attribute. + + Returns the identifier stored in the 'variable' attribute of this + EventAssignment. +"; + + +%feature("docstring") EventAssignment::getMath " + Get the mathematical expression in this EventAssignment's 'math' + subelement. + + Returns the top ASTNode of an abstract syntax tree representing the + mathematical formula in this EventAssignment. +"; + + +%feature("docstring") EventAssignment::isSetVariable " + Predicate for testing whether the attribute 'variable' of this + EventAssignment is set. + + Returns True if the 'variable' attribute of this EventAssignment is + set, False otherwise. +"; + + +%feature("docstring") EventAssignment::isSetMath " + Predicate for testing whether the 'math' subelement of this + EventAssignment is set. + + Returns True if this EventAssignment has a 'math' subelement, False + otherwise. +"; + + +%feature("docstring") EventAssignment::setVariable " + Sets the attribute 'variable' of this EventAssignment to a copy of + the given identifier string. + + Parameter 'sid' is the identifier of a Compartment, Species or + (global) Parameter defined in this model. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") EventAssignment::setMath " + Sets the 'math' subelement of this EventAssignment to a copy of the + given ASTNode. + + Parameter 'math' is an ASTNode that will be copied and stored as the + mathematical formula for this EventAssignment. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") EventAssignment::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units of + measurement assumed for the 'math' expression of this + EventAssignment. + + The units are calculated based on the mathematical expression in the + EventAssignment and the model quantities referenced by <ci> elements + used within that expression. The + EventAssignment.getDerivedUnitDefinition() method returns the + calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + WARNING: + + Note that it is possible the 'math' expression in the + EventAssignment contains literal numbers or parameters with + undeclared units. In those cases, it is not possible to calculate + the units of the overall expression without making assumptions. + LibSBML does not make assumptions about the units, and + EventAssignment.getDerivedUnitDefinition() only returns the units as + far as it is able to determine them. For example, in an expression + X + Y, if X has unambiguously-defined units and Y does not, it will + return the units of X. When using this method, <strong>it is + critical that callers also invoke the method</strong> + EventAssignment.containsUndeclaredUnits() <strong>to determine + whether this situation holds</strong>. Callers should take suitable + action in those situations. + + Returns a UnitDefinition that expresses the units of the math + expression of this EventAssignment, or None if one cannot be + constructed. + + See also containsUndeclaredUnits(). +"; + + +%feature("docstring") EventAssignment::containsUndeclaredUnits " + Predicate returning True if the math expression of this + EventAssignment contains literal numbers or parameters with + undeclared units. + + The EventAssignment.getDerivedUnitDefinition() method returns what + libSBML computes to be the units of the 'math', to the extent that + libSBML can compute them. However, if the expression contains + literal numbers or parameters with undeclared units, libSBML may not + be able to compute the full units of the expression and will only + return what it can compute. Callers should always use + EventAssignment.containsUndeclaredUnits() when using + EventAssignment.getDerivedUnitDefinition() to decide whether the + returned units may be incomplete. + + Returns True if the math expression of this EventAssignment includes + parameters/numbers with undeclared units, False otherwise. + + Note: + + A return value of True indicates that the UnitDefinition returned by + EventAssignment.getDerivedUnitDefinition() may not accurately + represent the units of the expression. + + See also getDerivedUnitDefinition(). +"; + + +%feature("docstring") EventAssignment::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") EventAssignment::getElementName " + Returns the XML element name of this object, which for + EventAssignment, is always 'eventAssignment'. + + Returns the name of this element, i.e., 'eventAssignment'. +"; + + +%feature("docstring") EventAssignment::writeElements " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + EventAssignment object have been set. + + Note: + + The required attributes for a EventAssignment object are: + + * 'variable' + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") EventAssignment::hasRequiredElements " + Predicate returning True if all the required elements for this + EventAssignment object have been set. + + Note: + + The required elements for a EventAssignment object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") EventAssignment::getId " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") EventAssignment::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") EventAssignment::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::divideAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::multiplyAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") EventAssignment::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") ListOfEventAssignments::ListOfEventAssignments " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfEventAssignments(SBMLNamespaces sbmlns) + + Creates a new ListOfEventAssignments object. + + The object is constructed such that it is valid for the SBML Level + and Version combination determined by the SBMLNamespaces object in + 'sbmlns'. + + Parameter 'sbmlns' is an SBMLNamespaces object that is used to + determine the characteristics of the ListOfEventAssignments object + to be created. + + ______________________________________________________________________ + Method variant with the following signature: + + ListOfEventAssignments(long level, long version) + + Creates a new ListOfEventAssignments object. + + The object is constructed such that it is valid for the given SBML + Level and Version combination. + + Parameter 'level' is the SBML Level + + Parameter 'version' is the Version within the SBML Level +"; + + +%feature("docstring") ListOfEventAssignments::clone " + Creates and returns a deep copy of this ListOfEventAssignments. + + Returns a (deep) copy of this ListOfEventAssignments. +"; + + +%feature("docstring") ListOfEventAssignments::getTypeCode " + Returns the libSBML type code for this SBML object. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfEventAssignments::getItemTypeCode " + Returns the libSBML type code for the objects contained in this + ListOf (i.e., EventAssignment objects, if the list is non-empty). + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for the objects contained in this ListOf + instance, or libsbml.SBML_UNKNOWN (default). + + See also getElementName(). +"; + + +%feature("docstring") ListOfEventAssignments::getElementName " + Returns the XML element name of this object. + + For ListOfEventAssignments, the XML element name is + 'listOfEventAssignments'. + + Returns the name of this element, i.e., 'listOfEventAssignments'. +"; + + +%feature("docstring") ListOfEventAssignments::get " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + get(long n) + + Get a EventAssignment from the ListOfEventAssignments. + + Parameter 'n' is the index number of the EventAssignment to get. + + Returns the nth EventAssignment in this ListOfEventAssignments. + + See also size(), get(), size(). +"; + + +%feature("docstring") ListOfEventAssignments::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(long n) + + Removes the nth item from this ListOfEventAssignments items and + returns a pointer to it. + + The caller owns the returned item and is responsible for deleting it. + + Parameter 'n' is the index of the item to remove + + See also size(). + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string sid) + + Removes item in this ListOfEventAssignments items with the given + identifier. + + The caller owns the returned item and is responsible for deleting it. + If none of the items in this list have the identifier 'sid', then + None is returned. + + Parameter 'sid' is the identifier of the item to remove + + Returns the item removed. As mentioned above, the caller owns the + returned item. +"; + + +%feature("docstring") ListOfEventAssignments::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. Note + that EventAssignments do not actually have IDs, but the libsbml + interface pretends that they do: no event assignment is returned by + this function. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") ListOfEventAssignments::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") ListOfEventAssignments::createObject " + Internal implementation method. +"; + + +%feature("docstring") Trigger " + @ingroup Core Implementation of SBML's Trigger construct for Event. + + An Event object defines when the event can occur, the variables that + are affected by the event, and how the variables are affected. The + Trigger construct in SBML is used to define a mathematical + expression that determines when an Event is triggered. + + A Trigger object in SBML Level 2 and Level 3 contains one subelement + named 'math' containing a MathML expression. The expression must + evaluate to a value of type boolean. The exact moment at which the + expression evaluates to True is the time point when the Event is + triggered. In SBML Level 3, Trigger has additional attributes that + must be assigned values; they are discussed in a separate section + below. + + An event only triggers when its Trigger expression makes the + transition in value from False to True. The event will also trigger + at any subsequent time points when the trigger makes this + transition; in other words, an event can be triggered multiple times + during a simulation if its trigger condition makes the transition + from False to True more than once. In SBML Level 3, the behavior + at the very start of simulation (i.e., at t = 0, where t stands for + time) is determined in part by the boolean flag 'initialValue'. + This and other additional features introduced in SBML Level 3 are + discussed further below. + + Version differences + ====================================================================== + + SBML Level 3 Version 1 introduces two required attributes on the + Trigger object: 'persistent' and 'initialValue'. The rest of this + introduction describes these two attributes. + + The 'persistent' attribute on Trigger + ...................................................................... + + In the interval between when an Event object triggers (i.e., its + Trigger object expression transitions in value from False to True) + and when its assignments are to be executed, conditions in the model + may change such that the trigger expression transitions back from + True to False. Should the event's assignments still be made if this + happens? Answering this question is the purpose of the 'persistent' + attribute on Trigger. + + If the boolean attribute 'persistent' has a value of True, then once + the event is triggered, all of its assignments are always performed + when the time of execution is reached. The name persistent is meant + to evoke the idea that the trigger expression does not have to be + re-checked after it triggers if 'persistent'=True. Conversely, if + the attribute value is False, then the trigger expression is not + assumed to persist: if the expression transitions in value back to + false at any time between when the event triggered and when it is to + be executed, the event is no longer considered to have triggered and + its assignments are not executed. (If the trigger expression + transitions once more to True after that point, then the event is + triggered, but this then constitutes a whole new event trigger-and- + execute sequence.) + + The 'persistent' attribute can be especially useful when Event + objects contain Delay objects, but it is relevant even in a model + without delays if the model contains two or more events. As + explained in the introduction to this section, the operation of all + events in SBML (delayed or not) is conceptually divided into two + phases, triggering and execution; however, unless events have + priorities associated with them, SBML does not mandate a particular + ordering of event execution in the case of simultaneous events. + Models with multiple events can lead to situations where the + execution of one event affects another event's trigger expression + value. If that other event has 'persistent'=False, and its trigger + expression evaluates to False before it is to be executed, the event + must not be executed after all. + + The 'initialValue' attribute on Trigger + ...................................................................... + + As mentioned above, an event triggers when the mathematical + expression in its Trigger object transitions in value from False to + True. An unanswered question concerns what happens at the start of a + simulation: can event triggers make this transition at t = 0, where + t stands for time? + + In order to determine whether an event may trigger at t = 0, it is + necessary to know what value the Trigger object's 'math' expression + had immediately prior to t = 0. This starting value of the trigger + expression is determined by the value of the boolean attribute + 'initialValue'. A value of True means the trigger expression is + taken to have the value True immediately prior to t = 0. In that + case, the trigger cannot transition in value from False to true at + the moment simulation begins (because it has the value True both + before and after t = 0), and can only make the transition from False + to True sometime after t = 0. (To do that, it would also first have + to transition to False before it could make the transition from + False back to True.) Conversely, if 'initialValue'=False, then the + trigger expression is assumed to start with the value False, and + therefore may trigger at t = 0 if the expression evaluates to True + at that moment. + + See also Event, Delay, EventAssignment. +"; + + +%feature("docstring") Trigger::Trigger " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Trigger(SBMLNamespaces sbmlns) + + Creates a new Trigger using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + ______________________________________________________________________ + Method variant with the following signature: + + Trigger(long level, long version) + + Creates a new Trigger using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Trigger + + Parameter 'version' is a long integer, the SBML Version to assign to + this Trigger + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + ______________________________________________________________________ + Method variant with the following signature: + + Trigger(Trigger orig) + + Copy constructor; creates a copy of this Trigger. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Trigger::accept " + Accepts the given SBMLVisitor for this instance of Trigger. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") Trigger::clone " + Creates and returns a deep copy of this Trigger. + + Returns a (deep) copy of this Trigger. +"; + + +%feature("docstring") Trigger::getMath " + Get the mathematical formula for the trigger and return it as an + AST. + + Returns the math of this Trigger. +"; + + +%feature("docstring") Trigger::getInitialValue " + (SBML Level 3 only) Get the value of the 'initialValue' attribute of + this Trigger. + + Returns the boolean value stored as the 'initialValue' attribute + value in this Trigger. + + Note: + + The attribute 'initialValue' is available in SBML Level 3 Version 1 + Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::getPersistent " + (SBML Level 3 only) Get the value of the 'persistent' attribute of + this Trigger. + + Returns the boolean value stored as the 'persistent' attribute value + in this Trigger. + + Note: + + The attribute 'persistent' is available in SBML Level 3 Version 1 + Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::isSetMath " + Predicate to test whether the math for this trigger is set. + + Returns True if the formula (meaning the 'math' subelement) of this + Trigger is set, False otherwise. +"; + + +%feature("docstring") Trigger::isSetInitialValue " + (SBML Level 3 only) Predicate to test whether the 'initialValue' + attribute for this trigger is set. + + Returns True if the initialValue attribute of this Trigger is set, + False otherwise. + + Note: + + The attribute 'initialValue' is available in SBML Level 3 Version 1 + Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::isSetPersistent " + (SBML Level 3 only) Predicate to test whether the 'persistent' + attribute for this trigger is set. + + Returns True if the persistent attribute of this Trigger is set, + False otherwise. + + Note: + + The attribute 'persistent' is available in SBML Level 3 Version 1 + Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::setMath " + Sets the trigger expression of this Trigger instance to a copy of the + given ASTNode. + + Parameter 'math' is an ASTNode representing a formula tree. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") Trigger::setInitialValue " + (SBML Level 3 only) Sets the 'initialValue' attribute of this Trigger + instance. + + Parameter 'initialValue' is a boolean representing the initialValue + to be set. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attribute 'initialValue' is available in SBML Level 3 Version 1 + Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::setPersistent " + (SBML Level 3 only) Sets the 'persistent' attribute of this Trigger + instance. + + Parameter 'persistent' is a boolean representing the persistent value + to be set. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + Note: + + The attribute 'persistent' is available in SBML Level 3 Version 1 + Core, but is not present in lower Levels of SBML. +"; + + +%feature("docstring") Trigger::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") Trigger::setParentSBMLObject " + Internal implementation method. +"; + + +%feature("docstring") Trigger::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Trigger::getElementName " + Returns the XML element name of this object, which for Trigger, is + always 'trigger'. + + Returns the name of this element, i.e., 'trigger'. +"; + + +%feature("docstring") Trigger::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Trigger::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Trigger::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") Trigger::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") Trigger::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Trigger::hasRequiredElements " + Predicate returning True if all the required elements for this + Trigger object have been set. + + Note: + + The required elements for a Trigger object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Trigger::hasRequiredAttributes " + Predicate returning True if all the required attributes for this + Trigger object have been set. + + Note: + + The required attributes for a Trigger object are: + + * 'persistent' (required in SBML Level 3) + + * 'initialValue' (required in SBML Level 3) + + Returns a boolean value indicating whether all the required + attributes for this object have been defined. +"; + + +%feature("docstring") Trigger::removeFromParentAndDelete " + Finds this Trigger's Event parent and calls unsetTrigger() on it, + indirectly deleting itself. Overridden from the SBase function since + the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Trigger::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") Trigger::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Trigger::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Trigger::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Trigger::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Trigger::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Delay " + @ingroup Core Implementation of SBML's Delay construct for Event. + + An Event object defines when the event can occur, the variables that + are affected by the event, and how the variables are affected. The + effect of the event can optionally be delayed after the occurrence of + the condition which invokes it. An event delay is defined using an + object of class Delay. + + The object class Delay is derived from SBase and adds a single + subelement called 'math'. This subelement is used to hold MathML + content. The mathematical formula represented by 'math' must + evaluate to a numerical value. It is used as the length of time + between when the event is triggered and when the event's assignments + are actually executed. If no delay is present on a given Event, a + time delay of zero is assumed. + + The expression in 'math' must be evaluated at the time the event is + triggered. The expression must always evaluate to a nonnegative + number (otherwise, a nonsensical situation could arise where an + event is defined to execute before it is triggered!). + + The units of the mathematical expression in a Delay + ====================================================================== + + In SBML Level 2 versions before Version 4, the units of the + numerical value computed by the Delay's 'math' expression are + required to be in units of time, or the model is considered to have a + unit consistency error. In Level 2 Version 4 as well as SBML Level + 3 Version 1 Core, this requirement is relaxed; these specifications + only stipulate that the units of the numerical value computed by a + Delay instance's 'math' expression should match the model's units of + time (meaning the definition of the time units in the model). + LibSBML respects these requirements, and depending on whether an + earlier Version of SBML Level 2 is in use, libSBML may or may not + flag unit inconsistencies as errors or merely warnings. + + Note that units are not predefined or assumed for the contents of + 'math' in a Delay object; rather, they must be defined explicitly for + each instance of a Delay object in a model. This is an important + point to bear in mind when literal numbers are used in delay + expressions. For example, the following Event instance would result + in a warning logged by SBMLDocument.checkConsistency() about the + fact that libSBML cannot verify the consistency of the units of the + expression. The reason is that the formula inside the 'math' + element does not have any declared units, whereas what is expected + in this context is units of time: + + <model> + ... + <listOfEvents> + <event useValuesFromTriggerTime=\'true\'> + ... + <delay> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <cn> 1 </cn> + </math> + </delay> + ... + </event> + </listOfEvents> + ... + </model> + + The <cn> 1 </cn> within the mathematical formula of the delay above + has no units declared. To make the expression have the needed units + of time, literal numbers should be avoided in favor of defining + Parameter objects for each quantity, and declaring units for the + Parameter values. The following fragment of SBML illustrates this + approach: + + <model> + ... + <listOfParameters> + <parameter id=\'transcriptionDelay\' value=\'10\' units=\'second\'/> + </listOfParameters> + ... + <listOfEvents> + <event useValuesFromTriggerTime=\'true\'> + ... + <delay> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <ci> transcriptionDelay </ci> + </math> + </delay> + ... + </event> + </listOfEvents> + ... + </model> + + In SBML Level 3, an alternative approach is available in the form of + the units attribute, which SBML Level 3 allows to appear on MathML + cn elements. The value of this attribute can be used to indicate + the unit of measurement to be associated with the number in the + content of a cn element. The attribute is named units but, because + it appears inside MathML element (which is in the XML namespace for + MathML and not the namespace for SBML), it must always be prefixed + with an XML namespace prefix for the SBML Level 3 Version 1 + namespace. The following is an example of this approach: + + <model timeUnits=\'second\' ...> + ... + <listOfEvents> + <event useValuesFromTriggerTime=\'true\'> + ... + <delay> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\' + xmlns:sbml=\'http://www.sbml.org/sbml/level3/version1/core\'> + <cn sbml:units=\'second\'> 10 </cn> + </math> + </delay> + ... + </event> + </listOfEvents> + ... + </model> +"; + + +%feature("docstring") Delay::Delay " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Delay(SBMLNamespaces sbmlns) + + Creates a new Delay using the given SBMLNamespaces object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Delay object to an Event (e.g., using + Event.setDelay()), the SBML XML namespace of the document overrides + the value used when creating the Delay object via this constructor. + This is necessary to ensure that an SBML document is a consistent + structure. Nevertheless, the ability to supply the values at the + time of creation of a Delay is an important aid to producing valid + SBML. Knowledge of the intented SBML Level and Version determine + whether it is valid to assign a particular value to an attribute, or + whether it is valid to add a particular Delay object to an existing + Event. + + ______________________________________________________________________ + Method variant with the following signature: + + Delay(long level, long version) + + Creates a new Delay using the given SBML 'level' and 'version' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Delay + + Parameter 'version' is a long integer, the SBML Version to assign to + this Delay + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Delay object to an Event (e.g., using + Event.setDelay()), the SBML Level, SBML Version and XML namespace of + the document override the values used when creating the Delay object + via this constructor. This is necessary to ensure that an SBML + document is a consistent structure. Nevertheless, the ability to + supply the values at the time of creation of a Delay is an important + aid to producing valid SBML. Knowledge of the intented SBML Level + and Version determine whether it is valid to assign a particular + value to an attribute, or whether it is valid to add a particular + Delay object to an existing Event. + + ______________________________________________________________________ + Method variant with the following signature: + + Delay(Delay orig) + + Copy constructor; creates a copy of this Delay. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Delay::accept " + Accepts the given SBMLVisitor for this instance of Delay. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") Delay::clone " + Creates and returns a deep copy of this Delay. + + Returns a (deep) copy of this Delay. +"; + + +%feature("docstring") Delay::getMath " + Get the mathematical formula for the delay and return it as an AST. + + Returns the math of this Delay. +"; + + +%feature("docstring") Delay::isSetMath " + Predicate to test whether the formula for this delay is set. + + Returns True if the formula (meaning the math subelement) of this + Delay is set, False otherwise. +"; + + +%feature("docstring") Delay::setMath " + Sets the delay expression of this Delay instance to a copy of the + given ASTNode. + + Parameter 'math' is an ASTNode representing a formula tree. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") Delay::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition that expresses the units of + measurement assumed for the 'math' expression of this Delay. + + Delay elements in SBML express a time delay for an Event. Beginning + with SBML Level 2 Version 2, the units of that time are calculated + based on the mathematical expression and the model quantities + referenced by <ci> elements used within that expression. The + Delay.getDerivedUnitDefinition() method returns what libSBML + computes the units to be, to the extent that libSBML can compute + them. + + (Prior to SBML Level 2 Version 2, there existed an attribute on + Event called 'timeUnits'. This attribute could be used to set the + intended units of the delay expression. For such models, this will + return a UnitDefinition object that corresponds to the declared + 'timeUnits' units.) + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + WARNING: + + Note that it is possible the 'math' expression in the Delay contains + literal numbers or parameters with undeclared units. In those + cases, it is not possible to calculate the units of the overall + expression without making assumptions. LibSBML does not make + assumptions about the units, and Delay.getDerivedUnitDefinition() + only returns the units as far as it is able to determine them. For + example, in an expression X + Y, if X has unambiguously-defined + units and Y does not, it will return the units of X. When using + this method, <strong>it is critical that callers also invoke the + method</strong> Delay.containsUndeclaredUnits() <strong>to determine + whether this situation holds</strong>. Callers should take suitable + action in those situations. + + Returns a UnitDefinition that expresses the units of the math + expression of this Delay, or None if one cannot be constructed. + + See also containsUndeclaredUnits(). +"; + + +%feature("docstring") Delay::containsUndeclaredUnits " + Predicate returning True if the 'math' expression in this Delay + instance contains parameters with undeclared units or literal + numbers. + + Delay elements in SBML express a time delay for an Event. Beginning + with SBML Level 2 Version 2, the units of that time are calculated + based on the mathematical expression and the model quantities + referenced by <ci> elements used within that expression. The + Delay.getDerivedUnitDefinition() method returns what libSBML + computes the units to be, to the extent that libSBML can compute + them. However, if the expression contains literal numbers or + parameters with undeclared units, libSBML may not be able to compute + the full units of the expression and will only return what it can + compute. Callers should always use Delay.containsUndeclaredUnits() + when using Delay.getDerivedUnitDefinition() to decide whether the + returned units may be incomplete. + + Returns True if the math expression of this Delay includes + numbers/parameters with undeclared units, False otherwise. + + Note: + + A return value of True indicates that the UnitDefinition returned by + Delay.getDerivedUnitDefinition() may not accurately represent the + units of the expression. + + See also getDerivedUnitDefinition(). +"; + + +%feature("docstring") Delay::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Delay::getElementName " + Returns the XML element name of this object, which for Delay, is + always 'delay'. + + Returns the name of this element, i.e., 'delay'. + + See also getTypeCode(). +"; + + +%feature("docstring") Delay::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") Delay::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Delay::hasRequiredElements " + Predicate returning True if all the required elements for this Delay + object have been set. + + Note: + + The required elements for a Delay object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Delay::removeFromParentAndDelete " + Finds this Delay's Event parent and calls unsetDelay() on it, + indirectly deleting itself. + + Overridden from the SBase function since the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Delay::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Delay::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Delay::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") Delay::getInternalId " + Internal implementation method. +"; + + +%feature("docstring") Delay::setInternalId " + Internal implementation method. +"; + + +%feature("docstring") Delay::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") Delay::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Delay::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Delay::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") Delay::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Delay::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") Priority " + @ingroup Core Implementation of SBML Level 3's Priority construct + for Event. + + The Priority object class (which was introduced in SBML Level 3 + Version 1), like Delay, is derived from SBase and contains a MathML + formula stored in the element 'math'. This formula is used to + compute a dimensionless numerical value that influences the order in + which a simulator is to perform the assignments of two or more + events that happen to be executed simultaneously. The formula may + evaluate to any double value (and thus may be a positive or negative + number, or zero), with positive numbers taken to signifying a higher + priority than zero or negative numbers. If no Priority object is + present on a given Event object, no priority is defined for that + event. + + The interpretation of priorities on events in a model + ====================================================================== + + For the purposes of SBML, simultaneous event execution is defined as + the situation in which multiple events have identical times of + execution. The time of execution is calculated as the sum of the + time at which a given event's Trigger is triggered plus its Delay + duration, if any. Here, identical times means mathematically equal + instants in time. (In practice, simulation software adhering to + this specification may have to rely on numerical equality instead of + strict mathematical equality; robust models will ensure that this + difference will not cause significant discrepancies from expected + behavior.) + + If no Priority subobjects are defined for two or more Event objects, + then those events are still executed simultaneously but their order + of execution is undefined by the SBML Level 3 Version 1 + specification. A software implementation may choose to execute such + simultaneous events in any order, as long as each event is executed + only once and the requirements of checking the 'persistent' attribute + (and acting accordingly) are satisfied. + + If Priority subobjects are defined for two or more simultaneously- + triggered events, the order in which those particular events must be + executed is dictated by their Priority objects, as follows. If the + values calculated using the two Priority objects' 'math' expressions + differ, then the event having the higher priority value must be + executed before the event with the lower value. If, instead, the + two priority values are mathematically equal, then the two events + must be triggered in a random order. It is important to note that a + random order is not the same as an undefined order: given multiple + runs of the same model with identical conditions, an undefined + ordering would permit a system to execute the events in (for + example) the same order every time (according to whatever scheme may + have been implemented by the system), whereas the explicit + requirement for random ordering means that the order of execution in + different simulation runs depends on random chance. In other words, + given two events A and B, a randomly-determined order must lead to + an equal chance of executing A first or B first, every time those + two events are executed simultaneously. + + A model may contain a mixture of events, some of which have Priority + subobjects and some do not. Should a combination of simultaneous + events arise in which some events have priorities defined and others + do not, the set of events with defined priorities must trigger in + the order determined by their Priority objects, and the set of + events without Priority objects must be executed in an undefined + order with respect to each other and with respect to the events with + Priority subobjects. (Note that undefined order does not + necessarily mean random order, although a random ordering would be a + valid implementation of this requirement.) + + The following example may help further clarify these points. Suppose + a model contains four events that should be executed simultaneously, + with two of the events having Priority objects with the same value + and the other two events having Priority objects with the same, but + different, value. The two events with the higher priorities must be + executed first, in a random order with respect to each other, and + the remaining two events must be executed after them, again in a + random order, for a total of four possible and equally-likely event + executions: A-B-C-D, A-B-D-C, B-A-C-D, and B-A-D-C. If, instead, + the model contains four events all having the same Priority values, + there are 4! or 24 possible orderings, each of which must be equally + likely to be chosen. Finally, if none of the four events has a + Priority subobject defined, or even if exactly one of the four + events has a defined Priority, there are again 24 possible + orderings, but the likelihood of choosing any particular ordering is + undefined; the simulator can choose between events as it wishes. + (The SBML specification only defines the effects of priorities on + Event objects with respect to other Event objects with priorities. + Putting a priority on a single Event object in a model does not + cause it to fall within that scope.) + + Evaluation of Priority expressions + ====================================================================== + + An event's Priority object 'math' expression must be evaluated at + the time the Event is to be executed. During a simulation, all + simultaneous events have their Priority values calculated, and the + event with the highest priority is selected for next execution. + Note that it is possible for the execution of one Event object to + cause the Priority value of another simultaneously-executing Event + object to change (as well as to trigger other events, as already + noted). Thus, after executing one event, and checking whether any + other events in the model have been triggered, all remaining + simultaneous events that either (i) have Trigger objects with + attributes 'persistent'=False or (ii) have Trigger expressions that + did not transition from True to False, must have their Priority + expression reevaluated. The highest-priority remaining event must + then be selected for execution next. + + Units of Priority object's mathematical expressions + ====================================================================== + + The unit associated with the value of a Priority object's 'math' + expression should be dimensionless. This is because the priority + expression only serves to provide a relative ordering between + different events, and only has meaning with respect to other + Priority object expressions. The value of Priority objects is not + comparable to any other kind of object in an SBML model. + + Note: + + The Priority construct exists only in SBML Level 3; it cannot be + used in SBML Level 2 or Level 1 models. + + See also Event, Delay, EventAssignment. +"; + + +%feature("docstring") Priority::Priority " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Priority(SBMLNamespaces sbmlns) + + Creates a new Priority object using the given SBMLNamespaces object + 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Priority object to an Event (e.g., using + Event.setPriority()), the SBML XML namespace of the document + overrides the value used when creating the Priority object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a Priority is an important aid to + producing valid SBML. Knowledge of the intented SBML Level and + Version determine whether it is valid to assign a particular value to + an attribute, or whether it is valid to add a particular Priority + object to an existing Event. + + Note: + + The Priority construct exists only in SBML Level 3; it cannot be + used in SBML Level 2 or Level 1 models. + + ______________________________________________________________________ + Method variant with the following signature: + + Priority(long level, long version) + + Creates a new Priority object using the given SBML 'level' and + 'version' values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + Priority + + Parameter 'version' is a long integer, the SBML Version to assign to + this Priority + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a Priority object to an Event (e.g., using + Event.setPriority()), the SBML Level, SBML Version and XML namespace + of the document override the values used when creating the Priority + object via this constructor. This is necessary to ensure that an + SBML document is a consistent structure. Nevertheless, the ability + to supply the values at the time of creation of a Priority is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add a + particular Priority object to an existing Event. + + Note: + + The Priority construct exists only in SBML Level 3; it cannot be + used in SBML Level 2 or Level 1 models. + + ______________________________________________________________________ + Method variant with the following signature: + + Priority(Priority orig) + + Copy constructor; creates a copy of this Priority. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Priority::accept " + Accepts the given SBMLVisitor for this instance of Priority. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") Priority::clone " + Creates and returns a deep copy of this Priority. + + Returns a (deep) copy of this Priority. +"; + + +%feature("docstring") Priority::getMath " + Get the mathematical formula for the priority and return it as an + AST. + + Returns the math of this Priority. +"; + + +%feature("docstring") Priority::isSetMath " + Predicate to test whether the formula for this delay is set. + + Returns True if the formula (meaning the math subelement) of this + Priority is set, False otherwise. +"; + + +%feature("docstring") Priority::setMath " + Sets the math expression of this Priority instance to a copy of the + given ASTNode. + + Parameter 'math' is an ASTNode representing a formula tree. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") Priority::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") Priority::getElementName " + Returns the XML element name of this object, which for Priority, is + always 'priority'. + + Returns the name of this element, i.e., 'priority'. + + See also getTypeCode(). +"; + + +%feature("docstring") Priority::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") Priority::writeElements " + Internal implementation method. +"; + + +%feature("docstring") Priority::hasRequiredElements " + Predicate returning True if all the required elements for this + Priority object have been set. + + Note: + + The required elements for a Priority object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") Priority::removeFromParentAndDelete " + Finds this Priority's Event parent and calls unsetPriority() on it, + indirectly deleting itself. Overridden from the SBase function since + the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") Priority::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Priority::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") Priority::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") Priority::getInternalId " + Internal implementation method. +"; + + +%feature("docstring") Priority::setInternalId " + Internal implementation method. +"; + + +%feature("docstring") Priority::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") Priority::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") Priority::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") Priority::readL3Attributes " + Internal implementation method. +"; + + +%feature("docstring") Priority::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBO " + @ingroup Core Methods for interacting with Systems Biology Ontology + terms. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The values of 'id' attributes on SBML components allow the components + to be cross-referenced within a model. The values of 'name' + attributes on SBML components provide the opportunity to assign them + meaningful labels suitable for display to humans. The specific + identifiers and labels used in a model necessarily must be + unrestricted by SBML, so that software and users are free to pick + whatever they need. However, this freedom makes it more difficult + for software tools to determine, without additional human + intervention, the semantics of models more precisely than the + semantics provided by the SBML object classes defined in other + sections of this document. For example, there is nothing inherent in + a parameter with identifier k that would indicate to a software + tool it is a first-order rate constant (if that's what k happened to + be in some given model). However, one may need to convert a model + between different representations (e.g., Henri-Michaelis-Menten + versus elementary steps), or to use it with different modeling + approaches (discrete or continuous). One may also need to relate + the model components with other description formats such as SBGN + (http://www.sbgn.org/) using deeper semantics. Although an advanced + software tool might be able to deduce the semantics of some model + components through detailed analysis of the kinetic rate expressions + and other parts of the model, this quickly becomes infeasible for + any but the simplest of models. + + An approach to solving this problem is to associate model components + with terms from carefully curated controlled vocabularies (CVs). + This is the purpose of the optional 'sboTerm' attribute provided on + the SBML class SBase. The 'sboTerm' attribute always refers to + terms belonging to the Systems Biology Ontology (SBO). + + Use of SBO + ====================================================================== + + Labeling model components with terms from shared controlled + vocabularies allows a software tool to identify each component using + identifiers that are not tool-specific. An example of where this is + useful is the desire by many software developers to provide users + with meaningful names for reaction rate equations. Software tools + with editing interfaces frequently provide these names in menus or + lists of choices for users. However, without a standardized set of + names or identifiers shared between developers, a given software + package cannot reliably interpret the names or identifiers of + reactions used in models written by other tools. + + The first solution that might come to mind is to stipulate that + certain common reactions always have the same name (e.g., + 'Michaelis-Menten'), but this is simply impossible to do: not only + do humans often disagree on the names themselves, but it would not + allow for correction of errors or updates to the list of predefined + names except by issuing new releases of the SBML specification -- to + say nothing of many other limitations with this approach. Moreover, + the parameters and variables that appear in rate expressions also + need to be identified in a way that software tools can interpret + mechanically, implying that the names of these entities would also + need to be regulated. + + The Systems Biology Ontology (SBO) provides terms for identifying + most elements of SBML. The relationship implied by an 'sboTerm' on + an SBML model component is is-a between the characteristic of the + component meant to be described by SBO on this element and the SBO + term identified by the value of the 'sboTerm'. By adding SBO term + references on the components of a model, a software tool can provide + additional details using independent, shared vocabularies that can + enable other software tools to recognize precisely what the + component is meant to be. Those tools can then act on that + information. For example, if the SBO identifier 'SBO:0000049' is + assigned to the concept of 'first-order irreversible mass-action + kinetics, continuous framework', and a given KineticLaw object in a + model has an 'sboTerm' attribute with this value, then regardless of + the identifier and name given to the reaction itself, a software + tool could use this to inform users that the reaction is a first- + order irreversible mass-action reaction. This kind of reverse + engineering of the meaning of reactions in a model would be + difficult to do otherwise, especially for more complex reaction + types. + + The presence of SBO labels on Compartment, Species, and Reaction + objects in SBML can help map those entities to equivalent concepts in + other standards, such as (but not limited to) BioPAX + (http://www.biopax.org/), PSI-MI (http://www.psidev.info), or the + Systems Biology Graphical Notation (SBGN, http://www.sbgn.org/). + Such mappings can be used in conversion procedures, or to build + interfaces, with SBO becoming a kind of 'glue' between standards of + representation. + + The presence of the label on a kinetic expression can also allow + software tools to make more intelligent decisions about reaction rate + expressions. For example, an application could recognize certain + types of reaction formulas as being ones it knows how to solve with + optimized procedures. The application could then use internal, + optimized code implementing the rate formula indexed by identifiers + such as 'SBO:0000049' appearing in SBML models. + + Finally, SBO labels may be very valuable when it comes to model + integration, by helping identify interfaces, convert mathematical + expressions and parameters etc. + + Although the use of SBO can be beneficial, it is critical to keep in + mind that the presence of an 'sboTerm' value on an object must not + change the fundamental mathematical meaning of the model. An SBML + model must be defined such that it stands on its own and does not + depend on additional information added by SBO terms for a correct + mathematical interpretation. SBO term definitions will not imply + any alternative mathematical semantics for any SBML object labeled + with that term. Two important reasons motivate this principle. + First, it would be too limiting to require all software tools to be + able to understand the SBO vocabularies in addition to understanding + SBML. Supporting SBO is not only additional work for the software + developer; for some kinds of applications, it may not make sense. + If SBO terms on a model are optional, it follows that the SBML model + must remain unambiguous and fully interpretable without them, + because an application reading the model may ignore the terms. + Second, we believe allowing the use of 'sboTerm' to alter the + mathematical meaning of a model would allow too much leeway to + shoehorn inconsistent concepts into SBML objects, ultimately + reducing the interoperability of the models. + + Relationships between SBO and SBML + ====================================================================== + + The goal of SBO labeling for SBML is to clarify to the fullest extent + possible the nature of each element in a model. The approach taken + in SBO begins with a hierarchically-structured set of controlled + vocabularies with six main divisions: (1) entity, (2) participant + role, (3) quantitative parameter, (4) modeling framework, (5) + mathematical expression, and (6) interaction. The web site for SBO + (http://biomodels.net) should be consulted for the current version + of the ontology. + + The Systems Biology Ontology (SBO) is not part of SBML; it is being + developed separately, to allow the modeling community to evolve the + ontology independently of SBML. However, the terms in the ontology + are being designed keeping SBML components in mind, and are + classified into subsets that can be directly related with SBML + components such as reaction rate expressions, parameters, and + others. The use of 'sboTerm' attributes is optional, and the + presence of 'sboTerm' on an element does not change the way the + model is interpreted. Annotating SBML elements with SBO terms adds + additional semantic information that may be used to convert the + model into another model, or another format. Although SBO support + provides an important source of information to understand the + meaning of a model, software does not need to support 'sboTerm' to + be considered SBML-compliant. +"; + + +%feature("docstring") SBO::readTerm " + Internal implementation method. +"; + + +%feature("docstring") SBO::writeTerm " + Internal implementation method. +"; + + +%feature("docstring") SBO::isQuantitativeParameter " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'quantiative parameter', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isQuantitativeParameter(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isParticipantRole " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'participant role', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isParticipantRole(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isModellingFramework " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'modeling framework', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isModellingFramework(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isMathematicalExpression " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'mathematical expression', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isMathematicalExpression(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isKineticConstant " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'kinetic constant', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isKineticConstant(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isReactant " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'reactant', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isReactant(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isProduct " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'product', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isProduct(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isModifier " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'modifier', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isModifier(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isRateLaw " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'rate law', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isRateLaw(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isEvent " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'event', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isEvent(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isPhysicalParticipant " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'physical participant, False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isPhysicalParticipant(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isParticipant " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'participant', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isParticipant(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isInteraction " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'interaction', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isInteraction(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isEntity " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'entity', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isEntity(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isFunctionalEntity " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'functional entity', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isFunctionalEntity(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isMaterialEntity " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'material entity', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isMaterialEntity(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isConservationLaw " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'conservation law', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isConservationLaw(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isSteadyStateExpression " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'steady state expression', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isSteadyStateExpression(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isFunctionalCompartment " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'functional compartment', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isFunctionalCompartment(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isContinuousFramework " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'continuous framework', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isContinuousFramework(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isDiscreteFramework " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'discrete framework', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isDiscreteFramework(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isLogicalFramework " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'logical framework', False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isLogicalFramework(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isMetadataRepresentation " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'metadata representation', False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isMetadataRepresentation(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isOccurringEntityRepresentation " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'occurring entity representation', + False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isOccurringEntityRepresentation(). They + are functionally identical. @~ +"; + + +%feature("docstring") SBO::isPhysicalEntityRepresentation " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'physical entity representation', + False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isPhysicalEntityRepresentation(). They + are functionally identical. @~ +"; + + +%feature("docstring") SBO::isSystemsDescriptionParameter " + Returns True if the given term identifier comes from the stated + branch of SBO. + + Returns True if 'term' is-a SBO 'systems description parameter', + False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isSystemsDescriptionParameter(). They are + functionally identical. @~ +"; + + +%feature("docstring") SBO::isObselete " + Predicate for checking whether the given term is obsolete. + + Returns True if 'term' is-a SBO 'obsolete' term, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_isObselete(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::intToString " + Returns the integer as a correctly formatted SBO identifier string. + + Returns the given integer sboTerm as a zero-padded seven digit + string. + + Note: + + If the sboTerm is not in the correct range (0000000-9999999), an + empty string is returned. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_intToString(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::stringToInt " + Returns the string as a correctly formatted SBO integer portion. + + Returns the given string sboTerm as an integer. If the sboTerm is + not in the correct format (a zero-padded, seven digit string), -1 is + returned. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_stringToInt(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::checkTerm " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + checkTerm(string sboTerm) + + Checks the format of the given SBO identifier string. + + Returns True if sboTerm is in the correct format (a zero-padded, + seven digit string), False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_checkTerm(). They are functionally + identical. @~ + + ______________________________________________________________________ + Method variant with the following signature: + + checkTerm(int sboTerm) + + Checks the format of the given SBO identifier, given in the form of + the integer portion alone. + + Returns True if sboTerm is in the range (0000000-9999999), False + otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBO), and the other will be a standalone top-level + function with the name SBO_checkTerm(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBO::isChildOf " + Internal implementation method. +"; + + +%feature("docstring") SBO::populateSBOTree " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker " + @ingroup Core Methods for checking syntax of SBML identifiers and + other strings. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + This utility class provides static methods for checking the syntax of + identifiers and other text used in an SBML model. The methods allow + callers to verify that strings such as SBML identifiers and XHTML + notes text conform to the SBML specifications. +"; + + +%feature("docstring") SyntaxChecker::isValidSBMLSId " + Returns true True or False depending on whether the argument string + conforms to the syntax of SBML identifiers. + + In SBML, identifiers that are the values of 'id' attributes on + objects must conform to a data type called SId in the SBML + specifications. LibSBML does not provide an explicit SId data type; + it uses ordinary character strings, which is easier for applications + to support. LibSBML does, however, test for identifier validity at + various times, such as when reading in models from files and data + streams. + + This method provides programs with the ability to test explicitly + that the identifier strings they create conform to the SBML + identifier syntax. + + Parameter 'sid' is string to be checked for conformance to SBML + identifier syntax. + + Returns True if the string conforms to type SBML data type SId, + False otherwise. + + Note: + + The following is a summary of the definition of the SBML identifier + type SId, which defines the permitted syntax of identifiers. We + express the syntax using an extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter + | digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML identifiers is determined by an exact character + sequence match; i.e., comparisons must be performed in a case- + sensitive manner. In addition, there are a few conditions for the + uniqueness of identifiers in an SBML model. Please consult the SBML + specifications for the exact formulations. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SyntaxChecker), and the other will be a standalone + top-level function with the name SyntaxChecker_isValidSBMLSId(). + They are functionally identical. @~ + + @see SyntaxChecker.isValidUnitSId() @~ @see + SyntaxChecker.isValidXMLID() @~ +"; + + +%feature("docstring") SyntaxChecker::isValidXMLID " + Returns True or False depending on whether the argument string + conforms to the XML data type ID. + + In SBML, identifiers that are the values of 'metaid' attributes on + objects must conform to the XML ID data type. LibSBML does not + provide an explicit XML ID data type; it uses ordinary character + strings, which is easier for applications to support. LibSBML does, + however, test for identifier validity at various times, such as when + reading in models from files and data streams. + + This method provides programs with the ability to test explicitly + that the identifier strings they create conform to the SBML + identifier syntax. + + Parameter 'id' is string to be checked for conformance to the syntax + of XML ID. + + Returns True if the string is a syntactically-valid value for the + XML type ID, False otherwise. + + Note: + + The following is a summary of the definition of the XML 1.0 data type + ID. We express the syntax using an extended form of BNF notation: + + NCNameChar ::= letter | digit | '.' | '-' | '_' | ':' | CombiningChar + | Extender ID ::= ( letter | '_' | ':' ) NCNameChar* + + The characters ( and ) are used for grouping, the character * means + \"zero or more times\", and the character | indicates logical \"or\". + The production letter consists of the basic upper and lower case + alphabetic characters of the Latin alphabet along with a large + number of related characters defined by Unicode 2.0; similarly, the + production digit consists of the numerals 0..9 along with related + Unicode 2.0 characters. The CombiningChar production is a list of + characters that add such things as accents to the preceding + character. (For example, the Unicode character \#x030A when combined + with a produces \aa.) The Extender production is a list of + characters that extend the shape of the preceding character. Please + consult the XML 1.0 specification for the complete definitions of + letter, digit, CombiningChar, and Extender. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SyntaxChecker), and the other will be a standalone + top-level function with the name SyntaxChecker_isValidXMLID(). They + are functionally identical. @~ + + @see SyntaxChecker.isValidSBMLSId() @~ @see + SyntaxChecker.isValidUnitSId() @~ +"; + + +%feature("docstring") SyntaxChecker::isValidXMLanyURI " + Returns True or False depending on whether the Parameter 'uri' is + argument string conforms to the XML data type anyURI. + + Type anyURI is defined by XML Schema 1.0. It is a character string + data type whose values are interpretable as URIs (Universal Resource + Identifiers) as described by the W3C document RFC 3986. LibSBML + does not provide an explicit XML anyURI data type; it uses ordinary + character strings, which is easier for applications to support. + LibSBML does, however, test for anyURI validity at various times, + such as when reading in models from files and data streams. + + This method provides programs with the ability to test explicitly + that the strings they create conform to the XML anyURI syntax. + + Parameter 'uri' is string to be checked for conformance to the syntax + of anyURI. + + Returns True if the string is a syntactically-valid value for the + XML type anyURI, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SyntaxChecker), and the other will be a standalone + top-level function with the name SyntaxChecker_isValidXMLanyURI(). + They are functionally identical. @~ +"; + + +%feature("docstring") SyntaxChecker::isValidUnitSId " + Returns True or False depending on whether the argument string + conforms to the syntax of SBML unit identifiers. + + In SBML, the identifiers of units (of both the predefined units and + user-defined units) must conform to a data type called UnitSId in + the SBML specifications. LibSBML does not provide an explicit + UnitSId data type; it uses ordinary character strings, which is + easier for applications to support. LibSBML does, however, test for + identifier validity at various times, such as when reading in models + from files and data streams. + + This method provides programs with the ability to test explicitly + that the identifier strings they create conform to the SBML + identifier syntax. + + Parameter 'units' is string to be checked for conformance to SBML + unit identifier syntax. + + Returns True if the string conforms to type SBML data type UnitSId, + False otherwise. + + Note: + + The following is a summary of the definition of the SBML identifier + type UnitSId, which defines the permitted syntax of identifiers. We + express the syntax using an extended form of BNF notation: + + letter ::= 'a'..'z','A'..'Z' digit ::= '0'..'9' idChar ::= letter | + digit | '_' SId ::= ( letter | '_' ) idChar* + + The characters ( and ) are used for grouping, the character * \"zero + or more times\", and the character | indicates logical \"or\". The + equality of SBML unit identifiers is determined by an exact + character sequence match; i.e., comparisons must be performed in a + case-sensitive manner. In addition, there are a few conditions for + the uniqueness of unit identifiers in an SBML model. Please consult + the SBML specifications for the exact formulations. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SyntaxChecker), and the other will be a standalone + top-level function with the name SyntaxChecker_isValidUnitSId(). + They are functionally identical. @~ + + @see SyntaxChecker.isValidSBMLSId() @~ @see + SyntaxChecker.isValidXMLID() @~ +"; + + +%feature("docstring") SyntaxChecker::hasExpectedXHTMLSyntax " + Returns True or False depending on whether the given XMLNode object + contains valid XHTML content. + + In SBML, the content of the 'notes' subelement available on SBase, as + well as the 'message' subelement available on Constraint, must + conform to XHTML 1.0 (which is simply an XML-ized version of HTML). + However, the content cannot be entirely free-form; it must satisfy + certain requirements defined in the SBML specifications for + specific SBML Levels. This method implements a verification process + that lets callers check whether the content of a given XMLNode + object conforms to the SBML requirements for 'notes' and 'message' + structure. + + An aspect of XHTML validity is that the content is declared to be in + the XML namespace for XHTML 1.0. There is more than one way in + which this can be done in XML. In particular, a model might not + contain the declaration within the 'notes' or 'message' subelement + itself, but might instead place the declaration on an enclosing + element and use an XML namespace prefix within the 'notes' element to + refer to it. In other words, the following is valid: + + <sbml xmlns=\'http://www.sbml.org/sbml/level2/version3\' level=\'2\' version=\'3\' + xmlns:xhtml=\'http://www.w3.org/1999/xhtml\'> + <model> + <notes> + <xhtml:body> + <xhtml:center><xhtml:h2>A Simple Mitotic Oscillator</xhtml:h2></xhtml:center> + <xhtml:p>A minimal cascade model for the mitotic oscillator.</xhtml:p> + </xhtml:body> + </notes> + ... rest of model ... + </sbml> + Contrast the above with the following, self-contained + version, which places the XML namespace declaration within the + <notes> element itself: + + <sbml xmlns=\'http://www.sbml.org/sbml/level2/version3\' level=\'2\' version=\'3\'> + <model> + <notes> + <html xmlns=\'http://www.w3.org/1999/xhtml\'> + <head> + <title/> + </head> + <body> + <center><h2>A Simple Mitotic Oscillator</h2></center> + <p>A minimal cascade model for the mitotic oscillator.</p> + </body> + </html> + </notes> + ... rest of model ... + </sbml> + + Both of the above are valid XML. The purpose of the 'sbmlns' + argument to this method is to allow callers to check the validity of + 'notes' and 'message' subelements whose XML namespace declarations + have been put elsewhere in the manner illustrated above. Callers can + can pass in the SBMLNamespaces object of a higher-level model + component if the XMLNode object does not itself have the XML + namespace declaration for XHTML 1.0. + + Parameter 'xhtml' is the XMLNode to be checked for conformance. + Parameter 'sbmlns' is the SBMLNamespaces associated with the object. + + Returns True if the XMLNode content conforms, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SyntaxChecker), and the other will be a standalone + top-level function with the name + SyntaxChecker_hasExpectedXHTMLSyntax(). They are functionally + identical. @~ + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") SyntaxChecker::isValidInternalSId " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isValidInternalUnitSId " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isAllowedElement " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::hasDeclaredNS " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isCorrectHTMLNode " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isUnicodeLetter " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isUnicodeDigit " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isCombiningChar " + Internal implementation method. +"; + + +%feature("docstring") SyntaxChecker::isExtender " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath " + @ingroup Core Implementation of SBML Level 2's StoichiometryMath + construct. + + Stoichiometries in SBML Level 2 + ====================================================================== + + In SBML Level 2, product and reactant stoichiometries can be + specified using either the 'stoichiometry' attribute or a + 'stoichiometryMath' element in a SpeciesReference object. The + 'stoichiometry' attribute is of type double and should contain + values greater than zero (0). The 'stoichiometryMath' element is + implemented as an element containing a MathML expression. These two + are mutually exclusive; only one of 'stoichiometry' or + 'stoichiometryMath' should be defined in a given SpeciesReference + instance. When neither the attribute nor the element is present, + the value of 'stoichiometry' in the enclosing SpeciesReference + instance defaults to 1. + + For maximum interoperability, SpeciesReference's 'stoichiometry' + attribute should be used in preference to 'stoichiometryMath' when a + species' stoichiometry is a simple scalar number (integer or + decimal). When the stoichiometry is a rational number, or when it is + a more complicated formula, 'stoichiometryMath' must be used. The + MathML expression in 'stoichiometryMath' may also refer to + identifiers of entities in a model (except reaction identifiers). + However, the only species identifiers that can be used in + 'stoichiometryMath' are those referenced in the enclosing Reaction's + list of reactants, products and modifiers. + + The 'stoichiometry' attribute and the 'stoichiometryMath' element, + when either is used, is each interpreted as a factor applied to the + reaction rate to produce the rate of change of the species + identified by the 'species' attribute in the enclosing + SpeciesReference. This is the normal interpretation of a + stoichiometry, but in SBML, one additional consideration has to be + taken into account. The reaction rate, which is the result of the + KineticLaw's 'math' element, is always in the model's substance per + time units. However, the rate of change of the species will involve + the species' substance units (i.e., the units identified by the + Species object's 'substanceUnits' attribute), and these units may be + different from the model's default substance units. If the units + are different, the stoichiometry must incorporate a conversion + factor for converting the model's substance units to the species' + substance units. The conversion factor is assumed to be included in + the scalar value of the 'stoichiometry' attribute if 'stoichiometry' + is used. If instead 'stoichiometryMath' is used, then the product + of the model's 'substance' units times the 'stoichiometryMath' units + must match the substance units of the species. Note that in either + case, if the species' units and the model's default substance units + are the same, the stoichiometry ends up being a dimensionless number + and equivalent to the standard chemical stoichiometry found in + textbooks. Examples and more explanations of this are given in the + SBML specification. + + The following is a simple example of a species reference for species + 'X0', with stoichiometry 2, in a list of reactants within a reaction + having the identifier 'J1': + + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\' stoichiometry=\'2\'> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + + The following is a more complex example of a species reference for + species 'X0', with a stoichiometry formula consisting of a rational + number: + + <model> + ... + <listOfReactions> + <reaction id=\'J1\'> + <listOfReactants> + <speciesReference species=\'X0\'> + <stoichiometryMath> + <math xmlns=\'http://www.w3.org/1998/Math/MathML\'> + <cn type=\'rational\'> 3 <sep/> 2 </cn> + </math> + </stoichiometryMath> + </speciesReference> + </listOfReactants> + ... + </reaction> + ... + </listOfReactions> + ... + </model> + + Additional discussions of stoichiometries and implications for + species and reactions are included in the documentation of + SpeciesReference class. + + Stoichiometries in SBML Level 3 + ====================================================================== + + The StoichiometryMath construct is not defined in SBML Level 3 + Version 1 Core. Instead, Level 3 defines the identifier of + SpeciesReference objects as a stand-in for the stoichiometry of the + reactant or product being referenced, and allows that identifier to + be used elsewhere in SBML models, including (for example) + InitialAssignment objects. This makes it possible to achieve the + same effect as StoichiometryMath, but with other SBML objects. For + instance, to produce a stoichiometry value that is a rational + number, a model can use InitialAssignment to assign the identifier + of a SpeciesReference object to a MathML expression evaluating to a + rational number. This is analogous to the same way that, in Level + 2, the model would use StoichiometryMath with a MathML expression + evaluating to a rational number. + + In SBML Level 2, the stoichiometry of a reactant or product is a + combination of both a biochemical stoichiometry (meaning, the + standard stoichiometry of a species in a reaction) and any necessary + unit conversion factors. The introduction of an explicit attribute on + the Species object for a conversion factor allows Level 3 to avoid + having to overload the meaning of stoichiometry. In Level 3, the + stoichiometry given by a SpeciesReference object in a reaction is a + 'proper' biochemical stoichiometry, meaning a dimensionless number + free of unit conversions. + + See also SpeciesReference, Reaction. +"; + + +%feature("docstring") StoichiometryMath::StoichiometryMath " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + StoichiometryMath(SBMLNamespaces sbmlns) + + Creates a new StoichiometryMath object using the given SBMLNamespaces + object 'sbmlns'. + + The SBMLNamespaces object encapsulates SBML Level/Version/namespaces + information. It is used to communicate the SBML Level, Version, and + (in Level 3) packages used in addition to SBML Level 3 Core. A + common approach to using this class constructor is to create an + SBMLNamespaces object somewhere in a program, once, then pass it to + object constructors such as this one when needed. + + Parameter 'sbmlns' is an SBMLNamespaces object. + + The StoichiometryMath construct exists only in SBML Level 2. It is + an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a StoichiometryMath object to an SBMLDocument + (e.g., using SpeciesReference.createStoichiometryMath()), the SBML + XML namespace of the document overrides the value used when creating + the StoichiometryMath object via this constructor. This is + necessary to ensure that an SBML document is a consistent structure. + Nevertheless, the ability to supply the values at the time of + creation of a StoichiometryMath is an important aid to producing + valid SBML. Knowledge of the intented SBML Level and Version + determine whether it is valid to assign a particular value to an + attribute, or whether it is valid to add an object to an existing + SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + StoichiometryMath(long level, long version) + + Creates a new StoichiometryMath object using the given SBML 'level' + values. + + Parameter 'level' is a long integer, the SBML Level to assign to this + StoichiometryMath + + Parameter 'version' is a long integer, the SBML Version to assign to + this StoichiometryMath + + The StoichiometryMath construct exists only in SBML Level 2. It is + an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. + + Throws ValueError: @~ Thrown if the given 'level' and 'version' + combination, or this kind of SBML object, are either invalid or + mismatched with respect to the parent SBMLDocument object. + + Note: + + Upon the addition of a StoichiometryMath object to an SBMLDocument + (e.g., using SpeciesReference.createStoichiometryMath()), the SBML + Level, SBML Version and XML namespace of the document override the + values used when creating the StoichiometryMath object via this + constructor. This is necessary to ensure that an SBML document is a + consistent structure. Nevertheless, the ability to supply the + values at the time of creation of a StoichiometryMath is an + important aid to producing valid SBML. Knowledge of the intented + SBML Level and Version determine whether it is valid to assign a + particular value to an attribute, or whether it is valid to add an + object to an existing SBMLDocument. + + ______________________________________________________________________ + Method variant with the following signature: + + StoichiometryMath(StoichiometryMath orig) + + Copy constructor; creates a copy of this StoichiometryMath. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") StoichiometryMath::accept " + Accepts the given SBMLVisitor for this instance of StoichiometryMath. + + Parameter 'v' is the SBMLVisitor instance to be used. + + Returns the result of calling v.visit(). +"; + + +%feature("docstring") StoichiometryMath::clone " + Creates and returns a deep copy of this StoichiometryMath object. + + Returns a (deep) copy of this StoichiometryMath. +"; + + +%feature("docstring") StoichiometryMath::getMath " + Retrieves the mathematical formula within this StoichiometryMath and + return it as an AST. + + Returns the math of this StoichiometryMath. + + The StoichiometryMath construct exists only in SBML Level 2. It is + an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. +"; + + +%feature("docstring") StoichiometryMath::isSetMath " + Predicate to test whether the math for this StoichiometryMath object + is set. + + Returns True if the formula (meaning the math subelement) of this + StoichiometryMath is set, False otherwise. + + The StoichiometryMath construct exists only in SBML Level 2. It is + an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. +"; + + +%feature("docstring") StoichiometryMath::setMath " + Sets the 'math' expression of this StoichiometryMath instance to a + copy of the given ASTNode. + + Parameter 'math' is an ASTNode representing a formula tree. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + The StoichiometryMath construct exists only in SBML Level 2. It is + an optional construct available for defining the stoichiometries of + reactants and products in Reaction objects. Note that a different + mechanism is used in SBML Level 3, where StoichiometryMath is not + available. Please consult the top of this libSBML StoichiometryMath + documentation for more information about the differences between SBML + Level 2 and 3 with respect to stoichiometries. +"; + + +%feature("docstring") StoichiometryMath::getDerivedUnitDefinition " + Calculates and returns a UnitDefinition object that expresses the + units returned by the math expression in this StoichiometryMath + object. + + The units are calculated based on the mathematical expression in the + StoichiometryMath and the model quantities referenced by <ci> + elements used within that expression. The + StoichiometryMath.getDerivedUnitDefinition() method returns the + calculated units. + + Note that the functionality that facilitates unit analysis depends + on the model as a whole. Thus, in cases where the object has not + been added to a model or the model itself is incomplete, unit + analysis is not possible and this method will return None. + + WARNING: + + Note that it is possible the 'math' expression in the + StoichiometryMath instance contains literal numbers or parameters + with undeclared units. In those cases, it is not possible to + calculate the units of the overall expression without making + assumptions. LibSBML does not make assumptions about the units, and + StoichiometryMath.getDerivedUnitDefinition() only returns the units + as far as it is able to determine them. For example, in an + expression X + Y, if X has unambiguously-defined units and Y does + not, it will return the units of X. When using this method, + <strong>it is critical that callers also invoke the method</strong> + StoichiometryMath.containsUndeclaredUnits() <strong>to determine + whether this situation holds</strong>. Callers should take suitable + action in those situations. + + Returns a UnitDefinition that expresses the units of the math, or + None if one cannot be constructed. + + See also containsUndeclaredUnits(). +"; + + +%feature("docstring") StoichiometryMath::containsUndeclaredUnits " + Predicate returning True if the math expression of this + StoichiometryMath object contains literal numbers or parameters with + undeclared units. + + The StoichiometryMath.getDerivedUnitDefinition() method returns what + libSBML computes the units of the Stoichiometry to be, to the extent + that libSBML can compute them. However, if the expression contains + literal numbers or parameters with undeclared units, libSBML may not + be able to compute the full units of the expression and will only + return what it can compute. Callers should always use + StoichiometryMath.containsUndeclaredUnits() when using + StoichiometryMath.getDerivedUnitDefinition() to decide whether the + returned units may be incomplete. + + Returns True if the math expression of this StoichiometryMath + includes numbers/parameters with undeclared units, False otherwise. + + Note: + + A return value of True indicates that the UnitDefinition returned by + StoichiometryMath.getDerivedUnitDefinition() may not accurately + represent the units of the expression. + + See also getDerivedUnitDefinition(). +"; + + +%feature("docstring") StoichiometryMath::getTypeCode " + Returns the libSBML type code of this object instance. + + LibSBML attaches an identifying code to every kind of SBML object. + These are known as SBML type codes. In the Python language + interface for libSBML, the type codes are defined as static integer + constants in the interface class libsbml. The names of the type + codes all begin with the characters SBML_. @~ + + Returns the SBML type code for this object, or libsbml.SBML_UNKNOWN + (default). + + See also getElementName(). +"; + + +%feature("docstring") StoichiometryMath::getElementName " + Returns the XML element name of this object, which for + StoichiometryMath, is always 'stoichiometryMath'. + + Returns the name of this element, i.e., 'stoichiometryMath'. +"; + + +%feature("docstring") StoichiometryMath::getElementPosition " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::writeElements " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::hasRequiredElements " + Predicate returning True if all the required elements for this + StoichiometryMath object have been set. + + Note: + + The required elements for a StoichiometryMath object are: + + * 'math' + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") StoichiometryMath::removeFromParentAndDelete " + Finds this StoichiometryMath's SpeciesReference parent and calls + unsetStoichiometryMath() on it, indirectly deleting itself. + Overridden from the SBase function since the parent is not a ListOf. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") StoichiometryMath::renameSIdRefs " + Renames all the SIdRef attributes on this element, including any + found in MathML. + + In SBML, object identifiers are of a type called SId. In SBML Level + 3, an explicit data type called SIdRef was introduced for attribute + values that refer to SId values; in previous Levels of SBML, this + data type did not exist and attributes were simply described to as + \"referring to an identifier\", but the effective data type was the + same as Level 3's SIdRef. These and other methods of libSBML refer + to the type SIdRef for all Levels of SBML, even if the corresponding + SBML specification did not explicitly name the data type. + + This method works by looking at all attributes and (if appropriate) + mathematical formulas, comparing the identifiers to the value of + 'oldid'. If any matches are found, the matching identifiers are + replaced with 'newid'. The method does not descend into child + elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") StoichiometryMath::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this element. + + In SBML, unit definitions have identifiers of type UnitSId. In SBML + Level 3, an explicit data type called UnitSIdRef was introduced for + attribute values that refer to UnitSId values; in previous Levels of + SBML, this data type did not exist and attributes were simply + described to as \"referring to a unit identifier\", but the + effective data type was the same as Level 3's UnitSIdRef. These and + other methods of libSBML refer to the type UnitSIdRef for all Levels + of SBML, even if the corresponding SBML specification did not + explicitly name the data type. + + This method works by looking at all unit identifier attribute values + (including, if appropriate, inside mathematical formulas), comparing + the unit identifiers to the value of 'oldid'. If any matches are + found, the matching identifiers are replaced with 'newid'. The + method does not descend into child elements. + + Parameter 'oldid' is the old identifier Parameter 'newid' is the new + identifier +"; + + +%feature("docstring") StoichiometryMath::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::getInternalId " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::setInternalId " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::readOtherXML " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::addExpectedAttributes " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::readAttributes " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::readL2Attributes " + Internal implementation method. +"; + + +%feature("docstring") StoichiometryMath::writeAttributes " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces " + @ingroup Core Class to store SBML level, version and namespace + information. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + There are differences in the definitions of components between + different SBML Levels, as well as Versions within Levels. For + example, the 'sboTerm' attribute was not introduced until Level 2 + Version 2, and then only on certain component classes; the SBML + Level 2 Version 3 specification moved the 'sboTerm' attribute to the + SBase class, thereby allowing nearly all components to have SBO + annotations. As a result of differences such as those, libSBML needs + to track the SBML Level and Version of every object created. + + The purpose of the SBMLNamespaces object class is to make it easier + to communicate SBML Level and Version data between libSBML + constructors and other methods. The SBMLNamespaces object class + tracks 3-tuples (triples) consisting of SBML Level, Version, and the + corresponding SBML XML namespace. + + The plural name (SBMLNamespaces) is not a mistake, because in SBML + Level 3, objects may have extensions added by Level 3 packages used + by a given model and therefore may have multiple namespaces + associated with them; however, until the introduction of SBML Level + 3, the SBMLNamespaces object only records one SBML + Level/Version/namespace combination at a time. Most constructors for + SBML objects in libSBML take a SBMLNamespaces object as an argument, + thereby allowing the constructor to produce the proper combination of + attributes and other internal data structures for the given SBML + Level and Version. +"; + + +%feature("docstring") SBMLNamespaces::SBMLNamespaces " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLNamespaces(SBMLNamespaces orig) + + Copy constructor; creates a copy of a SBMLNamespaces. + + Parameter 'orig' is the SBMLNamespaces instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLNamespaces(long level = SBML_DEFAULT_LEVEL, long version = + SBML_DEFAULT_VERSION) + + Creates a new SBMLNamespaces object corresponding to the given SBML + 'level' and 'version'. + + SBMLNamespaces objects are used in libSBML to communicate SBML Level + and Version data between constructors and other methods. The + SBMLNamespaces object class tracks 3-tuples (triples) consisting of + SBML Level, Version, and the corresponding SBML XML namespace. Most + constructors for SBML objects in libSBML take a SBMLNamespaces object + as an argument, thereby allowing the constructor to produce the + proper combination of attributes and other internal data structures + for the given SBML Level and Version. + + The plural name (SBMLNamespaces) is not a mistake, because in SBML + Level 3, objects may have extensions added by Level 3 packages used + by a given model and therefore may have multiple namespaces + associated with them; however, until the introduction of SBML Level + 3, the SBMLNamespaces object only records one SBML + Level/Version/namespace combination at a time. Most constructors for + SBML objects in libSBML take a SBMLNamespaces object as an argument, + thereby allowing the constructor to produce the proper combination of + attributes and other internal data structures for the given SBML + Level and Version. + + Parameter 'level' is the SBML level Parameter 'version' is the SBML + version + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLNamespaces(long level, long version, string &pkgName, long + pkgVersion, string pkgPrefix = '') + + (For Extension) + + Creates a new SBMLNamespaces object corresponding to the combination + of (1) the given SBML 'level' and 'version', and (2) the given + 'package' with the 'package' 'version'. + + Note: + + SBMLExtensionException will be thrown if the extension module + that supports the combination of the given sbml level, sbml version, + package name, and package version has not been registered. + + Parameter 'level' is the SBML level Parameter 'version' is the SBML + version Parameter 'pkgName' is the string of package name (e.g. + 'layout', 'multi') Parameter 'pkgVersion' is the package version + Parameter 'pkgPrefix' is the prefix of the package namespace (e.g. + 'layout', 'multi') to be added. The package's name will be + used if the given string is empty (default). +"; + + +%feature("docstring") SBMLNamespaces::clone " + Creates and returns a deep copy of this SBMLNamespaces. + + Returns a (deep) copy of this SBMLNamespaces. +"; + + +%feature("docstring") SBMLNamespaces::getSBMLNamespaceURI " + Returns a string representing the SBML XML namespace for the given + 'level' and 'version' of SBML. + + Parameter 'level' is the SBML level Parameter 'version' is the SBML + version + + Returns a string representing the SBML namespace that reflects the + SBML Level and Version specified. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLNamespaces), and the other will be a standalone + top-level function with the name + SBMLNamespaces_getSBMLNamespaceURI(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBMLNamespaces::getSupportedNamespaces " + Returns a list of all supported SBMLNamespaces in this version of + libsbml. + + Returns a list with supported SBML namespaces. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLNamespaces), and the other will be a standalone + top-level function with the name + SBMLNamespaces_getSupportedNamespaces(). They are functionally + identical. @~ +"; + + +%feature("docstring") SBMLNamespaces::getURI " + Returns a string representing the SBML XML namespace of this object. + + Returns a string representing the SBML namespace that reflects the + SBML Level and Version of this object. +"; + + +%feature("docstring") SBMLNamespaces::getLevel " + Get the SBML Level of this SBMLNamespaces object. + + Returns the SBML Level of this SBMLNamespaces object. +"; + + +%feature("docstring") SBMLNamespaces::getVersion " + Get the SBML Version of this SBMLNamespaces object. + + Returns the SBML Version of this SBMLNamespaces object. +"; + + +%feature("docstring") SBMLNamespaces::getNamespaces " + Get the XML namespaces list for this SBMLNamespaces object. + + The plural is not a mistake, because in SBML Level 3, objects may + have extensions added by Level 3 packages used by a given model, and + therefore there may be multiple XML namespaces involved too. + However, until the introduction of SBML Level 3, the SBMLNamespaces + object only records one SBML Level/Version/namespace combination at + a time, and so this method will also only return a list of one item. + + Returns the XML namespaces of this SBMLNamespaces object. +"; + + +%feature("docstring") SBMLNamespaces::addNamespaces " + Add the given XML namespaces list to the set of namespaces within + this SBMLNamespaces object. + + The following code gives an example of how one could add the XHTML + namespace to the list of namespaces recorded by the top-level <sbml> + element of a model. It gives the new namespace a prefix of html. + + sbmlDoc = None + try: + sbmlDoc = SBMLDocument(3, 1) + except ValueError: + # Do something to handle exceptional situation. Candidate + # causes include invalid combinations of SBML Level and Version + # (impossible if hardwired as given here), running out of memory, and + # unknown system exceptions. + + namespaces = sbmlDoc.getNamespaces() + if namespaces == None: + # Do something to handle case of no namespaces. + + status = namespaces.add(\'http://www.w3.org/1999/xhtml\', \'html\') + if status != LIBSBML_OPERATION_SUCCESS: + # Do something to handle failure. + @~ + + Parameter 'xmlns' is the XML namespaces to be added. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") SBMLNamespaces::addNamespace " + Add an XML namespace (a pair of URI and prefix) to the set of + namespaces within this SBMLNamespaces object. + + Parameter 'uri' is the XML namespace to be added. Parameter 'prefix' + is the prefix of the namespace to be added. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") SBMLNamespaces::removeNamespace " + Removes an XML namespace from the set of namespaces within this + SBMLNamespaces object. + + Parameter 'uri' is the XML namespace to be added. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE +"; + + +%feature("docstring") SBMLNamespaces::addPackageNamespace " + Add an XML namespace (a pair of URI and prefix) of a package + extension to the set of namespaces within this SBMLNamespaces + object. The SBML Level and SBML Version of this object is used. + + Note: + + An XML namespace of a non-registered package extension can't be + added by this function (libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + will be returned). + + Parameter 'pkgName' is the string of package name (e.g. 'layout', + 'multi') Parameter 'pkgVersion' is the package version Parameter + 'prefix' is the prefix of the package namespace to be added. + The package's name will be used if the given string is empty + (default). + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + See also addNamespace(). +"; + + +%feature("docstring") SBMLNamespaces::addPackageNamespaces " + Add the XML namespaces of package extensions in the given + XMLNamespace object to the set of namespaces within this + SBMLNamespaces object (Non-package XML namespaces are not added by + this function). + + Note: + + XML namespaces of a non-registered package extensions are not added + (just ignored) by this function. + libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned if the + given xmlns is null. + + Parameter 'xmlns' is the XML namespaces to be added. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SBMLNamespaces::removePackageNamespace " + Removes an XML namespace of a package extension from the set of + namespaces within this SBMLNamespaces object. + + Parameter 'level' is the SBML level Parameter 'version' is the SBML + version Parameter 'pkgName' is the string of package name (e.g. + 'layout', 'multi') Parameter 'pkgVersion' is the package version + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE +"; + + +%feature("docstring") SBMLNamespaces::addPkgNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces::addPkgNamespaces " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces::removePkgNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces::isSBMLNamespace " + Predicate returning True if the given URL is one of SBML XML + namespaces. + + Parameter 'uri' is the URI of namespace + + Returns True if the 'uri' is one of SBML namespaces, False otherwise. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., SBMLNamespaces), and the other will be a standalone + top-level function with the name SBMLNamespaces_isSBMLNamespace(). + They are functionally identical. @~ +"; + + +%feature("docstring") SBMLNamespaces::isValidCombination " + Predicate returning True if the given set of namespaces represent a + valid set + + Returns True if the set of namespaces is valid, False otherwise. +"; + + +%feature("docstring") SBMLNamespaces::setLevel " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces::setVersion " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces::setNamespaces " + Internal implementation method. +"; + + +%feature("docstring") SBMLNamespaces::getPackageName " + Returns the name of the main package for this namespace. + + Returns the name of the main package for this namespace. 'core' will + be returned if this namespace is defined in the SBML core. +"; + + +%feature("docstring") SBMLNamespaces::initSBMLNamespace " + Internal implementation method. +"; + + +%feature("docstring") SBMLConstructorException " + @ingroup Core Class of exceptions thrown by constructors of some + libSBML objects. + + In some situations, constructors for SBML objects may need to + indicate to callers that the creation of the object failed. The + failure may be for different reasons, such as an attempt to use + invalid parameters or a system condition such as a memory error. To + communicate this to callers, those classes will throw an + SBMLConstructorException. + + In languages that don't have an exception mechanism (e.g., C), the + constructors generally try to return an error code instead of + throwing an exception. +"; + + +%feature("docstring") SBMLConstructorException::getSBMLErrMsg " + Returns the message associated with this SBML exception. + + Returns the message string. +"; + + +%feature("docstring") ConversionOption " + @ingroup Core Class of object that encapsulates a conversion option. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + LibSBML provides a number of converters that can perform + transformations on SBML documents. These converters allow their + behaviors to be controlled by setting property values. Converter + properties are communicated using objects of class + ConversionProperties, and within such objects, individual options + are encapsulated using ConversionOption objects. + + A ConversionOption object consists of four parts: + + * A key, acting as the name of the option; + + * A value of this option; + + * A type for the value; this is chosen from the enumeration type + ConversionOptionType_t; and + + * A description consisting of a text string that describes the + option in some way. + + There are no constraints on the values of keys or descriptions; + authors of SBML converters are free to choose them as they see fit. + + Conversion option data types + ====================================================================== + + An option in ConversionOption must have a data type declared, to + indicate whether it is a string value, an integer, and so forth. The + possible types of values are taken from the enumeration + ConversionOptionType_t. The following are the possible values: + + <center> <table width='90' cellspacing='1' cellpadding='1' + border='0' class='normal-font'> <tr style='background: lightgray' + class='normal-font'> <td><strong>Enumerator</strong></td> + <td><strong>Meaning</strong></td> </tr> <tr> + <td>libsbml.CNV_TYPE_BOOL</td> <td>Indicates the value type is a + Boolean.</td> </tr> <tr> <td>libsbml.CNV_TYPE_DOUBLE</td> + <td>Indicates the value type is a double-sized float.</td> </tr> + <tr> <td>libsbml.CNV_TYPE_INT</td> <td>Indicates the value type is + an integer.</td> </tr> <tr> <td>libsbml.CNV_TYPE_SINGLE</td> + <td>Indicates the value type is a float.</td> </tr> <tr> + <td>libsbml.CNV_TYPE_STRING</td> <td>Indicates the value type is a + string.</td> </tr> </table> </center> + + See also ConversionProperties. +"; + + +%feature("docstring") ConversionOption::ConversionOption " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(string key, double value, string description='') + + Creates a new ConversionOption specialized for double-type options. + + Parameter 'key' is the key for this option Parameter 'value' is the + value for this option Parameter 'description' is an optional + description + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(string key, int value, string description='') + + Creates a new ConversionOption specialized for integer-type options. + + Parameter 'key' is the key for this option Parameter 'value' is the + value for this option Parameter 'description' is an optional + description + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(string key, float value, string description='') + + Creates a new ConversionOption specialized for float-type options. + + Parameter 'key' is the key for this option Parameter 'value' is the + value for this option Parameter 'description' is an optional + description + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(string key, string value, string description='') + + Creates a new ConversionOption specialized for string-type options. + + Parameter 'key' is the key for this option Parameter 'value' is the + value for this option Parameter 'description' is an optional + description + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(string key, bool value, string description='') + + Creates a new ConversionOption specialized for Boolean-type options. + + Parameter 'key' is the key for this option Parameter 'value' is the + value for this option Parameter 'description' is an optional + description + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(string key, string value='', + ConversionOptionType_t type=CNV_TYPE_STRING, string description='') + + Creates a new ConversionOption. + + This is the general constructor, taking arguments for all aspects of + an option. Other constructors exist with different arguments. + + Parameter 'key' is the key for this option Parameter 'value' is an + optional value for this option Parameter 'type' is the type of this + option Parameter 'description' is the description for this option + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionOption(ConversionOption orig) + + Copy constructor; creates a copy of an ConversionOption object. + + Parameter 'orig' is the ConversionOption object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") ConversionOption::clone " + Creates and returns a deep copy of this ConversionOption object. + + Returns a (deep) copy of this ConversionOption object. +"; + + +%feature("docstring") ConversionOption::getKey " + Returns the key for this option. + + Returns the key, as a string. +"; + + +%feature("docstring") ConversionOption::setKey " + Sets the key for this option. + + Parameter 'key' is a string representing the key to set. +"; + + +%feature("docstring") ConversionOption::getValue " + Returns the value of this option. + + Returns the value of this option, as a string. +"; + + +%feature("docstring") ConversionOption::setValue " + Sets the value for this option. + + Parameter 'value' is the value to set, as a string. +"; + + +%feature("docstring") ConversionOption::getDescription " + Returns the description string for this option. + + Returns the description of this option. +"; + + +%feature("docstring") ConversionOption::setDescription " + Sets the description text for this option. + + Parameter 'description' is the description to set for this option. +"; + + +%feature("docstring") ConversionOption::getType " + Returns the type of this option + + Returns the type of this option. +"; + + +%feature("docstring") ConversionOption::setType " + Sets the type of this option. + + Parameter 'type' is the type value to use. +"; + + +%feature("docstring") ConversionOption::getBoolValue " + Returns the value of this option as a Boolean. + + Returns the value of this option. +"; + + +%feature("docstring") ConversionOption::setBoolValue " + Set the value of this option to a given Boolean value. + + Invoking this method will also set the type of the option to + libsbml.CNV_TYPE_BOOL. + + Parameter 'value' is the Boolean value to set +"; + + +%feature("docstring") ConversionOption::getDoubleValue " + Returns the value of this option as a double. + + Returns the value of this option. +"; + + +%feature("docstring") ConversionOption::setDoubleValue " + Set the value of this option to a given double value. + + Invoking this method will also set the type of the option to + libsbml.CNV_TYPE_DOUBLE. + + Parameter 'value' is the value to set +"; + + +%feature("docstring") ConversionOption::getFloatValue " + Returns the value of this option as a float. + + Returns the value of this option as a float +"; + + +%feature("docstring") ConversionOption::setFloatValue " + Set the value of this option to a given float value. + + Invoking this method will also set the type of the option to + libsbml.CNV_TYPE_SINGLE. + + Parameter 'value' is the value to set +"; + + +%feature("docstring") ConversionOption::getIntValue " + Returns the value of this option as an integer. + + Returns the value of this option, as an int +"; + + +%feature("docstring") ConversionOption::setIntValue " + Set the value of this option to a given int value. + + Invoking this method will also set the type of the option to + libsbml.CNV_TYPE_INT. + + Parameter 'value' is the value to set +"; + + +%feature("docstring") ConversionProperties " + @ingroup Core Class of object that encapsulates the properties of an + SBML converter. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + The properties of SBML converters are communicated using objects of + class ConversionProperties, and within such objects, individual + options are encapsulated using ConversionOption objects. The + ConversionProperties class provides numerous methods for setting and + getting options. + + ConversionProperties objects are also used to determine the target + SBML namespace when an SBML converter's behavior depends on the + intended Level+Version combination of SBML. In addition, it is + conceivable that conversions may be affected by SBML Level 3 + packages being used by an SBML document. These, too, are + communicated by the values of the SBML namespaces set on a + ConversionProperties object. + + See also ConversionOption, SBMLNamespaces. +"; + + +%feature("docstring") ConversionProperties::ConversionProperties " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionProperties(ConversionProperties orig) + + Copy constructor. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + ConversionProperties(SBMLNamespaces targetNS=None) + + Constructor that initializes the conversion properties with a + specific SBML target namespace. + + Parameter 'targetNS' is the target namespace to convert to +"; + + +%feature("docstring") ConversionProperties::clone " + Creates and returns a deep copy of this ConversionProperties object. + + Returns a (deep) copy of this ConversionProperties object. +"; + + +%feature("docstring") ConversionProperties::getTargetNamespaces " + Returns the current target SBML namespace. + + Returns the SBMLNamepaces object expressing the target namespace. +"; + + +%feature("docstring") ConversionProperties::hasTargetNamespaces " + Returns True if the target SBML namespace has been set. + + Returns True if the target namespace has been set, False otherwise. +"; + + +%feature("docstring") ConversionProperties::setTargetNamespaces " + Sets the target namespace. + + Parameter 'targetNS' is the target namespace to use. +"; + + +%feature("docstring") ConversionProperties::getDescription " + Returns the description string for a given option in this properties + object. + + Parameter 'key' is the key for the option. + + Returns the description text of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::getType " + Returns the type of a given option in this properties object. + + Parameter 'key' is the key for the option. + + Returns the type of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::getOption " + Returns the ConversionOption object for a given key. + + Parameter 'key' is the key for the option. + + Returns the option with the given key. +"; + + +%feature("docstring") ConversionProperties::addOption " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(ConversionOption option) + + Adds a copy of the given option to this properties object. + + Parameter 'option' is the option to add + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(string key, double value, string description='') + + Adds a new ConversionOption object with the given parameters. + + Parameter 'key' is the key for the new option Parameter 'value' is + the double value of that option Parameter 'description' is + (optional) the description for the option + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(string key, int value, string description='') + + Adds a new ConversionOption object with the given parameters. + + Parameter 'key' is the key for the new option Parameter 'value' is + the integer value of that option Parameter 'description' is + (optional) the description for the option + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(string key, float value, string description='') + + Adds a new ConversionOption object with the given parameters. + + Parameter 'key' is the key for the new option Parameter 'value' is + the float value of that option Parameter 'description' is (optional) + the description for the option + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(string key, string value, string description='') + + Adds a new ConversionOption object with the given parameters. + + Parameter 'key' is the key for the new option Parameter 'value' is + the string value of that option Parameter 'description' is + (optional) the description for the option + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(string key, bool value, string description='') + + Adds a new ConversionOption object with the given parameters. + + Parameter 'key' is the key for the new option Parameter 'value' is + the boolean value of that option Parameter 'description' is + (optional) the description for the option + + ______________________________________________________________________ + Method variant with the following signature: + + addOption(string key, string value='', ConversionOptionType_t + type=CNV_TYPE_STRING, string description='') + + Adds a new ConversionOption object with the given parameters. + + Parameter 'key' is the key for the new option Parameter 'value' is + (optional) the value of that option Parameter 'type' is (optional) + the type of the option Parameter 'description' is (optional) the + description for the option +"; + + +%feature("docstring") ConversionProperties::removeOption " + Removes the option with the given key from this properties object. + + Parameter 'key' is the key for the new option to remove Returns the + removed option +"; + + +%feature("docstring") ConversionProperties::hasOption " + Returns True if this properties object contains an option with the + given key. + + Parameter 'key' is the key of the option to find. + + Returns True if an option with the given 'key' exists in this + properties object, False otherwise. +"; + + +%feature("docstring") ConversionProperties::getValue " + Returns the value of the given option as a string. + + Parameter 'key' is the key for the option. + + Returns the string value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setValue " + Sets the value of the given option to a string. + + Parameter 'key' is the key for the option Parameter 'value' is the + new value +"; + + +%feature("docstring") ConversionProperties::getBoolValue " + Returns the value of the given option as a Boolean. + + Parameter 'key' is the key for the option. + + Returns the boolean value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setBoolValue " + Sets the value of the given option to a Boolean. + + Parameter 'key' is the key for the option. + + Parameter 'value' is the new Boolean value. +"; + + +%feature("docstring") ConversionProperties::getDoubleValue " + Returns the value of the given option as a double. + + Parameter 'key' is the key for the option. + + Returns the double value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setDoubleValue " + Sets the value of the given option to a double. + + Parameter 'key' is the key for the option. + + Parameter 'value' is the new double value. +"; + + +%feature("docstring") ConversionProperties::getFloatValue " + Returns the value of the given option as a float. + + Parameter 'key' is the key for the option. + + Returns the float value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setFloatValue " + Sets the value of the given option to a float. + + Parameter 'key' is the key for the option. + + Parameter 'value' is the new float value. +"; + + +%feature("docstring") ConversionProperties::getIntValue " + Returns the value of the given option as an integer. + + Parameter 'key' is the key for the option. + + Returns the int value of the option with the given key. +"; + + +%feature("docstring") ConversionProperties::setIntValue " + Sets the value of the given option to an integer. + + Parameter 'key' is the key for the option. + + Parameter 'value' is the new integer value. +"; + + +%feature("docstring") SBMLConverter " + @ingroup Core Base class for SBML converters. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + The SBMLConverter class is the base class for the various SBML + converters: classes of objects that transform or convert SBML + documents. These transformations can involve essentially anything + that can be written algorithmically; examples include converting the + units of measurement in a model, or converting from one + Level+Version combination of SBML to another. + + LibSBML provides a number of built-in converters, and applications + can create their own by subclassing SBMLConverter and following the + examples of the existing converters. The following are the built-in + converters in libSBML 5.8.1: + + * SBMLFunctionDefinitionConverter + + * SBMLInitialAssignmentConverter + + * SBMLLevelVersionConverter + + * SBMLRuleConverter + + * SBMLStripPackageConverter + + * SBMLUnitsConverter + + Many converters provide the ability to configure their behavior to + some extent. This is realized through the use of properties that + offer different options. Two related classes implement these + features: ConversionProperties and ConversionOptions. The default + property values for each converter can be interrogated using the + method SBMLConverter.getDefaultProperties() on the converter class. +"; + + +%feature("docstring") SBMLConverter::SBMLConverter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLConverter() + + Creates a new SBMLConverter object. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLConverter(SBMLConverter c) + + Copy constructor; creates a copy of an SBMLConverter object. + + Parameter 'c' is the SBMLConverter object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") SBMLConverter::clone " + Creates and returns a deep copy of this SBMLConverter object. + + Returns a (deep) copy of this SBMLConverter object. +"; + + +%feature("docstring") SBMLConverter::getDocument " + Returns the SBML document that is the subject of the conversions. + + Returns the current SBMLDocument object. +"; + + +%feature("docstring") SBMLConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. The run-time properties of the converter object + can be adjusted by using the method SBMLConverter.setProperties(). + + Returns the default properties for the converter. + + See also setProperties(), matchesProperties(). +"; + + +%feature("docstring") SBMLConverter::getTargetNamespaces " + Returns the target SBML namespaces of the currently set properties. + + SBML namespaces are used by libSBML to express the Level+Version of + the SBML document (and, possibly, any SBML Level 3 packages in use). + Some converters' behavior is affected by the SBML namespace + configured in the converter. For example, the actions of + SBMLLevelVersionConverter, the converter for converting SBML + documents from one Level+Version combination to another, are + fundamentally dependent on the SBML namespaces being targeted. + + Returns the SBMLNamespaces object that describes the SBML namespaces + in effect. +"; + + +%feature("docstring") SBMLConverter::matchesProperties " + Predicate returning True if this converter's properties matches a + given set of configuration properties. + + Parameter 'props' is the configuration properties to match. + + Returns True if this converter's properties match, False otherwise. +"; + + +%feature("docstring") SBMLConverter::setDocument " + Sets the current SBML document to the given SBMLDocument object. + + Parameter 'doc' is the document to use for this conversion. + + Returns integer value indicating the success/failure of the + operation. @~ The set of possible values that may be returned + ultimately depends on the specific subclass of SBMLConverter being + used, but the default method can return the following values: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") SBMLConverter::setProperties " + Sets the configuration properties to be used by this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + sets the current properties for this converter. + + Parameter 'props' is the ConversionProperties object defining the + properties to set. + + Returns integer value indicating the success/failure of the + operation. @~ The set of possible values that may be returned + ultimately depends on the specific subclass of SBMLConverter being + used, but the default method can return the following values: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also getProperties(), matchesProperties(). +"; + + +%feature("docstring") SBMLConverter::getProperties " + Returns the current properties in effect for this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the current properties for this converter; in other words, + the settings in effect at this moment. To change the property + values, you can use SBMLConverter.setProperties(). + + Returns the currently set configuration properties. + + See also setProperties(), matchesProperties(). +"; + + +%feature("docstring") SBMLConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and with the configuration options set + by SBMLConverter.setProperties(). + + Returns integer value indicating the success/failure of the + operation. @~ The set of possible values that may be returned + depends on the converter subclass; please consult the documentation + for the relevant class to find out what the possibilities are. +"; + + +%feature("docstring") SBMLConverterRegistry " + @ingroup Core Registry of all SBML converters. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + LibSBML provides facilities for transforming and converting SBML + documents in various ways. These transformations can involve + essentially anything that can be written algorithmically; examples + include converting the units of measurement in a model, or converting + from one Level+Version combination of SBML to another. Converters + are implemented as objects derived from the class SBMLConverter. + + The converter registry, implemented as a singleton object of class + SBMLConverterRegistry, maintains a list of known converters and + provides methods for discovering them. Callers can use the method + SBMLConverterRegistry.getNumConverters() to find out how many + converters are registered, then use + SBMLConverterRegistry.getConverterByIndex() to iterate over each + one; alternatively, callers can use + SBMLConverterRegistry.getConverterFor() to search for a converter + having specific properties. +"; + + +%feature("docstring") SBMLConverterRegistry::getInstance " + Returns the singleton instance for the converter registry. + + Prior to using the registry, callers have to obtain a copy of the + registry. This static method provides the means for doing that. + + Returns the singleton for the converter registry. +"; + + +%feature("docstring") SBMLConverterRegistry::addConverter " + Adds the given converter to the registry of SBML converters. + + Parameter 'converter' is the converter to add to the registry. + + Returns integer value indicating the success/failure of the + operation. @~ The possible values are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") SBMLConverterRegistry::getConverterByIndex " + Returns the converter with the given index number. + + Converters are given arbitrary index numbers by the registry. + Callers can use the method SBMLConverterRegistry.getNumConverters() + to find out how many converters are registered, then use this method + to iterate over the list and obtain each one in turn. + + Parameter 'index' is the zero-based index of the converter to fetch. + + Returns the converter with the given index number, or None if the + number is less than 0 or there is no converter at the given index + position. +"; + + +%feature("docstring") SBMLConverterRegistry::getConverterFor " + Returns the converter that best matches the given configuration + properties. + + Many converters provide the ability to configure their behavior. + This is realized through the use of properties that offer different + options. The present method allows callers to search for converters + that have specific property values. Callers can do this by creating + a ConversionProperties object, adding the desired option(s) to the + object, then passing the object to this method. + + Parameter 'props' is a ConversionProperties object defining the + properties to match against. + + Returns the converter matching the properties, or None if no + suitable converter is found. + + See also getConverterByIndex(). +"; + + +%feature("docstring") SBMLConverterRegistry::getNumConverters " + Returns the number of converters known by the registry. + + Returns the number of registered converters. + + See also getConverterByIndex(). +"; + + +%feature("docstring") SBMLConverterRegistry::SBMLConverterRegistry " + Internal implementation method. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter " + @ingroup Core SBML converter for replacing function definitions. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + This is an SBML converter for manipulating user-defined functions in + an SBML file. When invoked on the current model, it performs the + following operation: <ol> + + * Read the list of user-defined functions in the model (i.e., the + list of FunctionDefinition objects); + + * Look for invocations of the function in mathematical expressions + throughout the model; and + + * For each invocation found, replaces the invocation with a in- + line copy of the function's body, similar to how macro expansions + might be performed in scripting and programming languages. </ol> + + For example, suppose the model contains a function definition + representing the function f(x, y) = x * y. Further suppose this + functions invoked somewhere else in the model, in a mathematical + formula, as f(s, p). The outcome of running + SBMLFunctionDefinitionConverter on the model will be to replace the + call to f with the expression s * p. + + See also SBMLInitialAssignmentConverter, SBMLLevelVersionConverter, + SBMLRuleConverter, SBMLStripPackageConverter, SBMLUnitsConverter. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::SBMLFunctionDefinitionConverter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLFunctionDefinitionConverter() + + Creates a new SBMLFunctionDefinitionConverter object. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLFunctionDefinitionConverter(SBMLFunctionDefinitionConverter + obj) + + Copy constructor; creates a copy of an + SBMLFunctionDefinitionConverter object. + + Parameter 'obj' is the SBMLFunctionDefinitionConverter object to + copy. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::clone " + Creates and returns a deep copy of this + SBMLFunctionDefinitionConverter object. + + Returns a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::matchesProperties " + Returns True if this converter object's properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLFunctionDefinitionConverter object to find out if the object's + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() to search across all + registered converters for one matching particular properties. + + Parameter 'props' is the properties to match. + + Returns True if this converter's properties match, False otherwise. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::convert " + Replaces invocations of each user-defined function with an in-line + copy, similar to macro expansion. + + Returns integer value indicating the success/failure of the + operation. @~ The possible values are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + Returns the ConversionProperties object describing the default + properties for this converter. +"; + + +%feature("docstring") SBMLFunctionDefinitionConverter::expandFD_errors " + Internal implementation method. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter " + @ingroup Core SBML converter for replacing initial assignments. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + This is an SBML converter for replacing InitialAssignment objects + (when possible) by setting the initial value attributes on the model + objects being assigned. In other words, for every object that is + the target of an initial assignment in the model, it evaluates the + mathematical expression of the assignment to get a numerical value, + and then sets the corresponding attribute of the object to the + value. The effects for different kinds of SBML components are as + follows: + + <center> <table border='0' class='text-table width80 normal-font + alt-row-colors'> <tr style='background: lightgray; font-size: + 14px;'> <th align='left' width='200'>Component</th> <th + align='left'>Effect</th> </tr> <tr> <td>Compartment</td> + <td>Sets the value of the size attribute.</td> </tr> <tr> + <td>Species</td> <td>Sets the value of either the initialAmount + or the initialConcentration attributes, depending on the value of + the Species object's hasOnlySubstanceUnits attribute.</td> </tr> + <tr> <td>Parameter</td> <td>Sets the value of the value + attribute.</td> </tr> <tr> <td>SpeciesReference</td> <td>Sets + the value of the stoichiometry attribute in the Reaction object + where the SpeciesReference object appears.</td> </tr> </table> + </center> + + See also SBMLFunctionDefinitionConverter, SBMLLevelVersionConverter, + SBMLRuleConverter, SBMLStripPackageConverter, SBMLUnitsConverter. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::SBMLInitialAssignmentConverter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLInitialAssignmentConverter(SBMLInitialAssignmentConverter obj) + + Copy constructor; creates a copy of an SBMLInitialAssignmentConverter + object. + + Parameter 'obj' is the SBMLInitialAssignmentConverter object to copy. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLInitialAssignmentConverter() + + Creates a new SBMLInitialAssignmentConverter object. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::clone " + Creates and returns a deep copy of this + SBMLInitialAssignmentConverter object. + + Returns a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::matchesProperties " + Returns True if this converter object's properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLInitialAssignmentConverter object to find out if the object's + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() to search across all + registered converters for one matching particular properties. + + Parameter 'props' is the properties to match. + + Returns True if this converter's properties match, False otherwise. +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and with the configuration options set + by SBMLConverter.setProperties(). + + Returns integer value indicating the success/failure of the + operation. @~ The possible values are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") SBMLInitialAssignmentConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + Returns the ConversionProperties object describing the default + properties for this converter. +"; + + +%feature("docstring") SBMLLevelVersionConverter " + @ingroup Core SBML converter for transforming documents from one + Level+Version to another. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + This SBML converter takes an SBML document of one SBML Level+Version + combination and attempts to convert it to another Level+Version + combination. The target Level+Version is set using an SBMLNamespace + object in the ConversionProperties object that controls this + converter. + + This class is the basis for SBMLDocument.setLevelAndVersion(). + + See also SBMLFunctionDefinitionConverter, + SBMLInitialAssignmentConverter, SBMLRuleConverter, + SBMLStripPackageConverter, SBMLUnitsConverter. +"; + + +%feature("docstring") SBMLLevelVersionConverter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLLevelVersionConverter() + + Creates a new SBMLLevelVersionConverter object. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLLevelVersionConverter(SBMLLevelVersionConverter obj) + + Copy constructor; creates a copy of an SBMLLevelVersionConverter + object. + + Parameter 'obj' is the SBMLLevelVersionConverter object to copy. +"; + + +%feature("docstring") clone " + Creates and returns a deep copy of this SBMLLevelVersionConverter + object. + + Returns a (deep) copy of this converter. +"; + + +%feature("docstring") matchesProperties " + Returns True if this converter object's properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLLevelVersionConverter object to find out if the object's + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() to search across all + registered converters for one matching particular properties. + + Parameter 'props' is the properties to match. + + Returns True if this converter's properties match, False otherwise. +"; + + +%feature("docstring") convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and with the configuration options set + by SBMLConverter.setProperties(). SBMLConverter.setProperties(). + + Returns integer value indicating the success/failure of the + operation. @~ The possible values are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + Returns the ConversionProperties object describing the default + properties for this converter. +"; + + +%feature("docstring") getTargetLevel " + Returns the target SBML Level for the conversion. + + Returns an integer indicating the SBML Level. +"; + + +%feature("docstring") getTargetVersion " + Returns the target SBML Version for the conversion. + + Returns an integer indicating the Version within the SBML Level. +"; + + +%feature("docstring") getValidityFlag " + Returns the flag indicating whether the conversion has been set to + 'strict'. + + Returns True if strict validity has been requested, False otherwise. +"; + + +%feature("docstring") SBMLRuleConverter " + @ingroup Core SBML converter for reordering rules and assignments in + a model. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + This converter reorders assignments in a model. Specifically, it + sorts the list of assignment rules (i.e., the AssignmentRule objects + contained in the ListOfAssignmentRules within the Model object) and + the initial assignments (i.e., the InitialAssignment objects + contained in the ListOfInitialAssignments) such that, within each + set, assignments that depend on prior values are placed after the + values are set. For example, if there is an assignment rule stating + a = b + 1, and another rule stating b = 3, the list of rules is + sorted and the rules are arranged so that the rule for b = 3 appears + before the rule for a = b + 1. Similarly, if dependencies of this + sort exist in the list of initial assignments in the model, the + initial assignments are sorted as well. + + Beginning with SBML Level 2, assignment rules have no ordering + required -- the order in which the rules appear in an SBML file has + no significance. Software tools, however, may need to reorder + assignments for purposes of evaluating them. For example, for + simulators that use time integration methods, it would be a good idea + to reorder assignment rules such as the following, + + b = a + 10 seconds + + a = time + + so that the evaluation of the rules is independent of integrator + step sizes. (This is due to the fact that, in this case, the order in + which the rules are evaluated changes the result.) This converter + can be used to reorder the SBML objects regardless of whether the + input file contained them in the desired order. Here is a code + fragment to illustrate how to do that: + + ConversionProperties props; + props.addOption(\'sortRules\', true, \'sort rules\'); + + SBMLConverter converter; + converter.setProperties(&props); + converter.setDocument(&doc); + converter.convert(); + + Note: + + The two sets of assignments (list of assignment rules on the one + hand, and list of initial assignments on the other hand) are handled + independently. In an SBML model, these entities are treated + differently and no amount of sorting can deal with inter- + dependencies between assignments of the two kinds. + + See also SBMLFunctionDefinitionConverter, + SBMLInitialAssignmentConverter, SBMLLevelVersionConverter, + SBMLStripPackageConverter, SBMLUnitsConverter. +"; + + +%feature("docstring") SBMLRuleConverter::SBMLRuleConverter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLRuleConverter(SBMLRuleConverter obj) + + Copy constructor; creates a copy of an SBMLLevelVersionConverter + object. + + Parameter 'obj' is the SBMLLevelVersionConverter object to copy. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLRuleConverter() + + Creates a new SBMLLevelVersionConverter object. +"; + + +%feature("docstring") SBMLRuleConverter::clone " + Creates and returns a deep copy of this SBMLLevelVersionConverter + object. + + Returns a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLRuleConverter::matchesProperties " + Returns True if this converter object's properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLLevelVersionConverter object to find out if the object's + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() to search across all + registered converters for one matching particular properties. + + Parameter 'props' is the properties to match. + + Returns True if this converter's properties match, False otherwise. +"; + + +%feature("docstring") SBMLRuleConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and with the configuration options set + by SBMLConverter.setProperties(). + + Returns integer value indicating the success/failure of the + operation. @~ The possible values are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT +"; + + +%feature("docstring") SBMLRuleConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + Returns the ConversionProperties object describing the default + properties for this converter. +"; + + +%feature("docstring") SBMLStripPackageConverter " + @ingroup Core SBML converter for removing packages. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + This SBML converter takes an SBML document and removes (strips) a + package from it. No conversion is performed; the package constructs + are simply removed from the SBML document. The package to be + stripped is determined by the value of the option 'package' on the + conversion properties. + + See also SBMLFunctionDefinitionConverter, SBMLLevelVersionConverter, + SBMLRuleConverter, SBMLLevelVersionConverter, SBMLUnitsConverter. +"; + + +%feature("docstring") SBMLStripPackageConverter::SBMLStripPackageConverter " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLStripPackageConverter() + + Creates a new SBMLStripPackageConverter object. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLStripPackageConverter(SBMLStripPackageConverter obj) + + Copy constructor; creates a copy of an SBMLStripPackageConverter + object. + + Parameter 'obj' is the SBMLStripPackageConverter object to copy. +"; + + +%feature("docstring") SBMLStripPackageConverter::clone " + Creates and returns a deep copy of this SBMLStripPackageConverter + object. + + Returns a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLStripPackageConverter::matchesProperties " + Returns True if this converter object's properties match the given + properties. + + A typical use of this method involves creating a ConversionProperties + object, setting the options desired, and then calling this method on + an SBMLStripPackageConverter object to find out if the object's + property values match the given ones. This method is also used by + SBMLConverterRegistry.getConverterFor() to search across all + registered converters for one matching particular properties. + + Parameter 'props' is the properties to match. + + Returns True if this converter's properties match, False otherwise. +"; + + +%feature("docstring") SBMLStripPackageConverter::convert " + Perform the conversion. + + This method causes the converter to do the actual conversion work, + that is, to convert the SBMLDocument object set by + SBMLConverter.setDocument() and with the configuration options set + by SBMLConverter.setProperties(). + + Returns integer value indicating the success/failure of the + operation. @~ The possible values are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SBMLStripPackageConverter::getDefaultProperties " + Returns the default properties of this converter. + + A given converter exposes one or more properties that can be adjusted + in order to influence the behavior of the converter. This method + returns the default property settings for this converter. It is + meant to be called in order to discover all the settings for the + converter object. + + Returns the ConversionProperties object describing the default + properties for this converter. +"; + + +%feature("docstring") SBMLUnitsConverter " + @ingroup Core SBML converter to convert a model's units to SI units. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. It is a class used in the + implementation of extra functionality provided by libSBML. + + This SBML converter converts the units in a model to base SI units, + namely metre, kilogram, second, Ampere, Kelvin, mole and candela. + + Unit conversion will only be performed on models that are fully unit + consistent; that is, all objects have associated units, and there are + no literal numbers with no units specified. In the case of an SBML + Level 3 model involving math expressions, this means that the + timeUnits attribute on the Model object must be set, and if there are + any reactions in the model, the extentUnits attribute on the Model + object must also be set. + + This converter has the additional Boolean property + 'removeUnusedUnits' that can be used to tell the converter whether + to remove any UnitDefinition objects that are not referred to, after + conversion is complete. You can set this value by adding the + property using + + prop.addOption(\'removeUnusedUnits\', false); + The converter's default behavior is to remove the unused + UnitDefinition objects in the model. + + See also SBMLFunctionDefinitionConverter, SBMLLevelVersionConverter, + SBMLRuleConverter, SBMLStripPackageConverter, SBMLUnitsConverter. +"; + + +%feature("docstring") SBMLValidator " + @ingroup Core Base class for SBML validators + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + LibSBML implements facilities for verifying that a given SBML + document is valid according to the SBML specifications; it also + exposes the validation interface so that user programs and SBML + Level 3 package authors may use the facilities to implement new + validators. There are two main interfaces to libSBML's validation + facilities, based on the classes Validator and SBMLValidator. + + The Validator class is the basis of the system for validating an SBML + document against the validation rules defined in the SBML + specifications. The scheme used by Validator relies is compact and + uses the visitor programming pattern, but it relies on C/C++ + features and is not directly accessible from language bindings. + SBMLValidator offers a framework for straightforward class-based + extensibility, so that user code can subclass SBMLValidator to + implement new validation systems, different validators can be + introduced or turned off at run-time, and interfaces can be provided + in the libSBML language bindings. SBMLValidator can call Validator + functionality internally (as is the case in the current + implementation of SBMLInternalValidator) or use entirely different + implementation approaches, as necessary. + + Users of libSBML may already be familiar with the facilities + encompassed by the validation system, in the form of the + consistency-checking methods defined on SBMLDocument. The methods + SBMLDocument.setConsistencyChecks(), + SBMLDocument.checkConsistency(), + SBMLDocument.checkInternalConsistency() and other method of that + sort are in fact implemented via SBMLValidator, specifically as + methods on the class SBMLInternalValidator. + + Authors may use SBMLValidator as the base class for their own + validator extensions to libSBML. The class SBMLInternalValidator + may serve as a code example for how to implement such things. +"; + + +%feature("docstring") SBMLValidator::SBMLValidator " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLValidator() + + Creates a new SBMLValidator. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLValidator(const SBMLValidator& orig) + + Copy constructor; creates a copy of an SBMLValidator object. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") SBMLValidator::clone " + Creates and returns a deep copy of this SBMLValidator. + + Returns a (deep) copy of this SBMLValidator. +"; + + +%feature("docstring") SBMLValidator::getDocument " + Returns the current SBML document in use by this validator. + + Returns the current SBML document + + See also setDocument(). +"; + + +%feature("docstring") SBMLValidator::setDocument " + Sets the current SBML document to the given SBMLDocument object. + + Parameter 'doc' is the document to use for this validation + + Returns an integer value indicating the success/failure of the + validation. @~ The possible values returned by this function are + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also getDocument(). +"; + + +%feature("docstring") SBMLValidator::validate " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + validate(string filename) + + Validates the SBML document located at the given 'filename'. + + This is a convenience method that saves callers the trouble of using + SBMLReader to read the document first. + + Parameter 'filename' is the path to the file to be read and + validated. + + Returns the number of validation failures that occurred. The objects + describing the actual failures can be retrieved using getFailures(). + + ______________________________________________________________________ + Method variant with the following signature: + + validate() + + Runs this validator on the current SBML document. + + Returns an integer value indicating the success/failure of the + validation. @~ The possible values returned by this function are + determined by the specific subclasses of this class. + + ______________________________________________________________________ + Method variant with the following signature: + + validate(SBMLDocument d) + + Validates the given SBMLDocument object. + + This is identical to calling setDocument() followed by validate(). + + Parameter 'd' is the SBML document to validate + + Returns the number of validation failures that occurred. The objects + describing the actual failures can be retrieved using getFailures(). +"; + + +%feature("docstring") SBMLValidator::clearFailures " + Clears this validator's list of failures. + + If you are validating multiple SBML documents with the same + validator, call this method after you have processed the list of + failures from the last validation run and before validating the next + document. + + @~ +"; + + +%feature("docstring") SBMLValidator::getFailures " + Returns a list of SBMLError objects (if any) that were logged by the + last run of this validator. + + Returns a list of errors, warnings and other diagnostics logged + during validation. + + See also clearFailures(). +"; + + +%feature("docstring") SBMLValidator::logFailure " + Adds the given failure to this list of Validators failures. + + Parameter 'err' is an SBMLError object representing an error or + warning + + @~ +"; + + +%feature("docstring") SBMLValidator::getErrorLog " + Returns the list of errors or warnings logged during parsing, + consistency checking, or attempted translation of this model. + + Note that this refers to the SBMLDocument object's error log (i.e., + the list returned by SBMLDocument.getErrorLog()). That list of + errors and warnings is separate from the validation failures tracked + by this validator (i.e., the list returned by getFailures()). + + Returns the SBMLErrorLog used for the SBMLDocument + + @~ +"; + + +%feature("docstring") SBMLValidator::getModel " + Returns the Model object stored in the SBMLDocument. + + It is important to note that this method does not create a Model + instance. The model in the SBMLDocument must have been created at + some prior time, for example using SBMLDocument.createModel() or + SBMLDocument.setModel(). This method returns None if a model does + not yet exist. + + Returns the Model contained in this validator's SBMLDocument object. + + See also SBMLDocument.setModel(), SBMLDocument.createModel(). +"; + + +%feature("docstring") SBMLValidator::getNumFailures " + Returns the number of failures encountered in the last validation + run. + + This method returns the number of failures logged by this validator. + This number only reflects this validator's actions; the number may + not be the same as the number of errors and warnings logged on the + SBMLDocument object's error log (i.e., the object returned by + SBMLDocument.getErrorLog()), because other parts of libSBML may log + errors and warnings beyond those found by this validator. + + Returns the number of errors logged by this validator. +"; + + +%feature("docstring") SBMLValidator::getFailure " + Returns the failure object at index n in this validator's list of + failures logged during the last run. + + Callers should use getNumFailures() first, to find out the number of + entries in this validator's list of failures. + + Parameter 'n' is an integer indicating the index of the object to + return from the failures list; index values start at 0. + + Returns the failure at the given index number. + + See also getNumFailures(). +"; + + +%feature("docstring") SBMLExternalValidator::SBMLExternalValidator " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLExternalValidator() + + Constructor. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLExternalValidator(SBMLExternalValidator) + + Copy constructor. +"; + + +%feature("docstring") SBMLExternalValidator::clone " + Creates and returns a deep copy of this converter. + + Returns a (deep) copy of this converter. +"; + + +%feature("docstring") SBMLExternalValidator::validate " + the actual conversion + + Returns status code represeting success/failure/conversion impossible +"; + + +%feature("docstring") SBMLExternalValidator::getProgram " + Returns the program name of the validator to be run +"; + + +%feature("docstring") SBMLExternalValidator::setProgram " + Sets the name of the program to run + + Parameter 'program' is the program to be started +"; + + +%feature("docstring") SBMLExternalValidator::getOutputFileName " + Returns the output file name (this is the file the external program + will write) +"; + + +%feature("docstring") SBMLExternalValidator::setOutputFileName " + Sets the output file name + + Parameter 'outputFileName' is the name of the output XML file +"; + + +%feature("docstring") SBMLExternalValidator::getSBMLFileName " + Returns the name of the SBML file (the document of this validator + will be written to it) +"; + + +%feature("docstring") SBMLExternalValidator::setSBMLFileName " + Sets the filename for the temporary file to be created + + Parameter 'sbmlFileName' is the temporary name +"; + + +%feature("docstring") SBMLExternalValidator::clearArguments " + Clear all additional arguments +"; + + +%feature("docstring") SBMLExternalValidator::addArgument " + Adds the given argument to the list of additional arguments + + Parameter 'arg' is the argument +"; + + +%feature("docstring") SBMLExternalValidator::getNumArguments " + Returns the number of arguments. +"; + + +%feature("docstring") SBMLExternalValidator::getArgument " + Returns the argument for the given index. + + Parameter 'n' is the zero based index of the argument. + + Returns the argument at the given index. +"; + + +%feature("docstring") SBMLExternalValidator::getArguments " + Returns all arguments +"; + + +%feature("docstring") SBMLExternalValidator::setArguments " + Sets the additional arguments + + Parameter 'args' is teh additional arguments +"; + + +%feature("docstring") readMathML " + Internal implementation method. +"; + + +%feature("docstring") writeMathML " + Internal implementation method. +"; + + +%feature("docstring") readMathMLFromString " + Reads the MathML from the given XML string, constructs a + corresponding abstract syntax tree, and returns a pointer to the + root of the tree. + + Parameter 'xml' is a string containing a full MathML expression + + Returns the root of an AST corresponding to the given mathematical + expression, otherwise None is returned if the given string is None + or invalid. +"; + + +%feature("docstring") writeMathMLToString " + Writes the given ASTNode (and its children) to a string as MathML, + and returns the string. + + Parameter 'node' is the root of an AST to write out to the stream. + + Returns a string containing the written-out MathML representation of + the given AST. + + Note: + + The string is owned by the caller and should be freed (with free()) + when no longer needed. None is returned if the given argument is + None. +"; + + +%feature("docstring") ASTNode " + @ingroup Core Abstract Syntax Tree (AST) representation of a + mathematical expression. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + Abstract Syntax Trees (ASTs) are a simple kind of data structure used + in libSBML for storing mathematical expressions. The ASTNode is the + cornerstone of libSBML's AST representation. An AST 'node' + represents the most basic, indivisible part of a mathematical + formula and come in many types. For instance, there are node types + to represent numbers (with subtypes to distinguish integer, real, + and rational numbers), names (e.g., constants or variables), simple + mathematical operators, logical or relational operators and + functions. LibSBML ASTs provide a canonical, in-memory + representation for all mathematical formulas regardless of their + original format (which might be MathML or might be text strings). + + An AST node in libSBML is a recursive structure containing a pointer + to the node's value (which might be, for example, a number or a + symbol) and a list of children nodes. Each ASTNode node may have + none, one, two, or more children depending on its type. The + following diagram illustrates an example of how the mathematical + expression '1 + 2' is represented as an AST with one plus node + having two integer children nodes for the numbers 1 and 2. The + figure also shows the corresponding MathML representation: + + Example AST representation of a mathematical expression. Infix AST + MathML 1 + 2 <math xmlns=\"http://www.w3.org/1998/Math/MathML\"> + + <plus/> <cn type=\"integer\"> 1 </cn> <cn + type=\"integer\"> 2 </cn> </apply> </math> + + The following are other noteworthy points about the AST + representation in libSBML: + + * A numerical value represented in MathML as a real number with + an exponent is preserved as such in the AST node representation, + even if the number could be stored in a double data type. This is + done so that when an SBML model is read in and then written out + again, the amount of change introduced by libSBML to the SBML during + the round-trip activity is minimized. + + * Rational numbers are represented in an AST node using separate + numerator and denominator values. These can be retrieved using the + methods ASTNode.getNumerator() and ASTNode.getDenominator(). + + * The children of an ASTNode are other ASTNode objects. The list of + children is empty for nodes that are leaf elements, such as numbers. + For nodes that are actually roots of expression subtrees, the list of + children points to the parsed objects that make up the rest of the + expression. + + <a class='anchor' name='ASTNodeType_t'>The set of possible ASTNode + types</h3> @~ Every ASTNode has an associated type code to + indicate, for example, whether it holds a number or stands for an + arithmetic operator. The type is recorded as a value drawn from a + set of static integer constants defined in the class {@link + libsbml}. Their names begin with the characters AST_. The list of + possible types is quite long, because it covers all the mathematical + functions that are permitted in SBML. The values are shown in the + following table: AST_CONSTANT_E AST_CONSTANT_FALSE + AST_CONSTANT_PI AST_CONSTANT_TRUE AST_DIVIDE AST_FUNCTION + AST_FUNCTION_ABS AST_FUNCTION_ARCCOS AST_FUNCTION_ARCCOSH + AST_FUNCTION_ARCCOT AST_FUNCTION_ARCCOTH AST_FUNCTION_ARCCSC + AST_FUNCTION_ARCCSCH AST_FUNCTION_ARCSEC AST_FUNCTION_ARCSECH + AST_FUNCTION_ARCSIN AST_FUNCTION_ARCSINH AST_FUNCTION_ARCTAN + AST_FUNCTION_ARCTANH AST_FUNCTION_CEILING AST_FUNCTION_COS + AST_FUNCTION_COSH AST_FUNCTION_COT AST_FUNCTION_COTH + AST_FUNCTION_CSC AST_FUNCTION_CSCH AST_FUNCTION_DELAY + AST_FUNCTION_EXP AST_FUNCTION_FACTORIAL AST_FUNCTION_FLOOR + AST_FUNCTION_LN AST_FUNCTION_LOG AST_FUNCTION_PIECEWISE + AST_FUNCTION_POWER AST_FUNCTION_ROOT AST_FUNCTION_SEC + AST_FUNCTION_SECH AST_FUNCTION_SIN AST_FUNCTION_SINH + AST_FUNCTION_TAN AST_FUNCTION_TANH AST_INTEGER AST_LAMBDA + AST_LOGICAL_AND AST_LOGICAL_NOT AST_LOGICAL_OR AST_LOGICAL_XOR + AST_MINUS AST_NAME AST_NAME_AVOGADRO (Level 3 only) AST_NAME_TIME + AST_PLUS AST_POWER AST_RATIONAL AST_REAL AST_REAL_E + AST_RELATIONAL_EQ AST_RELATIONAL_GEQ AST_RELATIONAL_GT + AST_RELATIONAL_LEQ AST_RELATIONAL_LT AST_RELATIONAL_NEQ AST_TIMES + AST_UNKNOWN The types have the following meanings: * If + the node is basic mathematical operator (e.g., '+'), then the + node's type will be AST_PLUS, AST_MINUS, AST_TIMES, AST_DIVIDE, or + AST_POWER, as appropriate. * If the node is a predefined function + or operator from SBML Level 1 (in the string-based formula syntax + used in Level 1) or SBML Levels 2 and 3 (in the subset of MathML + used in SBML Levels 2 and 3), then the node's type will be either + AST_FUNCTION_X, AST_LOGICAL_X, or AST_RELATIONAL_X, as appropriate. + (Examples: AST_FUNCTION_LOG, AST_RELATIONAL_LEQ.) * If the node + refers to a user-defined function, the node's type will be + AST_FUNCTION (because it holds the name of the function). * If the + node is a lambda expression, its type will be AST_LAMBDA. * If the + node is a predefined constant ('ExponentialE', 'Pi', 'True' or + 'False'), then the node's type will be AST_CONSTANT_E, + AST_CONSTANT_PI, AST_CONSTANT_TRUE, or AST_CONSTANT_FALSE. * + (Levels 2 and 3 only) If the node is the special MathML csymbol + time, the value of the node will be AST_NAME_TIME. (Note, however, + that the MathML csymbol delay is translated into a node of type + AST_FUNCTION_DELAY. The difference is due to the fact that time is a + single variable, whereas delay is actually a function taking + arguments.) * (Level 3 only) If the node is the special MathML + csymbol avogadro, the value of the node will be AST_NAME_AVOGADRO. + * If the node contains a numerical value, its type will be + AST_INTEGER, AST_REAL, AST_REAL_E, or AST_RATIONAL, as appropriate. + <h3>Converting between ASTs and text strings + ...................................................................... + + The text-string form of mathematical formulas produced by + libsbml.formulaToString()@~ and read by libsbml.parseFormula()@~ + and libsbml.parseL3Formula()@~ are in a simple C-inspired infix + notation. A formula in this text-string form can be handed to a + program that understands SBML mathematical expressions, or used as + part of a translation system. The libSBML distribution comes with + an example program in the 'examples' subdirectory called + translateMath that implements an interactive command-line + demonstration of translating infix formulas into MathML and vice- + versa. + + The formula strings may contain operators, function calls, symbols, + and white space characters. The allowable white space characters + are tab and space. The following are illustrative examples of + formulas expressed in the syntax: + + 0.10 * k4^2 + + + (vm * s1)/(km + s1) + + The following table shows the precedence rules in this syntax. In + the Class column, operand implies the construct is an operand, + prefix implies the operation is applied to the following arguments, + unary implies there is one argument, and binary implies there are + two arguments. The values in the Precedence column show how the + order of different types of operation are determined. For example, + the expression a * b + c is evaluated as (a * b) + c because the * + operator has higher precedence. The Associates column shows how the + order of similar precedence operations is determined; for example, a + - b + c is evaluated as (a - b) + c because the + and - operators + are left-associative. The precedence and associativity rules are + taken from the C programming language, except for the symbol ^, + which is used in C for a different purpose. (Exponentiation can be + invoked using either ^ or the function power.) + + Token Operation Class Precedence Associates namesymbol + referenceoperand6n/a (expression)expression groupingoperand6n/a + f(...)function callprefix6left -negationunary5right + ^powerbinary4left *multiplicationbinary3left /divisonbinary3left + +additionbinary2left -subtractionbinary2left ,argument + delimiterbinary1left A table of the expression operators and their + precedence in the text-string format for mathematical expressions + used by SBML_parseFormula(). + + A program parsing a formula in an SBML model should assume that names + appearing in the formula are the identifiers of Species, Parameter, + Compartment, FunctionDefinition, Reaction (in SBML Levels 2 and 3), + or SpeciesReference (in SBML Level 3 only) objects defined in a + model. When a function call is involved, the syntax consists of a + function identifier, followed by optional white space, followed by + an opening parenthesis, followed by a sequence of zero or more + arguments separated by commas (with each comma optionally preceded + and/or followed by zero or more white space characters), followed by + a closing parenthesis. There is an almost one-to-one mapping + between the list of predefined functions available, and those + defined in MathML. All of the MathML functions are recognized; this + set is larger than the functions defined in SBML Level 1. In the + subset of functions that overlap between MathML and SBML Level 1, + there exist a few differences. The following table summarizes the + differences between the predefined functions in SBML Level 1 and the + MathML equivalents in SBML Levels 2 and 3: + + Text string formula functions MathML equivalents in SBML Levels 2 and + 3 acosarccos asinarcsin atanarctan ceilceiling logln log10(x)log(10, + x) pow(x, y)power(x, y) sqr(x)power(x, 2) sqrt(x)root(2, x) Table + comparing the names of certain functions in the SBML text-string + formula syntax and MathML. The left column shows the names of + functions recognized by SBML_parseFormula(); the right column shows + their equivalent function names in MathML 2.0, used in SBML Levels 2 + and 3. + + WARNING: + + We urge developers to keep in mind that the text-string formula + syntax is specific to SBML Level 1's C-like mathematical formula + syntax. In particular, it is not a general-purpose mathematical + expression syntax. LibSBML provides methods for parsing and + transforming text-string math formulas back and forth from AST + structures, but it is important to keep the system's limitations in + mind. + + @~ @~ See also libsbml.parseL3Formula()@~, + libsbml.parseFormula()@~. @~ +"; + + +%feature("docstring") ASTNode::ASTNode " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ASTNode(ASTNode orig) + + Copy constructor; creates a deep copy of the given ASTNode. + + Parameter 'orig' is the ASTNode to be copied. + + ______________________________________________________________________ + Method variant with the following signature: + + ASTNode(Token_t *token) + + Creates a new ASTNode from the given Token. The resulting ASTNode + will contain the same data as the Token. + + Parameter 'token' is the Token to add. + + ______________________________________________________________________ + Method variant with the following signature: + + ASTNode(ASTNodeType_t type = AST_UNKNOWN) + + Creates and returns a new ASTNode. + + Unless the argument 'type' is given, the returned node will by + default have a type of libsbml.AST_UNKNOWN. If the type isn't + supplied when caling this constructor, the caller should set the + node type to something else as soon as possible using + ASTNode.setType(). + + Parameter 'type' is an optional type@~ code indicating the type of + node to create. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") ASTNode::freeName " + Frees the name of this ASTNode and sets it to None. + + This operation is only applicable to ASTNode objects corresponding to + operators, numbers, or libsbml.AST_UNKNOWN. This method has no + effect on other types of nodes. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") ASTNode::canonicalize " + Converts this ASTNode to a canonical form and returns True if + successful, False otherwise. + + The rules determining the canonical form conversion are as follows: + + + * If the node type is libsbml.AST_NAME and the node name matches + 'ExponentialE', 'Pi', 'True' or 'False' the node type is converted to + the corresponding AST_CONSTANT_X type. + + * If the node type is an libsbml.AST_FUNCTION and the node name + matches an SBML (MathML) function name, logical operator name, or + relational operator name, the node is converted to the corresponding + AST_FUNCTION_X or AST_LOGICAL_X type. + + SBML Level 1 function names are searched first; thus, for example, + canonicalizing log will result in a node type of + libsbml.AST_FUNCTION_LN. (See the SBML Level 1 Version 2 + Specification, Appendix C.) + + Sometimes, canonicalization of a node results in a structural + conversion of the node as a result of adding a child. For example, a + node with the SBML Level 1 function name sqr and a single child node + (the argument) will be transformed to a node of type + libsbml.AST_FUNCTION_POWER with two children. The first child will + remain unchanged, but the second child will be an ASTNode of type + libsbml.AST_INTEGER and a value of 2. The function names that result + in structural changes are: log10, sqr, and sqrt. +"; + + +%feature("docstring") ASTNode::addChild " + Adds the given node as a child of this ASTNode. Child nodes are + added in-order, from left to right. + + Parameter 'child' is the ASTNode instance to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + Adding a child to an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. Callers need to be careful to use + this method in the context of other operations to create complete and + correct formulas. The method ASTNode.isWellFormedASTNode()@~ may + also be useful for checking the results of node modifications. + + See also prependChild(), replaceChild(), insertChild(), + removeChild(), isWellFormedASTNode(). +"; + + +%feature("docstring") ASTNode::prependChild " + Adds the given node as a child of this ASTNode. This method adds + child nodes from right to left. + + Parameter 'child' is the ASTNode instance to add + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + Prepending a child to an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + See also addChild(), replaceChild(), insertChild(), removeChild(). +"; + + +%feature("docstring") ASTNode::removeChild " + Removes the nth child of this ASTNode object. + + Parameter 'n' is long the index of the child to remove + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + Note: + + Removing a child from an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + See also addChild(), prependChild(), replaceChild(), insertChild(). +"; + + +%feature("docstring") ASTNode::replaceChild " + Replaces the nth child of this ASTNode with the given ASTNode. + + Parameter 'n' is long the index of the child to replace Parameter + 'newChild' is ASTNode to replace the nth child + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + Replacing a child from an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + See also addChild(), prependChild(), insertChild(), removeChild(). +"; + + +%feature("docstring") ASTNode::insertChild " + Insert the given ASTNode at point n in the list of children of this + ASTNode. + + Parameter 'n' is long the index of the ASTNode being added Parameter + 'newChild' is ASTNode to insert as the nth child + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + Inserting a child into an ASTNode may change the structure of the + mathematical formula being represented by the tree structure, and may + render the representation invalid. + + See also addChild(), prependChild(), replaceChild(), removeChild(). +"; + + +%feature("docstring") ASTNode::deepCopy " + Creates a recursive copy of this node and all its children. + + Returns a copy of this ASTNode and all its children. The caller owns + the returned ASTNode and is reponsible for deleting it. +"; + + +%feature("docstring") ASTNode::getChild " + Get a child of this node according to its index number. + + Parameter 'n' is the index of the child to get + + Returns the nth child of this ASTNode or None if this node has no nth + child (n > ASTNode.getNumChildren()@~ - 1). +"; + + +%feature("docstring") ASTNode::getLeftChild " + Get the left child of this node. + + Returns the left child of this ASTNode. This is equivalent to + calling ASTNode.getChild()@~ with an argument of 0. +"; + + +%feature("docstring") ASTNode::getRightChild " + Get the right child of this node. + + Returns the right child of this ASTNode, or None if this node has no + right child. If ASTNode.getNumChildren()@~ > 1, then this is + equivalent to: + + getChild( getNumChildren() - 1 ); +"; + + +%feature("docstring") ASTNode::getNumChildren " + Get the number of children that this node has. + + Returns the number of children of this ASTNode, or 0 is this node has + no children. +"; + + +%feature("docstring") ASTNode::addSemanticsAnnotation " + Adds the given XMLNode as a semantic annotation of this ASTNode. + + The <semantics> element is a MathML 2.0 construct that can be used to + associate additional information with a MathML construct. The + construct can be used to decorate a MathML expressions with a + sequence of one or more or <annotation-xml> elements. Each such + element contains a pair of items; the first is a symbol that acts as + an attribute or key, and the second is the value associated with the + attribute or key. Please refer to the MathML 2.0 documentation, + particularly the Section 5.2, Semantic Annotations for more + information about these constructs. + + Parameter 'sAnnotation' is the annotation to add. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + Note: + + Although SBML permits the semantic annotation construct in MathML + expressions, the truth is that this construct has so far (at this + time of this writing, which is early 2011) seen very little use in + SBML software. The full implications of using semantic annotations + are still poorly understood. If you wish to use this construct, we + urge you to discuss possible uses and applications on the SBML + discussion lists, particularly <a target='_blank' + href='http://sbml.org/Forums'>sbml-discuss@caltech.edu and/or sbml- + interoperability@caltech.edu. +"; + + +%feature("docstring") ASTNode::getNumSemanticsAnnotations " + Get the number of semantic annotation elements inside this node. + + The <semantics> element is a MathML 2.0 construct that can be used to + associate additional information with a MathML construct. The + construct can be used to decorate a MathML expressions with a + sequence of one or more <annotation> or <annotation-xml> elements. + Each such element contains a pair of items; the first is a symbol + that acts as an attribute or key, and the second is the value + associated with the attribute or key. Please refer to the MathML 2.0 + documentation, particularly the Section 5.2, Semantic Annotations + for more information about these constructs. + + Returns the number of annotations of this ASTNode. + + See also ASTNode.addSemanticsAnnotation(). +"; + + +%feature("docstring") ASTNode::getSemanticsAnnotation " + Get the nth semantic annotation of this node. + + The <semantics> element is a MathML 2.0 construct that can be used to + associate additional information with a MathML construct. The + construct can be used to decorate a MathML expressions with a + sequence of one or more <annotation> or <annotation-xml> elements. + Each such element contains a pair of items; the first is a symbol + that acts as an attribute or key, and the second is the value + associated with the attribute or key. Please refer to the MathML 2.0 + documentation, particularly the Section 5.2, Semantic Annotations + for more information about these constructs. + + Returns the nth annotation of this ASTNode, or None if this node has + no nth annotation (n > ASTNode.getNumChildren()@~ - 1). + + See also ASTNode.addSemanticsAnnotation(). +"; + + +%feature("docstring") ASTNode::getListOfNodes " + Performs a depth-first search of the tree rooted at this ASTNode + object, and returns a List of nodes where the given function + predicate(node) returns True (non-zero). + + For portability between different programming languages, the + predicate is passed in as a pointer to a function. + + Parameter 'predicate' is the predicate to use + + Returns the list of nodes for which the predicate returned True + (non-zero). The List returned is owned by the caller and should be + deleted after the caller is done using it. The ASTNode objects in + the list; however, are not owned by the caller (as they still belong + to the tree itself), and therefore should not be deleted. +"; + + +%feature("docstring") ASTNode::fillListOfNodes " + Performs a depth-first search of the tree rooted at this ASTNode + object, and adds to the list 'lst' the nodes where the given function + predicate(node) returns True (non-zero). + + This method is identical to getListOfNodes(ASTNodePredicate + predicate) const, except that instead of creating a new List + object, it uses the one passed in as argument 'lst'. + + For portability between different programming languages, the + predicate is passed in as a pointer to a function. The function + definition must have the type ASTNode.h::ASTNodePredicate, which is + defined as + + int (*ASTNodePredicate) (const ASTNode_t *node); + where a return value of non-zero represents True and zero + represents False. + + Parameter 'predicate' is the predicate to use. + + Parameter 'lst' is the List to which ASTNode objects should be added. + + See also getListOfNodes(). +"; + + +%feature("docstring") ASTNode::getCharacter " + Get the value of this node as a single character. This function + should be called only when ASTNode.getType()@~ returns + libsbml.AST_PLUS, libsbml.AST_MINUS, libsbml.AST_TIMES, + libsbml.AST_DIVIDE or libsbml.AST_POWER. + + Returns the value of this ASTNode as a single character +"; + + +%feature("docstring") ASTNode::getId " + Get the id of this ASTNode. + + Returns the mathml id of this ASTNode. +"; + + +%feature("docstring") ASTNode::getClass " + Get the class of this ASTNode. + + Returns the mathml class of this ASTNode. +"; + + +%feature("docstring") ASTNode::getStyle " + Get the style of this ASTNode. + + Returns the mathml style of this ASTNode. +"; + + +%feature("docstring") ASTNode::getInteger " + Get the value of this node as an integer. This function should be + called only when ASTNode.getType()@~ == libsbml.AST_INTEGER. + + Returns the value of this ASTNode as a (long) integer. +"; + + +%feature("docstring") ASTNode::getName " + Get the value of this node as a string. This function may be called + on nodes that (1) are not operators, i.e., nodes for which + ASTNode.isOperator()@~ returns False, and (2) are not numbers, i.e., + ASTNode.isNumber()@~ returns False. + + Returns the value of this ASTNode as a string. +"; + + +%feature("docstring") ASTNode::getOperatorName " + Get the value of this operator node as a string. This function may + be called on nodes that are operators, i.e., nodes for which + ASTNode.isOperator()@~ returns True. + + Returns the name of this operator ASTNode as a string (or None if not + an operator). +"; + + +%feature("docstring") ASTNode::getNumerator " + Get the value of the numerator of this node. This function should be + called only when ASTNode.getType()@~ == libsbml.AST_RATIONAL. + + Returns the value of the numerator of this ASTNode. +"; + + +%feature("docstring") ASTNode::getDenominator " + Get the value of the denominator of this node. This function should + be called only when ASTNode.getType()@~ == libsbml.AST_RATIONAL. + + Returns the value of the denominator of this ASTNode. +"; + + +%feature("docstring") ASTNode::getReal " + Get the real-numbered value of this node. This function should be + called only when ASTNode.isReal()@~ == true. + + This function performs the necessary arithmetic if the node type is + libsbml.AST_REAL_E (mantissa * 10^exponent) or libsbml.AST_RATIONAL + (numerator / denominator). + + Returns the value of this ASTNode as a real (double). +"; + + +%feature("docstring") ASTNode::getMantissa " + Get the mantissa value of this node. This function should be called + only when ASTNode.getType()@~ returns libsbml.AST_REAL_E or + libsbml.AST_REAL. If ASTNode.getType()@~ returns libsbml.AST_REAL, + this method is identical to ASTNode.getReal(). + + Returns the value of the mantissa of this ASTNode. +"; + + +%feature("docstring") ASTNode::getExponent " + Get the exponent value of this ASTNode. This function should be + called only when ASTNode.getType()@~ returns libsbml.AST_REAL_E or + libsbml.AST_REAL. + + Returns the value of the exponent of this ASTNode. +"; + + +%feature("docstring") ASTNode::getPrecedence " + Get the precedence of this node in the infix math syntax of SBML + Level 1. For more information about the infix syntax, see the + discussion about text string formulas at the top of the + documentation for ASTNode. + + Returns an integer indicating the precedence of this ASTNode +"; + + +%feature("docstring") ASTNode::getType " + Get the type of this ASTNode. The value returned is one of the + enumeration values such as libsbml.AST_LAMBDA, libsbml.AST_PLUS, + etc. + + Returns the type of this ASTNode. +"; + + +%feature("docstring") ASTNode::getUnits " + Get the units of this ASTNode. + + SBML Level 3 Version 1 introduced the ability to include an attribute + sbml:units on MathML cn elements appearing in SBML mathematical + formulas. The value of this attribute can be used to indicate the + unit of measurement to be associated with the number in the content + of the cn element. The value of this attribute must be the + identifier of a unit of measurement defined by SBML or the enclosing + Model. Here, the sbml portion is an XML namespace prefix that must + be associated with the SBML namespace for SBML Level 3. The + following example illustrates how this attribute can be used to + define a number with value 10 and unit of measurement second: + + <math xmlns=\"http://www.w3.org/1998/Math/MathML\" + xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> + <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> + + Returns the units of this ASTNode. + + Note: + + The sbml:units attribute is only available in SBML Level 3. It may + not be used in Levels 1-2 of SBML. + + @~ @~ See also libsbml.parseL3Formula()@~. @~ +"; + + +%feature("docstring") ASTNode::isAvogadro " + Predicate returning True (non-zero) if this node is the special + symbol avogadro. The predicate returns False (zero) otherwise. + + Returns True if this ASTNode is the special symbol avogadro. + + @~ @~ See also libsbml.parseL3Formula()@~. @~ +"; + + +%feature("docstring") ASTNode::isBoolean " + Predicate returning True (non-zero) if this node has a boolean type + (a logical operator, a relational operator, or the constants True or + False). + + Returns true if this ASTNode is a boolean, false otherwise. +"; + + +%feature("docstring") ASTNode::returnsBoolean " + Predicate returning True (non-zero) if this node returns a boolean + type or False (zero) otherwise. + + This function looks at the whole ASTNode rather than just the top + level of the ASTNode. Thus it will consider return values from + piecewise statements. In addition, if this ASTNode uses a function + call, the return value of the functionDefinition will be determined. + Note that this is only possible where the ASTNode can trace its + parent Model, that is, the ASTNode must represent the math element + of some SBML object that has already been added to an instance of an + SBMLDocument. + + See also isBoolean(). + + Returns true if this ASTNode returns a boolean, false otherwise. +"; + + +%feature("docstring") ASTNode::isConstant " + Predicate returning True (non-zero) if this node represents a MathML + constant (e.g., True, Pi). + + Returns True if this ASTNode is a MathML constant, False otherwise. + + Note: + + this function will also return True for libsbml.AST_NAME_AVOGADRO in + SBML Level 3. +"; + + +%feature("docstring") ASTNode::isFunction " + Predicate returning True (non-zero) if this node represents a MathML + function (e.g., abs()), or an SBML Level 1 function, or a user- + defined function. + + Returns True if this ASTNode is a function, False otherwise. +"; + + +%feature("docstring") ASTNode::isInfinity " + Predicate returning True (non-zero) if this node represents the + special IEEE 754 value infinity, False (zero) otherwise. + + Returns True if this ASTNode is the special IEEE 754 value infinity, + False otherwise. +"; + + +%feature("docstring") ASTNode::isInteger " + Predicate returning True (non-zero) if this node contains an integer + value, False (zero) otherwise. + + Returns True if this ASTNode is of type libsbml.AST_INTEGER, False + otherwise. +"; + + +%feature("docstring") ASTNode::isLambda " + Predicate returning True (non-zero) if this node is a MathML + <lambda>, False (zero) otherwise. + + Returns True if this ASTNode is of type libsbml.AST_LAMBDA, False + otherwise. +"; + + +%feature("docstring") ASTNode::isLog10 " + Predicate returning True (non-zero) if this node represents a log10 + function, False (zero) otherwise. More precisely, this predicate + returns True if the node type is libsbml.AST_FUNCTION_LOG with two + children, the first of which is an libsbml.AST_INTEGER equal to 10. + + Returns True if the given ASTNode represents a log10() function, + false otherwise. + + @~ @~ See also libsbml.parseL3Formula()@~. @~ +"; + + +%feature("docstring") ASTNode::isLogical " + Predicate returning True (non-zero) if this node is a MathML logical + operator (i.e., and, or, not, xor). + + Returns True if this ASTNode is a MathML logical operator +"; + + +%feature("docstring") ASTNode::isName " + Predicate returning True (non-zero) if this node is a user-defined + variable name in SBML L1, L2 (MathML), or the special symbols delay + or time. The predicate returns False (zero) otherwise. + + Returns True if this ASTNode is a user-defined variable name in SBML + L1, L2 (MathML) or the special symbols delay or time. +"; + + +%feature("docstring") ASTNode::isNaN " + Predicate returning True (non-zero) if this node represents the + special IEEE 754 value 'not a number' (NaN), False (zero) otherwise. + + Returns True if this ASTNode is the special IEEE 754 NaN. +"; + + +%feature("docstring") ASTNode::isNegInfinity " + Predicate returning True (non-zero) if this node represents the + special IEEE 754 value 'negative infinity', False (zero) otherwise. + + Returns True if this ASTNode is the special IEEE 754 value negative + infinity, False otherwise. +"; + + +%feature("docstring") ASTNode::isNumber " + Predicate returning True (non-zero) if this node contains a number, + False (zero) otherwise. This is functionally equivalent to the + following code: + + isInteger() || isReal() + + Returns True if this ASTNode is a number, False otherwise. +"; + + +%feature("docstring") ASTNode::isOperator " + Predicate returning True (non-zero) if this node is a mathematical + operator, meaning, +, -, *, / or ^ (power). + + Returns True if this ASTNode is an operator. +"; + + +%feature("docstring") ASTNode::isPiecewise " + Predicate returning True (non-zero) if this node is the MathML + <piecewise> construct, False (zero) otherwise. + + Returns True if this ASTNode is a MathML piecewise function +"; + + +%feature("docstring") ASTNode::isRational " + Predicate returning True (non-zero) if this node represents a + rational number, False (zero) otherwise. + + Returns True if this ASTNode is of type libsbml.AST_RATIONAL. +"; + + +%feature("docstring") ASTNode::isReal " + Predicate returning True (non-zero) if this node can represent a + real number, False (zero) otherwise. More precisely, this node must + be of one of the following types: libsbml.AST_REAL, + libsbml.AST_REAL_E or libsbml.AST_RATIONAL. + + Returns True if the value of this ASTNode can represented as a real + number, False otherwise. +"; + + +%feature("docstring") ASTNode::isRelational " + Predicate returning True (non-zero) if this node is a MathML + relational operator, meaning ==, >=, >, <, and !=. + + Returns True if this ASTNode is a MathML relational operator, false + otherwise +"; + + +%feature("docstring") ASTNode::isSqrt " + Predicate returning True (non-zero) if this node represents a square + root function, False (zero) otherwise. More precisely, the node + type must be libsbml.AST_FUNCTION_ROOT with two children, the first + of which is an libsbml.AST_INTEGER node having value equal to 2. + + Returns True if the given ASTNode represents a sqrt() function, + False otherwise. +"; + + +%feature("docstring") ASTNode::isUMinus " + Predicate returning True (non-zero) if this node is a unary minus + operator, False (zero) otherwise. A node is defined as a unary + minus node if it is of type libsbml.AST_MINUS and has exactly one + child. + + For numbers, unary minus nodes can be 'collapsed' by negating the + number. In fact, libsbml.parseFormula()@~ does this during its + parsing process, and libsbml.parseL3Formula()@~ has a + configuration option that allows this behavior to be turned on or + off. However, unary minus nodes for symbols (libsbml.AST_NAME) + cannot be 'collapsed', so this predicate function is necessary. + + Returns True if this ASTNode is a unary minus, False otherwise. + + @~ @~ See also libsbml.parseL3Formula()@~. @~ +"; + + +%feature("docstring") ASTNode::isUPlus " + Predicate returning True (non-zero) if this node is a unary plus + operator, False (zero) otherwise. A node is defined as a unary + minus node if it is of type libsbml.AST_MINUS and has exactly one + child. + + Returns True if this ASTNode is a unary plus, False otherwise. +"; + + +%feature("docstring") ASTNode::hasTypeAndNumChildren " + Predicate returning True if this node is of type Parameter 'type' is + and has Parameter 'numchildren' is number of children. Designed for + use in cases where it is useful to discover if the node is a unary + not or unary minus, or a times node with no children, etc. + + Returns True if this ASTNode is has the specified type and number + of children, False otherwise. +"; + + +%feature("docstring") ASTNode::isUnknown " + Predicate returning True (non-zero) if this node has an unknown type. + + 'Unknown' nodes have the type libsbml.AST_UNKNOWN. Nodes with + unknown types will not appear in an ASTNode tree returned by libSBML + based upon valid SBML input; the only situation in which a node with + type libsbml.AST_UNKNOWN may appear is immediately after having + create a new, untyped node using the ASTNode constructor. Callers + creating nodes should endeavor to set the type to a valid node type + as soon as possible after creating new nodes. + + Returns True if this ASTNode is of type libsbml.AST_UNKNOWN, False + otherwise. +"; + + +%feature("docstring") ASTNode::isSetId " + Predicate returning True (non-zero) if this node has the mathml + attribute id. + + Returns true if this ASTNode has an attribute id, false otherwise. +"; + + +%feature("docstring") ASTNode::isSetClass " + Predicate returning True (non-zero) if this node has the mathml + attribute class. + + Returns true if this ASTNode has an attribute class, false otherwise. +"; + + +%feature("docstring") ASTNode::isSetStyle " + Predicate returning True (non-zero) if this node has the mathml + attribute style. + + Returns true if this ASTNode has an attribute style, false otherwise. +"; + + +%feature("docstring") ASTNode::isSetUnits " + Predicate returning True (non-zero) if this node has the attribute + sbml:units. + + SBML Level 3 Version 1 introduced the ability to include an attribute + sbml:units on MathML cn elements appearing in SBML mathematical + formulas. The value of this attribute can be used to indicate the + unit of measurement to be associated with the number in the content + of the cn element. The value of this attribute must be the + identifier of a unit of measurement defined by SBML or the enclosing + Model. Here, the sbml portion is an XML namespace prefix that must + be associated with the SBML namespace for SBML Level 3. The + following example illustrates how this attribute can be used to + define a number with value 10 and unit of measurement second: + + <math xmlns=\"http://www.w3.org/1998/Math/MathML\" + xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> + <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> + + Returns True if this ASTNode has units associated with it, False + otherwise. + + Note: + + The sbml:units attribute is only available in SBML Level 3. It may + not be used in Levels 1-2 of SBML. +"; + + +%feature("docstring") ASTNode::hasUnits " + Predicate returning True (non-zero) if this node or any of its + children nodes have the attribute sbml:units. + + SBML Level 3 Version 1 introduced the ability to include an attribute + sbml:units on MathML cn elements appearing in SBML mathematical + formulas. The value of this attribute can be used to indicate the + unit of measurement to be associated with the number in the content + of the cn element. The value of this attribute must be the + identifier of a unit of measurement defined by SBML or the enclosing + Model. Here, the sbml portion is an XML namespace prefix that must + be associated with the SBML namespace for SBML Level 3. The + following example illustrates how this attribute can be used to + define a number with value 10 and unit of measurement second: + + <math xmlns=\"http://www.w3.org/1998/Math/MathML\" + xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> + <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> + + Returns True if this ASTNode or its children has units associated + with it, False otherwise. + + Note: + + The sbml:units attribute is only available in SBML Level 3. It may + not be used in Levels 1-2 of SBML. +"; + + +%feature("docstring") ASTNode::setCharacter " + Sets the value of this ASTNode to the given character. If character + is one of +, -, *, / or ^, the node type will be set accordingly. + For all other characters, the node type will be set to + libsbml.AST_UNKNOWN. + + Parameter 'value' is the character value to which the node's value + should be set. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ASTNode::setId " + Sets the mathml id of this ASTNode to id. + + Parameter 'id' is string representing the identifier. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ASTNode::setClass " + Sets the mathml class of this ASTNode to className. + + Parameter 'className' is string representing the mathml class for + this node. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ASTNode::setStyle " + Sets the mathml style of this ASTNode to style. + + Parameter 'style' is string representing the identifier. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ASTNode::setName " + Sets the value of this ASTNode to the given name. + + As a side-effect, this ASTNode object's type will be reset to + libsbml.AST_NAME if (and only if) the ASTNode was previously an + operator ( ASTNode.isOperator()@~ == true), number ( + ASTNode.isNumber()@~ == true), or unknown. This allows names to be + set for libsbml.AST_FUNCTION nodes and the like. + + Parameter 'name' is the string containing the name to which this + node's value should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ASTNode::setValue " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setValue(long numerator, long denominator) + + Sets the value of this ASTNode to the given rational in two parts: + the numerator and denominator. The node type is set to + libsbml.AST_RATIONAL. + + Parameter 'numerator' is the numerator value of the rational + Parameter 'denominator' is the denominator value of the rational + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + ______________________________________________________________________ + Method variant with the following signature: + + setValue(double mantissa, long exponent) + + Sets the value of this ASTNode to the given real (double) in two + parts: the mantissa and the exponent. The node type is set to + libsbml.AST_REAL_E. + + Parameter 'mantissa' is the mantissa of this node's real-numbered + value Parameter 'exponent' is the exponent of this node's real- + numbered value + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + ______________________________________________________________________ + Method variant with the following signature: + + setValue(int value) + + Sets the value of this ASTNode to the given integer and sets the node + type to libsbml.AST_INTEGER. + + Parameter 'value' is the integer to which this node's value should be + set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + ______________________________________________________________________ + Method variant with the following signature: + + setValue(double value) + + Sets the value of this ASTNode to the given real (double) and sets + the node type to libsbml.AST_REAL. + + This is functionally equivalent to: + + setValue(value, 0); + + Parameter 'value' is the double format number to which this node's + value should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: * + libsbml.LIBSBML_OPERATION_SUCCESS + + ______________________________________________________________________ + Method variant with the following signature: + + setValue(long value) + + Sets the value of this ASTNode to the given (long) integer and sets + the node type to libsbml.AST_INTEGER. + + Parameter 'value' is the integer to which this node's value should be + set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ASTNode::setType " + Sets the type of this ASTNode to the given type code. A side-effect + of doing this is that any numerical values previously stored in this + node are reset to zero. + + Parameter 'type' is the type to which this node should be set + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") ASTNode::setUnits " + Sets the units of this ASTNode to units. + + The units will be set only if this ASTNode object represents a + MathML <cn> element, i.e., represents a number. Callers may use + ASTNode.isNumber()@~ to inquire whether the node is of that type. + + SBML Level 3 Version 1 introduced the ability to include an attribute + sbml:units on MathML cn elements appearing in SBML mathematical + formulas. The value of this attribute can be used to indicate the + unit of measurement to be associated with the number in the content + of the cn element. The value of this attribute must be the + identifier of a unit of measurement defined by SBML or the enclosing + Model. Here, the sbml portion is an XML namespace prefix that must + be associated with the SBML namespace for SBML Level 3. The + following example illustrates how this attribute can be used to + define a number with value 10 and unit of measurement second: + + <math xmlns=\"http://www.w3.org/1998/Math/MathML\" + xmlns:sbml=\"http://www.sbml.org/sbml/level3/version1/core\"> + <cn type=\"integer\" sbml:units=\"second\"> 10 </cn> </math> + + Parameter 'units' is string representing the unit identifier. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + The sbml:units attribute is only available in SBML Level 3. It may + not be used in Levels 1-2 of SBML. +"; + + +%feature("docstring") ASTNode::swapChildren " + Swap the children of this ASTNode object with the children of the + given ASTNode object. + + Parameter 'that' is the other node whose children should be used to + replace this node's children + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ASTNode::renameSIdRefs " + Renames all the SIdRef attributes on this node and any child node +"; + + +%feature("docstring") ASTNode::renameUnitSIdRefs " + Renames all the UnitSIdRef attributes on this node and any child + node. (The only place UnitSIDRefs appear in MathML <cn> elements.) +"; + + +%feature("docstring") ASTNode::replaceIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::multiplyTimeBy " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::unsetUnits " + Unsets the units of this ASTNode. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ASTNode::unsetId " + Unsets the mathml id of this ASTNode. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ASTNode::unsetClass " + Unsets the mathml class of this ASTNode. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ASTNode::unsetStyle " + Unsets the mathml style of this ASTNode. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ASTNode::setSemanticsFlag " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::unsetSemanticsFlag " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::getSemanticsFlag " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::setDefinitionURL " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::getDefinitionURL " + Gets the MathML definitionURL attribute value. + + Returns the value of the definitionURL attribute, in the form of a + libSBML XMLAttributes object. +"; + + +%feature("docstring") ASTNode::replaceArgument " + Replaces occurences of a given name within this ASTNode with the + name/value/formula represented by 'arg'. + + For example, if the formula in this ASTNode is x + y, then the + <bvar> is x and arg is an ASTNode representing the real value 3. + This method substitutes 3 for x within this ASTNode object. + + Parameter 'bvar' is a string representing the variable name to be + substituted Parameter 'arg' is an ASTNode representing the + name/value/formula to substitute +"; + + +%feature("docstring") ASTNode::setParentSBMLObject " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::getParentSBMLObject " + Returns the parent SBML object. + + Returns the parent SBML object of this ASTNode. +"; + + +%feature("docstring") ASTNode::reduceToBinary " + Reduces this ASTNode to a binary tree. + + Example: if this ASTNode is and(x, y, z), then the formula of the + reduced node is and(and(x, y), z). The operation replaces the + formula stored in the current ASTNode object. +"; + + +%feature("docstring") ASTNode::setUserData " + Sets the user data of this node. This can be used by the application + developer to attach custom information to the node. In case of a deep + copy this attribute will passed as it is. The attribute will be never + interpreted by this class. + + Parameter 'userData' is specifies the new user data. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ASTNode::*getUserData " + Returns the user data that has been previously set via setUserData(). + + Returns the user data of this node, or None if no user data has been + set. + + @~ +"; + + +%feature("docstring") ASTNode::isWellFormedASTNode " + Predicate returning True or False depending on whether this ASTNode + is well-formed. + + Note: + + An ASTNode may be well-formed, with each node and its children + having the appropriate number of children for the given type, but may + still be invalid in the context of its use within an SBML model. + + Returns True if this ASTNode is well-formed, False otherwise. + + See also hasCorrectNumberArguments(). +"; + + +%feature("docstring") ASTNode::hasCorrectNumberArguments " + Predicate returning True or False depending on whether this ASTNode + has the correct number of children for it's type. + + For example, an ASTNode with type libsbml.AST_PLUS expects 2 child + nodes. + + Note: + + This function performs a check on the toplevel node only. Child + nodes are not checked. + + Returns True if this ASTNode is has appropriate number of children + for it's type, False otherwise. + + See also isWellFormedASTNode(). +"; + + +%feature("docstring") ASTNode::isBvar " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::setBvar " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::canonicalizeConstant " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::canonicalizeFunction " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::canonicalizeFunctionL1 " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::canonicalizeLogical " + Internal implementation method. +"; + + +%feature("docstring") ASTNode::canonicalizeRelational " + Internal implementation method. +"; + + +%feature("docstring") SBML_parseFormula " + Parses the given SBML formula and returns a representation of it as + an Abstract Syntax Tree (AST). + + The text-string form of mathematical formulas produced by + libsbml.formulaToString()@~ and read by libsbml.parseFormula()@~ + and libsbml.parseL3Formula()@~ use a simple C-inspired infix + notation. A formula in this text-string form therefore can be + handed to a program that understands SBML mathematical expressions, + or used as part of a formula translation system. The syntax is + described in detail in the documentation for ASTNode. + + This returns the root node of the AST corresponding to the formula. + If the formula contains a syntax error, None is returned instead. + + Note that this facility is provided as a convenience by libSBML -- + the MathML standard does not actually define a 'string-form' + equivalent to MathML expression trees, so the choice of formula + syntax is somewhat arbitrary. The approach taken by libSBML is to + use the syntax defined by SBML Level 1 (which in fact used a text- + string representation of formulas and not MathML). This formula + syntax is based mostly on C programming syntax, and may contain + operators, function calls, symbols, and white space characters. The + following table provides the precedence rules for the different + entities that may appear in formula strings. + + Token Operation Class Precedence Associates namesymbol + referenceoperand6n/a (expression)expression groupingoperand6n/a + f(...)function callprefix6left -negationunary5right + ^powerbinary4left *multiplicationbinary3left /divisonbinary3left + +additionbinary2left -subtractionbinary2left ,argument + delimiterbinary1left A table of the expression operators and their + precedence in the text-string format for mathematical expressions + used by SBML_parseFormula(). + + In the table above, operand implies the construct is an operand, + prefix implies the operation is applied to the following arguments, + unary implies there is one argument, and binary implies there are + two arguments. The values in the Precedence column show how the + order of different types of operation are determined. For example, + the expression a * b + c is evaluated as (a * b) + c because the * + operator has higher precedence. The Associates column shows how the + order of similar precedence operations is determined; for example, a + - b + c is evaluated as (a - b) + c because the + and - operators + are left-associative. + + The function call syntax consists of a function name, followed by + optional white space, followed by an opening parenthesis token, + followed by a sequence of zero or more arguments separated by commas + (with each comma optionally preceded and/or followed by zero or more + white space characters, followed by a closing parenthesis token. + The function name must be chosen from one of the pre-defined + functions in SBML or a user-defined function in the model. The + following table lists the names of certain common mathematical + functions; this table corresponds to Table 6 in the SBML Level 1 + Version 2 specification: + + Name Args Formula or meaning Argument Constraints Result constraints + absxabsolute value of x acosxarc cosine of x in radians-1.0 ≤ + x ≤ 1.00 ≤ acos(x) ≤ π asinxarc sine of x in + radians-1.0 ≤ x ≤ 1.00 ≤ asin(x) ≤ π + atanxarc tangent of x in radians0 ≤ atan(x) ≤ π + ceilxsmallest number not less than x whose value is an exact integer + cosxcosine of x expxe x, where e is the base of the natural + logarithm floorxthe largest number not greater than x whose value is + an exact integer logxnatural logarithm of xx > 0 log10xbase 10 + logarithm of xx > 0 powx, yx y sqrxx2 sqrtx√xx > 0sqrt(x) + ≥ 0 sinxsine of x tanxtangent of xx ≠ n*π/2, for + odd integer n The names of mathematical functions defined in the + SBML Level 1 Version 2 text-string formula syntax. + + WARNING: + + There are differences between the symbols used to represent the + common mathematical functions and the corresponding MathML token + names. This is a potential source of incompatibilities. Note in + particular that in this text-string syntax, log(x) represents the + natural logarithm, whereas in MathML, the natural logarithm is + <ln/>. Application writers are urged to be careful when translating + between text forms and MathML forms, especially if they provide a + direct text-string input facility to users of their software + systems. + + We urge developers to keep in mind that the text-string formula + syntax is specific to SBML Level 1's C-like mathematical formula + syntax. In particular, it is not a general-purpose mathematical + expression syntax. LibSBML provides methods for parsing and + transforming text-string math formulas back and forth from AST + structures, but it is important to keep the system's limitations in + mind. + + Parameter 'formula' is the text-string formula expression to be + parsed + + Returns the root node of the AST, or None if an error occurred in + parsing the formula + + @~ @~ See also libsbml.formulaToString(), + libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), + libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), + libsbml.getDefaultL3ParserSettings(). @~ @~ +"; + + +%feature("docstring") SBML_formulaToString " + Converts an AST to a string representation of a formula using a + syntax basically derived from SBML Level 1. + + The text-string form of mathematical formulas produced by + libsbml.formulaToString()@~ and read by libsbml.parseFormula()@~ + use a simple C-inspired infix notation taken from SBML Level 1. A + formula in this text-string form therefore can be handed to a program + that understands SBML Level 1 mathematical expressions, or used as + part of a formula translation system. The syntax is described in + detail in the documentation for ASTNode. + + Note that this facility is provided as a convenience by libSBML -- + the MathML standard does not actually define a 'string-form' + equivalent to MathML expression trees, so the choice of formula + syntax is somewhat arbitrary. The approach taken by libSBML is to + use the syntax defined by SBML Level 1 (which in fact used a text- + string representation of formulas and not MathML). This formula + syntax is based mostly on C programming syntax, and may contain + operators, function calls, symbols, and white space characters. The + following table provides the precedence rules for the different + entities that may appear in formula strings. + + Token Operation Class Precedence Associates namesymbol + referenceoperand6n/a (expression)expression groupingoperand6n/a + f(...)function callprefix6left -negationunary5right + ^powerbinary4left *multiplicationbinary3left /divisonbinary3left + +additionbinary2left -subtractionbinary2left ,argument + delimiterbinary1left A table of the expression operators and their + precedence in the text-string format for mathematical expressions + used by SBML_parseFormula(). + + In the table above, operand implies the construct is an operand, + prefix implies the operation is applied to the following arguments, + unary implies there is one argument, and binary implies there are + two arguments. The values in the Precedence column show how the + order of different types of operation are determined. For example, + the expression a * b + c is evaluated as (a * b) + c because the * + operator has higher precedence. The Associates column shows how the + order of similar precedence operations is determined; for example, a + - b + c is evaluated as (a - b) + c because the + and - operators + are left-associative. + + The function call syntax consists of a function name, followed by + optional white space, followed by an opening parenthesis token, + followed by a sequence of zero or more arguments separated by commas + (with each comma optionally preceded and/or followed by zero or more + white space characters, followed by a closing parenthesis token. + The function name must be chosen from one of the pre-defined + functions in SBML or a user-defined function in the model. The + following table lists the names of certain common mathematical + functions; this table corresponds to Table 6 in the SBML Level 1 + Version 2 specification: + + Name Args Formula or meaning Argument Constraints Result constraints + absxabsolute value of x acosxarc cosine of x in radians-1.0 ≤ + x ≤ 1.00 ≤ acos(x) ≤ π asinxarc sine of x in + radians-1.0 ≤ x ≤ 1.00 ≤ asin(x) ≤ π + atanxarc tangent of x in radians0 ≤ atan(x) ≤ π + ceilxsmallest number not less than x whose value is an exact integer + cosxcosine of x expxe x, where e is the base of the natural + logarithm floorxthe largest number not greater than x whose value is + an exact integer logxnatural logarithm of xx > 0 log10xbase 10 + logarithm of xx > 0 powx, yx y sqrxx2 sqrtx√xx > 0sqrt(x) + ≥ 0 sinxsine of x tanxtangent of xx ≠ n*π/2, for + odd integer n The names of mathematical functions defined in the + SBML Level 1 Version 2 text-string formula syntax. + + WARNING: + + There are differences between the symbols used to represent the + common mathematical functions and the corresponding MathML token + names. This is a potential source of incompatibilities. Note in + particular that in this text-string syntax, log(x) represents the + natural logarithm, whereas in MathML, the natural logarithm is + <ln/>. Application writers are urged to be careful when translating + between text forms and MathML forms, especially if they provide a + direct text-string input facility to users of their software + systems. + + We urge developers to keep in mind that the text-string formula + syntax is specific to SBML Level 1's C-like mathematical formula + syntax. In particular, it is not a general-purpose mathematical + expression syntax. LibSBML provides methods for parsing and + transforming text-string math formulas back and forth from AST + structures, but it is important to keep the system's limitations in + mind. + + Parameter 'tree' is the AST to be converted. + + Returns the formula from the given AST as an SBML Level 1 text-string + mathematical formula. The caller owns the returned string and is + responsible for freeing it when it is no longer needed. + + @~ @~ See also libsbml.formulaToString(), + libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), + libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), + libsbml.getDefaultL3ParserSettings(). @~ @~ +"; + + +%feature("docstring") SBML_parseL3Formula " + Parses the given mathematical formula and returns a representation of + it as an Abstract Syntax Tree (AST). + + The text-string form of mathematical formulas read by this function + are expanded versions of the formats produced and read by + libsbml.formulaToString()@~ and libsbml.parseFormula()@~, + respectively. The latter two libSBML functions were originally + developed to support conversion between SBML Levels 1 and 2, and + were focused on the syntax of mathematical formulas used in SBML + Level 1. With time, and the use of MathML in SBML Levels 2 and 3, + it became clear that supporting Level 2 and 3's expanded + mathematical syntax would be useful for software developers. To + maintain backwards compatibility, the original + libsbml.formulaToString()@~ and libsbml.parseFormula()@~ have been + left untouched, and instead, the new functionality is provided in + the form of libsbml.parseL3Formula()@~. + + The following are the differences in the formula syntax supported by + this function, compared to what is supported by + libsbml.parseFormula()@~: + + * Units may be asociated with bare numbers, using the following + syntax: + + number unit + + The number may be in any form (an integer, real, or rational + number), and the unit must conform to the syntax of an SBML + identifier (technically, the type defined as SId in the SBML + specifications). The whitespace between number and unit is + optional. + + * The Boolean function symbols &&, ||, !, and != may be used. + + * The modulo operation is allowed as the symbol @ and will + produce a piecewise function in the MathML. + + * All inverse trigonometric functions may be defined in the infix + either using arc as a prefix or simply a; in other words, both + arccsc and acsc are interpreted as the operator arccosecant defined + in MathML. (Many functions in the SBML Level 1 infix-notation + parser implemented by libsbml.parseFormula()@~ are defined this way + as well, but not all.) + + * The following expression is parsed as a rational number instead + of as a numerical division: + + (<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>/<span class=\'code\' style=\'background-color: #d0d0ee\'>integer</span>) + + No spaces are allowed in this construct; in other words, \"(3 / 4)\" + will be parsed into the MathML <divide> construct rather than a + rational number. The general number syntax allows you to assign + units to a rational number, e.g., \"(3/4) ml\". (If the string is a + division, units are not interpreted in this way.) + + * Various settings may be altered by using an L3ParserSettings + object in conjunction with the alternative function call + libsbml.parseL3FormulaWithSettings()@~, including the following: + + * The function log with a single argument (\"log(x)\") can be + parsed as log10(x), ln(x), or treated as an error, as desired. + + * Unary minus signs can be collapsed or preserved; that is, + sequential pairs of unary minuses (e.g., \"- -3\") can be removed + from the input entirely and single unary minuses can be incorporated + into the number node, or all minuses can be preserved in the AST + node structure. + + * Parsing of units embedded in the input string can be turned on + and off. + + * The string avogadro can be parsed as a MathML csymbol or as an + identifier. + + * A Model object may optionally be provided to the parser using + the variant function call libsbml.SBML_parseL3FormulaWithModel()@~. + or stored in a L3ParserSettings object passed to the variant function + libsbml.parseL3FormulaWithSettings()@~. When a Model object is + provided, identifiers (values of type SId) from that model are used + in preference to pre-defined MathML definitions. More precisely, + the Model entities whose identifiers will shadow identical symbols + in the mathematical formula are: Species, Compartment, Parameter, + Reaction, and SpeciesReference. For instance, if the parser is + given a Model containing a Species with the identifier \"pi\", and + the formula to be parsed is \"3*pi\", the MathML produced will + contain the construct <ci> pi </ci> instead of the construct <pi/>. + + * Similarly, when a Model object is provided, SId values of user- + defined functions present in the model will be used preferentially + over pre-defined MathML functions. For example, if the passed-in + Model contains a FunctionDefinition with the identifier \"sin\", + that function will be used instead of the predefined MathML function + <sin/>. + + These configuration settings cannot be changed using this function + (i.e., libsbml.parseL3Formula()@~), but they can be change on a + per-call basis by using the alternative function + libsbml.parseL3FormulaWithSettings()@~ + + This function returns the root node of the AST corresponding to the + formula given as the argument. If the formula contains a syntax + error, this function will return None instead. When None is + returned, an error is set; information about the error can be + retrieved using libsbml.getLastParseL3Error()@~. + + Note that this facility and the SBML Level 1-based + libsbml.parseFormula()@~ are provided as a convenience by libSBML -- + the MathML standard does not actually define a 'string-form' + equivalent to MathML expressions, so the choice of formula syntax is + arbitrary. The approach taken by libSBML is to start with the + syntax defined by SBML Level 1 (which in fact used a text-string + representation of formulas, and not MathML), and expand it to + include the above functionality. This formula syntax is based + mostly on C programming syntax, and may contain operators, function + calls, symbols, and white space characters. The following table + provides the precedence rules for the different entities that may + appear in formula strings. + + Token Operation Class Precedence Associates namesymbol + referenceoperand8n/a (expression)expression groupingoperand8n/a + f(...)function callprefix8left ^powerbinary7left -, !negation and + boolean 'not'unary6right *, /, multiplication, division, and + modulobinary5left +, -addition and subtractionbinary4left ==, <, >, + <=, >=, !=boolean equality, inequality, and comparisonbinary3left + &&, ||boolean 'and' and 'or'binary2left ,argument + delimiterbinary1left A table of the expression operators and their + precedence in the text-string format for mathematical expressions + used by SBML_parseL3Formula(). + + In the table above, operand implies the construct is an operand, + prefix implies the operation is applied to the following arguments, + unary implies there is one argument, and binary implies there are + two arguments. The values in the Precedence column show how the + order of different types of operation are determined. For example, + the expression a + b * c is evaluated as a + (b * c) because the * + operator has higher precedence. The Associates column shows how the + order of similar precedence operations is determined; for example, a + && b || c is evaluated as (a && b) || c because the && and || + operators are left-associative and have the same precedence. + + The function call syntax consists of a function name, followed by + optional white space, followed by an opening parenthesis token, + followed by a sequence of zero or more arguments separated by commas + (with each comma optionally preceded and/or followed by zero or more + white space characters), followed by a closing parenthesis token. + The function name must be chosen from one of the pre-defined + functions in SBML or a user-defined function in the model. The + following table lists the names of certain common mathematical + functions; this table corresponds to Table 6 in the SBML Level 1 + Version 2 specification with additions based on the functions added + in SBML Level 2 and Level 3: + + Name Argument(s) Formula or meaning Argument Constraints Result + constraints abs x Absolute value of x. acos, arccos x Arccosine of x + in radians. -1.0 ≤ x ≤ 1.0 0 ≤ acos(x) ≤ + π acosh, arccosh x Hyperbolic arccosine of x in radians. acot, + arccot x Arccotangent of x in radians. acoth, arccoth x Hyperbolic + arccotangent of x in radians. acsc, arccsc x Arccosecant of x in + radians. acsch, arccsch x Hyperbolic arccosecant of x in radians. + asec, arcsec x Arcsecant of x in radians. asech, arcsech x + Hyperbolic arcsecant of x in radians. asin, arcsin xArcsine of x in + radians. -1.0 ≤ x ≤ 1.0 0 ≤ asin(x) ≤ π + atan, arctan x Arctangent of x in radians. 0 ≤ atan(x) ≤ + π atanh, arctanh x Hyperbolic arctangent of x in radians. ceil, + ceiling x Smallest number not less than x whose value is an exact + integer. cos x Cosine of x cosh x Hyperbolic cosine of x. cot x + Cotangent of x. coth x Hyperbolic cotangent of x. csc x Cosecant of + x. csch x Hyperbolic cosecant of x. delay x, y The value of x at y + time units in the past. factorial n The factorial of n. Factorials + are defined by n! = n*(n-1)* ... * 1. n must be an integer. exp x e + x, where e is the base of the natural logarithm. floor x The largest + number not greater than x whose value is an exact integer. ln x + Natural logarithm of x. x > 0 log x By default, the base 10 + logarithm of x, but can be set to be the natural logarithm of x, or + to be an illegal construct. x > 0 log x, y The base x logarithm of y. + y > 0 log10 x Base 10 logarithm of x. x > 0 piecewise x1, y1, [x2, + y2,] [...] [z] A piecewise function: if (y1), x1. Otherwise, if + (y2), x2, etc. Otherwise, z. y1, y2, y3 [etc] must be boolean pow, + power x, y x y. root b, x The root base b of x. sec x Secant of x. + sech x Hyperbolic secant of x. sqr x x2. sqrt x √x. x > 0 + sqrt(x) ≥ 0 sin x Sine of x. sinh x Hyperbolic sine of x. tan + x Tangent of x. x ≠ n*π/2, for odd integer n tanh x + Hyperbolic tangent of x. and x, y, z... Boolean and(x, y, z...): + returns true if all of its arguments are true. Note that 'and' is an + n-ary function, taking 0 or more arguments, and that and() returns + 'true'. All arguments must be boolean not x Boolean not(x) x must be + boolean or x, y, z... Boolean or(x, y, z...): returns true if at + least one of its arguments is true. Note that 'or' is an n-ary + function, taking 0 or more arguments, and that or() returns 'false'. + All arguments must be boolean xor x, y, z... Boolean xor(x, y, + z...): returns true if an odd number of its arguments is true. Note + that 'xor' is an n-ary function, taking 0 or more arguments, and + that xor() returns 'false'. All arguments must be boolean eq x, y, + z... Boolean eq(x, y, z...): returns true if all arguments are + equal. Note that 'eq' is an n-ary function, but must take 2 or more + arguments. geq x, y, z... Boolean geq(x, y, z...): returns true if + each argument is greater than or equal to the argument following it. + Note that 'geq' is an n-ary function, but must take 2 or more + arguments. gt x, y, z... Boolean gt(x, y, z...): returns true if + each argument is greater than the argument following it. Note that + 'gt' is an n-ary function, but must take 2 or more arguments. leq x, + y, z... Boolean leq(x, y, z...): returns true if each argument is + less than or equal to the argument following it. Note that 'leq' is + an n-ary function, but must take 2 or more arguments. lt x, y, z... + Boolean lt(x, y, z...): returns true if each argument is less than + the argument following it. Note that 'lt' is an n-ary function, but + must take 2 or more arguments. neq x, y Boolean x != y: returns true + unless x and y are equal. plus x, y, z... x + y + z + ...: The sum of + the arguments of the function. Note that 'plus' is an n-ary function + taking 0 or more arguments, and that 'plus()' returns 0. times x, y, + z... x * y * z * ...: The product of the arguments of the function. + Note that 'times' is an n-ary function taking 0 or more arguments, + and that 'times()' returns 1. minus x, y x - y. divide x, y x / y. + The names of mathematical functions defined in the text-string + formula syntax understood by SBML_parseL3Formula() and related + functions. + + Note that this function's interpretation of the string \"log\" as a + function with a single argument can be changed; use the function + libsbml.parseL3FormulaWithSettings()@~ instead of this function and + pass it an appropriate L3ParserSettings object. By default, unlike + the SBML Level 1 parser implemented by libsbml.parseFormula()@~, + the string \"log\" is interpreted as the base 10 logarithm, and not + as the natural logarithm. However, you can change the + interpretation to be base-10 log, natural log, or as an error; since + the name 'log' by itself is ambiguous, you require that the parser + uses log10 or ln instead, which are more clear. Please refer to + libsbml.parseL3FormulaWithSettings()@~. + + In addition, the following symbols will be translated to their MathML + equivalents, if no symbol with the same SId identifier string exists + in the Model object provided: + + Name Meaning MathML true The boolean value true <true/> false The + boolean value false <false/> pi The mathematical constant pi <pi/> + avogadro The numerical value of Avogadro's constant, as defined in + the SBML specification <csymbol encoding=\"text\" + definitionURL=\"http://www.sbml.org/sbml/symbols/avogadro\"> avogadro + </csymbol/> time Simulation time as defined in SBML <csymbol + encoding=\"text\" + definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time + </csymbol/> inf or infinity The mathematical constant \"infinity\" + <infinity/> nan or notanumber The mathematical concept \"not a + number\" <notanumber/> The names of mathematical symbols defined in + the text-string formula syntax understood by SBML_parseL3Formula() + and related functions. + + Note that whether the string \"avogadro\" is parsed as an AST node + of type libsbml.AST_NAME_AVOGADRO or libsbml.AST_NAME is + configurable; use the alternate version of this function, called + libsbml.parseL3FormulaWithSettings()@~. This functionality is + provided because SBML Level 2 models may not use + libsbml.AST_NAME_AVOGADRO AST nodes. + + Parameter 'formula' is the text-string formula expression to be + parsed + + Returns the root node of an AST representing the mathematical + formula, or None if an error occurred while parsing the formula. + When None is returned, an error is recorded internally; information + about the error can be retrieved using + libsbml.getLastParseL3Error()@~. + + @~ @~ See also libsbml.formulaToString(), + libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), + libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), + libsbml.getDefaultL3ParserSettings(). @~ @~ +"; + + +%feature("docstring") SBML_parseL3FormulaWithModel " + Parses the given mathematical formula using specific a specific Model + to resolve symbols, and returns an Abstract Syntax Tree (AST) + representation of the result. + + This is identical to libsbml.parseL3Formula()@~, except that this + function uses the given model in the argument 'model' to check + against identifiers that appear in the 'formula'. + + For more details about the parser, please see the definition of the + function libsbml.parseL3Formula()@~. + + Parameter 'formula' is the mathematical formula expression to be + parsed + + Parameter 'model' is the Model object to use for checking identifiers + + Returns the root node of an AST representing the mathematical + formula, or None if an error occurred while parsing the formula. + When None is returned, an error is recorded internally; information + about the error can be retrieved using + libsbml.getLastParseL3Error()@~. + + @~ @~ See also libsbml.formulaToString(), + libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), + libsbml.getLastParseL3Error(), libsbml.getDefaultL3ParserSettings(). + @~ @~ +"; + + +%feature("docstring") SBML_parseL3FormulaWithSettings " + Parses the given mathematical formula using specific parser settings + and returns an Abstract Syntax Tree (AST) representation of the + result. + + This is identical to libsbml.parseL3Formula()@~, except that this + function uses the parser settings given in the argument 'settings'. + The settings override the default parsing behavior. + + The parameter 'settings' allows callers to change the following + parsing behaviors: + + * Use a specific Model object against which identifiers to compare + identifiers. This causes the parser to search the Model for + identifiers that the parser encounters in the formula. If a given + symbol in the formula matches the identifier of a Species, + Compartment, Parameter, Reaction, SpeciesReference or + FunctionDefinition in the Model, then the symbol is assumed to refer + to that model entity instead of any possible mathematical terms with + the same symbol. For example, if the parser is given a Model + containing a Species with the identifier \"pi\", and the formula to + be parsed is \"3*pi\", the MathML produced will contain the + construct <ci> pi </ci> instead of the construct <pi/>. + + * Whether to parse \"log(x)\" with a single argument as the base + 10 logarithm of x, the natural logarithm of x, or treat the case as + an error. + + * Whether to parse \"number id\" by interpreting id as the + identifier of a unit of measurement associated with the number, or + whether to treat the case as an error. + + * Whether to parse \"avogadro\" as an ASTNode of type + libsbml.AST_NAME_AVOGADRO or as type libsbml.AST_NAME. + + * Whether to always create explicit ASTNodes of type + libsbml.AST_MINUS for all unary minuses, or collapse and remove + minuses where possible. + + For more details about the parser, please see the definition of + L3ParserSettings and libsbml.parseL3Formula()@~. + + Parameter 'formula' is the mathematical formula expression to be + parsed + + Parameter 'settings' is the settings to be used for this parser + invocation + + Returns the root node of an AST representing the mathematical + formula, or None if an error occurred while parsing the formula. + When None is returned, an error is recorded internally; information + about the error can be retrieved using + libsbml.getLastParseL3Error()@~. + + @~ @~ See also libsbml.formulaToString(), libsbml.parseL3Formula(), + libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(), + libsbml.getDefaultL3ParserSettings(). @~ @~ +"; + + +%feature("docstring") SBML_getDefaultL3ParserSettings " + Returns a copy of the default parser settings used by + libsbml.parseL3Formula()@~. + + The settings structure allows callers to change the following parsing + behaviors: + + * Use a specific Model object against which identifiers to compare + identifiers. This causes the parser to search the Model for + identifiers that the parser encounters in the formula. If a given + symbol in the formula matches the identifier of a Species, + Compartment, Parameter, Reaction, SpeciesReference or + FunctionDefinition in the Model, then the symbol is assumed to refer + to that model entity instead of any possible mathematical terms with + the same symbol. For example, if the parser is given a Model + containing a Species with the identifier \"pi\", and the formula to + be parsed is \"3*pi\", the MathML produced will contain the + construct <ci> pi </ci> instead of the construct <pi/>. + + * Whether to parse \"log(x)\" with a single argument as the base + 10 logarithm of x, the natural logarithm of x, or treat the case as + an error. + + * Whether to parse \"number id\" by interpreting id as the + identifier of a unit of measurement associated with the number, or + whether to treat the case as an error. + + * Whether to parse \"avogadro\" as an ASTNode of type + libsbml.AST_NAME_AVOGADRO or as type libsbml.AST_NAME. + + * Whether to always create explicit ASTNodes of type + libsbml.AST_MINUS for all unary minuses, or collapse and remove + minuses where possible. + + For more details about the parser, please see the definition of + L3ParserSettings and libsbml.parseL3Formula()@~. + + @~ @~ See also libsbml.formulaToString(), + libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), + libsbml.parseL3FormulaWithModel(), libsbml.getLastParseL3Error(). @~ + @~ +"; + + +%feature("docstring") SBML_getLastParseL3Error " + Returns the last error reported by the parser. + + If libsbml.parseL3Formula()@~, + libsbml.parseL3FormulaWithSettings()@~, or + libsbml.parseL3FormulaWithModel()@~ return None, an error is set + internally which is accessible via this function. + + Returns a string describing the error that occurred. This will + contain the string the parser was trying to parse, which character + it had parsed when it encountered the error, and a description of + the error. + + @~ @~ See also libsbml.formulaToString(), + libsbml.parseL3FormulaWithSettings(), libsbml.parseL3Formula(), + libsbml.parseL3FormulaWithModel(), + libsbml.getDefaultL3ParserSettings(). @~ @~ +"; + + +%feature("docstring") L3ParserSettings " + @ingroup Core A helper class for controlling the behavior of the + text-string formula parser. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The function libsbml.parseL3FormulaWithSettings()@~, along with its + variants libsbml.parseFormula()@~ and + libsbml.parseL3FormulaWithModel()@~, are the interfaces to a parser + for mathematical formulas expressed as text strings. The parser + converts the text-string formulas into Abstract Syntax Trees (ASTs), + represented in libSBML using ASTNode objects. Compared to the parser + implemented by the function libsbml.parseFormula()@~, which was + designed primarily for converting the mathematical formula strings + in SBML Level 1, the 'L3' variant of the parser accepts an extended + formula syntax. It also has a number of configurable behaviors. + This class (L3ParserSettings) is an object used to communicate the + configuration settings with callers. + + The following aspects of the parser are configurable: + + * The function log with a single argument (\"log(x)\") can be + parsed as log10(x), ln(x), or treated as an error, as desired. + + * Unary minus signs can be collapsed or preserved; that is, + sequential pairs of unary minuses (e.g., \"- -3\") can be removed + from the input entirely and single unary minuses can be incorporated + into the number node, or all minuses can be preserved in the AST + node structure. + + * Parsing of units embedded in the input string can be turned on + and off. + + * The string avogadro can be parsed as a MathML csymbol or as an + identifier. + + * A Model object may optionally be provided to the parser using + the variant function call libsbml.SBML_parseL3FormulaWithModel()@~. + or stored in a L3ParserSettings object passed to the variant function + libsbml.parseL3FormulaWithSettings()@~. When a Model object is + provided, identifiers (values of type SId) from that model are used + in preference to pre-defined MathML definitions. More precisely, + the Model entities whose identifiers will shadow identical symbols + in the mathematical formula are: Species, Compartment, Parameter, + Reaction, and SpeciesReference. For instance, if the parser is + given a Model containing a Species with the identifier \"pi\", and + the formula to be parsed is \"3*pi\", the MathML produced will + contain the construct <ci> pi </ci> instead of the construct <pi/>. + + * Similarly, when a Model object is provided, SId values of user- + defined functions present in the Model will be used preferentially + over pre-defined MathML functions. For example, if the passed-in + Model contains a FunctionDefinition with the identifier \"sin\", + that function will be used instead of the predefined MathML function + <sin/>. + + To obtain the default configuration values, callers can use the + function libsbml.SBML_getDefaultL3ParserSettings()@~. To change the + configuration, callers can create an L3ParserSettings object, set + the desired characteristics using the methods provided, and pass + that object to libsbml.parseL3FormulaWithSettings()@~. + + @~ @~ See also libsbml.parseL3FormulaWithSettings(), + libsbml.parseL3Formula(), libsbml.parseL3FormulaWithModel(). @~ @~ +"; + + +%feature("docstring") L3ParserSettings::L3ParserSettings " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + L3ParserSettings(Model model, ParseLogType_t parselog, bool + collapseminus, bool parseunits, bool avocsymbol) + + Creates a new L3ParserSettings object with specific values for all + possible settings. + + Parameter 'model' is a Model object to be used for disambiguating + identifiers + + Parameter 'parselog' is a flag that controls how the parser will + handle the symbol log in formulas + + Parameter 'collapseminus' is a flag that controls how the parser will + handle minus signs + + Parameter 'parseunits' is a flag that controls how the parser will + handle apparent references to units of measurement associated with + raw numbers in a formula + + Parameter 'avocsymbol' is a flag that controls how the parser will + handle the appearance of the symbol avogadro in a formula + + See also getModel(), setModel(), unsetModel(), getParseLog(), + setParseLog(), getParseUnits(), setParseUnits(), + getParseCollapseMinus(), setParseCollapseMinus(), + getParseAvogadroCsymbol(), setParseAvogadroCsymbol(). + + ______________________________________________________________________ + Method variant with the following signature: + + L3ParserSettings() + + Creates a new L3ParserSettings object with default values. + + This is the default constructor for the L3ParserSettings object. It + sets the Model to None and other settings to L3P_PARSE_LOG_AS_LOG10, + L3P_EXPAND_UNARY_MINUS, L3P_PARSE_UNITS, and + L3P_AVOGADRO_IS_CSYMBOL. +"; + + +%feature("docstring") L3ParserSettings::setModel " + Sets the model reference in this L3ParserSettings object. + + When a Model object is provided, identifiers (values of type SId) + from that model are used in preference to pre-defined MathML + definitions. More precisely, the Model entities whose identifiers + will shadow identical symbols in the mathematical formula are: + Species, Compartment, Parameter, Reaction, and SpeciesReference. + For instance, if the parser is given a Model containing a Species + with the identifier \"pi\", and the formula to be parsed is + \"3*pi\", the MathML produced will contain the construct <ci> pi + </ci> instead of the construct <pi/>. Similarly, when a Model + object is provided, SId values of user-defined functions present in + the Model will be used preferentially over pre-defined MathML + functions. For example, if the passed-in Model contains a + FunctionDefinition with the identifier \"sin\", that function will + be used instead of the predefined MathML function <sin/>. + + Parameter 'model' is a Model object to be used for disambiguating + identifiers + + WARNING: + + This does not copy the Model object. This means that modifications + made to the object after invoking this method may affect parsing + behavior. + + See also getModel(), unsetModel(). +"; + + +%feature("docstring") L3ParserSettings::getModel " + Returns the Model object referenced by this L3ParserSettings object. + + See also setModel(), unsetModel(). +"; + + +%feature("docstring") L3ParserSettings::unsetModel " + Sets the Model reference in this L3ParserSettings object to None. + + See also setModel(), getModel(). +"; + + +%feature("docstring") L3ParserSettings::setParseLog " + Sets the behavior for handling log in mathematical formulas. + + The function log with a single argument (\"log(x)\") can be parsed + as log10(x), ln(x), or treated as an error, as desired. + + Parameter 'type' is a constant, one of following three possibilities: + + * libsbml.L3P_PARSE_LOG_AS_LOG10 + + * libsbml.L3P_PARSE_LOG_AS_LN + + * libsbml.L3P_PARSE_LOG_AS_ERROR + + See also getParseLog(). +"; + + +%feature("docstring") L3ParserSettings::getParseLog " + Returns the current setting indicating what to do with formulas + containing the function log with one argument. + + The function log with a single argument (\"log(x)\") can be parsed + as log10(x), ln(x), or treated as an error, as desired. + + Returns One of following three constants: + + * libsbml.L3P_PARSE_LOG_AS_LOG10 + + * libsbml.L3P_PARSE_LOG_AS_LN + + * libsbml.L3P_PARSE_LOG_AS_ERROR + + See also setParseLog(). +"; + + +%feature("docstring") L3ParserSettings::setParseCollapseMinus " + Sets the behavior for handling unary minuses appearing in + mathematical formulas. + + This setting affects two behaviors. First, pairs of multiple unary + minuses in a row (e.g., \"- -3\") can be collapsed and ignored in + the input, or the multiple minuses can be preserved in the AST node + tree that is generated by the parser. Second, minus signs in front + of numbers can be collapsed into the number node itself; for + example, a \"- 4.1\" can be turned into a single ASTNode of type + libsbml.AST_REAL with a value of -4.1, or it can be turned into a + node of type libsbml.AST_MINUS having a child node of type + libsbml.AST_REAL. This method lets you tell the parser which + behavior to use -- either collapse minuses or always preserve them. + The two possibilities are represented using the following constants: + + * libsbml.L3P_COLLAPSE_UNARY_MINUS (value = True): collapse unary + minuses where possible. + + * libsbml.L3P_EXPAND_UNARY_MINUS (value = False): do not collapse + unary minuses, and instead translate each one into an AST node of + type libsbml.AST_MINUS. + + Parameter 'collapseminus' is a boolean value (one of the constants + libsbml.L3P_COLLAPSE_UNARY_MINUS or libsbml.L3P_EXPAND_UNARY_MINUS) + indicating how unary minus signs in the input should be handled. + + See also getParseCollapseMinus(). +"; + + +%feature("docstring") L3ParserSettings::getParseCollapseMinus " + Returns a flag indicating the current behavior set for handling + multiple unary minuses in formulas. + + This setting affects two behaviors. First, pairs of multiple unary + minuses in a row (e.g., \"- -3\") can be collapsed and ignored in + the input, or the multiple minuses can be preserved in the AST node + tree that is generated by the parser. Second, minus signs in front + of numbers can be collapsed into the number node itself; for + example, a \"- 4.1\" can be turned into a single ASTNode of type + libsbml.AST_REAL with a value of -4.1, or it can be turned into a + node of type libsbml.AST_MINUS having a child node of type + libsbml.AST_REAL. This method lets you tell the parser which + behavior to use -- either collapse minuses or always preserve them. + The two possibilities are represented using the following constants: + + * libsbml.L3P_COLLAPSE_UNARY_MINUS (value = True): collapse unary + minuses where possible. + + * libsbml.L3P_EXPAND_UNARY_MINUS (value = False): do not collapse + unary minuses, and instead translate each one into an AST node of + type libsbml.AST_MINUS. + + Returns A boolean, one of libsbml.L3P_COLLAPSE_UNARY_MINUS or + libsbml.L3P_EXPAND_UNARY_MINUS. + + See also setParseCollapseMinus(). +"; + + +%feature("docstring") L3ParserSettings::setParseUnits " + Sets the parser's behavior in handling units associated with numbers + in a mathematical formula. + + In SBML Level 2, there is no means of associating a unit of + measurement with a pure number in a formula, while SBML Level 3 does + define a syntax for this. In Level 3, MathML <cn> elements can have + an attribute named units placed in the SBML namespace, which can be + used to indicate the units to be associated with the number. The + text-string infix formula parser allows units to be placed after raw + numbers; they are interpreted as unit identifiers for units defined + by the SBML specification or in the containing Model object. Some + examples include: \"4 mL\", \"2.01 Hz\", \"3.1e-6 M\", and \"(5/8) + inches\". To produce a valid SBML model, there must either exist a + UnitDefinition corresponding to the identifier of the unit, or the + unit must be defined in Table 2 of the SBML specification. + + Parameter 'units' is A boolean indicating whether to parse units: + + * libsbml.L3P_PARSE_UNITS (value = True): parse units in the text- + string formula. + + * libsbml.L3P_NO_UNITS (value = false): treat units in the text- + string formula as errors. + + See also getParseUnits(). +"; + + +%feature("docstring") L3ParserSettings::getParseUnits " + Returns if the current settings allow units in text-string + mathematical formulas. + + In SBML Level 2, there is no means of associating a unit of + measurement with a pure number in a formula, while SBML Level 3 does + define a syntax for this. In Level 3, MathML <cn> elements can have + an attribute named units placed in the SBML namespace, which can be + used to indicate the units to be associated with the number. The + text-string infix formula parser allows units to be placed after raw + numbers; they are interpreted as unit identifiers for units defined + by the SBML specification or in the containing Model object. Some + examples include: \"4 mL\", \"2.01 Hz\", \"3.1e-6 M\", and \"(5/8) + inches\". To produce a valid SBML model, there must either exist a + UnitDefinition corresponding to the identifier of the unit, or the + unit must be defined in Table 2 of the SBML specification. + + Since SBML Level 2 does not have the ability to associate units with + pure numbers, the value should be set to False when parsing text- + string formulas intended for use in SBML Level 2 documents. + + Returns A boolean indicating whether to parse units: + + * libsbml.L3P_PARSE_UNITS (value = True): parse units in the text- + string formula. + + * libsbml.L3P_NO_UNITS (value = false): treat units in the text- + string formula as errors. + + See also setParseUnits(). +"; + + +%feature("docstring") L3ParserSettings::setParseAvogadroCsymbol " + Sets the parser's behavior in handling the string avogadro in + mathematical formulas. + + SBML Level 3 defines a symbol for representing the value of + Avogadro's constant, but it is not defined in SBML Level 2. As a + result, the text-string formula parser must behave differently + depending on which SBML Level is being targeted. The argument to + this method can be one of two values: + + * libsbml.L3P_AVOGADRO_IS_CSYMBOL (value = True): tells the parser to + translate the string avogadro (in any capitalization) into an AST + node of type libsbml.AST_NAME_AVOGADRO. + + * libsbml.L3P_AVOGADRO_IS_NAME (value = False): tells the parser to + translate the string avogadro into an AST of type libsbml.AST_NAME. + + Since SBML Level 2 does not define a symbol for Avogadro's constant, + the value should be set to False when parsing text-string formulas + intended for use in SBML Level 2 documents. + + Parameter 'l2only' is a boolean value (one of the constants + libsbml.L3P_AVOGADRO_IS_CSYMBOL or libsbml.L3P_AVOGADRO_IS_NAME) + indicating how the string avogadro should be treated when + encountered in a formula. + + See also getParseAvogadroCsymbol(). +"; + + +%feature("docstring") L3ParserSettings::getParseAvogadroCsymbol " + Returns True if the current settings are oriented towards handling + avogadro for SBML Level 3. + + SBML Level 3 defines a symbol for representing the value of + Avogadro's constant, but it is not defined in SBML Level 2. As a + result, the text-string formula parser must behave differently + depending on which SBML Level is being targeted. + + Returns A boolean indicating which mode is currently set; the value + is one of the following possibilities: + + * libsbml.L3P_AVOGADRO_IS_CSYMBOL (value = True): tells the parser + to translate the string avogadro (in any capitalization) into an AST + node of type libsbml.AST_NAME_AVOGADRO. + + * libsbml.L3P_AVOGADRO_IS_NAME (value = False): tells the parser to + translate the string avogadro into an AST of type libsbml.AST_NAME. + + See also setParseAvogadroCsymbol(). +"; + + +%feature("docstring") XMLAttributes " + @ingroup Core Representation of attributes on an XML node. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. +"; + + +%feature("docstring") XMLConstructorException " + @ingroup Core Class of exceptions thrown by constructors of some + libSBML objects. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + In some situations, constructors for SBML objects may need to + indicate to callers that the creation of the object failed. The + failure may be for different reasons, such as an attempt to use + invalid parameters or a system condition such as a memory error. To + communicate this to callers, those classes will throw an + XMLConstructorException. @~ + + In languages that don't have an exception mechanism (e.g., C), the + constructors generally try to return an error code instead of + throwing an exception. + + See also SBMLConstructorException. +"; + + +%feature("docstring") XMLAttributes::XMLAttributes " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLAttributes() + + Creates a new empty XMLAttributes set. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLAttributes(XMLAttributes orig) + + Copy constructor; creates a copy of this XMLAttributes set. + + 'orig' the XMLAttributes object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") XMLAttributes::clone " + Creates and returns a deep copy of this XMLAttributes set. + + Returns a (deep) copy of this XMLAttributes set. +"; + + +%feature("docstring") XMLAttributes::add " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + add( XMLTriple triple, string value) + + Adds an attribute with the given XMLTriple/value pair to this + XMLAttributes set. + + Note: + + if local name with the same namespace URI already exists in this + attribute set, its value and prefix will be replaced. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a string, the value of the attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + ______________________________________________________________________ + Method variant with the following signature: + + add( string name , string value , string namespaceURI = '' , + string prefix = '') + + Adds an attribute (a name/value pair) to this XMLAttributes object, + optionally with a prefix and URI defining a namespace. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a string, the value of the attribute. Parameter + 'namespaceURI' is a string, the namespace URI of the attribute. + Parameter 'prefix' is a string, the prefix of the namespace + + Returns an integer code indicating the success or failure of the + function. The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + Note: + + if local name with the same namespace URI already exists in this + attribute set, its value and prefix will be replaced. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLAttributes::addResource " + Internal implementation method. +"; + + +%feature("docstring") XMLAttributes::removeResource " + Removes an attribute with the given index from this XMLAttributes + set. + + Parameter 'n' is an integer the index of the resource to be deleted + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE +"; + + +%feature("docstring") XMLAttributes::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(XMLTriple triple) + + Removes an attribute with the given XMLTriple from this XMLAttributes + set. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + ______________________________________________________________________ + Method variant with the following signature: + + remove(int n) + + Removes an attribute with the given index from this XMLAttributes + set. (This function is an alias of XMLAttributes.removeResource() + ). + + Parameter 'n' is an integer the index of the resource to be deleted + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string name, string uri = '') + + Removes an attribute with the given local name and namespace URI from + this XMLAttributes set. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'uri' is a string, the namespace URI of the attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE +"; + + +%feature("docstring") XMLAttributes::clear " + Clears (deletes) all attributes in this XMLAttributes object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") XMLAttributes::getIndex " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getIndex(XMLTriple triple) + + Return the index of an attribute with the given XMLTriple. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute + for which the index is required. + + Returns the index of an attribute with the given XMLTriple, or -1 if + not present. + + ______________________________________________________________________ + Method variant with the following signature: + + getIndex(string name, string uri) + + Return the index of an attribute with the given local name and + namespace URI. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'uri' is a string, the namespace URI of the attribute. + + Returns the index of an attribute with the given local name and + namespace URI, or -1 if not present. + + ______________________________________________________________________ + Method variant with the following signature: + + getIndex(string name) + + Return the index of an attribute with the given name. + + Note: + + A namespace bound to the name is not checked by this function. Thus, + if there are multiple attributes with the given local name and + different namespaces, the smallest index among those attributes will + be returned. XMLAttributes.getIndex() const or + XMLAttributes.getIndex() const should be used to get an index of an + attribute with the given local name and namespace. + + Parameter 'name' is a string, the local name of the attribute for + which the index is required. + + Returns the index of an attribute with the given local name, or -1 if + not present. +"; + + +%feature("docstring") XMLAttributes::getLength " + Return the number of attributes in the set. + + Returns the number of attributes in this XMLAttributes set. +"; + + +%feature("docstring") XMLAttributes::getNumAttributes " + Return the number of attributes in the set. + + Returns the number of attributes in this XMLAttributes set. + + This function is an alias for getLength introduced for consistency + with other XML classes. +"; + + +%feature("docstring") XMLAttributes::getName " + Return the local name of an attribute in this XMLAttributes set (by + position). + + Parameter 'index' is an integer, the position of the attribute whose + local name is required. + + Returns the local name of an attribute in this list (by position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for the attribute + existence. +"; + + +%feature("docstring") XMLAttributes::getPrefix " + Return the prefix of an attribute in this XMLAttributes set (by + position). + + Parameter 'index' is an integer, the position of the attribute whose + prefix is required. + + Returns the namespace prefix of an attribute in this list (by + position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for the attribute + existence. +"; + + +%feature("docstring") XMLAttributes::getPrefixedName " + Return the prefixed name of an attribute in this XMLAttributes set + (by position). + + Parameter 'index' is an integer, the position of the attribute whose + prefixed name is required. + + Returns the prefixed name of an attribute in this list (by + position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. +"; + + +%feature("docstring") XMLAttributes::getURI " + Return the namespace URI of an attribute in this XMLAttributes set + (by position). + + Parameter 'index' is an integer, the position of the attribute whose + namespace URI is required. + + Returns the namespace URI of an attribute in this list (by position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. +"; + + +%feature("docstring") XMLAttributes::getValue " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getValue(XMLTriple triple) + + Return a value of an attribute with the given XMLTriple. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute + whose value is required. + + Returns The attribute value as a string. + + Note: + + If an attribute with the given XMLTriple does not exist, an empty + string will be returned. Use XMLAttributes.hasAttribute() const to + test for attribute existence. + + ______________________________________________________________________ + Method variant with the following signature: + + getValue(int index) + + Return the value of an attribute in this XMLAttributes set (by + position). + + Parameter 'index' is an integer, the position of the attribute whose + value is required. + + Returns the value of an attribute in the list (by position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. + + ______________________________________________________________________ + Method variant with the following signature: + + getValue(string name) + + Return an attribute's value by name. + + Parameter 'name' is a string, the local name of the attribute whose + value is required. + + Returns The attribute value as a string. + + Note: + + If an attribute with the given local name does not exist, an empty + string will be returned. Use XMLAttributes.hasAttribute() const to + test for attribute existence. A namespace bound to the local name + is not checked by this function. Thus, if there are multiple + attributes with the given local name and different namespaces, the + value of an attribute with the smallest index among those attributes + will be returned. XMLAttributes.getValue() const or + XMLAttributes.getValue() const should be used to get a value of an + attribute with the given local name and namespace. + + ______________________________________________________________________ + Method variant with the following signature: + + getValue(string name, string uri) + + Return a value of an attribute with the given local name and + namespace URI. + + Parameter 'name' is a string, the local name of the attribute whose + value is required. Parameter 'uri' is a string, the namespace URI of + the attribute. + + Returns The attribute value as a string. + + Note: + + If an attribute with the given local name and namespace URI does not + exist, an empty string will be returned. Use + XMLAttributes.hasAttribute() const to test for attribute existence. +"; + + +%feature("docstring") XMLAttributes::hasAttribute " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + hasAttribute(XMLTriple triple) + + Predicate returning True or False depending on whether an attribute + with the given XML triple exists in this XMLAttributes. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute + + Returns True if an attribute with the given XML triple exists in this + XMLAttributes, False otherwise. + + ______________________________________________________________________ + Method variant with the following signature: + + hasAttribute(int index) + + Predicate returning True or False depending on whether an attribute + with the given index exists in this XMLAttributes. + + Parameter 'index' is an integer, the position of the attribute. + + Returns True if an attribute with the given index exists in this + XMLAttributes, False otherwise. + + ______________________________________________________________________ + Method variant with the following signature: + + hasAttribute(string name, string uri='') + + Predicate returning True or False depending on whether an attribute + with the given local name and namespace URI exists in this + XMLAttributes. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'uri' is a string, the namespace URI of the attribute. + + Returns True if an attribute with the given local name and namespace + URI exists in this XMLAttributes, False otherwise. +"; + + +%feature("docstring") XMLAttributes::isEmpty " + Predicate returning True or False depending on whether this + XMLAttributes set is empty. + + Returns True if this XMLAttributes set is empty, False otherwise. +"; + + +%feature("docstring") XMLAttributes::readInto " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( XMLTriple triple , string& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute with the given XMLTriple into + value. If the XMLTriple was not found, value is not modified. + + If an XMLErrorLog is passed in and required is true, missing + attributes are logged. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a string, the value of the attribute. Parameter + 'log' is an XMLErrorLog, the error log. Parameter 'required' is a + boolean, indicating whether the attribute is required. Parameter + 'line' is a long integer, the line number at which the error occured. + Parameter 'column' is a long integer, the column number at which the + error occured. + + @returns True if the attribute was read into value, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( XMLTriple triple , long& value , XMLErrorLog + log = None , bool required = false , const long line + = 0 , const long column = 0) + + Reads the value for the attribute XMLTriple into value. If the + XMLTriple was not found or value could be interpreted as a long, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, + we limit values to what can be stored in a long. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a long, the value of the attribute. Parameter + 'log' is an XMLErrorLog, the error log. Parameter 'required' is a + boolean, indicating whether the attribute is required. Parameter + 'line' is a long integer, the line number at which the error occured. + Parameter 'column' is a long integer, the column number at which the + error occured. + + @returns True if the attribute was read into value, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( XMLTriple triple , double& value , + XMLErrorLog log = None , bool required = false + , const long line = 0 , const long column = 0) + + Reads the value for the attribute with the given XMLTriple into + value. If the triple was not found or value could be interpreted + as a double, value is not modified. + + According to the W3C XML Schema, valid doubles are the same as valid + doubles for C and the special values 'INF', '-INF', and 'NaN' (case- + sensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#double + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a double, the value of the attribute. Parameter + 'log' is an XMLErrorLog, the error log. Parameter 'required' is a + boolean, indicating whether the attribute is required. Parameter + 'line' is a long integer, the line number at which the error occured. + Parameter 'column' is a long integer, the column number at which the + error occured. + + @returns True if the attribute was read into value, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( string name , string& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute name into value. If the given + local name was not found, value is not modified. + + If an XMLErrorLog is passed in and required is true, missing + attributes are logged. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a string, the value of the attribute. Parameter + 'log' is an XMLErrorLog, the error log. Parameter 'required' is a + boolean, indicating whether the attribute is required. Parameter + 'line' is a long integer, the line number at which the error occured. + Parameter 'column' is a long integer, the column number at which the + error occured. + + @returns True if the attribute was read into value, False otherwise. + + Note: + + A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a + value for an attribute name with a prefix and namespace. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( string name , bool& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute name into value. If the given + local name was not found or value could be interpreted as a boolean, + value is not modified. + + According to the W3C XML Schema, valid boolean values are: 'true', + 'false', '1', and '0' (case-insensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#boolean + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a boolean, the value of the attribute. + Parameter 'log' is an XMLErrorLog, the error log. Parameter + 'required' is a boolean, indicating whether the attribute is + required. Parameter 'line' is a long integer, the line number at + which the error occured. Parameter 'column' is a long integer, the + column number at which the error occured. + + @returns True if the attribute was read into value, False otherwise. + + Note: + + A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a + value for an attribute name with a prefix and namespace. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( string name , int& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute name into value. If the given + local name was not found or value could be interpreted as an int, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, + we limit values to what can be stored in a int. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is an integer, the value of the attribute. + Parameter 'log' is an XMLErrorLog, the error log. Parameter + 'required' is a boolean, indicating whether the attribute is + required. Parameter 'line' is a long integer, the line number at + which the error occured. Parameter 'column' is a long integer, the + column number at which the error occured. + + @returns True if the attribute was read into value, False otherwise. + + Note: + + A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a + value for an attribute name with a prefix and namespace. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( XMLTriple triple , bool& value , XMLErrorLog log + = None , bool required = false , const long line = 0 , + const long column = 0) + + Reads the value for the attribute with the given XMLTriple into + value. If the XMLTriple was not found or value could be + interpreted as a boolean, value is not modified. + + According to the W3C XML Schema, valid boolean values are: 'true', + 'false', '1', and '0' (case-insensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#boolean + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a boolean, the value of the attribute. + Parameter 'log' is an XMLErrorLog, the error log. Parameter + 'required' is a boolean, indicating whether the attribute is + required. Parameter 'line' is a long integer, the line number at + which the error occured. Parameter 'column' is a long integer, the + column number at which the error occured. + + @returns True if the attribute was read into value, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( string name , double& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute name into value. If the given + local name was not found or value could be interpreted as a double, + value is not modified. + + According to the W3C XML Schema, valid doubles are the same as valid + doubles for C and the special values 'INF', '-INF', and 'NaN' (case- + sensitive). For more information, see: + http://www.w3.org/TR/xmlschema-2/#double + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a double, the value of the attribute. Parameter + 'log' is an XMLErrorLog, the error log. Parameter 'required' is a + boolean, indicating whether the attribute is required. Parameter + 'line' is a long integer, the line number at which the error occured. + Parameter 'column' is a long integer, the column number at which the + error occured. + + @returns True if the attribute was read into value, False otherwise. + + Note: + + A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a + value for an attribute name with a prefix and namespace. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( string name , long& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute name into value. If the given + local name was not found or value could be interpreted as an long, + value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, + we limit values to what can be stored in a long. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a long, the value of the attribute. Parameter + 'log' is an XMLErrorLog, the error log. Parameter 'required' is a + boolean, indicating whether the attribute is required. Parameter + 'line' is a long integer, the line number at which the error occured. + Parameter 'column' is a long integer, the column number at which the + error occured. + + @returns True if the attribute was read into value, False otherwise. + + Note: + + A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a + value for an attribute name with a prefix and namespace. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( string name , long& value , XMLErrorLog + log = None , bool required = false , const long + line = 0 , const long column = 0) + + Reads the value for the attribute name into value. If the given + local name was not found or value could be interpreted as a long + integer, value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, + we limit values to what can be stored in a long. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a long integereger, the value of the attribute. + Parameter 'log' is an XMLErrorLog, the error log. Parameter + 'required' is a boolean, indicating whether the attribute is + required. Parameter 'line' is a long integer, the line number at + which the error occured. Parameter 'column' is a long integer, the + column number at which the error occured. + + @returns True if the attribute was read into value, False otherwise. + + Note: + + A namespace bound to the given local name is not checked by this + function. XMLAttributes.readInto() const should be used to read a + value for an attribute name with a prefix and namespace. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( XMLTriple triple , int& value , XMLErrorLog + log = None , bool required = false , const long line + = 0 , const long column = 0) + + Reads the value for the attribute with the given XMLTriple into + value. If the XMLTriple was not found or value could be + interpreted as an int, value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, + we limit values to what can be stored in a int. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is an integer, the value of the attribute. + Parameter 'log' is an XMLErrorLog, the error log. Parameter + 'required' is a boolean, indicating whether the attribute is + required. Parameter 'line' is a long integer, the line number at + which the error occured. Parameter 'column' is a long integer, the + column number at which the error occured. + + @returns True if the attribute was read into value, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + readInto( XMLTriple triple , long& value , XMLErrorLog log + = None , bool required = false , const long line = 0 + , const long column = 0) + + Reads the value for the attribute with the given XMLTriple into + value. If the XMLTriple was not found or value could be + interpreted as a long integer, value is not modified. + + According to the W3C XML Schema valid integers include zero, *all* + positive and *all* negative whole numbers. For practical purposes, + we limit values to what can be stored in a long. For more + information, see: http://www.w3.org/TR/xmlschema-2/#integer + + If an XMLErrorLog is passed in datatype format errors are logged. If + required is true, missing attributes are also logged. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a long integereger, the value of the attribute. + Parameter 'log' is an XMLErrorLog, the error log. Parameter + 'required' is a boolean, indicating whether the attribute is + required. Parameter 'line' is a long integer, the line number at + which the error occured. Parameter 'column' is a long integer, the + column number at which the error occured. + + @returns True if the attribute was read into value, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLAttributes::write " + Internal implementation method. +"; + + +%feature("docstring") XMLAttributes::setErrorLog " + Internal implementation method. +"; + + +%feature("docstring") XMLAttributes::attributeTypeError " + Internal implementation method. +"; + + +%feature("docstring") XMLAttributes::attributeRequiredError " + Internal implementation method. +"; + + +%feature("docstring") XMLConstructorException " + @ingroup Core Class of exceptions thrown by constructors of some + libSBML objects. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + In some situations, constructors for SBML objects may need to + indicate to callers that the creation of the object failed. The + failure may be for different reasons, such as an attempt to use + invalid parameters or a system condition such as a memory error. To + communicate this to callers, those classes will throw an + XMLConstructorException. @~ + + In languages that don't have an exception mechanism (e.g., C), the + constructors generally try to return an error code instead of + throwing an exception. + + See also SBMLConstructorException. +"; + + +%feature("docstring") XMLNamespaces " + @ingroup Core Representation of XML Namespaces. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + This class serves to organize functionality for tracking XML + namespaces in a document or data stream. The namespace declarations + are stored as a list of pairs of XML namespace URIs and prefix + strings. These correspond to the parts of a namespace declaration + on an XML element. For example, in the following XML fragment, + + <annotation> + <mysim:nodecolors xmlns:mysim=\'urn:lsid:mysim.org\' + mysim:bgcolor=\'green\' mysim:fgcolor=\'white\'/> + </annotation> + there is one namespace declaration. Its URI is + urn:lsid:mysim.org and its prefix is mysim. This pair could be + stored as one item in an XMLNamespaces list. + + XMLNamespaces provides various methods for manipulating the list of + prefix-URI pairs. Individual namespaces stored in a given + XMLNamespace object instance can be retrieved based on their index + using XMLNamespaces.getPrefix(), or by their characteristics such as + their URI or position in the list. +"; + + +%feature("docstring") XMLNamespaces::XMLNamespaces " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNamespaces() + + Creates a new empty list of XML namespace declarations. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNamespaces(XMLNamespaces orig) + + Copy constructor; creates a copy of this XMLNamespaces list. + + Parameter 'orig' is the XMLNamespaces object to copy + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") XMLNamespaces::clone " + Creates and returns a deep copy of this XMLNamespaces list. + + Returns a (deep) copy of this XMLNamespaces list. +"; + + +%feature("docstring") XMLNamespaces::add " + Appends an XML namespace prefix and URI pair to this list of + namespace declarations. + + An XMLNamespaces object stores a list of pairs of namespaces and + their prefixes. If there is an XML namespace with the given 'uri' + prefix in this list, then its corresponding URI will be overwritten + by the new 'uri' unless the uri represents the core sbml namespace. + Calling programs could use one of the other XMLNamespaces methods, + such as XMLNamespaces.hasPrefix() and XMLNamespaces.hasURI() to + inquire whether a given prefix and/or URI is already present in this + XMLNamespaces object. If the 'uri' represents the sbml namespaces + then it will not be overwritten, as this has potentially serious + consequences. If it is necessary to replace the sbml namespace the + namespace should be removed prior to adding the new namespace. + + Parameter 'uri' is a string, the uri for the namespace Parameter + 'prefix' is a string, the prefix for the namespace + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLNamespaces::remove " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + remove(int index) + + Removes an XML Namespace stored in the given position of this list. + + Parameter 'index' is an integer, position of the namespace to remove. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + ______________________________________________________________________ + Method variant with the following signature: + + remove(string prefix) + + Removes an XML Namespace with the given prefix. + + Parameter 'prefix' is a string, prefix of the required namespace. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + See also remove(). +"; + + +%feature("docstring") XMLNamespaces::clear " + Clears (deletes) all XML namespace declarations in this XMLNamespaces + object. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also remove(). +"; + + +%feature("docstring") XMLNamespaces::getIndex " + Look up the index of an XML namespace declaration by URI. + + An XMLNamespaces object stores a list of pairs of namespaces and + their prefixes. If this XMLNamespaces object contains a pair with + the given URI 'uri', this method returns its index in the list. + + Parameter 'uri' is a string, the URI of the sought-after namespace. + + Returns the index of the given declaration, or -1 if not present. +"; + + +%feature("docstring") XMLNamespaces::containsUri " + Tests whether the given uri is contained in this set of namespaces. +"; + + +%feature("docstring") XMLNamespaces::getIndexByPrefix " + Look up the index of an XML namespace declaration by prefix. + + An XMLNamespaces object stores a list of pairs of namespaces and + their prefixes. If this XMLNamespaces object contains a pair with + the given prefix 'prefix', this method returns its index in the + list. + + Parameter 'prefix' is a string, the prefix string of the sought-after + namespace + + Returns the index of the given declaration, or -1 if not present. +"; + + +%feature("docstring") XMLNamespaces::getLength " + Returns the total number of URI-and-prefix pairs stored in this + particular XMLNamespaces instance. + + Returns the number of namespaces in this list. +"; + + +%feature("docstring") XMLNamespaces::getNumNamespaces " + Returns the total number of URI-and-prefix pairs stored in this + particular XMLNamespaces instance. + + Returns the number of namespaces in this list. + + This function is an alias for getLength introduced for consistency + with other XML classes. +"; + + +%feature("docstring") XMLNamespaces::getPrefix " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getPrefix(int index) + + Look up the prefix of an XML namespace declaration by its position. + + An XMLNamespaces object stores a list of pairs of namespaces and + their prefixes. This method returns the prefix of the nth element + in that list (if it exists). Callers should use + XMLAttributes.getLength() first to find out how many namespaces are + stored in the list. + + Parameter 'index' is an integer, position of the sought-after prefix + + Returns the prefix of an XML namespace declaration in this list (by + position), or an empty string if the 'index' is out of range + + See also getLength(). + + ______________________________________________________________________ + Method variant with the following signature: + + getPrefix(string uri) + + Look up the prefix of an XML namespace declaration by its URI. + + An XMLNamespaces object stores a list of pairs of namespaces and + their prefixes. This method returns the prefix for a pair that has + the given 'uri'. + + Parameter 'uri' is a string, the URI of the prefix being sought + + Returns the prefix of an XML namespace declaration given its URI, or + an empty string if no such 'uri' exists in this XMLNamespaces object +"; + + +%feature("docstring") XMLNamespaces::getURI " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getURI(int index) + + Look up the URI of an XML namespace declaration by its position. + + An XMLNamespaces object stores a list of pairs of namespaces and + their prefixes. This method returns the URI of the nth element in + that list (if it exists). Callers should use + XMLAttributes.getLength() first to find out how many namespaces are + stored in the list. + + Parameter 'index' is an integer, position of the required URI. + + Returns the URI of an XML namespace declaration in this list (by + position), or an empty string if the 'index' is out of range. + + See also getLength(), getURI(). +"; + + +%feature("docstring") XMLNamespaces::isEmpty " + Predicate returning True or False depending on whether this + XMLNamespaces list is empty. + + Returns True if this XMLNamespaces list is empty, False otherwise. +"; + + +%feature("docstring") XMLNamespaces::hasURI " + Predicate returning True or False depending on whether an XML + Namespace with the given URI is contained in this XMLNamespaces list. + + Parameter 'uri' is a string, the uri for the namespace + + Returns True if an XML Namespace with the given URI is contained in + this XMLNamespaces list, False otherwise. +"; + + +%feature("docstring") XMLNamespaces::hasPrefix " + Predicate returning True or False depending on whether an XML + Namespace with the given prefix is contained in this XMLNamespaces + list. + + Parameter 'prefix' is a string, the prefix for the namespace + + Returns True if an XML Namespace with the given URI is contained in + this XMLNamespaces list, False otherwise. +"; + + +%feature("docstring") XMLNamespaces::hasNS " + Predicate returning True or False depending on whether an XML + Namespace with the given URI and prefix pair is contained in this + XMLNamespaces list. + + Parameter 'uri' is a string, the URI for the namespace Parameter + 'prefix' is a string, the prefix for the namespace + + Returns True if an XML Namespace with the given uri/prefix pair is + contained in this XMLNamespaces list, False otherwise. +"; + + +%feature("docstring") XMLNamespaces::removeDefault " + Internal implementation method. +"; + + +%feature("docstring") XMLNamespaces::containIdenticalSetNS " + Internal implementation method. +"; + + +%feature("docstring") XMLToken " + @ingroup Core Representation of a token in an XML stream. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. +"; + + +%feature("docstring") XMLToken::XMLToken " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLToken() + + Creates a new empty XMLToken. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLToken(XMLToken orig) + + Copy constructor; creates a copy of this XMLToken. + + Parameter 'orig' is the XMLToken object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLToken( XMLTriple triple , XMLAttributes attributes , + const long line = 0 , const long column = 0 ) + + Creates a start element XMLToken with the given set of attributes. + + Parameter 'triple' is XMLTriple. Parameter 'attributes' is + XMLAttributes, the attributes to set. Parameter 'line' is a long + integer, the line number (default = 0). Parameter 'column' is a long + integer, the column number (default = 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLToken( XMLTriple triple , const long line = 0 , const + long column = 0 ) + + Creates an end element XMLToken. + + Parameter 'triple' is XMLTriple. Parameter 'line' is a long integer, + the line number (default = 0). Parameter 'column' is a long integer, + the column number (default = 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLToken( XMLTriple triple , XMLAttributes attributes , + XMLNamespaces namespaces , const long line = 0 , const long + column = 0 ) + + Creates a start element XMLToken with the given set of attributes and + namespace declarations. + + Parameter 'triple' is XMLTriple. Parameter 'attributes' is + XMLAttributes, the attributes to set. Parameter 'namespaces' is + XMLNamespaces, the namespaces to set. Parameter 'line' is a long + integer, the line number (default = 0). Parameter 'column' is a long + integer, the column number (default = 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLToken( string chars , const long line = 0 , const long + column = 0 ) + + Creates a text XMLToken. + + Parameter 'chars' is a string, the text to be added to the XMLToken + Parameter 'line' is a long integer, the line number (default = 0). + Parameter 'column' is a long integer, the column number (default = + 0). + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::clone " + Creates and returns a deep copy of this XMLToken. + + Returns a (deep) copy of this XMLToken set. +"; + + +%feature("docstring") XMLToken::getAttributes " + Returns the attributes of this element. + + Returns the XMLAttributes of this XML element. +"; + + +%feature("docstring") XMLToken::setAttributes " + Sets an XMLAttributes to this XMLToken. Nothing will be done if this + XMLToken is not a start element. + + Parameter 'attributes' is XMLAttributes to be set to this XMLToken. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + This function replaces the existing XMLAttributes with the new one. +"; + + +%feature("docstring") XMLToken::addAttr " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + addAttr( XMLTriple triple, string value) + + Adds an attribute with the given XMLTriple/value pair to the + attribute set in this XMLToken. Nothing will be done if this + XMLToken is not a start element. + + Note: + + if local name with the same namespace URI already exists in the + attribute set, its value and prefix will be replaced. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + Parameter 'value' is a string, the value of the attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + ______________________________________________________________________ + Method variant with the following signature: + + addAttr( string name , string value , string namespaceURI = '' , + string prefix = '') + + Adds an attribute to the attribute set in this XMLToken optionally + with a prefix and URI defining a namespace. Nothing will be done if + this XMLToken is not a start element. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'value' is a string, the value of the attribute. Parameter + 'namespaceURI' is a string, the namespace URI of the attribute. + Parameter 'prefix' is a string, the prefix of the namespace + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + Note: + + if local name with the same namespace URI already exists in the + attribute set, its value and prefix will be replaced. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::removeAttr " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeAttr(XMLTriple triple) + + Removes an attribute with the given XMLTriple from the attribute set + in this XMLToken. Nothing will be done if this XMLToken is not a + start element. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + ______________________________________________________________________ + Method variant with the following signature: + + removeAttr(int n) + + Removes an attribute with the given index from the attribute set in + this XMLToken. Nothing will be done if this XMLToken is not a start + element. + + Parameter 'n' is an integer the index of the resource to be deleted + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + ______________________________________________________________________ + Method variant with the following signature: + + removeAttr(string name, string uri = '') + + Removes an attribute with the given local name and namespace URI from + the attribute set in this XMLToken. Nothing will be done if this + XMLToken is not a start element. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'uri' is a string, the namespace URI of the attribute. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE +"; + + +%feature("docstring") XMLToken::clearAttributes " + Clears (deletes) all attributes in this XMLToken. Nothing will be + done if this XMLToken is not a start element. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION +"; + + +%feature("docstring") XMLToken::getAttrIndex " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getAttrIndex(XMLTriple triple) + + Return the index of an attribute with the given XMLTriple. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute + for which the index is required. + + Returns the index of an attribute with the given XMLTriple, or -1 if + not present. + + ______________________________________________________________________ + Method variant with the following signature: + + getAttrIndex(string name, string uri='') + + Return the index of an attribute with the given local name and + namespace URI. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'uri' is a string, the namespace URI of the attribute. + + Returns the index of an attribute with the given local name and + namespace URI, or -1 if not present. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::getAttributesLength " + Return the number of attributes in the attributes set. + + Returns the number of attributes in the attributes set in this + XMLToken. +"; + + +%feature("docstring") XMLToken::getAttrName " + Return the local name of an attribute in the attributes set in this + XMLToken (by position). + + Parameter 'index' is an integer, the position of the attribute whose + local name is required. + + Returns the local name of an attribute in this list (by position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test for the attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrPrefix " + Return the prefix of an attribute in the attribute set in this + XMLToken (by position). + + Parameter 'index' is an integer, the position of the attribute whose + prefix is required. + + Returns the namespace prefix of an attribute in the attribute set + (by position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test for the attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrPrefixedName " + Return the prefixed name of an attribute in the attribute set in this + XMLToken (by position). + + Parameter 'index' is an integer, the position of the attribute whose + prefixed name is required. + + Returns the prefixed name of an attribute in the attribute set (by + position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test for attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrURI " + Return the namespace URI of an attribute in the attribute set in this + XMLToken (by position). + + Parameter 'index' is an integer, the position of the attribute whose + namespace URI is required. + + Returns the namespace URI of an attribute in the attribute set (by + position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test for attribute existence. +"; + + +%feature("docstring") XMLToken::getAttrValue " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getAttrValue(XMLTriple triple) + + Return a value of an attribute with the given XMLTriple. + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute + whose value is required. + + Returns The attribute value as a string. + + Note: + + If an attribute with the given XMLTriple does not exist, an empty + string will be returned. Use XMLToken.hasAttr() to test for + attribute existence. + + ______________________________________________________________________ + Method variant with the following signature: + + getAttrValue(int index) + + Return the value of an attribute in the attribute set in this + XMLToken (by position). + + Parameter 'index' is an integer, the position of the attribute whose + value is required. + + Returns the value of an attribute in the attribute set (by position). + + Note: + + If index is out of range, an empty string will be returned. Use + XMLToken.hasAttr() to test for attribute existence. + + ______________________________________________________________________ + Method variant with the following signature: + + getAttrValue(string name, string uri='') + + Return a value of an attribute with the given local name and + namespace URI. + + Parameter 'name' is a string, the local name of the attribute whose + value is required. Parameter 'uri' is a string, the namespace URI of + the attribute. + + Returns The attribute value as a string. + + Note: + + If an attribute with the given local name and namespace URI does + not exist, an empty string will be returned. Use + XMLToken.hasAttr() to test for attribute existence. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::hasAttr " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + hasAttr(XMLTriple triple) + + Predicate returning True or False depending on whether an attribute + with the given XML triple exists in the attribute set in this + XMLToken + + Parameter 'triple' is an XMLTriple, the XML triple of the attribute + + Returns True if an attribute with the given XML triple exists in the + attribute set in this XMLToken, False otherwise. + + ______________________________________________________________________ + Method variant with the following signature: + + hasAttr(int index) + + Predicate returning True or False depending on whether an attribute + with the given index exists in the attribute set in this XMLToken. + + Parameter 'index' is an integer, the position of the attribute. + + Returns True if an attribute with the given index exists in the + attribute set in this XMLToken, False otherwise. + + ______________________________________________________________________ + Method variant with the following signature: + + hasAttr(string name, string uri='') + + Predicate returning True or False depending on whether an attribute + with the given local name and namespace URI exists in the attribute + set in this XMLToken. + + Parameter 'name' is a string, the local name of the attribute. + Parameter 'uri' is a string, the namespace URI of the attribute. + + Returns True if an attribute with the given local name and namespace + URI exists in the attribute set in this XMLToken, False otherwise. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::isAttributesEmpty " + Predicate returning True or False depending on whether the + attribute set in this XMLToken set is empty. + + Returns True if the attribute set in this XMLToken is empty, False + otherwise. +"; + + +%feature("docstring") XMLToken::getNamespaces " + Returns the XML namespace declarations for this XML element. + + Returns the XML namespace declarations for this XML element. +"; + + +%feature("docstring") XMLToken::setNamespaces " + Sets an XMLnamespaces to this XML element. Nothing will be done if + this XMLToken is not a start element. + + Parameter 'namespaces' is XMLNamespaces to be set to this XMLToken. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INVALID_OBJECT + + Note: + + This function replaces the existing XMLNamespaces with the new one. +"; + + +%feature("docstring") XMLToken::addNamespace " + Appends an XML namespace prefix and URI pair to this XMLToken. If + there is an XML namespace with the given prefix in this XMLToken, + then the existing XML namespace will be overwritten by the new one. + + Nothing will be done if this XMLToken is not a start element. + + Parameter 'uri' is a string, the uri for the namespace Parameter + 'prefix' is a string, the prefix for the namespace + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::removeNamespace " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + removeNamespace(int index) + + Removes an XML Namespace stored in the given position of the + XMLNamespaces of this XMLToken. Nothing will be done if this + XMLToken is not a start element. + + Parameter 'index' is an integer, position of the removed namespace. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE + + ______________________________________________________________________ + Method variant with the following signature: + + removeNamespace(string prefix) + + Removes an XML Namespace with the given prefix. Nothing will be done + if this XMLToken is not a start element. + + Parameter 'prefix' is a string, prefix of the required namespace. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INDEX_EXCEEDS_SIZE +"; + + +%feature("docstring") XMLToken::clearNamespaces " + Clears (deletes) all XML namespace declarations in the XMLNamespaces + of this XMLToken. Nothing will be done if this XMLToken is not a + start element. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION +"; + + +%feature("docstring") XMLToken::getNamespaceIndex " + Look up the index of an XML namespace declaration by URI. + + Parameter 'uri' is a string, uri of the required namespace. + + Returns the index of the given declaration, or -1 if not present. +"; + + +%feature("docstring") XMLToken::getNamespaceIndexByPrefix " + Look up the index of an XML namespace declaration by prefix. + + Parameter 'prefix' is a string, prefix of the required namespace. + + Returns the index of the given declaration, or -1 if not present. +"; + + +%feature("docstring") XMLToken::getNamespacesLength " + Returns the number of XML namespaces stored in the XMLNamespaces of + this XMLToken. + + Returns the number of namespaces in this list. +"; + + +%feature("docstring") XMLToken::getNamespacePrefix " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getNamespacePrefix(int index) + + Look up the prefix of an XML namespace declaration by position. + + Callers should use getNamespacesLength() to find out how many + namespaces are stored in the XMLNamespaces. + + Parameter 'index' is an integer, position of the required prefix. + + Returns the prefix of an XML namespace declaration in the + XMLNamespaces (by position). + + Note: + + If index is out of range, an empty string will be returned. + + See also getNamespacesLength(). + + ______________________________________________________________________ + Method variant with the following signature: + + getNamespacePrefix(string uri) + + Look up the prefix of an XML namespace declaration by its URI. + + Parameter 'uri' is a string, the URI of the prefix being sought + + Returns the prefix of an XML namespace declaration given its URI. + + Note: + + If 'uri' does not exist, an empty string will be returned. +"; + + +%feature("docstring") XMLToken::getNamespaceURI " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getNamespaceURI(int index) + + Look up the URI of an XML namespace declaration by its position. + + Parameter 'index' is an integer, position of the required URI. + + Returns the URI of an XML namespace declaration in the XMLNamespaces + (by position). + + Note: + + If 'index' is out of range, an empty string will be returned. + + See also getNamespacesLength(). + + ______________________________________________________________________ + Method variant with the following signature: + + getNamespaceURI(string prefix = '') + + Look up the URI of an XML namespace declaration by its prefix. + + Parameter 'prefix' is a string, the prefix of the required URI + + Returns the URI of an XML namespace declaration given its prefix. + + Note: + + If 'prefix' does not exist, an empty string will be returned. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLToken::isNamespacesEmpty " + Predicate returning True or False depending on whether the + XMLNamespaces of this XMLToken is empty. + + Returns True if the XMLNamespaces of this XMLToken is empty, False + otherwise. +"; + + +%feature("docstring") XMLToken::hasNamespaceURI " + Predicate returning True or False depending on whether an XML + Namespace with the given URI is contained in the XMLNamespaces of + this XMLToken. + + Parameter 'uri' is a string, the uri for the namespace + + Returns True if an XML Namespace with the given URI is contained in + the XMLNamespaces of this XMLToken, False otherwise. +"; + + +%feature("docstring") XMLToken::hasNamespacePrefix " + Predicate returning True or False depending on whether an XML + Namespace with the given prefix is contained in the XMLNamespaces of + this XMLToken. + + Parameter 'prefix' is a string, the prefix for the namespace + + Returns True if an XML Namespace with the given URI is contained in + the XMLNamespaces of this XMLToken, False otherwise. +"; + + +%feature("docstring") XMLToken::hasNamespaceNS " + Predicate returning True or False depending on whether an XML + Namespace with the given uri/prefix pair is contained in the + XMLNamespaces ofthis XMLToken. + + Parameter 'uri' is a string, the uri for the namespace Parameter + 'prefix' is a string, the prefix for the namespace + + Returns True if an XML Namespace with the given uri/prefix pair is + contained in the XMLNamespaces of this XMLToken, False otherwise. +"; + + +%feature("docstring") XMLToken::setTriple " + Sets the XMLTripe (name, uri and prefix) of this XML element. + Nothing will be done if this XML element is a text node. + + Parameter 'triple' is XMLTriple to be added to this XML element. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") XMLToken::getName " + Returns the (unqualified) name of this XML element. + + Returns the (unqualified) name of this XML element. +"; + + +%feature("docstring") XMLToken::getPrefix " + Returns the namespace prefix of this XML element. + + Returns the namespace prefix of this XML element. + + Note: + + If no prefix exists, an empty string will be return. +"; + + +%feature("docstring") XMLToken::getURI " + Returns the namespace URI of this XML element. + + Returns the namespace URI of this XML element. +"; + + +%feature("docstring") XMLToken::getCharacters " + Returns the text of this element. + + Returns the characters of this XML text. +"; + + +%feature("docstring") XMLToken::append " + Appends characters to this XML text content. + + Parameter 'chars' is string, characters to append + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") XMLToken::getColumn " + Returns the column at which this XMLToken occurred in the input + document or data stream. + + Returns the column at which this XMLToken occurred. +"; + + +%feature("docstring") XMLToken::getLine " + Returns the line at which this XMLToken occurred in the input + document or data stream. + + Returns the line at which this XMLToken occurred. +"; + + +%feature("docstring") XMLToken::isElement " + Predicate returning True or False depending on whether this + XMLToken is an XML element. + + Returns True if this XMLToken is an XML element, False otherwise. +"; + + +%feature("docstring") XMLToken::isEnd " + Predicate returning True or False depending on whether this + XMLToken is an XML end element. + + Returns True if this XMLToken is an XML end element, False otherwise. +"; + + +%feature("docstring") XMLToken::isEndFor " + Predicate returning True or False depending on whether this + XMLToken is an XML end element for the given start element. + + Parameter 'element' is XMLToken, element for which query is made. + + Returns True if this XMLToken is an XML end element for the given + XMLToken start element, False otherwise. +"; + + +%feature("docstring") XMLToken::isEOF " + Predicate returning True or False depending on whether this + XMLToken is an end of file marker. + + Returns True if this XMLToken is an end of file (input) marker, False + otherwise. +"; + + +%feature("docstring") XMLToken::isStart " + Predicate returning True or False depending on whether this + XMLToken is an XML start element. + + Returns True if this XMLToken is an XML start element, False + otherwise. +"; + + +%feature("docstring") XMLToken::isText " + Predicate returning True or False depending on whether this + XMLToken is an XML text element. + + Returns True if this XMLToken is an XML text element, False + otherwise. +"; + + +%feature("docstring") XMLToken::setEnd " + Declares this XML start element is also an end element. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") XMLToken::setEOF " + Declares this XMLToken is an end-of-file (input) marker. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") XMLToken::unsetEnd " + Declares this XML start/end element is no longer an end element. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") XMLToken::write " + Internal implementation method. +"; + + +%feature("docstring") XMLToken::toString " + Prints a string representation of the underlying token stream, for + debugging purposes. +"; + + +%feature("docstring") XMLNode " + @ingroup Core Representation of a node in an XML document tree. + + Beginning with version 3.0.0, libSBML implements an XML abstraction + layer. This layer presents a uniform XML interface to calling + programs regardless of which underlying XML parser libSBML has + actually been configured to use. The basic data object in the XML + abstraction is a node, represented by XMLNode. + + An XMLNode can contain any number of children. Each child is another + XMLNode, thereby forming a tree. The methods + XMLNode.getNumChildren() and XMLNode.getChild() can be used to + access the tree structure starting from a given node. + + Each XMLNode is subclassed from XMLToken, and thus has the same + methods available as XMLToken. These methods include + XMLToken.getNamespaces(), XMLToken.getPrefix(), XMLToken.getName(), + XMLToken.getURI(), and XMLToken.getAttributes(). + + Conversion between an XML string and an XMLNode + ====================================================================== + + LibSBML provides the following utility functions for converting an + XML string (e.g., <annotation>...</annotation>) to/from an XMLNode + object. + + * XMLNode.toXMLString() returns a string representation of the + XMLNode object. + + * XMLNode.convertXMLNodeToString() (static function) returns a + string representation of the given XMLNode object. + + * XMLNode.convertStringToXMLNode() (static function) returns an + XMLNode object converted from the given XML string. + + The returned XMLNode object by XMLNode.convertStringToXMLNode() is a + dummy root (container) XMLNode if the given XML string has two or + more top-level elements (e.g., \"......\"). In the dummy root node, + each top-level element in the given XML string is contained as a + child XMLNode. XMLToken.isEOF() can be used to identify if the + returned XMLNode object is a dummy node or not. Here is an example: + + xn = XMLNode.convertStringToXMLNode(\'<p></p>\') + if xn == None: + # Do something to handle exceptional situation. + + elif xn.isEOF(): + # Node is a dummy node. + + else: + # None is not a dummy node. + @~ +"; + + +%feature("docstring") XMLNode::XMLNode " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode(XMLToken token) + + Creates a new XMLNode by copying token. + + Parameter 'token' is XMLToken to be copied to XMLNode + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode( XMLTriple triple , XMLAttributes attributes , + XMLNamespaces namespaces , const long line = 0 , const long + column = 0 ) + + Creates a new start element XMLNode with the given set of attributes + and namespace declarations. + + Parameter 'triple' is XMLTriple. Parameter 'attributes' is + XMLAttributes, the attributes to set. Parameter 'namespaces' is + XMLNamespaces, the namespaces to set. Parameter 'line' is a long + integer, the line number (default = 0). Parameter 'column' is a long + integer, the column number (default = 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode(XMLNode orig) + + Copy constructor; creates a copy of this XMLNode. + + Parameter 'orig' is the XMLNode instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode() + + Creates a new empty XMLNode with no children. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode( XMLTriple triple , XMLAttributes attributes , + const long line = 0 , const long column = 0 ) + + Creates a start element XMLNode with the given set of attributes. + + Parameter 'triple' is XMLTriple. Parameter 'attributes' is + XMLAttributes, the attributes to set. Parameter 'line' is a long + integer, the line number (default = 0). Parameter 'column' is a long + integer, the column number (default = 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode( XMLTriple triple , const long line = 0 , const + long column = 0 ) + + Creates an end element XMLNode. + + Parameter 'triple' is XMLTriple. Parameter 'line' is a long integer, + the line number (default = 0). Parameter 'column' is a long integer, + the column number (default = 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLNode( string chars , const long line = 0 , const long + column = 0 ) + + Creates a text XMLNode. + + Parameter 'chars' is a string, the text to be added to the XMLToken + Parameter 'line' is a long integer, the line number (default = 0). + Parameter 'column' is a long integer, the column number (default = + 0). + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLNode::clone " + Creates and returns a deep copy of this XMLNode. + + Returns a (deep) copy of this XMLNode. +"; + + +%feature("docstring") XMLNode::addChild " + Adds a copy of 'node' as a child of this XMLNode. + + The given 'node' is added at the end of the list of children. + + Parameter 'node' is the XMLNode to be added as child. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_XML_OPERATION + + Note: + + The given node is added at the end of the children list. +"; + + +%feature("docstring") XMLNode::insertChild " + Inserts a copy of the given node as the nth child of this XMLNode. + + If the given index 'n' is out of range for this XMLNode instance, + the 'node' is added at the end of the list of children. Even in + that situation, this method does not throw an error. + + Parameter 'n' is an integer, the index at which the given node is + inserted Parameter 'node' is an XMLNode to be inserted as nth child. + + Returns a reference to the newly-inserted child 'node' +"; + + +%feature("docstring") XMLNode::removeChild " + Removes the nth child of this XMLNode and returns the removed node. + + It is important to keep in mind that a given XMLNode may have more + than one child. Calling this method erases all existing references + to child nodes after the given position 'n'. If the index 'n' is + greater than the number of child nodes in this XMLNode, this method + takes no action (and returns None). + + Parameter 'n' is an integer, the index of the node to be removed + + Returns the removed child, or None if 'n' is greater than the number + of children in this node + + Note: + + The caller owns the returned node and is responsible for deleting it. +"; + + +%feature("docstring") XMLNode::removeChildren " + Removes all children from this node. Returns integer value + indicating success/failure of the function. The possible values + returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") XMLNode::getChild " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getChild(long n) + + Returns the nth child of this XMLNode. + + If the index 'n' is greater than the number of child nodes, or it is + 0 or less, this method returns an empty node. + + Parameter 'n' is an integer, the index of the node to return + + Returns the nth child of this XMLNode. + + ______________________________________________________________________ + Method variant with the following signature: + + getChild(string name) + + Returns the first child of this XMLNode with the corresponding name. + + If no child with corrsponding name can be found, this method + returns an empty node. + + Parameter 'name' is the name of the node to return + + Returns the first child of this XMLNode with given name. +"; + + +%feature("docstring") XMLNode::getIndex " + Return the index of the first child of this XMLNode with the given + name. + + Parameter 'name' is a string, the name of the child for which the + index is required. + + Returns the index of the first child of this XMLNode with the given + name, or -1 if not present. +"; + + +%feature("docstring") XMLNode::hasChild " + Return a boolean indicating whether this XMLNode has a child with the + given name. + + Parameter 'name' is a string, the name of the child to be checked. + + Returns boolean indicating whether this XMLNode has a child with the + given name. +"; + + +%feature("docstring") XMLNode::equals " + Compare this XMLNode against another XMLNode returning true if both + nodes represent the same XML tree, or false otherwise. + + Parameter 'other' is another XMLNode to compare against. + + Parameter 'ignoreURI' is whether to ignore the namespace URI when + doing the comparison. + + Returns boolean indicating whether this XMLNode represents the same + XML tree as another. +"; + + +%feature("docstring") XMLNode::getNumChildren " + Returns the number of children for this XMLNode. + + Returns the number of children for this XMLNode. +"; + + +%feature("docstring") XMLNode::write " + Internal implementation method. +"; + + +%feature("docstring") XMLNode::toXMLString " + Returns a string representation of this XMLNode. + + Returns a string derived from this XMLNode. +"; + + +%feature("docstring") XMLNode::convertXMLNodeToString " + Returns a string representation of a given XMLNode. + + Parameter 'node' is the XMLNode to be represented as a string + + Returns a string-form representation of 'node' +"; + + +%feature("docstring") XMLNode::convertStringToXMLNode " + Returns an XMLNode which is derived from a string containing XML + content. + + The XML namespace must be defined using argument 'xmlns' if the + corresponding XML namespace attribute is not part of the string of + the first argument. + + Parameter 'xmlstr' is string to be converted to a XML node. + Parameter 'xmlns' is XMLNamespaces the namespaces to set (default + value is None). + + Note: + + The caller owns the returned XMLNode and is reponsible for deleting + it. The returned XMLNode object is a dummy root (container) XMLNode + if the top-level element in the given XML string is NOT <html>, + <body>, <annotation>, or <notes>. In the dummy root node, each + top-level element in the given XML string is contained as a child + XMLNode. XMLToken.isEOF() can be used to identify if the returned + XMLNode object is a dummy node. + + Returns a XMLNode which is converted from string 'xmlstr'. If the + conversion failed, this method returns None. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLTriple " + @ingroup Core Representation of a qualified XML name. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + A 'triple' in the libSBML XML layer encapsulates the notion of + qualified name, meaning an element name or an attribute name with an + optional namespace qualifier. An XMLTriple instance carries up to + three data items: + + + * The name of the attribute or element; that is, the attribute name + as it appears in an XML document or data stream; + + * The XML namespace prefix (if any) of the attribute. For example, + in the following fragment of XML, the namespace prefix is the string + mysim and it appears on both the element someelement and the + attribute attribA. When both the element and the attribute are + stored as XMLTriple objects, their prefix is mysim. + + <mysim:someelement mysim:attribA=\'value\' /> + + * The XML namespace URI with which the prefix is associated. In + XML, every namespace used must be declared and mapped to a URI. + + XMLTriple objects are the lowest-level data item in the XML layer + of libSBML. Other objects such as XMLToken make use of XMLTriple + objects. +"; + + +%feature("docstring") XMLTriple::XMLTriple " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLTriple( string name , string uri , string prefix ) + + Creates a new XMLTriple with the given 'name', 'uri' and and + 'prefix'. + + Parameter 'name' is a string, name for the XMLTriple. Parameter + 'uri' is a string, URI of the XMLTriple. Parameter 'prefix' is a + string, prefix for the URI of the XMLTriple, + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLTriple(string triplet, const char sepchar = ' ') + + Creates a new XMLTriple by splitting the given 'triplet' on the + separator character 'sepchar'. + + Triplet may be in one of the following formats: + + * name + + * URI sepchar name + + * URI sepchar name sepchar prefix + + Parameter 'triplet' is a string representing the triplet as above + Parameter 'sepchar' is a character, the sepchar used in the triplet + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + XMLTriple() + + Creates a new, empty XMLTriple. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLTriple(XMLTriple orig) + + Copy constructor; creates a copy of this XMLTriple set. + + Parameter 'orig' is the XMLTriple object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") XMLTriple::clone " + Creates and returns a deep copy of this XMLTriple set. + + Returns a (deep) copy of this XMLTriple set. +"; + + +%feature("docstring") XMLTriple::getName " + Returns the name portion of this XMLTriple. + + Returns a string, the name from this XMLTriple. +"; + + +%feature("docstring") XMLTriple::getPrefix " + Returns the prefix portion of this XMLTriple. + + Returns a string, the prefix portion of this XMLTriple. +"; + + +%feature("docstring") XMLTriple::getURI " + Returns the URI portion of this XMLTriple. + + Returns URI a string, the prefix portion of this XMLTriple. +"; + + +%feature("docstring") XMLTriple::getPrefixedName " + Returns the prefixed name from this XMLTriple. + + Returns a string, the prefixed name from this XMLTriple. +"; + + +%feature("docstring") XMLTriple::isEmpty " + Predicate returning True or False depending on whether this + XMLTriple is empty. + + Returns True if this XMLTriple is empty, False otherwise. +"; + + +%feature("docstring") XMLOutputStream " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStream::endElement " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + endElement(XMLTriple triple) + + Writes the given XML end element 'prefix:name' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + endElement(string name, string prefix = '') + + Writes the given XML end element name to this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::setAutoIndent " + Turns automatic indentation on or off for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::startElement " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + startElement(XMLTriple triple) + + Writes the given XML start element 'prefix:name' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + startElement(string name, string prefix = '') + + Writes the given XML start element name to this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::startEndElement " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + startEndElement(XMLTriple triple) + + Writes the given XML start and end element 'prefix:name' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + startEndElement(string name, string prefix = '') + + Writes the given XML start and end element name to this + XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::writeAttribute " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, string value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string prefix, const double& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string prefix, string value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, const bool& value) + + Writes the given attribute, prefix:name='true' or prefix:name='false' + to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, const double& value) + + Writes the given attribute, name='value' to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, const long& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, const double& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, const long& value) + + Writes the given attribute, name='value' to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string value) + + Writes the given attribute, name='value' to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string value) + + Writes the given attribute, name='value' to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string prefix, const long& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string prefix, const long& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string prefix, const int& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, const long& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, const int& value) + + Writes the given attribute, name='value' to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, const int& value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, const bool& value) + + Writes the given attribute, name='true' or name='false' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(XMLTriple triple, string value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, const long& value) + + Writes the given attribute, name='value' to this XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string prefix, string value) + + Writes the given attribute, prefix:name='value' to this + XMLOutputStream. + + ______________________________________________________________________ + Method variant with the following signature: + + writeAttribute(string name, string &prefix, const bool& value) + + Writes the given attribute, prefix:name='true' or prefix:name='false' + to this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::writeXMLDecl " + Writes the XML declaration: <?xml version='1.0' encoding='...'?> +"; + + +%feature("docstring") XMLOutputStream::writeComment " + Writes an XML comment: <?xml version='1.0' encoding='...'?> +"; + + +%feature("docstring") XMLOutputStream::downIndent " + Decreases the indentation level for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::upIndent " + Increases the indentation level for this XMLOutputStream. +"; + + +%feature("docstring") XMLOutputStream::getStringStream " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStream::writeChars " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStream::writeIndent " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStream::setStringStream " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStream::unsetStringStream " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStringStream::XMLOutputStringStream " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputStringStream::getString " + Internal implementation method. +"; + + +%feature("docstring") XMLOutputFileStream::XMLOutputFileStream " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::getEncoding " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::getVersion " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::getErrorLog " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::isEOF " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::isError " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::isGood " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::next " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::peek " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::skipPastEnd " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::skipText " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::setErrorLog " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::toString " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::getSBMLNamespaces " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::setSBMLNamespaces " + Internal implementation method. +"; + + +%feature("docstring") XMLInputStream::queueToken " + Internal implementation method. +"; + + +%feature("docstring") XMLError " + @ingroup Core Representation of errors, warnings and other + diagnostics + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + LibSBML can be configured to use any of a number of XML parsers; at + the time of this writing, libSBML supports Xerces versions 2.4 + through 3.1, Expat version 1.95.x and higher, and libxml2 version + 2.6.16 and higher. These parsers each report different status codes + for the various exceptions that can occur during XML processing. + The XMLError object class abstracts away from the particular + diagnostics reported by the different parsers and presents a single + uniform interface and set of status codes, along with operations for + manipulating the error objects. + + When the libSBML XML parser layer encounters an error in the XML + content being processed, or when there is something else wrong (such + as an out-of-memory condition), the problems are reported as + XMLError objects. Each XMLError object instance has an + identification number that identifies the nature of the problem. + This error identifier is one of the constants listed in the next + section below. Applications can use the error identifiers as a means + of recognizing the error encountered and changing their behavior if + desired. @~ + + Integer error codes are useful for software, but not so much for + telling humans what happened. For this reason, XMLError also + provides two text messages describing the nature of the error. + These messages are accessible by means of the methods + XMLError.getShortMessage() and XMLError.getMessage(). The method + XMLError.getShortMessage() returns a very brief synopsis of the + warning or error condition, whereas XMLError.getMessage() returns a + longer explanation. These text strings are suitable for displaying + to human users. + + Each XMLError object also contains a category code; its value may be + retrieved using the method XMLError.getCategory(). Category values + are drawn from a set of constants whose names begin with the + characters LIBSBML_CAT_, described below.@~ Categories are used by + libSBML to provide more information to calling programs about the + nature of a given error. + + In addition to category codes, each XMLError object also has a + severity code; its value may be retrieved using the method + XMLError.getSeverity(). Severity code values are drawn from a set + of constants whose names begin with the characters LIBSBML_SEV_, + described below. Severity levels range from informational + (libsbml.LIBSBML_SEV_INFO) to fatal errors + (libsbml.LIBSBML_SEV_FATAL). + + Finally, XMLError objects record the line and column near where the + problem occurred in the XML content. The values can be retrieved + using the methods XMLError.getLine() and XMLError.getColumn(). We + say 'near where the problem occurred', because many factors affect + how accurate the line/column information ultimately is. For + example, sometimes, the underlying XML parsers can only report such + information for the parent XML element where an error occurs, and + not for the specific point where the problem occurs. In other + situations, some parsers report invalid line and/or column numbers + altogether. If this occurs, libSBML sets the line and/or column + number in the XMLError object to either 0 or the value of the + maximum unsigned long integer representable on the platform where + libSBML is running. The probability that a true line or column + number in an SBML model would equal this value is vanishingly small; + thus, if an application encounters these values in an XMLError + object, it can assume no valid line/column number could be provided + by libSBML in that situation. + + @~ + + <center> <table cellspacing='1' cellpadding='1' border='0' class + ='text-table width80 normal-font alt-row-colors'> <caption>Possible + XMLError error codes. Depending on the programming language in use, + the Enumerator values will be defined either as a value from the + enumeration XMLErrorCode_t or as integer constants. To make this + table more compact, we have shortened the identifiers for the + category and severity codes to their essential parts. To get the + actual names of the constants, prepend LIBSBML_CAT_ to the category + names and LIBSBML_SEV_ to the severity names shown in the two right- + hand columns. </caption> <tr style='background: lightgray' class + ='normal-font'> <th>Enumerator</th> <th>Meaning</th> + <th width='90'>Category</th> <th width='90'>Severity</th> + </tr> <tr><td>libsbml.XMLUnknownError</td><td>Unrecognized error + encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>libsbml.XMLOutOfMemory</td> <td>Out of + memory</td><td>SYSTEM</td><td>FATAL</td></tr> + <tr><td>libsbml.XMLFileUnreadable</td> <td>File + unreadable</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLFileUnwritable</td> <td>File + unwritable</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLFileOperationError</td><td>Error encountered while + attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLNetworkAccessError</td><td>Network access + error</td><td>SYSTEM</td><td>ERROR</td></tr> + <tr><td>libsbml.InternalXMLParserError</td><td>Internal XML parser + state error</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>libsbml.UnrecognizedXMLParserCode</td><td>XML parser returned + an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>libsbml.XMLTranscoderError</td><td>Character transcoder + error</td><td>INTERNAL</td><td>FATAL</td></tr> + <tr><td>libsbml.MissingXMLDecl</td><td>Missing XML declaration at + beginning of XML input</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.MissingXMLEncoding</td><td>Missing encoding attribute + in XML declaration</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLDecl</td><td>Invalid or unrecognized XML + declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLDOCTYPE</td><td>Invalid, malformed or + unrecognized XML DOCTYPE + declaration</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.InvalidCharInXML</td><td>Invalid character in XML + content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadlyFormedXML</td><td>XML content is not well- + formed</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.UnclosedXMLToken</td><td>Unclosed XML + token</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.InvalidXMLConstruct</td><td>XML construct is invalid + or not permitted</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLTagMismatch</td><td>Element tag mismatch or + missing tag</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.DuplicateXMLAttribute</td><td>Duplicate XML + attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.UndefinedXMLEntity</td><td>Undefined XML + entity</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadProcessingInstruction</td><td>Invalid, malformed + or unrecognized XML processing + instruction</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLPrefix</td><td>Invalid or undefined XML + namespace prefix</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLPrefixValue</td><td>Invalid XML namespace + prefix value</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.MissingXMLRequiredAttribute</td><td>Missing a + required XML attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLAttributeTypeMismatch</td><td>Data type mismatch + for the value of an attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLBadUTF8Content</td><td>Invalid UTF8 + content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.MissingXMLAttributeValue</td><td>Missing or + improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLAttributeValue</td><td>Invalid or + unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLAttribute</td><td>Invalid, unrecognized or + malformed attribute</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.UnrecognizedXMLElement</td><td>Element either not + recognized or not permitted</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLComment</td><td>Badly formed XML + comment</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLDeclLocation</td><td>XML declaration not + permitted in this location</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLUnexpectedEOF</td><td>Reached end of input + unexpectedly</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLIDValue</td><td>Value is invalid for XML ID, or + has already been used</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLIDRef</td><td>XML ID value was never + declared</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.UninterpretableXMLContent</td><td>Unable to interpret + content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.BadXMLDocumentStructure</td><td>Bad XML document + structure</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.InvalidAfterXMLContent</td><td>Encountered invalid + content after expected content</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLExpectedQuotedString</td><td>Expected to find a + quoted string</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLEmptyValueNotPermitted</td><td>An empty value is + not permitted in this context</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLBadNumber</td><td>Invalid or unrecognized + number</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLBadColon</td><td>Colon characters are invalid in + this context</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.MissingXMLElements</td><td>One or more expected + elements are missing</td><td>XML</td><td>ERROR</td></tr> + <tr><td>libsbml.XMLContentEmpty</td><td>Main XML content is + empty</td><td>XML</td><td>ERROR</td></tr> </table> </center> + + @~ + + <center> <table width='90' cellspacing='1' cellpadding='1' + border='0' class='text-table width80 normal-font alt-row-colors'> + <tr style='background: lightgray' class='normal-font'> + <th>Enumerator</th> <th>Meaning</th> </tr> + <tr><td>libsbml.LIBSBML_CAT_INTERNAL</td> <td>A problem involving + the libSBML software itself or the underlying XML parser. This + almost certainly indicates a software defect (i.e., bug) in libSBML. + Please report instances of this to the libSBML developers.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SYSTEM</td> <td>A problem reported by + the operating system, such as an inability to read or write a file. + This indicates something that is not a program error but is outside + of the control of libSBML.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_XML</td> <td>A problem in the XML + content itself. This usually arises from malformed XML or the use + of constructs not permitted in SBML.</td></tr> </table> </center> + + @~ + + <center> <table width='90' cellspacing='1' cellpadding='1' + border='0' class='text-table width80 normal-font alt-row-colors'> + <tr style='background: lightgray' class='normal-font'> + <th>Enumerator</th> <th>Meaning</th> </tr> + <tr><td>libsbml.LIBSBML_SEV_INFO</td> <td>The error is actually + informational and not necessarily a serious problem.</td></tr> + <tr><td>libsbml.LIBSBML_SEV_WARNING</td> <td>The error object + represents a problem that is not serious enough to necessarily stop + the problem, but applications should take note of the problem and + evaluate what its implications may be.</td></tr> + <tr><td>libsbml.LIBSBML_SEV_ERROR</td> <td>The error object + represents a serious error. The application may continue running + but it is unlikely to be able to continue processing the same XML + file or data stream.</td></tr> + <tr><td>libsbml.LIBSBML_SEV_FATAL</td> <td>A serious error occurred, + such as an out-of-memory condition, and the software should + terminate immediately.</td></tr> </table> </center> +"; + + +%feature("docstring") XMLError::XMLError " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLError(XMLError orig) + + Copy constructor; creates a copy of this XMLError. + + 'orig' the XMLError object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + XMLError( const int errorId = 0 , string details = '' , + const long line = 0 , const long column = 0 , const long + severity = LIBSBML_SEV_FATAL , const long category = + LIBSBML_CAT_INTERNAL ) + + Creates a new XMLError to report that something occurred during XML + processing. + + XMLError objects have identification numbers to indicate the nature + of the exception. These numbers are defined as unsigned integer + constants in the file 'libsbmlConstants.java'. See the top of this + documentation for a table listing the possible values and their + meanings. @~ The argument 'errorId' to this constructor can be (but + does not have to be) a value from this set of constants. If it is + one of the predefined error identifiers, the XMLError class assumes + the error is a low-level system or XML layer error and prepends a + built-in, predefined error message to any string passed in the + argument 'details' to this constructor. In addition, all the + predefined error identifiers have associated values for the + 'severity' and 'category' codes, and these fields are filled-in as + well. @~ + + If the error identifier 'errorId' is a number greater than 9999, this + constructor assumes that the error was generated from another part of + the software, and does not do additional filling in of values beyond + the defaults in the constructor itself. This allows XMLError to + serve as a base class for other errors (and is used in this way + elsewhere in libSBML). Callers should fill in all the parameters + with suitable values if generating errors with codes greater than + 9999 to make maximum use of the XMLError facilities. + + As mentioned above, there are additional constants defined for + standard severity and standard category codes, and every predefined + error in libSBML has an associated value for severity and category + taken from these predefined sets. These constants have symbol names + prefixed with LIBSBML_SEV_ and LIBSBML_CAT_, respectively. If the + value of 'errorId' is one of the standard error codes, callers do + not need to fill in 'severity' and 'category' in a call to this + constructor. Conversely, if 'errorId' is not an existing XML-level + error code, callers can use other values for 'severity' and + 'category'. @~ + + Parameter 'errorId' is a long integer, the identification number of + the error. + + Parameter 'details' is a string containing additional details about + the error. If the error code in 'errorId' is one that is recognized + by XMLError, the given message is appended to a predefined message + associated with the given code. If the error code is not + recognized, the message is stored as-is as the text of the error. + + Parameter 'line' is a long integer, the line number at which the + error occured. + + Parameter 'column' is a long integer, the column number at which the + error occured. + + Parameter 'severity' is an integer indicating severity of the error. + + Parameter 'category' is an integer indicating the category to which + the error belongs. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLError::getErrorId " + Returns the identifier of this error. + + Returns the error code for this error. + + See also getMessage(), getShortMessage(), getCategory(), + getSeverity(). +"; + + +%feature("docstring") XMLError::getMessage " + Returns the message text of this error. + + The message associated with an error object describes the nature of + the problem. The message returned by this method is generally longer + and clearer than the message returned by XMLError.getShortMessage(), + but not in all cases. + + Callers may use XMLError.getCategory() and XMLError.getSeverity() to + obtain additional information about the nature and severity of the + problem. + + Returns the message text + + See also getErrorId(), getShortMessage(), getCategory(), + getSeverity(). +"; + + +%feature("docstring") XMLError::getShortMessage " + Returns a brief message for this error. + + This is an alternative error message that, in general, is as short as + the authors could make it. However, brevity is often inversely + proportional to clarity, so this short message may not be + sufficiently informative to understand the nature of the error. + Calling applications may wish to check XMLError.getMessage() in + addition or instead. + + Returns the short error message text + + See also getErrorId(), getMessage(), getCategory(), getSeverity(). +"; + + +%feature("docstring") XMLError::getLine " + Returns the line number in the XML input near where the error, + warning or other diagnostic occurred. + + We say 'near where the problem occurred', because many factors affect + how accurate the line/column information ultimately is. For example, + sometimes, the underlying XML parsers can only report such + information for the parent XML element where an error occurs, and + not for the specific point where the problem occurs. In other + situations, some parsers report invalid line and/or column numbers + altogether. If this occurs, libSBML sets the line and/or column + number in the XMLError object to either 0 or the value of the + maximum unsigned long integer representable on the platform where + libSBML is running. The probability that a true line or column + number in an SBML model would equal this value is vanishingly small; + thus, if an application encounters these values in an XMLError + object, it can assume no valid line/column number could be provided + by libSBML in that situation. + + Returns the line number + + See also getColumn(). +"; + + +%feature("docstring") XMLError::getColumn " + Returns the column number in the XML input near where the error, + warning or other diagnostic occurred. + + We say 'near where the problem occurred', because many factors affect + how accurate the line/column information ultimately is. For example, + sometimes, the underlying XML parsers can only report such + information for the parent XML element where an error occurs, and + not for the specific point where the problem occurs. In other + situations, some parsers report invalid line and/or column numbers + altogether. If this occurs, libSBML sets the line and/or column + number in the XMLError object to either 0 or the value of the + maximum unsigned long integer representable on the platform where + libSBML is running. The probability that a true line or column + number in an SBML model would equal this value is vanishingly small; + thus, if an application encounters these values in an XMLError + object, it can assume no valid line/column number could be provided + by libSBML in that situation. + + Returns the column number + + See also getLine(). +"; + + +%feature("docstring") XMLError::getSeverity " + Returns the severity of this error. + + XMLError defines an enumeration of severity codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own severity codes with numbers higher than those in the predefined + set of severity codes. + + Returns the severity of this XMLError. + + See also getSeverityAsString(), getCategory(). +"; + + +%feature("docstring") XMLError::getSeverityAsString " + Returns a string describing the severity level of this error. + + XMLError defines an enumeration of severity codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own severity codes with numbers higher than those in the predefined + set of severity codes. + + Returns string representing the severity of this XMLError. + + See also getSeverity(), getCategoryAsString(). +"; + + +%feature("docstring") XMLError::getCategory " + Returns the category of this error. + + XMLError defines an enumeration of category codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own categories with numbers higher than those in the predefined set + of category codes. + + Categories can be used to partition errors into distinct groups. + Among other things, this can be used to prevent id conflicts by + uniquely identifying an XMLError by both id and category. + + Returns the category of this XMLError. + + See also getSeverity(), getCategoryAsString(). +"; + + +%feature("docstring") XMLError::getCategoryAsString " + Returns a string describing the category of this error. + + XMLError defines an enumeration of category codes for the XML layer. + Applications that build on XMLError by subclassing it may add their + own categories with numbers higher than those in the predefined set + of category codes. + + Categories can be used to partition errors into distinct groups. + Among other things, this can be used to prevent id conflicts by + uniquely identifying an XMLError by both id and category. + + Returns string representing the category of this XMLError. + + See also getCategory(), getSeverityAsString(). +"; + + +%feature("docstring") XMLError::isInfo " + Predicate returning True or False depending on whether this error + object is for information purposes only. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value libsbml.LIBSBML_SEV_INFO from the set of predefined severity + codes.@~ + + Returns True if this XMLError is for informational purposes only, + False otherwise. + + See also isWarning(), isError(), isFatal(). +"; + + +%feature("docstring") XMLError::isWarning " + Predicate returning True or False depending on whether this error + object is a warning. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value libsbml.LIBSBML_SEV_WARNING from the set of predefined + severity codes.@~ + + Returns True if this error is a warning, False otherwise. + + See also isInfo(), isError(), isFatal(). +"; + + +%feature("docstring") XMLError::isError " + Predicate returning True or False depending on whether this error is + a significant error. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value libsbml.LIBSBML_SEV_ERROR from the set of predefined severity + codes.@~ + + Returns True if this error is an error, False otherwise. + + See also isInfo(), isWarning(), isFatal(). +"; + + +%feature("docstring") XMLError::isFatal " + Predicate returning True or False depending on whether this error is + a fatal run-time error. + + This is equivalent to obtaining the severity code from an XMLError + object (via XMLError.getSeverity()) and then comparing it to the + value libsbml.LIBSBML_SEV_FATAL from the set of predefined severity + codes.@~ + + Returns True if this error is a fatal error, False otherwise. + + See also isInfo(), isWarning(), isError(). +"; + + +%feature("docstring") XMLError::isInternal " + Predicate returning True or False depending on whether this error + resulted from an internal program error. + + This is equivalent to obtaining the category identifier from an + XMLError object (via XMLError.getCategory()) and then comparing it to + the value libsbml.LIBSBML_CAT_INTERNAL from the set of predefined + category codes.@~ + + Returns True or False + + See also isSystem(), isXML(). +"; + + +%feature("docstring") XMLError::isSystem " + Predicate returning True or False depending on whether this error + was generated by the operating system. + + This is equivalent to obtaining the category identifier from an + XMLError object (via XMLError.getCategory()) and then comparing it to + the value libsbml.LIBSBML_CAT_SYSTEM from the set of predefined + category codes.@~ + + Returns True or False + + See also isInternal(), isXML(). +"; + + +%feature("docstring") XMLError::isXML " + Predicate returning True or False depending on whether this error + resulted from a problem in the XML input (e.g., an XML syntax + error). + + This is equivalent to obtaining the category identifier from an + XMLError object (via XMLError.getCategory()) and then comparing it to + the value libsbml.LIBSBML_CAT_XML from the set of predefined + category codes.@~ + + Returns True or False + + See also isInternal(), isSystem(). +"; + + +%feature("docstring") XMLError::isValid " + Predicate returning True or False depending on whether this error + resulted from a problem or whether it was logged as an unknown + error. + + This is equivalent to obtaining the error identifier from an + XMLError object (via XMLError.getErrorId()) and then comparing it to + the value XMLUnknownError or UnknownError from the set of predefined + error codes.@~ + + Returns True or False +"; + + +%feature("docstring") XMLError::setLine " + Sets the line number where this error occurred. + + Parameter 'line' is a long integer, the line number to set. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also setColumn(). +"; + + +%feature("docstring") XMLError::setColumn " + Sets the column number where this error occurred. + + Parameter 'column' is a long integer, the column number to set. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also setLine(). +"; + + +%feature("docstring") XMLError::getStandardMessage " + Returns a copy of the message string associated with the given + predefined XMLError code. + + Parameter 'code' is the error code whose message is sought; it must + be a predefined value from the set of predefined error + identifiers.@~ +"; + + +%feature("docstring") XMLError::getPackage " + Returns a copy of the message string associated with the given + predefined XMLError code. + + Parameter 'code' is the error code whose message is sought; it must + be a predefined value from the set of predefined error + identifiers.@~ +"; + + +%feature("docstring") XMLError::getErrorIdOffset " + Returns a copy of the message string associated with the given + predefined XMLError code. + + Parameter 'code' is the error code whose message is sought; it must + be a predefined value from the set of predefined error + identifiers.@~ +"; + + +%feature("docstring") XMLErrorLog " + @ingroup Core Log of errors and other events encountered while + processing an XML file or data stream. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The error log is a list. The XML layer of libSBML maintains an error + log associated with a given XML document or data stream. When an + operation results in an error, or when there is something wrong with + the XML content, the problem is reported as an XMLError object + stored in the XMLErrorLog list. Potential problems range from low- + level issues (such as the inability to open a file) to XML syntax + errors (such as mismatched tags or other problems). + + A typical approach for using this error log is to first use + getNumErrors()@~ to inquire how many XMLError object instances it + contains, and then to iterate over the list of objects one at a time + using getError(long n) const. Indexing in the list begins at 0. + + In normal circumstances, programs using libSBML will actually obtain + an SBMLErrorLog rather than an XMLErrorLog. The former is + subclassed from XMLErrorLog and simply wraps commands for working + with SBMLError objects rather than the low-level XMLError objects. + Classes such as SBMLDocument use the higher-level SBMLErrorLog. +"; + + +%feature("docstring") XMLErrorLog::getNumErrors " + Returns the number of errors that have been logged. + + To retrieve individual errors from the log, callers may use + XMLErrorLog.getError() . + + Returns the number of errors that have been logged. +"; + + +%feature("docstring") XMLErrorLog::getError " + Returns the nth XMLError object in this log. + + Index 'n' is counted from 0. Callers should first inquire about the + number of items in the log by using the method getNumErrors(). + Attempts to use an error index number that exceeds the actual number + of errors in the log will result in a None being returned. + + Parameter 'n' is the index number of the error to retrieve (with 0 + being the first error). + + Returns the nth XMLError in this log, or None if 'n' is greater than + or equal to getNumErrors(). + + See also getNumErrors(). +"; + + +%feature("docstring") XMLErrorLog::clearLog " + Deletes all errors from this log. +"; + + +%feature("docstring") XMLErrorLog::XMLErrorLog " + Internal implementation method. +"; + + +%feature("docstring") XMLErrorLog::setParser " + Internal implementation method. +"; + + +%feature("docstring") XMLErrorLog::toString " + Writes all errors contained in this log to a string and returns it. + + This method uses printErrors() to format the diagnostic messages. + Please consult that method for information about the organization of + the messages in the string returned by this method. + + Returns a string containing all logged errors and warnings. + + See also printErrors(). +"; + + +%feature("docstring") XMLErrorLog::printErrors " + Prints all the errors or warnings stored in this error log + + It prints the text to the stream given by the optional parameter + 'stream'. If no parameter is given, it prints the output to the + standard error stream. + + If no errors have occurred, i.e., getNumErrors() == 0, no output + will be sent to the stream. + + The format of the output is: + + N error(s): + line NNN: (id) message + + Parameter 'stream' is the ostream or ostringstream object indicating + where the output should be printed. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") XMLErrorLog::isSeverityOverridden " + Returns a boolean indicating whether or not the severity is overriden +"; + + +%feature("docstring") XMLErrorLog::unsetSeverityOverride " + usets an existing override +"; + + +%feature("docstring") XMLErrorLog::getSeverityOverride " + Returns the current override +"; + + +%feature("docstring") XMLErrorLog::setSeverityOverride " + Set the severity override. + + If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be + logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG + no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then + all errors will be logged as warnings. +"; + + +%feature("docstring") XMLErrorLog::changeErrorSeverity " + Set the severity override. + + If set to LIBSBML_OVERRIDE_DISABLED (default) all errors will be + logged as specified in the error. Set to LIBSBML_OVERRIDE_DONT_LOG + no error will be logged. When set to LIBSBML_OVERRIDE_WARNING, then + all errors will be logged as warnings. +"; + + +%feature("docstring") SBMLErrorLog " + @ingroup Core Log of errors and other events encountered during SBML + processing. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The error log is a list. Each SBMLDocument maintains its own + SBMLErrorLog. When a libSBML operation on SBML content results in an + error, or when there is something worth noting about the SBML + content, the issue is reported as an SBMLError object stored in the + SBMLErrorLog list. + + SBMLErrorLog is derived from XMLErrorLog, an object class that serves + exactly the same purpose but for the XML parsing layer. XMLErrorLog + provides crucial methods such as getNumErrors()@~ for determining + how many SBMLError or XMLError objects are in the log. SBMLErrorLog + inherits these methods. + + The general approach to working with SBMLErrorLog in user programs + involves first obtaining a pointer to a log from a libSBML object + such as SBMLDocument. Callers should then use getNumErrors() @~ to + inquire how many objects there are in the list. (The answer may be + 0.) If there is at least one SBMLError object in the SBMLErrorLog + instance, callers can then iterate over the list using + SBMLErrorLog.getError(), using methods provided by the SBMLError + class to find out the error code and associated information such as + the error severity, the message, and the line number in the input. + + If you wish to simply print the error strings for a human to read, an + easier and more direct way might be to use + SBMLDocument.printErrors(). + + See also SBMLError, XMLErrorLog, XMLError. +"; + + +%feature("docstring") SBMLErrorLog::getError " + Returns the nth SBMLError object in this log. + + Index 'n' is counted from 0. Callers should first inquire about the + number of items in the log by using the getNumErrors()@~ method. + Attempts to use an error index number that exceeds the actual number + of errors in the log will result in a None being returned. + + Parameter 'n' is the index number of the error to retrieve (with 0 + being the first error). + + Returns the nth SBMLError in this log, or None if 'n' is greater + than or equal to getNumErrors(). + + See also getNumErrors(). +"; + + +%feature("docstring") SBMLErrorLog::getNumFailsWithSeverity " + Returns the number of errors that have been logged with the given + severity code. + + LibSBML associates severity levels with every SBMLError object to + provide an indication of how serious the problem is. Severities + range from informational diagnostics to fatal (irrecoverable) + errors. Given an SBMLError object instance, a caller can + interrogate it for its severity level using methods such as + SBMLError.getSeverity(), SBMLError.isFatal(), and so on. The + present method encapsulates iteration and interrogation of all + objects in an SBMLErrorLog, making it easy to check for the presence + of error objects with specific severity levels. + + Parameter 'severity' is a value from the set of LIBSBML_SEV_ + constants defined by the interface class libsbml. @~ + + Returns a count of the number of errors with the given severity code. + + See also getNumErrors(). +"; + + +%feature("docstring") SBMLErrorLog::SBMLErrorLog " + Internal implementation method. +"; + + +%feature("docstring") SBMLErrorLog::logError " + Internal implementation method. +"; + + +%feature("docstring") SBMLErrorLog::logPackageError " + Internal implementation method. +"; + + +%feature("docstring") SBMLErrorLog::remove " + Removes an error having errorId from the SBMLError list. + + Only the first item will be removed if there are multiple errors + with the given errorId. + + Parameter 'errorId' is the error identifier of the error to be + removed. +"; + + +%feature("docstring") SBMLErrorLog::contains " + Returns true if SBMLErrorLog contains an errorId + + Parameter 'errorId' is the error identifier of the error to be found. +"; + + +%feature("docstring") SBMLError " + @ingroup Core Representation of errors, warnings and other + diagnostics + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + When a libSBML operation on SBML content results in an error, or when + there is something wrong with the SBML content, the problems are + reported as SBMLError objects. These are generally stored in an + SBMLErrorLog object; this log object, in turn, is kept in the + SBMLDocument object containing the SBML content. Applications can + obtain the list of logged errors using SBMLDocument.getErrorLog() and + then use the methods provided by SBMLErrorLog to access individual + SBMLError objects. (Note that despite the word 'error' in the name, + SBMLError objects are used to represent not only 'true' errors, but + also warnings and some informational diagnostics. The name is a + historical hold-over from early versions of libSBML, in which the + object really was only used to report errors.) + + Each SBMLError object instance has an identification number that + identifies the nature of the problem. This 'error id' number will be + up to five digits long, and it will come from one of two sets of + static integer constants defined in the interface class libsbml: + either the SBML error identifiers (described below) or the XML + error identifiers (described in the documentation for the class + XMLError). The former set of constants includes all the SBML + validation rule numbers listed in the appendices of the SBML + specification documents, as well as some additional libSBML-specific + error codes. @~ + + Error codes are useful mainly for software. For human readers, + SBMLError also includes text messages that describe the nature of a + given problem. The messages can be accessed using + SBMLError.getShortMessage() and SBMLError.getMessage(). The former + provides a brief one-line description of the issue, while + SBMLError.getMessage() provides a more detailed text, including (if + appropriate) references to sections of the SBML specifications where + relevant topics are discussed. These text strings are suitable for + displaying to human users. + + An SBMLError object also contains a category code; its value may be + retrieved using the method SBMLError.getCategory(). Category values + are drawn from a set of static integer constants defined in libsbml + and having names beginning with the characters LIBSBML_CAT_. The + list of possible codes is described in a separate section below. + Categories are used to partition errors into distinct conceptual + groups. This is principally used by the libSBML validation system + to group classes of validation checks. For example, + libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY is the category for tests + that check identifier consistency; + libsbml.LIBSBML_CAT_MATHML_CONSISTENCY is the category for MathML + consistency checking; and so on. @~ + + In addition, SBMLError also has a severity code. Its value may be + retrieved using the method SBMLError.getSeverity(). The possible + severity values are the same as those reported by XMLError.@~ + Severity levels currently range from informational + (libsbml.LIBSBML_SEV_INFO) to fatal errors + (libsbml.LIBSBML_SEV_FATAL). They can be used by an application to + evaluate how serious a given problem is. + + Finally, SBMLError records the line and column near where the problem + occurred in the SBML content. The values may be retrieved using the + methods SBMLError.getLine() and SBMLError.getColumn(). We say + 'near', because a lot of factors affect how accurate the line/column + information ultimately is. For example, different XML parsers have + different conventions for which line and column number they report + for a particular problem (which makes a difference when a problem + involves an opening XML tag on one line and a closing tag on another + line). In some situations, some parsers report invalid line and/or + column numbers altogether. If this occurs, libSBML sets the line + and/or column number in the SBMLError object to the the value of the + maximum unsigned long integer representable on the platform where + libSBML is running. (This is equal to the constant named ULONG_MAX + in C and C++.) The probability that a true line or column number in + an SBML model would equal this value is vanishingly small; thus, if + an application encounters these values in an XMLError object, it can + assume no valid line/column number could be provided by libSBML in + that situation. + + Error codes associated with SBMLError objects + ...................................................................... + + The error and warning codes returned by libSBML are listed in the + table below. The method SBMLError.getErrorId() returns the error + code of a given SBMLError object instance. In the libSBML Python + language interface, these error identifiers are currently + implemented as static integer constants defined in the interface + class libsbml. + + In this table, the right-hand columns titled 'L1V1', 'L1V2', etc. + refer to Levels and Versions of the SBML specifications, and the + entries in each column refer to whether the severity of the + condition in that particular Level+Version of SBML. The codes stand + for the following: + + @~ + + <table cellspacing='1' cellpadding='2' border='0' class='normal- + font'> <tr><td class='s-na'>N</td><td>= Not applicable</td></tr> + <tr><td class='s-info'>I</td><td>= Informational</td></tr> <tr><td + class='s-warning'>W</td><td>= Warning</td></tr> <tr><td + class='s-error'>E</td><td>= Error</td></tr> <tr><td + class='s-fatal'>F</td><td>= Fatal</td></tr> </table> + + The text shown in the 'Meaning' is the text returned by the + SBMLError.getShortMessage() method on a given SBMLError object. A + longer and (hopefully) clearer explanation of the issue is returned + by SBMLError.getMessage(). + + Enumerator Meaning L 1 V 1 L 1 V 2 L 2 V 1 L 2 V 2 L 2 V 3 L 2 V 4 L + 3 V 1 UnknownErrorEncountered unknown internal libSBML errorFFFFFFF + NotUTF8File does not use UTF-8 encodingEEEEEEE + UnrecognizedElementEncountered unrecognized elementEEEEEEE + NotSchemaConformantDocument does not conform to the SBML XML + schemaEEEEEEE L3NotSchemaConformantDocument is not well-formed + XMLNNNNNNE InvalidMathElementInvalid MathMLNNEEEEE + DisallowedMathMLSymbolDisallowed MathML symbol foundNNEEEEE + DisallowedMathMLEncodingUseUse of the MathML 'encoding' attribute is + not allowed on this elementNNEEEEE DisallowedDefinitionURLUseUse of + the MathML 'definitionURL' attribute is not allowed on this + elementNNEEEEE BadCsymbolDefinitionURLValueInvalid <csymbol> + 'definitionURL' attribute valueNNEEEEE + DisallowedMathTypeAttributeUseUse of the MathML 'type' attribute is + not allowed on this elementNNEEEEE + DisallowedMathTypeAttributeValueDisallowed MathML 'type' attribute + valueNNEEEEE LambdaOnlyAllowedInFunctionDefUse of <lambda> not + permitted outside of FunctionDefinition objectsNNEEEEE + BooleanOpsNeedBooleanArgsNon-Boolean argument given to Boolean + operatorNNWEEEE NumericOpsNeedNumericArgsNon-numerical argument + given to numerical operatorNNWEEEE ArgsToEqNeedSameTypeArguments to + <eq> and <neq> must have the same data typesNNWEEEE + PiecewiseNeedsConsistentTypesTerms in a <piecewise> expression must + have consistent data typesNNWEEEE PieceNeedsBooleanThe second + argument of a <piece> expression must yield a Boolean valueNNWEEEE + ApplyCiMustBeUserFunctionA <ci> element in this context must refer + to a function definitionNNWEEEE ApplyCiMustBeModelComponentA <ci> + element in this context must refer to a model componentNNWEEEE + KineticLawParametersAreLocalOnlyCannot use a KineticLaw local + parameter outside of its local scopeNNWEEEE MathResultMustBeNumericA + formula's result in this context must be a numerical valueNNWEEEE + OpsNeedCorrectNumberOfArgsIncorrect number of arguments given to + MathML operatorNNWEEEE InvalidNoArgsPassedToFunctionDefIncorrect + number of arguments given to function invocationNNNNNEE + DisallowedMathUnitsUseAttribute 'units' is only permitted on <cn> + elementsNNNNNNE InvalidUnitsValueInvalid value given for the 'units' + attributeNNNNNNE DuplicateComponentIdDuplicate 'id' attribute + valueEEEEEEE DuplicateUnitDefinitionIdDuplicate unit definition 'id' + attribute valueEEEEEEE DuplicateLocalParameterIdDuplicate local + parameter 'id' attribute valueEEEEEEE + MultipleAssignmentOrRateRulesMultiple rules for the same variable are + not allowedEEEEEEE MultipleEventAssignmentsForIdMultiple event + assignments for the same variable are not allowedNNEEEEE + EventAndAssignmentRuleForIdAn event assignment and an assignment rule + must not have the same value for 'variable'NNEEEEE + DuplicateMetaIdDuplicate 'metaid' attribute valueNNEEEEE + InvalidSBOTermSyntaxInvalid syntax for an 'sboTerm' attribute + valueNNNEEEE InvalidMetaidSyntaxInvalid syntax for a 'metaid' + attribute valueNNEEEEE InvalidIdSyntaxInvalid syntax for an 'id' + attribute valueEEEEEEE InvalidUnitIdSyntaxInvalid syntax for the + identifier of a unitNNNEEEE InvalidNameSyntaxInvalid syntax for a + 'name' attribute valueNNNNNNE MissingAnnotationNamespaceMissing + declaration of the XML namespace for the annotationNNNEEEE + DuplicateAnnotationNamespacesMultiple annotations using the same XML + namespaceNNNEEEE SBMLNamespaceInAnnotationThe SBML XML namespace + cannot be used in an Annotation objectNNNEEEN + MultipleAnnotationsOnly one Annotation object is permitted under a + given SBML objectNNNNNNE InconsistentArgUnitsThe units of the + function call's arguments are not consistent with its + definitionWWWEEWW InconsistentKineticLawUnitsL3The kinetic law's + units are inconsistent with those of other kinetic laws in the + modelNNNNNNW AssignRuleCompartmentMismatchMismatched units in + assignment rule for compartmentEEEEEWW + AssignRuleSpeciesMismatchMismatched units in assignment rule for + speciesEEEEEWW AssignRuleParameterMismatchMismatched units in + assignment rule for parameterEEEEEWW + AssignRuleStoichiometryMismatchMismatched units in assignment rule + for stoichiometryNNNNNNW InitAssignCompartmenMismatchMismatched + units in initial assignment to compartmentNNNEEWW + InitAssignSpeciesMismatchMismatched units in initial assignment to + speciesNNNEEWW InitAssignParameterMismatchMismatched units in + initial assignment to parameterNNNEEWW + InitAssignStoichiometryMismatchMismatched units in initial + assignment to stoichiometryNNNNNNW + RateRuleCompartmentMismatchMismatched units in rate rule for + compartmentEEEEEWW RateRuleSpeciesMismatchMismatched units in rate + rule for speciesEEEEEWW RateRuleParameterMismatchMismatched units in + rate rule for parameterEEEEEWW + RateRuleStoichiometryMismatchMismatched units in rate rule for + stoichiometryNNNNNNW KineticLawNotSubstancePerTimeThe units of the + kinetic law are not 'substance'/'time'EEEEEWW + SpeciesInvalidExtentUnitsThe species' units are not consistent with + units of extentNNNNNNW DelayUnitsNotTimeThe units of the delay + expression are not units of timeNNEEEWW + EventAssignCompartmentMismatchMismatched units in event assignment + for compartmentNNEEEWW EventAssignSpeciesMismatchMismatched units in + event assignment for speciesNNEEEWW + EventAssignParameterMismatchMismatched units in event assignment for + parameterNNEEEWW EventAssignStoichiometryMismatchMismatched units in + event assignment for stoichiometryNNNNNNW + PriorityUnitsNotDimensionlessThe units of a priority expression must + be 'dimensionless'NNNNNNW UpperUnitBoundUpper boundary of unit + validation diagnostic codesNNNNNNN OverdeterminedSystemThe model is + overdeterminedWWWEEEE InvalidModelSBOTermInvalid 'sboTerm' attribute + value for a Model objectNNNEEWW InvalidFunctionDefSBOTermInvalid + 'sboTerm' attribute value for a FunctionDefinition objectNNNEEWW + InvalidParameterSBOTermInvalid 'sboTerm' attribute value for a + Parameter objectNNNEEWW InvalidInitAssignSBOTermInvalid 'sboTerm' + attribute value for an InitialAssignment objectNNNEEWW + InvalidRuleSBOTermInvalid 'sboTerm' attribute value for a Rule + objectNNNEEWW InvalidConstraintSBOTermInvalid 'sboTerm' attribute + value for a Constraint objectNNNEEWW InvalidReactionSBOTermInvalid + 'sboTerm' attribute value for a Reaction objectNNNEEWW + InvalidSpeciesReferenceSBOTermInvalid 'sboTerm' attribute value for a + SpeciesReference objectNNNEEWW InvalidKineticLawSBOTermInvalid + 'sboTerm' attribute value for a KineticLaw objectNNNEEWW + InvalidEventSBOTermInvalid 'sboTerm' attribute value for an Event + objectNNNEEWW InvalidEventAssignmentSBOTermInvalid 'sboTerm' + attribute value for an EventAssignment objectNNNEEWW + InvalidCompartmentSBOTermInvalid 'sboTerm' attribute value for a + Compartment objectNNNNEWW InvalidSpeciesSBOTermInvalid 'sboTerm' + attribute value for a Species objectNNNNEWW + InvalidCompartmentTypeSBOTermInvalid 'sboTerm' attribute value for a + CompartmentType objectNNNNEWN InvalidSpeciesTypeSBOTermInvalid + 'sboTerm' attribute value for a SpeciesType objectNNNNEWN + InvalidTriggerSBOTermInvalid 'sboTerm' attribute value for an Event + Trigger objectNNNNEWW InvalidDelaySBOTermInvalid 'sboTerm' attribute + value for an Event Delay objectNNNNEWW NotesNotInXHTMLNamespaceNotes + must be placed in the XHTML XML namespaceEEEEEEE + NotesContainsXMLDeclXML declarations are not permitted in Notes + objectsNNNEEEE NotesContainsDOCTYPEXML DOCTYPE elements are not + permitted in Notes objectsNNNEEEE InvalidNotesContentInvalid notes + content foundNNNEEEN OnlyOneNotesElementAllowedOnly one Notes + subobject is permitted on a given SBML objectNNNNNNE + InvalidNamespaceOnSBMLInvalid XML namespace for the SBML container + elementEEEEEEE MissingOrInconsistentLevelMissing or inconsistent + value for the 'level' attributeEEEEEEE + MissingOrInconsistentVersionMissing or inconsistent value for the + 'version' attributeEEEEEEE PackageNSMustMatchInconsistent or invalid + SBML Level/Version for the package namespace declarationNNNNNNE + LevelPositiveIntegerThe 'level' attribute must have a positive + integer valueNNNNNNE VersionPositiveIntegerThe 'version' attribute + must have a positive integer valueNNNNNNE + AllowedAttributesOnSBMLInvalid attribute found on the SBML container + elementNNNNNNE L3PackageOnLowerSBMLAn L3 package ns found on the + SBML container element.WWWWWWN MissingModelNo model definition + foundEEEEEEE IncorrectOrderInModelIncorrect ordering of components + within the Model objectEEEEEEN EmptyListElementEmpty ListOf___ + object foundEEEEEEE NeedCompartmentIfHaveSpeciesThe presence of a + species requires a compartmentEEEEEEE OneOfEachListOfOnly one of + each kind of ListOf___ object is allowed inside a Model objectNNNNNNE + OnlyFuncDefsInListOfFuncDefsOnly FunctionDefinition, Notes and + Annotation objects are allowed in ListOfFunctionDefinitionsNNNNNNE + OnlyUnitDefsInListOfUnitDefsOnly UnitDefinition, Notes and Annotation + objects are allowed in ListOfUnitDefinitions objectsNNNNNNE + OnlyCompartmentsInListOfCompartmentsOnly Compartment, Notes and + Annotation objects are allowed in ListOfCompartments objectsNNNNNNE + OnlySpeciesInListOfSpeciesOnly Species, Notes and Annotation objects + are allowed in ListOfSpecies objectsNNNNNNE + OnlyParametersInListOfParametersOnly Parameter, Notes and Annotation + objects are allowed in ListOfParameters objectsNNNNNNE + OnlyInitAssignsInListOfInitAssignsOnly InitialAssignment, Notes and + Annotation objects are allowed in ListOfInitialAssignments + objectsNNNNNNE OnlyRulesInListOfRulesOnly Rule, Notes and Annotation + objects are allowed in ListOfRules objectsNNNNNNE + OnlyConstraintsInListOfConstraintsOnly Constraint, Notes and + Annotation objects are allowed in ListOfConstraints objectsNNNNNNE + OnlyReactionsInListOfReactionsOnly Reaction, Notes and Annotation + objects are allowed in ListOfReactions objectsNNNNNNE + OnlyEventsInListOfEventsOnly Event, Notes and Annotation objects are + allowed in ListOfEvents objectsNNNNNNE L3ConversionFactorOnModelA + 'conversionFactor' attribute value must reference a Parameter + objectNNNNNNE L3TimeUnitsOnModelInvalid 'timeUnits' attribute + valueNNNNNNW L3VolumeUnitsOnModelInvalid 'volumeUnits' attribute + valueNNNNNNW L3AreaUnitsOnModelInvalid 'areaUnits' attribute + valueNNNNNNW L3LengthUnitsOnModelInvalid 'lengthUnits' attribute + valueNNNNNNW L3ExtentUnitsOnModelInvalid 'extentUnits' attribute + valueNNNNNNW AllowedAttributesOnModelInvalid attribute found on the + Model objectNNNNNNE AllowedAttributesOnListOfFuncsInvalid attribute + found on the ListOfFunctionDefinitions objectNNNNNNE + AllowedAttributesOnListOfUnitDefsInvalid attribute found on the + ListOfUnitDefinitions objectNNNNNNE + AllowedAttributesOnListOfCompsInvalid attribute found on the + ListOfCompartments objectNNNNNNE + AllowedAttributesOnListOfSpeciesInvalid attribute found on the + ListOfSpecies objectNNNNNNE AllowedAttributesOnListOfParamsInvalid + attribute found on the ListOfParameters objectNNNNNNE + AllowedAttributesOnListOfInitAssignInvalid attribute found on the + ListOfInitialAssignments objectNNNNNNE + AllowedAttributesOnListOfRulesInvalid attribute found on the + ListOfRules objectNNNNNNE + AllowedAttributesOnListOfConstraintsInvalid attribute found on the + ListOfConstraints objectNNNNNNE + AllowedAttributesOnListOfReactionsInvalid attribute found on the + ListOfReactions objectNNNNNNE AllowedAttributesOnListOfEventsInvalid + attribute found on the ListOfEvents objectNNNNNNE + FunctionDefMathNotLambdaInvalid expression found in the function + definitionNNEEEEE InvalidApplyCiInLambdaInvalid forward reference in + the MathML <ci>...</ci></apply> expressionNNEEENN + RecursiveFunctionDefinitionRecursive function definitions are not + permittedNNEEEEE InvalidCiInLambdaInvalid <ci> reference found inside + the <lambda> mathematical formulaNNEEEEE + InvalidFunctionDefReturnTypeA function's return type must be either + a number or a BooleanNNEEEEE OneMathElementPerFuncA + FunctionDefinition object must contain one <math> elementNNNNNNE + AllowedAttributesOnFuncInvalid attribute found on the + FunctionDefinition objectNNNNNNE InvalidUnitDefIdInvalid 'id' + attribute value for a UnitDefinition objectEEEEEEE + InvalidSubstanceRedefinitionInvalid redefinition of built-in type + 'substance'EEEEEEN InvalidLengthRedefinitionInvalid redefinition of + built-in type 'length'WWEEEEN InvalidAreaRedefinitionInvalid + redefinition of built-in type name 'area'WWEEEEN + InvalidTimeRedefinitionInvalid redefinition of built-in type name + 'time'EEEEEEN InvalidVolumeRedefinitionInvalid redefinition of + built-in type name 'volume'EEEEEEN VolumeLitreDefExponentNotOneMust + use 'exponent'=1 when defining 'volume' in terms of litresEEEEENN + VolumeMetreDefExponentNot3Must use 'exponent'=3 when defining + 'volume' in terms of metresNNEEENN EmptyListOfUnitsAn empty list of + Unit objects is not permitted in a UnitDefinition objectEEEEEEN + InvalidUnitKindInvalid value for the 'kind' attribute of a + UnitDefinition objectEEEEEEE OffsetNoLongerValidUnit attribute + 'offset' is not supported in this Level+Version of SBMLNNNEEEN + CelsiusNoLongerValidUnit name 'Celsius' is not defined in this + Level+Version of SBMLNNNEEEN EmptyUnitListElementA ListOfUnits object + must not be emptyNNNNNNE OneListOfUnitsPerUnitDefAt most one + ListOfUnits object is allowed inside a UnitDefinition objectNNNNNNE + OnlyUnitsInListOfUnitsOnly Unit, Notes and Annotation objects are + allowed in ListOfUnits objectsNNNNNNE + AllowedAttributesOnUnitDefinitionInvalid attribute found on the + UnitDefinition objectNNNNNNE AllowedAttributesOnListOfUnitsInvalid + attribute found on the ListOfUnits objectNNNNNNE + AllowedAttributesOnUnitInvalid attribute found on the Unit + objectNNNNNNE ZeroDimensionalCompartmentSizeInvalid use of the 'size' + attribute for a zero-dimensional compartmentNNEEEEN + ZeroDimensionalCompartmentUnitsInvalid use of the 'units' attribute + for a zero-dimensional compartmentNNEEEEN + ZeroDimensionalCompartmentConstZero-dimensional compartments must be + defined to be constantNNEEEEN UndefinedOutsideCompartmentInvalid + value for the 'outside' attribute of a Compartment objectEEEEEEN + RecursiveCompartmentContainmentRecursive nesting of compartments via + the 'outside' attribute is not permittedWWWEEEN + ZeroDCompartmentContainmentInvalid nesting of zero-dimensional + compartmentsNNWEEEN Invalid1DCompartmentUnitsInvalid value for the + 'units' attribute of a one-dimensional compartmentNNEEEEW + Invalid2DCompartmentUnitsInvalid value for the 'units' attribute of a + two-dimensional compartmentNNEEEEW Invalid3DCompartmentUnitsInvalid + value for the 'units' attribute of a three-dimensional + compartmentEEEEEEW InvalidCompartmentTypeRefInvalid value for the + 'compartmentType' attribute of a compartmentNNNEEEN + OneDimensionalCompartmentUnitsNo units defined for 1-D + compartmentNNNNNNW TwoDimensionalCompartmentUnitsNo units defined + for 2-D compartmentNNNNNNW ThreeDimensionalCompartmentUnitsNo units + defined for 3-D Compartment objectNNNNNNW + AllowedAttributesOnCompartmentInvalid attribute found on Compartment + objectNNNNNNE NoUnitsOnCompartmentNo units defined for Compartment + objectNNNNNNW InvalidSpeciesCompartmentRefInvalid value found for + Species 'compartment' attributeEEEEEEE + HasOnlySubsNoSpatialUnitsAttribute 'spatialSizeUnits' must not be set + if 'hasOnlySubstanceUnits'='true'NNEENNN + NoSpatialUnitsInZeroDAttribute 'spatialSizeUnits' must not be set if + the compartment is zero-dimensionalNNEENNN + NoConcentrationInZeroDAttribute 'initialConcentration' must not be + set if the compartment is zero-dimensionalNNEEEEN + SpatialUnitsInOneDInvalid value for 'spatialSizeUnits' attribute of + a one-dimensional compartmentNNEENNN SpatialUnitsInTwoDInvalid value + for the 'spatialSizeUnits' attribute of a two-dimensional + compartmentNNEENNN SpatialUnitsInThreeDInvalid value for the + 'spatialSizeUnits' attribute of a three-dimensional + compartmentNNEENNN InvalidSpeciesSusbstanceUnitsInvalid value for a + Species 'units' attributeEEEEEEW BothAmountAndConcentrationSetCannot + set both 'initialConcentration' and 'initialAmount' attributes + simultaneouslyNNEEEEE NonBoundarySpeciesAssignedAndUsedCannot use a + non-boundary species in both reactions and rules + simultaneouslyWWEEEEE NonConstantSpeciesUsedCannot use a constant, + non-boundary species as a reactant or productNNEEEEE + InvalidSpeciesTypeRefInvalid value for the 'speciesType' attribute of + a speciesNNNEEEN MultSpeciesSameTypeInCompartmentCannot have + multiple species of the same species type in the same + compartmentNNNEEEN MissingSpeciesCompartmentMissing value for the + 'compartment' attributeEEEEEEE SpatialSizeUnitsRemovedAttribute + 'spatialSizeUnits' is not supported in this Level+Version of + SBMLNNNNEEN SubstanceUnitsOnSpeciesNo substance units defined for + the speciesNNNNNNW ConversionFactorOnSpeciesInvalid value for the + 'conversionFactor' attributeNNNNNNE + AllowedAttributesOnSpeciesInvalid attribute found on Species + objectNNNNNNE InvalidParameterUnitsInvalid value for the 'units' + attribute of a Parameter objectEEEEEEW ParameterUnitsNo units + defined for the parameterNNNNNNW ConversionFactorMustConstantA + conversion factor must reference a Parameter object declared to be a + constantNNNNNNE AllowedAttributesOnParameterInvalid attribute found + on Parameter objectNNNNNNE InvalidInitAssignSymbolInvalid value for + the 'symbol' attribute of an InitialAssignment objectNNNEEEE + MultipleInitAssignmentsMultiple initial assignments for the same + 'symbol' value are not allowedNNNEEEE + InitAssignmentAndRuleForSameIdCannot set a value using both an + initial assignment and an assignment rule simultaneouslyNNNEEEE + OneMathElementPerInitialAssignAn InitialAssignment object must + contain one <math> elementNNNNNNE + AllowedAttributesOnInitialAssignInvalid attribute found on an + InitialAssignment objectNNNNNNE InvalidAssignRuleVariableInvalid + value for the 'variable' attribute of an AssignmentRule + objectEEEEEEE InvalidRateRuleVariableInvalid value for the + 'variable' attribute of a RateRule objectEEEEEEE + AssignmentToConstantEntityAn assignment rule cannot assign an entity + declared to be constantNNEEEEE RateRuleForConstantEntityA rate rule + cannot assign an entity declared to be constantNNEEEEE + CircularRuleDependencyCircular dependencies involving rules and + reactions are not permittedNNNEEEE OneMathElementPerRuleA rule object + must contain one <math> elementNNNNNNE + AllowedAttributesOnAssignRuleInvalid attribute found on an + AssignmentRule objectNNNNNNE AllowedAttributesOnRateRuleInvalid + attribute found on a RateRule objectNNNNNNE + AllowedAttributesOnAlgRuleInvalid attribute found on an AlgebraicRule + objectNNNNNNE ConstraintMathNotBooleanA Constraint object's <math> + must evaluate to a Boolean valueNNNEEEE + IncorrectOrderInConstraintSubobjects inside the Constraint object + are not in the prescribed orderNNNEEEN + ConstraintNotInXHTMLNamespaceA Constraint's Message subobject must be + in the XHTML XML namespaceNNNEEEN ConstraintContainsXMLDeclXML + declarations are not permitted within Constraint's Message + objectsNNNEEEE ConstraintContainsDOCTYPEXML DOCTYPE elements are not + permitted within Constraint's Message objectsNNNEEEE + InvalidConstraintContentInvalid content for a Constraint object's + Message objectNNNEEEN OneMathElementPerConstraintA Constraint object + must contain one <math> elementNNNNNNE + OneMessageElementPerConstraintA Constraint object must contain one + Message subobjectNNNNNNE AllowedAttributesOnConstraintInvalid + attribute found on Constraint objectNNNNNNE + NoReactantsOrProductsCannot have a reaction with neither reactants + nor productsEEEEEEE IncorrectOrderInReactionSubobjects inside the + Reaction object are not in the prescribed orderEEEEEEN + EmptyListInReactionReaction components, if present, cannot be + emptyEEEEEEE InvalidReactantsProductsListInvalid object found in the + list of reactants or productsEEEEEEE InvalidModifiersListInvalid + object found in the list of modifiersNNEEEEE + OneSubElementPerReactionA Reaction object can only contain one of + each allowed type of objectNNNNNNE CompartmentOnReactionInvalid + value for the Reaction 'compartment' attributeNNNNNNE + AllowedAttributesOnReactionInvalid attribute for a Reaction + objectNNNNNNE InvalidSpeciesReferenceInvalid 'species' attribute + value in SpeciesReference objectEEEEEEE BothStoichiometryAndMathThe + 'stoichiometry' attribute and StoichiometryMath subobject are + mutually exclusiveNNEEEEN AllowedAttributesOnSpeciesReferenceInvalid + attribute found on the SpeciesReference objectNNNNNNE + AllowedAttributesOnModifierInvalid attribute found on the + ModifierSpeciesReference objectNNNNNNE UndeclaredSpeciesRefUnknown + species referenced in the kinetic law <math> formulaWWEEEEE + IncorrectOrderInKineticLawIncorrect ordering of components in the + KineticLaw objectNNEEEEN EmptyListInKineticLawThe list of + parameters, if present, cannot be emptyEEEEEEE + NonConstantLocalParameterParameters local to a KineticLaw object must + have a 'constant' attribute value of 'true'NNWEEEN + SubsUnitsNoLongerValidAttribute 'substanceUnits' is not supported in + this Level+Version of SBMLNNNEEEN TimeUnitsNoLongerValidAttribute + 'timeUnits' is not supported in this Level+Version of SBMLNNNEEEN + OneListOfPerKineticLawOnly one ListOfLocalParameters object is + permitted within a KineticLaw objectNNNNNNE + OnlyLocalParamsInListOfLocalParamsOnly LocalParameter, Notes and + Annotation objects are allowed in ListOfLocalParameter + objectsNNNNNNE AllowedAttributesOnListOfLocalParamInvalid attribute + found on the ListOfLocalParameters objectNNNNNNE + OneMathPerKineticLawOnly one <math> element is allowed in a + KineticLaw objectNNEEEEE UndeclaredSpeciesInStoichMathUnknown + species referenced in the StoichiometryMath object's <math> + formulaNNWEEEN AllowedAttributesOnKineticLawInvalid attribute found + on the KineticLaw objectNNNNNNE + AllowedAttributesOnListOfSpeciesRefInvalid attribute found on the + ListOfSpeciesReferences objectNNNNNNE + AllowedAttributesOnListOfModsInvalid attribute found on the + ListOfModifiers objectNNNNNNE + AllowedAttributesOnLocalParameterInvalid attribute found on the + LocalParameter objectNNNNNNE MissingTriggerInEventThe Event object + is missing a Trigger subobjectNNEEEEE TriggerMathNotBooleanA Trigger + object's <math> expression must evaluate to a Boolean valueNNEEEEE + MissingEventAssignmentThe Event object is missing an EventAssignment + subobjectNNEEEEE TimeUnitsEventUnits referenced by 'timeUnits' + attribute are not compatible with units of timeNNEENNN + IncorrectOrderInEventIncorrect ordering of components in Event + objectNNEEEEN ValuesFromTriggerTimeNeedDelayAttribute + 'useValuesFromTriggerTime'='false', but the Event object does not + define a delayNNNNNEN DelayNeedsValuesFromTriggerTimeThe use of a + Delay object requires the Event attribute + 'useValuesFromTriggerTime'NNNNNNN OneMathPerTriggerA Trigger object + must have one <math> elementNNNNNNE OneMathPerDelayA Delay object + must have one <math> elementNNNNNNE + InvalidEventAssignmentVariableInvalid 'variable' attribute value in + Event objectNNEEEEE EventAssignmentForConstantEntityAn + EventAssignment object cannot assign to a component having attribute + 'constant'='true'NNWEEEE OneMathPerEventAssignmentAn EventAssignment + object must have one <math> elementNNNNNNE + AllowedAttributesOnEventAssignmentInvalid attribute found on the + EventAssignment objectNNNNNNE OnlyOneDelayPerEventAn Event object + can only have one Delay subobjectNNNNNNE + OneListOfEventAssignmentsPerEventAn Event object can only have one + ListOfEventAssignments subobjectNNNNNNE + OnlyEventAssignInListOfEventAssignOnly EventAssignment, Notes and + Annotation objects are allowed in ListOfEventAssignmentsNNNNNNE + AllowedAttributesOnListOfEventAssignInvalid attribute found on the + ListOfEventAssignments objectNNNNNNE AllowedAttributesOnEventInvalid + attribute found on the Event objectNNNNNNE + AllowedAttributesOnTriggerInvalid attribute found on the Trigger + objectNNNNNNE AllowedAttributesOnDelayInvalid attribute found on the + Delay objectNNNNNNE PersistentNotBooleanThe Trigger attribute + 'persistent' must evaluate to a Boolean valueNNNNNNE + InitialValueNotBooleanThe Trigger attribute 'initialValue' must + evaluate to a Boolean valueNNNNNNE OnlyOnePriorityPerEventAn Event + object can only have one Priority subobjectNNNNNNE + OneMathPerPriorityA Priority object must have one <math> + elementNNNNNNE AllowedAttributesOnPriorityInvalid attribute found on + the Priority objectNNNNNNE GeneralWarningNotSpecifiedUnknown + errorNNNNNNN CompartmentShouldHaveSizeIt's best to define a size for + every compartment in a modelNNWWWWW SpeciesShouldHaveValueIt's best + to define an initial amount or initial concentration for every + species in a modelNNWWWWW ParameterShouldHaveUnitsIt's best to + declare units for every parameter in a modelWWWWWWW + LocalParameterShadowsIdLocal parameters defined within a kinetic law + shadow global object symbolsWWWWWWW CannotConvertToL1V1Cannot + convert to SBML Level 1 Version 1NEEEEEE NoEventsInL1SBML Level 1 + does not support eventsNNEEEEE NoFunctionDefinitionsInL1SBML Level 1 + does not support function definitionsNNWWWWW NoConstraintsInL1SBML + Level 1 does not support constraintsNNNWWWW + NoInitialAssignmentsInL1SBML Level 1 does not support initial + assignmentsNNNWWWW NoSpeciesTypesInL1SBML Level 1 does not support + species typesNNNWWWN NoCompartmentTypeInL1SBML Level 1 does not + support compartment typesNNNWWWN NoNon3DCompartmentsInL1SBML Level 1 + only supports three-dimensional compartmentsNNEEEEE + NoFancyStoichiometryMathInL1SBML Level 1 does not support non-integer + nor non-rational stoichiometry formulasNNEEEEE + NoNonIntegerStoichiometryInL1SBML Level 1 does not support non- + integer 'stoichiometry' attribute valuesNNEEEEE + NoUnitMultipliersOrOffsetsInL1SBML Level 1 does not support + multipliers or offsets in unit definitionsNNEEEEE + SpeciesCompartmentRequiredInL1In SBML Level 1, a value for + 'compartment' is mandatory in species definitionsNNEEEEE + NoSpeciesSpatialSizeUnitsInL1SBML Level 1 does not support species + 'spatialSizeUnits' settingsNNEEEEN NoSBOTermsInL1SBML Level 1 does + not support the 'sboTerm' attributeNNNWWWW + StrictUnitsRequiredInL1SBML Level 1 requires strict unit + consistencyNNNNNWW ConversionFactorNotInL1SBML Level 1 does not + support the 'conversionFactor' attributeNNNNNNE + CompartmentNotOnL1ReactionSBML Level 1 does not support the + 'compartment' attribute on Reaction objectsNNNNNNW + ExtentUnitsNotSubstanceUnits of extent must be compatible with units + of substanceNNNNNNE GlobalUnitsNotDeclaredGlobal units must be refer + to unit kind or unitDefinition.NNNNNNE + HasOnlySubstanceUnitsNotinL1The concept of hasOnlySubstanceUnits was + not available in SBML Level 1.NNEEEEE AvogadroNotSupportedAvogadro + not supported in Levels 2 and 1.NNNNNNE NoConstraintsInL2v1SBML + Level 2 Version 1 does not support Constraint objectsNNNWWWW + NoInitialAssignmentsInL2v1SBML Level 2 Version 1 does not support + InitialAssignment objectsNNNWWWW NoSpeciesTypeInL2v1SBML Level 2 + Version 1 does not support SpeciesType objectsNNNWWWN + NoCompartmentTypeInL2v1SBML Level 2 Version 1 does not support + CompartmentType objectsNNNWWWN NoSBOTermsInL2v1SBML Level 2 Version 1 + does not support the 'sboTerm' attributeNNNWWWW + NoIdOnSpeciesReferenceInL2v1SBML Level 2 Version 1 does not support + the 'id' attribute on SpeciesReference objectsNNNWWWW + NoDelayedEventAssignmentInL2v1SBML Level 2 Version 1 does not support + the 'useValuesFromTriggerTime' attributeNNNNNEE + StrictUnitsRequiredInL2v1SBML Level 2 Version 1 requires strict unit + consistencyNNNNNWW IntegerSpatialDimensionsSBML Level 2 Version 1 + requires that compartments have spatial dimensions of 0-3NNNNNNE + StoichiometryMathNotYetSupportedConversion to StoichiometryMath + objects not yet supportedNNNNNNN PriorityLostFromL3SBML Level 2 + Version 1 does not support priorities on Event objectsNNNNNNE + NonPersistentNotSupportedSBML Level 2 Version 1 does not support the + 'persistent' attribute on Trigger objectsNNNNNNE + InitialValueFalseEventNotSupportedSBML Level 2 Version 1 does not + support the 'initialValue' attribute on Trigger objectsNNNNNNE + SBOTermNotUniversalInL2v2The 'sboTerm' attribute is invalid for this + component in SBML Level 2 Version 2NNNNWWW NoUnitOffsetInL2v2This + Level+Version of SBML does not support the 'offset' attribute on Unit + objectsNNENNNN NoKineticLawTimeUnitsInL2v2This Level+Version of SBML + does not support the 'timeUnits' attribute on KineticLaw + objectsEEENNNN NoKineticLawSubstanceUnitsInL2v2This Level+Version of + SBML does not support the 'substanceUnits' attribute on KineticLaw + objectsEEENNNN NoDelayedEventAssignmentInL2v2This Level+Version of + SBML does not support the 'useValuesFromTriggerTime' + attributeNNNNNEE ModelSBOBranchChangedBeyondL2v2The allowable + 'sboTerm' attribute values for Model objects differ for this SBML + Level+VersionNNNNNEE StrictUnitsRequiredInL2v2SBML Level 2 Version 2 + requires strict unit consistencyNNNNNWW StrictSBORequiredInL2v2SBML + Level 2 Version 2 requires strict SBO term consistencyNNNNNWW + DuplicateAnnotationInvalidInL2v2Duplicate top-level annotations are + invalid in SBML Level 2 Version 2WWWNNNN NoUnitOffsetInL2v3This + Level+Version of SBML does not support the 'offset' attribute on Unit + objectsNNENNNN NoKineticLawTimeUnitsInL2v3This Level+Version of SBML + does not support the 'timeUnits' attribute on KineticLaw + objectsEEENNNN NoKineticLawSubstanceUnitsInL2v3This Level+Version of + SBML does not support the 'substanceUnits' attribute on KineticLaw + objectsEEENNNN NoSpeciesSpatialSizeUnitsInL2v3This Level+Version of + SBML does not support the 'spatialSizeUnit' attribute on Species + objectsNNEENNN NoEventTimeUnitsInL2v3This Level+Version of SBML does + not support the 'timeUnits' attribute on Event objectsNNEENNN + NoDelayedEventAssignmentInL2v3This Level+Version of SBML does not + support the 'useValuesFromTriggerTime' attributeNNNNNEE + ModelSBOBranchChangedBeyondL2v3The allowable 'sboTerm' attribute + values for Model objects differ for this SBML Level+VersionNNNNNEE + StrictUnitsRequiredInL2v3SBML Level 2 Version 3 requires strict unit + consistencyNNNNNWW StrictSBORequiredInL2v3SBML Level 2 Version 3 + requires strict SBO term consistencyNNNNNWW + DuplicateAnnotationInvalidInL2v3Duplicate top-level annotations are + invalid in SBML Level 2 Version 3WWWNNNN NoUnitOffsetInL2v4This + Level+Version of SBML does not support the 'offset' attribute on Unit + objectsNNENNNN NoKineticLawTimeUnitsInL2v4This Level+Version of SBML + does not support the 'timeUnits' attribute on KineticLaw + objectsEEENNNN NoKineticLawSubstanceUnitsInL2v4This Level+Version of + SBML does not support the 'substanceUnits' attribute on KineticLaw + objectsEEENNNN NoSpeciesSpatialSizeUnitsInL2v4This Level+Version of + SBML does not support the 'spatialSizeUnit' attribute on Species + objectsNNEENNN NoEventTimeUnitsInL2v4This Level+Version of SBML does + not support the 'timeUnits' attribute on Event objectsNNEENNN + ModelSBOBranchChangedInL2v4The allowable 'sboTerm' attribute values + for Model objects differ for this SBML Level+VersionNNNEENN + DuplicateAnnotationInvalidInL2v4Duplicate top-level annotations are + invalid in SBML Level 2 Version 4WWWNNNN NoSpeciesTypeInL3v1SBML + Level 3 Version 1 does not support SpeciesType objectsNNNWWWN + NoCompartmentTypeInL3v1SBML Level 3 Version 1 does not support + CompartmentType objectsNNNWWWN NoUnitOffsetInL3v1This Level+Version + of SBML does not support the 'offset' attribute on Unit + objectsNNENNNN NoKineticLawTimeUnitsInL3v1This Level+Version of SBML + does not support the 'timeUnits' attribute on KineticLaw + objectsEEENNNN NoKineticLawSubstanceUnitsInL3v1This Level+Version of + SBML does not support the 'substanceUnits' attribute on KineticLaw + objectsEEENNNN NoSpeciesSpatialSizeUnitsInL3v1This Level+Version of + SBML does not support the 'spatialSizeUnit' attribute on Species + objectsNNEENNN NoEventTimeUnitsInL3v1This Level+Version of SBML does + not support the 'timeUnits' attribute on Event objectsNNEENNN + ModelSBOBranchChangedInL3v1The allowable 'sboTerm' attribute values + for Model objects differ for this SBML Level+VersionNNNEENN + DuplicateAnnotationInvalidInL3v1Duplicate top-level annotations are + invalid in SBML Level 3 Version 1WWWNNNN + NoCompartmentOutsideInL3v1This Level+Version of SBML does not + support the 'outside' attribute on Compartment objectsWWWWWWN + NoStoichiometryMathInL3v1This Level+Version of SBML does not support + the StoichiometryMath objectNNEEEEN InvalidSBMLLevelVersionUnknown + Level+Version combination of SBMLEEEEEEE + AnnotationNotesNotAllowedLevel1Annotation objects on the SBML + container element are not permitted in SBML Level 1EENNNNN + InvalidRuleOrderingInvalid ordering of rulesEEENNNN + RequiredPackagePresentThe SBML document requires an SBML Level 3 + package unavailable in this softwareNNNNNNE + UnrequiredPackagePresentThe SBML document uses an SBML Level 3 + package unavailable in this softwareNNNNNNW + PackageRequiredShouldBeFalseThis package expects required to be + false.NNNNNNW SubsUnitsAllowedInKLDisallowed value for attribute + 'substanceUnits' on KineticLaw objectEEENNNN + TimeUnitsAllowedInKLDisallowed value for attribute 'timeUnits' on + KineticLaw objectEEENNNN FormulaInLevel1KLOnly predefined functions + are allowed in SBML Level 1 formulasEENNNNN + L3SubstanceUnitsOnModelInvalid 'substanceUnits' attribute + valueNNNNNNW TimeUnitsRemovedThis Level+Version of SBML does not + support the 'timeUnits' attribute on Event objectsNNNNEEE + BadMathMLInvalid MathML expressionNNEEEEE + FailedMathMLReadOfDoubleMissing or invalid floating-point number in + MathML expressionNNEEEEE FailedMathMLReadOfIntegerMissing or invalid + integer in MathML expressionNNEEEEE + FailedMathMLReadOfExponentialMissing or invalid exponential + expression in MathMLNNEEEEE FailedMathMLReadOfRationalMissing or + invalid rational expression in MathMLNNEEEEE + BadMathMLNodeTypeInvalid MathML elementNNEEEEE + NoTimeSymbolInFunctionDefUse of <csymbol> for 'time' not allowed + within FunctionDefinition objectsNNWEEEE NoBodyInFunctionDefThere + must be a <lambda> body within the <math> element of a + FunctionDefinition objectNNEEEEE DanglingUnitSIdRefUnits must refer + to valid unit or unitDefinitionWWWWWWW RDFMissingAboutTagRDF missing + the <about> tag.NNNWWWW RDFEmptyAboutTagRDF empty <about> + tag.NNNWWWW RDFAboutTagNotMetaidRDF <about> tag is not + metaid.NNNWWWW RDFNotCompleteModelHistoryRDF does not contain valid + ModelHistory.NNNWWWW RDFNotModelHistoryRDF does not result in a + ModelHistory.NNNWWWW AnnotationNotElementAnnotation must contain + element.NNNWWWW UndeclaredUnitsMissing unit declarations on + parameters or literal numbers in expressionWWWWWWW + UndeclaredTimeUnitsL3Unable to verify consistency of units: the unit + of time has not been declaredNNNNNNW UndeclaredExtentUnitsL3Unable + to verify consistency of units: the units of reaction extent have + not been declaredNNNNNNW UndeclaredObjectUnitsL3Unable to verify + consistency of units: encountered a model entity with no declared + unitsNNNNNNW UnrecognisedSBOTermUnrecognized 'sboTerm' attribute + valueNNNWWWW ObseleteSBOTermObsolete 'sboTerm' attribute valueNNNWWWW + IncorrectCompartmentSpatialDimensionsIn SBML Level 1, only three- + dimensional compartments are allowedEENNNNN + CompartmentTypeNotValidAttributeCompartmentType objects are not + available in this Level+Version of SBMLEEENNNE + ConstantNotValidAttributeThis Level+Version of SBML does not support + the 'constant' attribute on this componentEENNNNN + MetaIdNotValidAttributeAttribute 'metaid' is not available in SBML + Level 1EENNNNN SBOTermNotValidAttributeBeforeL2V3The 'sboTerm' + attribute is not available on this component before SBML Level 2 + Version 3EEEENNN InvalidL1CompartmentUnitsInvalid units for a + compartment in SBML Level 1EENNNNN L1V1CompartmentVolumeReqdIn SBML + Level 1, a compartment's volume must be specifiedENNNNNN + CompartmentTypeNotValidComponentCompartmentType objects are not + available in this Level+Version of SBMLEEENNNE + ConstraintNotValidComponentConstraint objects are not available in + this Level+Version of SBMLEEENNNN EventNotValidComponentEvent + objects are not available in this Level+Version of SBMLEENNNNN + SBOTermNotValidAttributeBeforeL2V2The 'sboTerm' attribute is invalid + for this component before Level 2 Version 2EEENNNN + FuncDefNotValidComponentFunctionDefinition objects are not available + in this Level+Version of SBMLEENNNNN + InitialAssignNotValidComponentInitialAssignment objects are not + available in this Level+Version of SBMLEEENNNN + VariableNotValidAttributeAttribute 'variable' is not available on + this component in this Level+Version of SBMLEEEEEEE + UnitsNotValidAttributeAttribute 'units' is not available on this + component in this Level+Version of SBMLEEEEEEE + ConstantSpeciesNotValidAttributeAttribute 'constant' is not available + on Species objects in SBML Level 1EENNNNN + SpatialSizeUnitsNotValidAttributeAttribute 'spatialSizeUnits' is not + available on Species objects in SBML Level 1EENNNNN + SpeciesTypeNotValidAttributeAttribute 'speciesType' is not available + on Species objects in SBML Level 1EEENNNE + HasOnlySubsUnitsNotValidAttributeAttribute 'hasOnlySubstanceUnits' + is not available on Species objects in SBML Level 1EENNNNN + IdNotValidAttributeAttribute 'id' is not available on + SpeciesReference objects in SBML Level 1EEENNNN + NameNotValidAttributeAttribute 'name' is not available on + SpeciesReference objects in SBML Level 1EEENNNN + SpeciesTypeNotValidComponentThe SpeciesType object is not supported + in SBML Level 1EEENNNE StoichiometryMathNotValidComponentThe + StoichiometryMath object is not supported in SBML Level 1EENNNNE + MultiplierNotValidAttributeAttribute 'multiplier' on Unit objects is + not supported in SBML Level 1EENNNNN + OffsetNotValidAttributeAttribute 'offset' on Unit objects is only + available in SBML Level 2 Version 1EENNNNN + L3SpatialDimensionsUnsetNo value given for 'spatialDimensions' + attribute; assuming a value of 3NNNNNNW + PackageConversionNotSupportedConversion of SBML Level 3 package + constructs is not yet supportedEEEEEEE InvalidTargetLevelVersionThe + requested SBML Level/Version combination is not known to + existEEEEEEE L3NotSupportedSBML Level 3 is not yet supportedEEEEEEE + + <a class='anchor' name='SBMLErrorCategory_t'>Category codes + associated with SBMLError objects + ...................................................................... + + As discussed above, each SBMLError object contains a value for a + category identifier, describing the type of issue that the SBMLError + object represents. The category can be retrieved from an SBMLError + object using the method SBMLError.getCategory(). The following table + lists each possible value and a brief description of its meaning. + + As is the case with the error codes, in the libSBML Python language + interface, the category identifiers are currently implemented as + static integer constants defined in the interface class libsbml. + + The following table lists each possible value and a brief description + of its meaning. + + @~ + + <center> <table width='90' cellspacing='1' cellpadding='4' + border='0' class='text-table normal-font alt-row-colors'> <tr + style='background: lightgray' class='normal-font'> + <th>Enumerator</td> <th>Meaning</td> </tr> + <tr><td>libsbml.LIBSBML_CAT_SBML</td><td>General error not falling + into another category below.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBML_L1_COMPAT</td><td>Category of errors + that can only occur during attempted translation from one + Level/Version of SBML to another. This particular category applies + to errors encountered while trying to convert a model from SBML + Level 2 to SBML Level 1.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBML_L2V1_COMPAT</td><td>Category of + errors that can only occur during attempted translation from one + Level/Version of SBML to another. This particular category applies + to errors encountered while trying to convert a model to SBML Level + 2 Version 1.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBML_L2V2_COMPAT</td><td>Category of + errors that can only occur during attempted translation from one + Level/Version of SBML to another. This particular category applies + to errors encountered while trying to convert a model to SBML Level + 2 Version 2.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY</td><td>Category of + errors that can occur while validating general SBML constructs. With + respect to the SBML specification, these concern failures in applying + the validation rules numbered 2xxxx in the Level 2 Versions 2-4 and + Level 3 Version 1 specifications.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY</td><td>Category + of errors that can occur while validating symbol identifiers in a + model. With respect to the SBML specification, these concern + failures in applying the validation rules numbered 103xx in the + Level 2 Versions 2-4 and Level 3 Version 1 specifications.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_UNITS_CONSISTENCY</td><td>Category of + errors that can occur while validating the units of measurement on + quantities in a model. With respect to the SBML specification, these + concern failures in applying the validation rules numbered 105xx in + the Level 2 Versions 2-4 and Level 3 Version 1 + specifications.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_MATHML_CONSISTENCY</td><td>Category of + errors that can occur while validating MathML formulas in a model. + With respect to the SBML specification, these concern failures in + applying the validation rules numbered 102xx in the Level 2 Versions + 2-4 and Level 3 Version 1 specifications.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBO_CONSISTENCY</td><td>Category of + errors that can occur while validating SBO identifiers in a model. + With respect to the SBML specification, these concern failures in + applying the validation rules numbered 107xx in the Level 2 Versions + 2-4 and Level 3 Version 1 specifications.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL</td><td>Error in the + system of equations in the model: the system is overdetermined, + therefore violating a tenet of proper SBML. With respect to the SBML + specification, this is validation rule #10601 in the SBML Level 2 + Versions 2-4 and Level 3 Version 1 specifications.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBML_L2V3_COMPAT</td><td>Category of + errors that can only occur during attempted translation from one + Level/Version of SBML to another. This particular category applies + to errors encountered while trying to convert a model to SBML Level + 2 Version 3.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_MODELING_PRACTICE</td><td>Category of + warnings about recommended good practices involving SBML and + computational modeling. (These are tests performed by libSBML and do + not have equivalent SBML validation rules.)</td></tr> + <tr><td>libsbml.LIBSBML_CAT_INTERNAL_CONSISTENCY</td><td>Category of + errors that can occur while validating libSBML's internal + representation of SBML constructs. (These are tests performed by + libSBML and do not have equivalent SBML validation rules.)</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBML_L2V4_COMPAT</td><td>Category of + errors that can only occur during attempted translation from one + Level/Version of SBML to another. This particular category applies + to errors encountered while trying to convert a model to SBML Level + 2 Version 4.</td></tr> + <tr><td>libsbml.LIBSBML_CAT_SBML_L3V1_COMPAT</td><td>Category of + errors that can only occur during attempted translation from one + Level/Version of SBML to another. This particular category applies + to errors encountered while trying to convert a model to SBML Level + 3 Version 1.</td></tr> + + </table> </center> + + <a class='anchor' name='SBMLErrorSeverity_t'>Severity codes + associated with SBMLError objects + ...................................................................... + + In libSBML version 5.8.1 there are no additional severity codes + beyond those defined by XMLError. They are implemented as static + integer constants defined in the interface class libsbml, and have + names beginning with LIBSBML_SEV_. @~ +"; + + +%feature("docstring") SBMLError::SBMLError " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLError(SBMLError orig) + + Copy constructor; creates a copy of this SBMLError. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLError( const long errorId = 0 , const long level = + SBML_DEFAULT_LEVEL , const long version = SBML_DEFAULT_VERSION , + string details = '' , const long line = 0 , const long column + = 0 , const long severity = LIBSBML_SEV_ERROR , const long category = + LIBSBML_CAT_SBML , string package = 'core' , const long pkgVersion = + 1 ) + + Creates a new SBMLError to report that something occurred during SBML + processing. + + When a libSBML operation on SBML content results in a warning, error + or other diagnostic, the issue is reported as an SBMLError object. + SBMLError objects have identification numbers to indicate the nature + of the exception. These numbers are defined as longeger constants + in the interface class libsbml. See the top of this documentation + page for a table listing the possible values and their meanings. @~ + The argument 'errorId' to this constructor can be (but does not + have to be) a value from this set of constants. If it is one of the + predefined error identifiers, the SBMLError class assumes the error + is a low-level system or SBML layer error and prepends a built-in, + predefined error message to any string passed in the argument + 'details' to this constructor. In addition, all the predefined + error identifiers have associated values for the 'severity' and + 'category' codes, and these fields are filled-in using the libSBML + defaults for each different error identifier. @~ + + If the error identifier 'errorId' is a number greater than 99999, the + SBMLError class assumes the error was generated from another part of + the software and does not do additional filling in of values beyond + the default in the constructor itself. This allows SBMLError to + serve as a base class for other errors, such as for user-defined + validation rules (see Validator). Callers should fill in all the + parameters with suitable values if generating errors with codes + greater than 99999 to make maximum use of the SBMLError facilities. + + As mentioned above, there are additional constants defined for + standard severity and standard category codes, and every predefined + error in libSBML has an associated value for severity and category + taken from these predefined sets. These constants have symbol names + prefixed with LIBSBML_SEV_ and LIBSBML_CAT_, respectively. If the + value of 'errorId' is one of the standard error codes, callers do + not need to fill in 'severity' and 'category' in a call to this + constructor. Conversely, if 'errorId' is not an existing SBML-level + error code, callers can use other values for 'severity' and + 'category'. @~ + + Please see the top of the documentation for SBMLError for a longer + discussion of the possible error codes, their meanings, and their + applicability to different combinations of Level+Version of SBML. + + Parameter 'errorId' is a long integer, the identification number of + the error. + + Parameter 'level' is the SBML Level of the SBML model + + Parameter 'version' is the SBML Version within the Level of the SBML + model + + Parameter 'details' is a string containing additional details about + the error. If the error code in 'errorId' is one that is recognized + by SBMLError, the given message is appended to a predefined message + associated with the given code. If the error code is not + recognized, the message is stored as-is as the text of the error. + + Parameter 'line' is a long integer, the line number at which the + error occured. + + Parameter 'column' is a long integer, the column number at which the + error occured. + + Parameter 'severity' is an integer indicating severity of the error. + + Parameter 'category' is an integer indicating the category to which + the error belongs. + + Parameter 'package' is the SBML Level package involved. + + Parameter 'pkgVersion' is the version of the 'package'. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") CVTerm " + @ingroup Core Representation of MIRIAM-compliant controlled + vocabulary annotation. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The SBML Level 2 and Level 3 specifications define a simple format + for annotating models when (a) referring to controlled vocabulary + terms and database identifiers that define and describe biological + and biochemical entities, and (b) describing the creator of a model + and the model's modification history. This SBML format is a + concrete syntax that conforms to the guidelines of MIRIAM ('Minimum + Information Requested in the Annotation of biochemical Models', + Nature Biotechnology, vol. 23, no. 12, Dec. 2005). The format uses + a subset of W3C RDF (Resource Description Format). In order to help + application developers work with annotations in this format, libSBML + provides several helper classes that provide higher-level interfaces + to the data elements; these classes include CVTerm, ModelCreator, + ModelHistory, RDFAnnotationParser, and Date. + + Components of an SBML annotation + ====================================================================== + + The SBML annotation format consists of RDF-based content placed + inside an <annotation> element attached to an SBML component such + as Species, Compartment, etc. The following template illustrates + the different parts of SBML annotations in XML form: + + <<span style=\'background-color: #bbb\'>SBML_ELEMENT</span> <span style=\'background-color: #d0eed0\'>+++</span> metaid=\"<span style=\'border-bottom: 1px solid black\'>meta id</span>\" <span style=\'background-color: #d0eed0\'>+++</span>> + <span style=\'background-color: #d0eed0\'>+++</span> + <annotation> + <span style=\'background-color: #d0eed0\'>+++</span> + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterm=\'http://purl.org/dc/terms/\' + xmlns:vcard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' + xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' + xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > + <rdf:Description rdf:about=\"#<span style=\'border-bottom: 1px solid black\'>meta id</span>\"> + <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> + <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <rdf:Bag> + <rdf:li rdf:resource=\"<span style=\'background-color: #d0d0ee\'>URI</span>\" /> + <span style=\'background-color: #edd\'>...</span> + </rdf:Bag> + </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <span style=\'background-color: #edd\'>...</span> + </rdf:Description> + <span style=\'background-color: #d0eed0\'>+++</span> + </rdf:RDF> + <span style=\'background-color: #d0eed0\'>+++</span> + </annotation> + <span style=\'background-color: #d0eed0\'>+++</span> + </<span style=\'background-color: #bbb\'>SBML_ELEMENT</span>> + + In the template above, the placeholder SBML_ELEMENT stands for the + XML tag name of an SBML model component (e.g., model, reaction, + etc.) and the placeholder meta id stands for the element's meta + identifier, which is a field available on all SBML components + derived from the SBase base object class. The dotted portions are + optional, the symbol +++ is a placeholder for either no content or + valid XML content that is not defined by this annotation scheme, and + the ellipses ... are placeholders for zero or more elements of the + same form as the immediately preceding element. The optional + content HISTORY is a creation and modification history; in libSBML, + this is stored using ModelHistory objects. + + The placeholder RELATION_ELEMENT refers to a BioModels.net qualifier + element name. This is an element in either the XML namespace + 'http://biomodels.net/model-qualifiers' (for model qualifiers) or + 'http://biomodels.net/biology-qualifiers' (for biological + qualifier). Note that these namespace URIs are only labels, and not + actual Web locations, which means you cannot visit an address such + as 'http://biomodels.net/model-qualifiers' in your browser or try to + have your application access it. Refer instead to the enumerations + #ModelQualifierType_t and #BiolQualifierType_t for a list of the + available relationship elements that can be used for + RELATION_ELEMENT. + + The URI is a required data value that uniquely identifies a resource + and data within that resource to which the annotation refers. + Again, being URIs, these do not refer to physical Web locations; + nevertheless, applications will often want a means of finding the + resource to which a given URI refers. Providing the facilities for + this task is the purpose of MIRIAM Resources, described in detail + online at http://biomodels.net/miriam) and also in the paper 'MIRIAM + Resources: tools to generate and resolve robust cross-references in + Systems Biology', BMC Systems Biology, 58(1), 2007. + + The relation-resource pairs above are the 'controlled vocabulary' + terms that which CVTerm is designed to store and manipulate. The + next section describes these parts in more detail. For more + information about SBML annotations in general, please refer to + Section 6 in the SBML Level 2 (Versions 2-4) or Level 3 + specification documents. + + The parts of a CVTerm + ====================================================================== + + Annotations that refer to controlled vocabularies are managed in + libSBML using CVTerm objects. A set of RDF-based annotations + attached to a given SBML <annotation> element are read by + RDFAnnotationParser and converted into a list of these CVTerm + objects. Each CVTerm object instance stores the following components + of an annotation: + + + * The qualifier, which can be a BioModels.net 'biological + qualifier', a BioModels.net 'model qualifier', or an unknown + qualifier (as far as the CVTerm class is concerned). Qualifiers are + used in MIRIAM to indicate the nature of the relationship between + the object being annotated and the resource. In CVTerm, the + qualifiers can be manipulated using the methods + CVTerm.getQualifierType(), CVTerm.setQualifierType(), and related + methods. + + * The resource, represented by a URI (which, we must remind + developers, is not the same as a URL). In the CVTerm class, the + resource component can be manipulated using the methods + CVTerm.addResource() and CVTerm.removeResource(). + + Note that a CVTerm contains a single qualifier, but possibly more + than one resource. This corresponds to the possibility of an + annotation that points to multiple resources, all of which are + qualified by the same BioModels.net qualifier. The CVTerm object + class supports this by supporting a list of resources. + + Detailed explanations of the qualifiers defined by BioModels.net can + be found at http://biomodels.net/qualifiers. +"; + + +%feature("docstring") CVTerm::CVTerm " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + CVTerm(CVTerm orig) + + Copy constructor; creates a copy of a CVTerm object. + + Parameter 'orig' is the CVTerm instance to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + CVTerm(const XMLNode node) + + Creates a new CVTerm from the given XMLNode. + + The SBML Level 2 and Level 3 specifications define a simple format + for annotating models when (a) referring to controlled vocabulary + terms and database identifiers that define and describe biological + and other entities, and (b) describing the creator of a model and + the model's modification history. The annotation content is stored + in <annotation> elements attached to individual SBML elements. The + format for storing the content inside SBML <annotation> elements is + a subset of W3C RDF (Resource Description Format) expressed in XML. + The CVTerm class provides a programming interface for working + directly with controlled vocabulary term ('CV term') objects without + having to deal directly with the XML form. When libSBML reads in an + SBML model containing RDF annotations, it parses those annotations + into a list of CVTerm objects, and when writing a model, it parses + the CVTerm objects back into the appropriate SBML <annotation> + structure. + + This method creates a CVTerm object from the XMLNode object 'node'. + Recall that XMLNode is a node in an XML tree of elements, and each + such element can be placed in a namespace. This constructor looks + for the element to be in the XML namespaces 'http://biomodels.net + /model-qualifiers' (for model qualifiers) and 'http://biomodels.net + /biology-qualifiers' (for biological qualifier), and if they are, + creates CVTerm objects for the result. + + Parameter 'node' is an XMLNode representing a CVTerm. + + Note: + + This method assumes that the given XMLNode object 'node' is of the + correct structural form. + + ______________________________________________________________________ + Method variant with the following signature: + + CVTerm(QualifierType_t type = UNKNOWN_QUALIFIER) + + Creates an empty CVTerm, optionally with the given qualifier@~ + 'type'. + + The SBML Level 2 and Level 3 specifications define a simple format + for annotating models when (a) referring to controlled vocabulary + terms and database identifiers that define and describe biological + and other entities, and (b) describing the creator of a model and + the model's modification history. The annotation content is stored + in <annotation> elements attached to individual SBML elements. The + format for storing the content inside SBML <annotation> elements is + a subset of W3C RDF (Resource Description Format) expressed in XML. + The CVTerm class provides a programming interface for working + directly with controlled vocabulary term ('CV term') objects without + having to deal directly with the XML form. When libSBML reads in an + SBML model containing RDF annotations, it parses those annotations + into a list of CVTerm objects, and when writing a model, it parses + the CVTerm objects back into the appropriate SBML <annotation> + structure. + + This method creates an empty CVTerm object. The possible qualifier + types usable as values of 'type' are libsbml.MODEL_QUALIFIER and + libsbml.BIOLOGICAL_QUALIFIER. If an explicit value for 'type' is + not given, this method defaults to using libsbml.UNKNOWN_QUALIFIER. + The qualifier type@~ can be set later using the + CVTerm.setQualifierType() method. + + Different BioModels.net qualifier elements encode different types of + relationships. Please refer to the SBML specification or the + BioModels.net qualifiers web page for an explanation of the meaning + of these different qualifiers. + + Parameter 'type' is a qualifier type@~ + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ +"; + + +%feature("docstring") CVTerm::clone " + Creates and returns a deep copy of this CVTerm object. + + Returns a (deep) copy of this CVTerm. +"; + + +%feature("docstring") CVTerm::getQualifierType " + Returns the qualifier type of this CVTerm object. + + The RDF element used in the SBML format for referring to external + entities is <rdf:Description>, with a <rdf:Bag> element inside of it + containing one or more <rdf:li> elements. The following template + illustrates the structure: + + <rdf:Description rdf:about=\"#meta id\"> HISTORY + <RELATION_ELEMENT> <rdf:Bag> <rdf:li + rdf:resource=\"resource URI\" /> ... </rdf:Bag> + </RELATION_ELEMENT> ... </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. + + The placeholder RELATION_ELEMENT refers to a BioModels.net + qualifier element name. This is an element in either the XML + namespace 'http://biomodels.net/model-qualifiers' (for model + qualifiers) or 'http://biomodels.net/biology-qualifiers' (for + biological qualifier). The present method returns a code + identifying which one of these two relationship namespaces is being + used; any other qualifier in libSBML is considered unknown (as far as + the CVTerm class is concerned). Consequently, this method will + return one of the following values: + + * libsbml.MODEL_QUALIFIER + + * libsbml.BIOLOGICAL_QUALIFIER + + * libsbml.UNKNOWN_QUALIFIER + + The specific relationship of this CVTerm to the enclosing SBML object + can be determined using the CVTerm methods such as + getModelQualifierType() and getBiologicalQualifierType(). Callers + will typically want to use the present method to find out which one + of the other two methods to call to find out the specific + relationship. + + Returns the qualifier type@~ of this object or + libsbml.UNKNOWN_QUALIFIER (the default). + + See also getResources(), getModelQualifierType(), + getBiologicalQualifierType(). +"; + + +%feature("docstring") CVTerm::getModelQualifierType " + Returns the model qualifier type of this CVTerm object. + + The RDF element used in the SBML format for referring to external + entities is <rdf:Description>, with a <rdf:Bag> element inside of it + containing one or more <rdf:li> elements. The following template + illustrates the structure: + + <rdf:Description rdf:about=\"#meta id\"> HISTORY + <RELATION_ELEMENT> <rdf:Bag> <rdf:li + rdf:resource=\"resource URI\" /> ... </rdf:Bag> + </RELATION_ELEMENT> ... </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. + + The placeholder RELATION_ELEMENT refers to a BioModels.net + qualifier element name. This is an element in either the XML + namespace 'http://biomodels.net/model-qualifiers' (for model + qualifiers) or 'http://biomodels.net/biology-qualifiers' (for + biological qualifier). Callers will typically use + getQualifierType() to find out the type of qualifier relevant to this + particular CVTerm object, then if it is a model qualifier, use the + present method to determine the specific qualifier. + + Annotations with model qualifiers express a relationship between an + annotation resource and the modeling concept represented by a given + object in the model. The diagram below illustrates the relationship + in this case: + + ‰PNG + + The set of known model qualifiers is, at the time of this libSBML + release, the following: + + * libsbml.BQM_IS + + * libsbml.BQM_IS_DESCRIBED_BY + + * libsbml.BQM_IS_DERIVED_FROM + + Any other BioModels.net qualifier found in the model is considered + unknown by libSBML and reported as libsbml.BQM_UNKNOWN. + + Returns the model qualifier type@~ of this object or + libsbml.BQM_UNKNOWN (the default). +"; + + +%feature("docstring") CVTerm::getBiologicalQualifierType " + Returns the biological qualifier type of this CVTerm object. + + The RDF element used in the SBML format for referring to external + entities is <rdf:Description>, with a <rdf:Bag> element inside of it + containing one or more <rdf:li> elements. The following template + illustrates the structure: + + <rdf:Description rdf:about=\"#meta id\"> HISTORY + <RELATION_ELEMENT> <rdf:Bag> <rdf:li + rdf:resource=\"resource URI\" /> ... </rdf:Bag> + </RELATION_ELEMENT> ... </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. + + The placeholder RELATION_ELEMENT refers to a BioModels.net + qualifier element name. This is an element in either the XML + namespace 'http://biomodels.net/model-qualifiers' (for model + qualifiers) or 'http://biomodels.net/biology-qualifiers' (for + biological qualifier). Callers will typically use + getQualifierType() to find out the type of qualifier relevant to this + particular CVTerm object, then if it is a biological qualifier, use + the present method to determine the specific qualifier. + + Annotations with biological qualifiers express a relationship between + an annotation resource and the biological concept represented by a + given object in the model. The diagram below illustrates the + relationship in this case: + + ‰PNG + + The set of known biological qualifiers is, at the time of this + libSBML release, the following: + + * libsbml.BQB_IS + + * libsbml.BQB_HAS_PART + + * libsbml.BQB_IS_PART_OF + + * libsbml.BQB_IS_VERSION_OF + + * libsbml.BQB_HAS_VERSION + + * libsbml.BQB_IS_HOMOLOG_TO + + * libsbml.BQB_IS_DESCRIBED_BY + + * libsbml.BQB_IS_ENCODED_BY + + * libsbml.BQB_ENCODES + + * libsbml.BQB_OCCURS_IN + + * libsbml.BQB_HAS_PROPERTY + + * libsbml.BQB_IS_PROPERTY_OF + + Any other BioModels.net qualifier found in the model is considered + unknown by libSBML and reported as libsbml.BQB_UNKNOWN. + + Returns the biology qualifier type@~ of this object or + libsbml.BQB_UNKNOWN (the default). +"; + + +%feature("docstring") CVTerm::getResources " + Returns the resource references for this CVTerm object. + + The RDF element used in the SBML format for referring to external + entities is <rdf:Description>, with a <rdf:Bag> element inside of it + containing one or more <rdf:li> elements. The following template + illustrates the structure: + + <rdf:Description rdf:about=\"#meta id\"> HISTORY + <RELATION_ELEMENT> <rdf:Bag> <rdf:li + rdf:resource=\"resource URI\" /> ... </rdf:Bag> + </RELATION_ELEMENT> ... </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. + + The resource URI values shown in the template above are stored + internally in CVTerm objects using an XMLAttributes object. Each + attribute stored inside the XMLAttributes will have the same name + (specifically, \"rdf:resource\") but a different value, and the + value will be a resource URI shown in the XML template above. + + A valid CVTerm entity must always have at least one resource and a + value for the relationship qualifier. + + Returns the XMLAttributes that store the resources of this CVTerm. + + See also getQualifierType(), addResource(), getResourceURI(). +"; + + +%feature("docstring") CVTerm::getNumResources " + Returns the number of resources for this CVTerm object. + + The RDF element used in the SBML format for referring to external + entities is <rdf:Description>, with a <rdf:Bag> element inside of it + containing one or more <rdf:li> elements. The following template + illustrates the structure: + + <rdf:Description rdf:about=\"#meta id\"> HISTORY + <RELATION_ELEMENT> <rdf:Bag> <rdf:li + rdf:resource=\"resource URI\" /> ... </rdf:Bag> + </RELATION_ELEMENT> ... </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. + + The fragment above illustrates that there can be more than one + resource referenced by a given relationship annotation (i.e., the + resource URI values associated with a particular RELATION_ELEMENT). + The present method returns a count of the resources stored in this + CVTerm object. + + Returns the number of resources in the set of XMLAttributes of this + CVTerm. + + See also getResources(), getResourceURI(). +"; + + +%feature("docstring") CVTerm::getResourceURI " + Returns the value of the nth resource for this CVTerm object. + + The RDF element used in the SBML format for referring to external + entities is <rdf:Description>, with a <rdf:Bag> element inside of it + containing one or more <rdf:li> elements. The following template + illustrates the structure: + + <rdf:Description rdf:about=\"#meta id\"> HISTORY + <RELATION_ELEMENT> <rdf:Bag> <rdf:li + rdf:resource=\"resource URI\" /> ... </rdf:Bag> + </RELATION_ELEMENT> ... </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. + + The fragment above illustrates that there can be more than one + resource referenced by a given relationship annotation (i.e., the + resource URI values associated with a particular RELATION_ELEMENT). + LibSBML stores all resource URIs in a single CVTerm object for a + given relationship. Callers can use getNumResources() to find out + how many resources are stored in this CVTerm object, then call this + method to retrieve the nth resource URI. + + Parameter 'n' is the index of the resource to query + + Returns string representing the value of the nth resource in the set + of XMLAttributes of this CVTerm. + + See also getNumResources(), getQualifierType(). +"; + + +%feature("docstring") CVTerm::setQualifierType " + Sets the qualifier code@~ of this CVTerm object. + + Parameter 'type' is the qualifier type. The possible values returned + by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also getQualifierType(). +"; + + +%feature("docstring") CVTerm::setModelQualifierType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setModelQualifierType(string qualifier) + + Sets the @~ value of this CVTerm object. + + Parameter 'qualifier' is the string representing a model qualifier + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + If the Qualifier Type of this object is not libsbml.MODEL_QUALIFIER, + then the ModelQualifierType_t value will default to + libsbml.BQM_UNKNOWN. + + See also getQualifierType(), setQualifierType(), getQualifierType(), + setQualifierType(). +"; + + +%feature("docstring") CVTerm::setBiologicalQualifierType " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + setBiologicalQualifierType(string qualifier) + + Sets the @~ of this CVTerm object. + + Parameter 'qualifier' is the string representing a biology qualifier + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + Note: + + If the Qualifier Type of this object is not + libsbml.BIOLOGICAL_QUALIFIER, then the @~ value will default to + libsbml.BQB_UNKNOWN. + + See also getQualifierType(), setQualifierType(), getQualifierType(), + setQualifierType(). +"; + + +%feature("docstring") CVTerm::addResource " + Adds a resource reference to this CVTerm object. + + The SBML Level 2 and Level 3 specifications define a simple + standardized format for annotating models with references to + controlled vocabulary terms and database identifiers that define and + describe biological or other entities. This annotation format + consists of RDF-based content placed inside an <annotation> element + attached to an SBML component such as Species, Compartment, etc. + + The specific RDF element used in this SBML format for referring to + external entities is <rdf:Description>, with a <rdf:Bag> element + containing one or more <rdf:li> elements. Each such element refers + to a data item in an external resource; the resource and data item + are together identified uniquely using a URI. The following + template illustrates the structure: + + <rdf:Description rdf:about=\"#<span style=\'border-bottom: 1px solid black\'>meta id</span>\"> + <span style=\'background-color: #e0e0e0; border-bottom: 2px dotted #888\'>HISTORY</span> + <<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <rdf:Bag> + <rdf:li rdf:resource=\"<span style=\'background-color: #d0d0ee\'>resource URI</span>\" /> + <span style=\'background-color: #edd\'>...</span> + </rdf:Bag> + </<span style=\'background-color: #bbb\'>RELATION_ELEMENT</span>> + <span style=\'background-color: #edd\'>...</span> + </rdf:Description> + + In the template above, the placeholder meta id stands for the + element's meta identifier, which is a field available on all SBML + components derived from the SBase base object class. The dotted + portions are optional, and the ellipses ... are placeholders for + zero or more elements of the same form as the immediately preceding + element. The placeholder RELATION_ELEMENT refers to a + BioModels.net qualifier element name. This is an element in either + the XML namespace 'http://biomodels.net/model-qualifiers' (for model + qualifiers) or 'http://biomodels.net/biology-qualifiers' (for + biological qualifier). + + The resource URI is a required data value that uniquely identifies a + resource and data within that resource to which the annotation + refers. The present method allows callers to add a reference to a + resource URI with the same relationship to the enclosing SBML + object. (In other words, the argument to this method is a resource + URI as shown in the XML fragment above.) Resources are stored in + this CVTerm object within an XMLAttributes object. + + The relationship of this CVTerm to the enclosing SBML object can be + determined using the CVTerm methods such as getModelQualifierType() + and getBiologicalQualifierType(). + + Parameter 'resource' is a string representing the URI of the resource + and data item being referenced; e.g., + 'http://www.geneontology.org/#GO:0005892'. + + Returns integer value indicating success/failure of the call. The + possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also getResources(), removeResource(), getQualifierType(), + getModelQualifierType(), getBiologicalQualifierType(). +"; + + +%feature("docstring") CVTerm::removeResource " + Removes a resource URI from the set of resources stored in this + CVTerm object. + + Parameter 'resource' is a string representing the resource URI to + remove; e.g., 'http://www.geneontology.org/#GO:0005892'. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE + + See also addResource(). +"; + + +%feature("docstring") CVTerm::hasRequiredAttributes " + Predicate returning True if all the required elements for this + CVTerm object have been set. + + Note: + + The required attributes for a CVTerm are: + + * a qualifier type, which can be either a model qualifier or a + biological qualifier + + * at least one resource +"; + + +%feature("docstring") CVTerm::hasBeenModified " + Internal implementation method. +"; + + +%feature("docstring") CVTerm::resetModifiedFlags " + Internal implementation method. +"; + + +%feature("docstring") Date " + @ingroup Core Representation of MIRIAM-compliant dates used in + ModelHistory. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + A Date object stores a reasonably complete representation of date and + time. Its purpose is to serve as a way to store dates to be read and + written in the W3C date format used in RDF Dublin Core annotations + within SBML. The W3C date format is a restricted form of ISO 8601, + the international standard for the representation of dates and + times. A time and date value in this W3C format takes the form + YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., 1997-07-16T19:20:30+01:00) where + XHH:ZZ is the time zone offset. The libSBML Date object contains + the following fields to represent these values: + + + * year: a long integer representing the year. This should be a + four-digit number such as 2011. + + * month: a long integer representing the month, with a range of + values of 1-12. The value 1 represents January, and so on. + + * day: a long integer representing the day of the month, with a + range of values of 1-31. + + * hour: a long integer representing the hour on a 24-hour clock, + with a range of values of 0-23. + + * minute: a long integer representing the minute, with a range of + 0-59. + + * second: a long integer representing the second, with a range of + 0-59. + + * sign: a long integer representing the sign of the offset (0 + signifying + and 1 signifying -). See the paragraph below for + further explanations. + + * hours offset: a long integer representing the time zone's hour + offset from GMT. + + * minute offset: a long integer representing the time zone's minute + offset from GMT. + + To illustrate the time zone offset, a value of -05:00 would + correspond to USA Eastern Standard Time. In the Date object, this + would require a value of 1 for the sign field, 5 for the hour offset + and 0 for the minutes offset. + + In the restricted RDF annotations used in SBML, described in Section + 6 of the SBML Level 2 and Level 3 specification documents, date/time + stamps can be used to indicate the time of creation and modification + of a model. The following SBML model fragment illustrates this: + + <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> + <annotation> + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterms=\'http://purl.org/dc/terms/\' + xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > + <rdf:Description rdf:about=\'#_180340\'> + <dc:creator> + <rdf:Bag> + <rdf:li rdf:parseType=\'Resource\'> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family>Shapiro</vCard:Family> + <vCard:Given>Bruce</vCard:Given> + </vCard:N> + <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> + </vCard:ORG> + </rdf:li> + </rdf:Bag> + </dc:creator> + <dcterms:created rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> + </dcterms:created> + <dcterms:modified rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> + </dcterms:modified> + </rdf:Description> + </rdf:RDF> + </annotation> + </model> +"; + + +%feature("docstring") Date::Date " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + Date(string date) + + Creates a Date object from a string expressing a date and time value. + + This constructor expects its argument to be in the W3C date format + with time zone offset, used in RDF Dublin Core annotations within + SBML. This format expresses a date and time value as a string of the + form YYYY-MM-DDThh:mm:ssXHH:ZZ, where + + + * YYYY is a four-digit integer representing the year. This + should be a four-digit number such as 2011. + + * MM is a two-digit integer representing the month, with a range of + values of 01-12. The value 1 represents January, and so on. + + * DD is a two-digit integer representing the day of the month, with + a range of values of 01-31. + + * hh is a two-digit integer representing the hour on a 24-hour + clock, with a range of values of 00-23. + + * mm is a two-digit integer representing the minute, with a range + of 00-59. + + * ss is a two-digit integer representing the second, with a range + of 0-59. + + * X is the the sign of the time zone offset, either + or -. + + * HH is a two-digit integer representing the hour of the time zone + offset, with a range of 00-23. + + * ZZ is a two-digit integer representing the minutes of the time + zone offset, with a range of 00-59. + + In the string format above, it is important not to forget the + literal character T in the string. Here is an example date/time + string: 1997-07-16T19:20:30+01:00, which would represent July 16, + 1997, at 19:20:30 in Central European Time (which is UTC +1:00). + + If this constructor is given a None argument or a string of length + zero, it constructs a Date object with the value of January 1, 2000, + at time 00:00 UTC. Otherwise, the argument must be in the complete + format described above, or unpredictable results will happen. + + Parameter 'date' is a string representing the date. + + ______________________________________________________________________ + Method variant with the following signature: + + Date(long year = 2000, long month = 1, long day = 1, long hour = + 0, long minute = 0, long second = 0, long sign = 0, long hoursOffset + = 0, long minutesOffset = 0) + + Creates a time and date representation for use in model annotations + and elsewhere. + + The following is the complete set of possible arguments to this + constructor, with default values as indicated: + + Parameter 'year' is a long integereger representing the year. This + should be a four-digit number such as 2011. (Default value used if + this argument is not given: 2000.) + + Parameter 'month' is a long integereger representing the month, with + a range of values of 1-12. The value 1 represents January, and so + on. (Default value used if this argument is not given: 1.) + + Parameter 'day' is a long integereger representing the day of the + month, with a range of values of 1-31. (Default value used if this + argument is not given: 1.) + + Parameter 'hour' is a long integereger representing the hour on a + 24-hour clock, with a range of values of 0-23. (Default value used + if this argument is not given: 0.) + + Parameter 'minute' is a long integereger representing the minute, + with a range of 0-59. (Default value used if this argument is not + given: 0.) + + Parameter 'second' is a long integereger representing the second, + with a range of 0-59. (Default value used if this argument is not + given: 0.) + + Parameter 'sign' is a long integereger representing the sign of the + offset (0 signifying + and 1 signifying -). See the paragraph + below for further explanations. (Default value used if this argument + is not given: 0.) + + Parameter 'hoursOffset' is a long integereger representing the time + zone's hour offset from GMT. (Default value used if this argument + is not given: 0.) + + Parameter 'minutesOffset' is a long integereger representing the time + zone's minute offset from GMT. (Default value used if this argument + is not given: 0.) + + To illustrate the time zone offset, a value of -05:00 would + correspond to USA Eastern Standard Time. In the Date object, this + would require a value of 1 for the sign field, 5 for the hour offset + and 0 for the minutes offset. + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. + + @~ + + ______________________________________________________________________ + Method variant with the following signature: + + Date(Date orig) + + Copy constructor; creates a copy of this Date. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") Date::clone " + Returns a copy of this Date. + + Returns a (deep) copy of this Date. +"; + + +%feature("docstring") Date::getYear " + Returns the year from this Date. + + Returns the year from this Date. +"; + + +%feature("docstring") Date::getMonth " + Returns the month from this Date. + + Returns the month from this Date. +"; + + +%feature("docstring") Date::getDay " + Returns the day from this Date. + + Returns the day from this Date. +"; + + +%feature("docstring") Date::getHour " + Returns the hour from this Date. + + Returns the hour from this Date. +"; + + +%feature("docstring") Date::getMinute " + Returns the minute from this Date. + + Returns the minute from this Date. +"; + + +%feature("docstring") Date::getSecond " + Returns the seconds from this Date. + + Returns the seconds from this Date. +"; + + +%feature("docstring") Date::getSignOffset " + Returns the sign of the time zone offset from this Date. + + Returns the sign of the offset from this Date. +"; + + +%feature("docstring") Date::getHoursOffset " + Returns the hours of the time zone offset from this Date. + + Returns the hours of the offset from this Date. +"; + + +%feature("docstring") Date::getMinutesOffset " + Returns the minutes of the time zone offset from this Date. + + Returns the minutes of the offset from this Date. +"; + + +%feature("docstring") Date::getDateAsString " + Returns the current Date value in text-string form. + + The string returned will be in the W3C date format with time zone + offset, used in RDF Dublin Core annotations within SBML. This format + expresses a date and time value as a string of the form YYYY-MM- + DDThh:mm:ssXHH:ZZ, where + + + * YYYY is a four-digit integer representing the year. This + should be a four-digit number such as 2011. + + * MM is a two-digit integer representing the month, with a range of + values of 01-12. The value 1 represents January, and so on. + + * DD is a two-digit integer representing the day of the month, with + a range of values of 01-31. + + * hh is a two-digit integer representing the hour on a 24-hour + clock, with a range of values of 00-23. + + * mm is a two-digit integer representing the minute, with a range + of 00-59. + + * ss is a two-digit integer representing the second, with a range + of 0-59. + + * X is the the sign of the time zone offset, either + or -. + + * HH is a two-digit integer representing the hour of the time zone + offset, with a range of 00-23. + + * ZZ is a two-digit integer representing the minutes of the time + zone offset, with a range of 00-59. + + An example date/time string is 1997-07-16T19:20:30+01:00, which + represents July 16, 1997, at 19:20:30 in Central European Time + (which is UTC +1:00). + + Returns the date as a string. +"; + + +%feature("docstring") Date::setYear " + Sets the value of the year of this Date object. + + The value given as argument must be between 1000 and 9999 inclusive. + (In the millennium during which this libSBML documentation is being + written, a typical value is 2011, but we hope that SBML will + continue to be used for a long time.) + + Parameter 'year' is a long integer representing the year. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setMonth " + Sets the value of the month of this Date object. + + Parameter 'month' is a long integer representing the month; it must + be in the range 1-12 or an error will be signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setDay " + Sets the value of the day of this Date object. + + Parameter 'day' is a long integer representing the day; it must be in + the range 0-31 or an error will be signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setHour " + Sets the value of the hour of this Date object. + + Parameter 'hour' is a long integer representing the hour to set; it + must be in the range 0-23 or an error will be signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setMinute " + Sets the value of the minute of this Date object. + + Parameter 'minute' is a long integer representing the minute to set; + it must be in the range 0-59 or an error will be signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setSecond " + Sets the value of the second of the Date object. + + Parameter 'second' is a long integer representing the seconds; it + must be in the range 0-59 or an error will be signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setSignOffset " + Sets the value of the sign of the time zone offset of this Date + object. + + The only permissible values are 0 and 1. + + Parameter 'sign' is a long integer representing the sign of the + offset, with 0 signifying + and 1 signifying -. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setHoursOffset " + Sets the value of this Date object's time zone hour offset. + + Parameter 'hoursOffset' is a long integer representing the hours of + the offset; it must be in the range 0-23 or an error will be + signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setMinutesOffset " + Sets the value of this Date object's time zone minutes offset. + + Parameter 'minutesOffset' is a long integer representing the minutes + of the offset; it must be in the range 0-59 or an error will be + signaled. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::setDateAsString " + Sets the value of this Date object using a date and time value + expressed as a text string. + + This method expects its argument to be in the W3C date format with + time zone offset, used in RDF Dublin Core annotations within SBML. + This format expresses a date and time value as a string of the form + YYYY-MM-DDThh:mm:ssXHH:ZZ, where + + * YYYY is a four-digit integer representing the year. This + should be a four-digit number such as 2011. + + * MM is a two-digit integer representing the month, with a range of + values of 01-12. The value 1 represents January, and so on. + + * DD is a two-digit integer representing the day of the month, with + a range of values of 01-31. + + * hh is a two-digit integer representing the hour on a 24-hour + clock, with a range of values of 00-23. + + * mm is a two-digit integer representing the minute, with a range + of 00-59. + + * ss is a two-digit integer representing the second, with a range + of 0-59. + + * X is the the sign of the time zone offset, either + or -. + + * HH is a two-digit integer representing the hour of the time zone + offset, with a range of 00-23. + + * ZZ is a two-digit integer representing the minutes of the time + zone offset, with a range of 00-59. + + In the string format above, it is important not to forget the + literal character T in the string. Here is an example date/time + string: 1997-07-16T19:20:30+01:00, which would represent July 16, + 1997, at 19:20:30 in Central European Time (which is UTC +1:00). + + If this method is given a None argument or a string of length zero, + it constructs a Date object with the value of January 1, 2000, at + time 00:00 UTC. Otherwise, the argument must be in the complete + format described above, or unpredictable results will happen. + + Parameter 'date' is a string representing the date. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") Date::representsValidDate " + Returns true or false depending on whether this date object + represents a valid date and time value. + + This method verifies that the date/time value stored in this object + is well-formed and represents plausible values. A time and date + value in the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ + (e.g., 1997-07-16T19:20:30+01:00) where XHH:ZZ is the time zone + offset. This method checks such things as whether the value of the + month number is less than or equal to 12, whether the value of the + minutes number is less than or equal to 59, whether a time zone + offset is set, etc. + + Returns True if the date is valid, False otherwise. +"; + + +%feature("docstring") Date::hasBeenModified " + Internal implementation method. +"; + + +%feature("docstring") Date::resetModifiedFlags " + Internal implementation method. +"; + + +%feature("docstring") Date::parseDateStringToNumbers " + Internal implementation method. +"; + + +%feature("docstring") Date::parseDateNumbersToString " + Internal implementation method. +"; + + +%feature("docstring") ModelCreator " + @ingroup Core Representation of MIRIAM-compliant model creator data + used in ModelHistory. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The SBML specification beginning with Level 2 Version 2 defines a + standard approach to recording model history and model creator + information in a form that complies with MIRIAM ('Minimum Information + Requested in the Annotation of biochemical Models', Nature + Biotechnology, vol. 23, no. 12, Dec. 2005). For the model creator, + this form involves the use of parts of the vCard representation. + LibSBML provides the ModelCreator class as a convenience high-level + interface for working with model creator data. Objects of class + ModelCreator can be used to store and carry around creator data + within a program, and the various methods in this object class let + callers manipulate the different parts of the model creator + representation. + + The different parts of a model creator definition + ====================================================================== + + The ModelCreator class mirrors the structure of the MIRIAM model + creator annotations in SBML. The following template illustrates + these different fields when they are written in XML form: + + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> + <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> + </vCard:N> + ... + <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> + ... + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> + </vCard:ORG> + + Each of the separate data values family name, given name, email + address, and organization can be set and retrieved via + corresponding methods in the ModelCreator class. These methods are + documented in more detail below. +"; + + +%feature("docstring") ModelCreator::ModelCreator " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ModelCreator(const XMLNode creator) + + Creates a new ModelCreator from an XMLNode. + + Parameter 'creator' is the XMLNode from which to create the + ModelCreator. + + ______________________________________________________________________ + Method variant with the following signature: + + ModelCreator() + + Creates a new ModelCreator object. + + ______________________________________________________________________ + Method variant with the following signature: + + ModelCreator(ModelCreator orig) + + Copy constructor; creates a copy of the ModelCreator. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. +"; + + +%feature("docstring") ModelCreator::clone " + Creates and returns a copy of this ModelCreator. + + Returns a (deep) copy of this ModelCreator. +"; + + +%feature("docstring") ModelCreator::getFamilyName " + Returns the 'family name' stored in this ModelCreator object. + + Returns the 'family name' portion of the ModelCreator object. +"; + + +%feature("docstring") ModelCreator::getGivenName " + Returns the 'given name' stored in this ModelCreator object. + + Returns the 'given name' portion of the ModelCreator object. +"; + + +%feature("docstring") ModelCreator::getEmail " + Returns the 'email' stored in this ModelCreator object. + + Returns email from the ModelCreator. +"; + + +%feature("docstring") ModelCreator::getOrganization " + Returns the 'organization' stored in this ModelCreator object. + + Returns organization from the ModelCreator. +"; + + +%feature("docstring") ModelCreator::getOrganisation " + (Alternate spelling) Returns the 'organization' stored in this + ModelCreator object. + + Note: + + This function is an alias of getOrganization(). + + Returns organization from the ModelCreator. + + See also getOrganization(). +"; + + +%feature("docstring") ModelCreator::isSetFamilyName " + Predicate returning True or False depending on whether this + ModelCreator's 'family name' part is set. + + Returns True if the familyName of this ModelCreator is set, False + otherwise. +"; + + +%feature("docstring") ModelCreator::isSetGivenName " + Predicate returning True or False depending on whether this + ModelCreator's 'given name' part is set. + + Returns True if the givenName of this ModelCreator is set, False + otherwise. +"; + + +%feature("docstring") ModelCreator::isSetEmail " + Predicate returning True or False depending on whether this + ModelCreator's 'email' part is set. + + Returns True if the email of this ModelCreator is set, False + otherwise. +"; + + +%feature("docstring") ModelCreator::isSetOrganization " + Predicate returning True or False depending on whether this + ModelCreator's 'organization' part is set. + + Returns True if the organization of this ModelCreator is set, False + otherwise. +"; + + +%feature("docstring") ModelCreator::isSetOrganisation " + (Alternate spelling) Predicate returning True or False depending on + whether this ModelCreator's 'organization' part is set. + + Note: + + This function is an alias of isSetOrganization(). + + Returns True if the organization of this ModelCreator is set, False + otherwise. + + See also isSetOrganization(). +"; + + +%feature("docstring") ModelCreator::setFamilyName " + Sets the 'family name' portion of this ModelCreator object. + + Parameter 'familyName' is a string representing the familyName of the + ModelCreator. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ModelCreator::setGivenName " + Sets the 'given name' portion of this ModelCreator object. + + Parameter 'givenName' is a string representing the givenName of the + ModelCreator. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ModelCreator::setEmail " + Sets the 'email' portion of this ModelCreator object. + + Parameter 'email' is a string representing the email of the + ModelCreator. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ModelCreator::setOrganization " + Sets the 'organization' portion of this ModelCreator object. + + Parameter 'organization' is a string representing the organization of + the ModelCreator. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS +"; + + +%feature("docstring") ModelCreator::setOrganisation " + (Alternate spelling) Sets the 'organization' portion of this + ModelCreator object. + + Parameter 'organization' is a string representing the organization of + the ModelCreator. + + Note: + + This function is an alias of setOrganization(string organization). + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + See also setOrganization(). +"; + + +%feature("docstring") ModelCreator::unsetFamilyName " + Unsets the 'family name' portion of this ModelCreator object. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ModelCreator::unsetGivenName " + Unsets the 'given name' portion of this ModelCreator object. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ModelCreator::unsetEmail " + Unsets the 'email' portion of this ModelCreator object. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ModelCreator::unsetOrganization " + Unsets the 'organization' portion of this ModelCreator object. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ModelCreator::unsetOrganisation " + (Alternate spelling) Unsets the 'organization' portion of this + ModelCreator object. + + Note: + + This function is an alias of unsetOrganization(). + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + See also unsetOrganization(). +"; + + +%feature("docstring") ModelCreator::getAdditionalRDF " + Internal implementation method. +"; + + +%feature("docstring") ModelCreator::hasRequiredAttributes " + Predicate returning True if all the required elements for this + ModelCreator object have been set. + + The only required elements for a ModelCreator object are the 'family + name' and 'given name'. + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") ModelCreator::hasBeenModified " + Internal implementation method. +"; + + +%feature("docstring") ModelCreator::resetModifiedFlags " + Internal implementation method. +"; + + +%feature("docstring") ModelHistory " + @ingroup Core Representation of MIRIAM-compliant model history data. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The SBML specification beginning with Level 2 Version 2 defines a + standard approach to recording optional model history and model + creator information in a form that complies with MIRIAM ('Minimum + Information Requested in the Annotation of biochemical Models', + Nature Biotechnology, vol. 23, no. 12, Dec. 2005). LibSBML provides + the ModelHistory class as a convenient high-level interface for + working with model history data. + + Model histories in SBML consist of one or more model creators, a + single date of creation, and one or more modification dates. The + overall XML form of this data takes the following form: + + <dc:creator> + <rdf:Bag> + <rdf:li rdf:parseType=\'Resource\'> + <span style=\'background-color: #d0eed0\'>+++</span> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> + <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> + </vCard:N> + <span style=\'background-color: #d0eed0\'>+++</span> + <span style=\'border-bottom: 2px dotted #888\'><vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL></span> + <span style=\'background-color: #d0eed0\'>+++</span> + <span style=\'border-bottom: 2px dotted #888\'><vCard:ORG rdf:parseType=\'Resource\'></span> + <span style=\'border-bottom: 2px dotted #888\'><vCard:Orgname><span style=\'background-color: #bbb\'>organization name</span></vCard:Orgname></span> + <span style=\'border-bottom: 2px dotted #888\'></vCard:ORG></span> + <span style=\'background-color: #d0eed0\'>+++</span> + </rdf:li> + <span style=\'background-color: #edd\'>...</span> + </rdf:Bag> + </dc:creator> + <dcterms:created rdf:parseType=\'Resource\'> + <dcterms:W3CDTF><span style=\'background-color: #bbb\'>creation date</span></dcterms:W3CDTF> + </dcterms:created> + <dcterms:modified rdf:parseType=\'Resource\'> + <dcterms:W3CDTF><span style=\'background-color: #bbb\'>modification date</span></dcterms:W3CDTF> + </dcterms:modified> + <span style=\'background-color: #edd\'>...</span> + + In the template above, the underlined portions are optional, the + symbol +++ is a placeholder for either no content or valid XML + content that is not defined by the annotation scheme, and the + ellipses ... are placeholders for zero or more elements of the same + form as the immediately preceding element. The various placeholders + for content, namely family name, given name, email address, + organization, creation date, and modification date are data that + can be filled in using the various methods on the ModelHistory class + described below. +"; + + +%feature("docstring") ModelCreator " + @ingroup Core Representation of MIRIAM-compliant model creator data + used in ModelHistory. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + The SBML specification beginning with Level 2 Version 2 defines a + standard approach to recording model history and model creator + information in a form that complies with MIRIAM ('Minimum Information + Requested in the Annotation of biochemical Models', Nature + Biotechnology, vol. 23, no. 12, Dec. 2005). For the model creator, + this form involves the use of parts of the vCard representation. + LibSBML provides the ModelCreator class as a convenience high-level + interface for working with model creator data. Objects of class + ModelCreator can be used to store and carry around creator data + within a program, and the various methods in this object class let + callers manipulate the different parts of the model creator + representation. + + The different parts of a model creator definition + ====================================================================== + + The ModelCreator class mirrors the structure of the MIRIAM model + creator annotations in SBML. The following template illustrates + these different fields when they are written in XML form: + + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family><span style=\'background-color: #bbb\'>family name</span></vCard:Family> + <vCard:Given><span style=\'background-color: #bbb\'>given name</span></vCard:Given> + </vCard:N> + ... + <vCard:EMAIL><span style=\'background-color: #bbb\'>email address</span></vCard:EMAIL> + ... + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname><span style=\'background-color: #bbb\'>organization</span></vCard:Orgname> + </vCard:ORG> + + Each of the separate data values family name, given name, email + address, and organization can be set and retrieved via + corresponding methods in the ModelCreator class. These methods are + documented in more detail below. +"; + + +%feature("docstring") Date " + @ingroup Core Representation of MIRIAM-compliant dates used in + ModelHistory. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + A Date object stores a reasonably complete representation of date and + time. Its purpose is to serve as a way to store dates to be read and + written in the W3C date format used in RDF Dublin Core annotations + within SBML. The W3C date format is a restricted form of ISO 8601, + the international standard for the representation of dates and + times. A time and date value in this W3C format takes the form + YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., 1997-07-16T19:20:30+01:00) where + XHH:ZZ is the time zone offset. The libSBML Date object contains + the following fields to represent these values: + + + * year: a long integer representing the year. This should be a + four-digit number such as 2011. + + * month: a long integer representing the month, with a range of + values of 1-12. The value 1 represents January, and so on. + + * day: a long integer representing the day of the month, with a + range of values of 1-31. + + * hour: a long integer representing the hour on a 24-hour clock, + with a range of values of 0-23. + + * minute: a long integer representing the minute, with a range of + 0-59. + + * second: a long integer representing the second, with a range of + 0-59. + + * sign: a long integer representing the sign of the offset (0 + signifying + and 1 signifying -). See the paragraph below for + further explanations. + + * hours offset: a long integer representing the time zone's hour + offset from GMT. + + * minute offset: a long integer representing the time zone's minute + offset from GMT. + + To illustrate the time zone offset, a value of -05:00 would + correspond to USA Eastern Standard Time. In the Date object, this + would require a value of 1 for the sign field, 5 for the hour offset + and 0 for the minutes offset. + + In the restricted RDF annotations used in SBML, described in Section + 6 of the SBML Level 2 and Level 3 specification documents, date/time + stamps can be used to indicate the time of creation and modification + of a model. The following SBML model fragment illustrates this: + + <model metaid=\'_180340\' id=\'GMO\' name=\'Goldbeter1991_MinMitOscil\'> + <annotation> + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterms=\'http://purl.org/dc/terms/\' + xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' > + <rdf:Description rdf:about=\'#_180340\'> + <dc:creator> + <rdf:Bag> + <rdf:li rdf:parseType=\'Resource\'> + <vCard:N rdf:parseType=\'Resource\'> + <vCard:Family>Shapiro</vCard:Family> + <vCard:Given>Bruce</vCard:Given> + </vCard:N> + <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> + <vCard:ORG rdf:parseType=\'Resource\'> + <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> + </vCard:ORG> + </rdf:li> + </rdf:Bag> + </dc:creator> + <dcterms:created rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> + </dcterms:created> + <dcterms:modified rdf:parseType=\'Resource\'> + <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> + </dcterms:modified> + </rdf:Description> + </rdf:RDF> + </annotation> + </model> +"; + + +%feature("docstring") ModelHistory::ModelHistory " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + ModelHistory(ModelHistory orig) + + Copy constructor; creates a copy of this ModelHistory object. + + Parameter 'orig' is the object to copy. + + Throws ValueError: @~ Thrown if the argument 'orig' is None. + + ______________________________________________________________________ + Method variant with the following signature: + + ModelHistory() + + Creates a new ModelHistory object. +"; + + +%feature("docstring") ModelHistory::clone " + Creates and returns a copy of this ModelHistory object + + Returns a (deep) copy of this ModelHistory object. +"; + + +%feature("docstring") ModelHistory::getCreatedDate " + Returns the 'creation date' portion of this ModelHistory object. + + Returns a Date object representing the creation date stored in this + ModelHistory object. +"; + + +%feature("docstring") ModelHistory::getModifiedDate " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + getModifiedDate() + + Returns the 'modified date' portion of this ModelHistory object. + + Note that in the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of 'modified date' values. If this ModelHistory + object contains more than one 'modified date' value in the list, + this method will return the first one in the list. + + Returns a Date object representing the date of modification stored + in this ModelHistory object. + + ______________________________________________________________________ + Method variant with the following signature: + + getModifiedDate(long n) + + Get the nth Date object in the list of 'modified date' values stored + in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of 'modified date' values. + + Returns the nth Date in the list of ModifiedDates of this + ModelHistory. +"; + + +%feature("docstring") ModelHistory::isSetCreatedDate " + Predicate returning True or False depending on whether this + ModelHistory's 'creation date' is set. + + Returns True if the creation date value of this ModelHistory is set, + False otherwise. +"; + + +%feature("docstring") ModelHistory::isSetModifiedDate " + Predicate returning True or False depending on whether this + ModelHistory's 'modified date' is set. + + Returns True if the modification date value of this ModelHistory + object is set, False otherwise. +"; + + +%feature("docstring") ModelHistory::setCreatedDate " + Sets the creation date of this ModelHistory object. + + Parameter 'date' is a Date object representing the date to which the + 'created date' portion of this ModelHistory should be set. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") ModelHistory::setModifiedDate " + Sets the modification date of this ModelHistory object. + + Parameter 'date' is a Date object representing the date to which the + 'modified date' portion of this ModelHistory should be set. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") ModelHistory::addModifiedDate " + Adds a copy of a Date object to the list of 'modified date' values + stored in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of 'modified date' values. + + Parameter 'date' is a Date object representing the 'modified date' + that should be added to this ModelHistory object. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED + + * libsbml.LIBSBML_INVALID_OBJECT +"; + + +%feature("docstring") ModelHistory::getListModifiedDates " + Returns the list of 'modified date' values (as Date objects) stored + in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of 'modified date' values. + + Returns the list of modification dates for this ModelHistory object. +"; + + +%feature("docstring") ModelHistory::getNumModifiedDates " + Get the number of Date objects in this ModelHistory object's list of + 'modified dates'. + + In the MIRIAM format for annotations, there can be multiple + modification dates. The libSBML ModelHistory class supports this by + storing a list of 'modified date' values. + + Returns the number of ModifiedDates in this ModelHistory. +"; + + +%feature("docstring") ModelHistory::addCreator " + Adds a copy of a ModelCreator object to the list of 'model creator' + values stored in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of 'model creator' values. + + Parameter 'mc' is the ModelCreator to add + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_OBJECT + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") ModelHistory::getListCreators " + Returns the list of ModelCreator objects stored in this ModelHistory + object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of 'model creator' values. + + Returns the list of ModelCreator objects. +"; + + +%feature("docstring") ModelHistory::getCreator " + Get the nth ModelCreator object stored in this ModelHistory object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of 'model creator' values. + + Returns the nth ModelCreator object. +"; + + +%feature("docstring") ModelHistory::getNumCreators " + Get the number of ModelCreator objects stored in this ModelHistory + object. + + In the MIRIAM format for annotations, there can be multiple model + creators. The libSBML ModelHistory class supports this by storing a + list of 'model creator' values. + + Returns the number of ModelCreators objects. +"; + + +%feature("docstring") ModelHistory::hasRequiredAttributes " + Predicate returning True if all the required elements for this + ModelHistory object have been set. + + The required elements for a ModelHistory object are 'created name', + 'modified date', and at least one 'model creator'. + + Returns a boolean value indicating whether all the required elements + for this object have been defined. +"; + + +%feature("docstring") ModelHistory::hasBeenModified " + Internal implementation method. +"; + + +%feature("docstring") ModelHistory::resetModifiedFlags " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser " + @ingroup Core Read/write/manipulate RDF annotations stored in SBML + annotation elements. + + This class of objects is defined by libSBML only and has no direct + equivalent in terms of SBML components. This class is not prescribed + by the SBML specifications, although it is used to implement + features defined in SBML. + + RDFAnnotationParser is a libSBML construct used as part of the + libSBML support for annotations conforming to the guidelines + specified by MIRIAM ('Minimum Information Requested in the + Annotation of biochemical Models', Nature Biotechnology, vol. 23, + no. 12, Dec. 2005). Section 6 of the SBML Level 2 and Level 3 + specification documents defines a recommended way of encoding MIRIAM + information using a subset of RDF (Resource Description Format). The + general scheme is as follows. A set of RDF-based annotations + attached to a given SBML <annotation> element are read by + RDFAnnotationParser and converted into a list of CVTerm objects. + There are different versions of the main method, @~ and + RDFAnnotationParser.parseRDFAnnotation(), used depending on whether + the annotation in question concerns the MIRIAM model history or + other MIRIAM resource annotations. A special object class, + ModelHistory, is used to make it easier to manipulate model history + annotations. + + All of the methods on RDFAnnotationParser are static; the class + exists only to encapsulate the annotation and CVTerm parsing and + manipulation functionality. +"; + + +%feature("docstring") RDFAnnotationParser::parseRDFAnnotation " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + parseRDFAnnotation(XMLNodeannotation, ListCVTerms, string metaId = + None, XMLInputStream* stream = None) + + Parses an annotation (given as an XMLNode tree) into a list of + CVTerm objects. + + This is used to take an annotation that has been read into an SBML + model, identify the RDF elements within it, and create a list of + corresponding CVTerm (controlled vocabulary term) objects. + + Parameter 'annotation' is XMLNode containing the annotation. + + Parameter 'CVTerms' is list of CVTerm objects to be created. + Parameter 'stream' is optional XMLInputStream that facilitates error + logging Parameter 'metaId' is optional metaId, if set only the rdf + annotation for this metaId will be returned. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_parseRDFAnnotation(). They are functionally + identical. @~ + + @see RDFAnnotationParser.parseRDFAnnotation() @~ + + ______________________________________________________________________ + Method variant with the following signature: + + parseRDFAnnotation(XMLNodeannotation, string metaId = None, + XMLInputStream* stream = None) + + Parses an annotation into a ModelHistory class instance. + + This is used to take an annotation that has been read into an SBML + model, identify the RDF elements representing model history + information, and create a list of corresponding CVTerm objects. + + Parameter 'annotation' is XMLNode containing the annotation. + Parameter 'stream' is optional XMLInputStream that facilitates error + logging Parameter 'metaId' is optional metaId, if set only the rdf + annotation for this metaId will be returned. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_parseRDFAnnotation(). They are functionally + identical. @~ + + Returns a pointer to the ModelHistory created. +"; + + +%feature("docstring") RDFAnnotationParser::createAnnotation " + Creates a blank annotation and returns its root XMLNode object. + + This creates a completely empty SBML <annotation> element. It is + not attached to any SBML element. An example of how this might be + used is illustrated in the following code fragment. In this + example, suppose that content is an XMLNode object previously + created, containing MIRIAM-style annotations, and that sbmlObject is + an SBML object derived from SBase (e.g., a Model, or a Species, or a + Compartment, etc.). Then: + RDF = RDFAnnotationParser.createRDFAnnotation() # Create RDF annotation XML structure. + success = RDF.addChild(...content...) # Put some content into it. + ... # Check \'success\' return code value. + + annot = RDFAnnotationParser.createAnnotation() # Create <annotation> container. + success = annot.addChild(RDF) # Put the RDF annotation into it. + ... # Check \'success\' return code value. + + success = sbmlObject.setAnnotation(annot) # Set object\'s annotation to what we built. + ... # Check \'success\' return code value. + @~ The SBML specification + contains more information about the format of annotations. We urge + readers to consult Section 6 of the SBML Level 2 (Versions 2-4) and + SBML Level 3 specification documents. + + Returns a pointer to an XMLNode for the annotation + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_createAnnotation(). They are functionally + identical. @~ + + @see RDFAnnotationParser.createRDFAnnotation() @~ +"; + + +%feature("docstring") RDFAnnotationParser::createRDFAnnotation " + Creates a blank RDF element suitable for use in SBML annotations. + + The annotation created by this method has namespace declarations for + all the relevant XML namespaces used in RDF annotations and also has + an empty RDF element. The result is the following XML: + + <rdf:RDF xmlns:rdf=\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\' + xmlns:dc=\'http://purl.org/dc/elements/1.1/\' + xmlns:dcterms=\'http://purl.org/dc/terms/\' + xmlns:vCard=\'http://www.w3.org/2001/vcard-rdf/3.0#\' + xmlns:bqbiol=\'http://biomodels.net/biology-qualifiers/\' + xmlns:bqmodel=\'http://biomodels.net/model-qualifiers/\' > + + </rdf:RDF> + + Note that this does not create the containing SBML <annotation> + element; the method RDFAnnotationParser.createAnnotation()@~ is + available for creating the container. + + Returns a pointer to an XMLNode + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_createRDFAnnotation(). They are functionally + identical. @~ + + @see RDFAnnotationParser.createAnnotation() @~ +"; + + +%feature("docstring") RDFAnnotationParser::createCVTerms " + Takes a list of CVTerm objects and creates a the RDF 'Description' + element. + + This essentially takes the given SBML object, reads out the CVTerm + objects attached to it, creates an RDF 'Description' element to hold + the terms, and adds each term with appropriate qualifiers. + + Parameter 'obj' is the SBML object to start from + + Returns the XMLNode tree corresponding to the Description element of + an RDF annotation. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name createRDFDescription(@if + java SBase obj). They are functionally identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::parseCVTerms " + Takes a list of CVTerm objects and creates a complete SBML annotation + around it. + + This essentially takes the given SBML object, reads out the CVTerm + objects attached to it, calls + RDFAnnotationParser.createRDFAnnotation()@~ to create an RDF + annotation to hold the terms, and finally calls + RDFAnnotationParser.createAnnotation()@~ to wrap the result as an + SBML <annotation> element. + + Parameter 'obj' is the SBML object to start from + + Returns the XMLNode tree corresponding to the annotation. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_parseCVTerms(). They are functionally identical. + @~ +"; + + +%feature("docstring") RDFAnnotationParser::parseModelHistory " + Reads the model history and cvTerms stored in 'obj' and creates the + XML structure for an SBML annotation representing that metadata if + there is a model history stored in 'obj'. + + Parameter 'obj' is any SBase object + + Returns the XMLNode corresponding to an annotation containing + MIRIAM-compliant model history and CV term information in RDF format. + + Note: + + If the object does not have a history element stored then None is + returned even if CVTerms are present. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_parseModelHistory(@if java Sbase obj). They are + functionally identical. @endif@~ +"; + + +%feature("docstring") RDFAnnotationParser::parseOnlyModelHistory " + Reads the model history stored in 'obj' and creates the XML + structure for an SBML annotation representing that history. + + Parameter 'obj' is any SBase object + + Returns the XMLNode corresponding to an annotation containing + MIRIAM-compliant model history information in RDF format. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_parseOnlyModelHistory(). They are functionally + identical. @~ +"; + + +%feature("docstring") RDFAnnotationParser::deleteRDFAnnotation " + Deletes any SBML MIRIAM RDF annotation found in the given XMLNode + tree and returns any remaining annotation content. + + The name of the XMLNode given as parameter 'annotation' must be + 'annotation', or else this method returns None. The method will + walk down the XML structure looking for elements that are in the RDF + XML namespace, and remove them if they conform to the syntax of a + History or CVTerm element. + + Parameter 'annotation' is the XMLNode tree within which the RDF + annotation is to be found and deleted + + Returns the XMLNode structure that is left after RDF annotations are + deleted. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @~ +"; + + +%feature("docstring") RDFAnnotationParser::deleteRDFHistoryAnnotation " + Deletes any SBML MIRIAM RDF 'History' annotation found in the given + XMLNode tree and returns any remaining annotation content. + + The name of the XMLNode given as parameter 'annotation' must be + 'annotation', or else this method returns None. The method will + walk down the XML structure looking for elements that are in the RDF + XML namespace, and remove any that conform to the syntax of a + History element. + + Parameter 'annotation' is the XMLNode tree within which the RDF + annotation is to be found and deleted + + Returns the XMLNode structure that is left after RDF annotations are + deleted. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @~ +"; + + +%feature("docstring") RDFAnnotationParser::deleteRDFCVTermAnnotation " + Deletes any SBML MIRIAM RDF 'CVTerm' annotation found in the given + XMLNode tree and returns any remaining annotation content. + + The name of the XMLNode given as parameter 'annotation' must be + 'annotation', or else this method returns None. The method will + walk down the XML structure looking for elements that are in the RDF + XML namespace, and remove any that conform to the syntax of a CVTerm + element. + + Parameter 'annotation' is the XMLNode tree within which the RDF + annotation is to be found and deleted + + Returns the XMLNode structure that is left after RDF annotations are + deleted. + + Note: + + Because this is a static method, the non-C++ language interfaces for + libSBML will contain two variants. One will be a static method on + the class (i.e., RDFAnnotationParser), and the other will be a + standalone top-level function with the name + RDFAnnotationParser_deleteRDFAnnotation(). They are functionally + identical. @~ +"; + + +%feature("docstring") RDFAnnotationParser::hasRDFAnnotation " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::hasAdditionalRDFAnnotation " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::hasCVTermRDFAnnotation " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::hasHistoryRDFAnnotation " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithCVTerms " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::createRDFDescriptionWithHistory " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::deriveCVTermsFromAnnotation " + Internal implementation method. +"; + + +%feature("docstring") RDFAnnotationParser::deriveHistoryFromAnnotation " + Internal implementation method. +"; + + +%feature("docstring") ISBMLExtensionNamespaces " + @ingroup Core +"; + + +%feature("docstring") SBaseExtensionPoint " + @ingroup Core Representation of an extension point of SBML's package + extension. + + SBaseExtensionPoint represents an element to be extended (extension + point) and the extension point is identified by a combination of a + package name and a typecode of the element. + + For example, an SBaseExtensionPoint object which represents an + extension point of the model element defined in the core package can + be created as follows: + + SBaseExtensionPoint modelextp(\'core\', SBML_MODEL); + + Similarly, an SBaseExtensionPoint object which represents an + extension point of the layout element defined in the layout + extension can be created as follows: + + SBaseExtensionPoint layoutextp(\'layout\', SBML_LAYOUT_LAYOUT); + + SBaseExtensionPoint object is required as one of arguments of the + constructor of SBasePluginCreatorlt;class SBasePluginType, class + SBMLExtensionType> template class to identify an extension poitnt to + which the plugin object created by the creator class is plugged in. + For example, the SBasePluginCreator class which creates a + LayoutModelPlugin object of the layout extension which is plugged in + to the model element of the core package can be created with the + corresponding SBaseExtensionPoint object as follows: + + // std::vector object that contains a list of URI (package versions) supported + // by the plugin object. + std::vector<string> packageURIs; + packageURIs.push_back(getXmlnsL3V1V1()); + packageURIs.push_back(getXmlnsL2()); + + // creates an extension point (model element of the \'core\' package) + SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); + + // creates an SBasePluginCreator object + SBasePluginCreator<LayoutModelPlugin, LayoutExtension> modelPluginCreator(modelExtPoint,packageURIs); + + This kind of code is implemented in init() function of each + SBMLExtension derived classes. +"; + + +%feature("docstring") SBaseExtensionPoint::SBaseExtensionPoint " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBaseExtensionPoint(SBaseExtensionPoint rhs) + + copy constructor + + ______________________________________________________________________ + Method variant with the following signature: + + SBaseExtensionPoint(string pkgName, int typeCode) + + constructor +"; + + +%feature("docstring") SBaseExtensionPoint::clone " + clone +"; + + +%feature("docstring") SBaseExtensionPoint::getPackageName " + Returns the package name of this extension point. +"; + + +%feature("docstring") SBaseExtensionPoint::getTypeCode " + Returns the typecode of this extension point. +"; + + +%feature("docstring") SBasePlugin " + @ingroup Core Representation of a plug-in object of SBML's package + extension. + + Additional attributes and/or elements of a package extension which + are directly contained by some pre-defined element are + contained/accessed by SBasePlugin class which is extended by + package developers for each extension point. The extension point, + which represents an element to be extended, is identified by a + combination of a Package name and a typecode of the element, and is + represented by SBaseExtensionPoint class. + + For example, the layout extension defines * element which is + directly contained in <model> element of the core package. In the + layout package (provided as one of example packages in libSBML-5), + the additional element for the model element is implemented as + ListOfLayouts class (an SBase derived class) and the object is + contained/accessed by a LayoutModelPlugin class (an SBasePlugin + derived class). + + SBasePlugin class defines basic virtual functions for + reading/writing/checking additional attributes and/or top-level + elements which should or must be overridden by subclasses like + SBase class and its derived classes. + + Package developers must implement an SBasePlugin exntended class + for each element to be extended (e.g. SBMLDocument, Model, ...) in + which additional attributes and/or top-level elements of the + package extension are directly contained. + + To implement reading/writing functions for attributes and/or top- + level elements of the SBsaePlugin extended class, package + developers should or must override the corresponding virtual + functions below provided in the SBasePlugin class: + + + * reading elements : <ol> + + * virtual SBase createObject (XMLInputStream& stream) + This function must be overridden if one or more additional elements + are defined. </li> + + * virtual bool readOtherXML (SBase parentObject, XMLInputStream& + stream) This function should be overridden if elements of + annotation, notes, MathML, etc. need to be directly + parsed from the given XMLInputStream object instead of the + SBase.readAnnotation() and/or SBase.readNotes() + functions. + + </li> </ol> </li> + + * reading attributes (must be overridden if additional attributes + are defined) : <ol> + + * virtual void addExpectedAttributes(ExpectedAttributes& + attributes) </li> + + * virtual void readAttributes (XMLAttributes attributes, const + ExpectedAttributes& expectedAttributes)</li> </ol> </li> + + * writing elements (must be overridden if additional elements are + defined) : <ol> + + * virtual void writeElements (XMLOutputStream& stream) const </li> + </ol> </li> + + * writing attributes : <ol> + + * virtual void writeAttributes (XMLOutputStream& stream) const + This function must be overridden if one or more additional attributes + are defined. </li> + + * virtual void writeXMLNS (XMLOutputStream& stream) const + This function must be overridden if one or more additional xmlns + attributes are defined. </li> </ol> </li> + + * checking elements (should be overridden) : <ol> + + * virtual bool hasRequiredElements() const </li> </ol> + </li> + + * checking attributes (should be overridden) : <ol> + + * virtual bool hasRequiredAttributes() const </li> </ol> + </li> + + To implement package-specific creating/getting/manipulating + functions of the SBasePlugin derived class (e.g., + getListOfLayouts(), createLyout(), getLayout(), and etc are + implemented in LayoutModelPlugin class of the layout package), + package developers must newly implement such functions (as they + like) in the derived class. + + SBasePlugin class defines other virtual functions of internal + implementations such as: + + + * virtual void setSBMLDocument(SBMLDocument d) + + * virtual void connectToParent(SBasesbase) + + * virtual void enablePackageInternal(string pkgURI, string + pkgPrefix, bool flag) + + These functions must be overridden by subclasses in which one or more + top-level elements are defined. + + For example, the following three SBasePlugin extended classes are + implemented in the layout extension: + + <ol> + + * SBMLDocumentPlugin class for SBMLDocument element + + + * required attribute is added to SBMLDocument object. + </li> + + ( SBMLDocumentPlugin class is a common SBasePlugin extended class + for SBMLDocument class. Package developers can use this class as-is + if no additional elements/attributes (except for required + attribute) is needed for the SBMLDocument class in their packages, + otherwise package developers must implement a new SBMLDocumentPlugin + derived class.) + + * LayoutModelPlugin class for Model element + + * * element is added to Model object. </li> + + * The following virtual functions for + reading/writing/checking are overridden: (type of + arguments and return values are omitted) + + + * createObject() : (read elements) </li> + + * readOtherXML() : (read elements in annotation of SBML L2) + </li> + + * writeElements() : (write elements) </li> + + </li> + + * The following virtual functions of internal + implementations are overridden: (type of arguments and + return values are omitted) + + + * setSBMLDocument() </li> + + * connectToParent() </li> + + * enablePackageInternal() </li> + + </li> + + * The following creating/getting/manipulating + functions are newly implemented: (type of arguments and + return values are omitted) + + + * getListOfLayouts() </li> + + * getLayout () </li> + + * addLayout() </li> + + * createLayout() </li> + + * removeLayout() </li> + + * getNumLayouts() </li> + + </li> + + </li> + + * LayoutSpeciesReferencePlugin class for SpeciesReference element + (used only for SBML L2V1) + + + * id attribute is internally added to SpeciesReference + object only for SBML L2V1 </li> + + * The following virtual functions for + reading/writing/checking are overridden: (type of arguments + and return values are omitted) </li> + + + * readOtherXML() </li> + + * writeAttributes() </li> + + </li> + + </ol> +"; + + +%feature("docstring") SBasePlugin::getElementNamespace " + Returns the XML namespace (URI) of the package extension of this + plugin object. + + Returns the URI of the package extension of this plugin object. +"; + + +%feature("docstring") SBasePlugin::getPrefix " + Returns the prefix of the package extension of this plugin object. + + Returns the prefix of the package extension of this plugin object. +"; + + +%feature("docstring") SBasePlugin::getPackageName " + Returns the package name of this plugin object. + + Returns the package name of this plugin object. +"; + + +%feature("docstring") SBasePlugin::clone " + Creates and returns a deep copy of this SBasePlugin object. + + Returns a (deep) copy of this SBase object +"; + + +%feature("docstring") SBasePlugin::getElementBySId " + Returns the first child element found that has the given 'id' in the + model-wide SId namespace, or None if no such object is found. + + Parameter 'id' is string representing the id of objects to find + + Returns pointer to the first element found with the given 'id'. +"; + + +%feature("docstring") SBasePlugin::getElementByMetaId " + Returns the first child element it can find with the given 'metaid', + or None if no such object is found. + + Parameter 'metaid' is string representing the metaid of objects to + find + + Returns pointer to the first element found with the given 'metaid'. +"; + + +%feature("docstring") SBasePlugin::getAllElements " + Returns a List of all child SBase objects, including those nested to + an arbitrary depth + + Returns a List of pointers to all children objects. +"; + + +%feature("docstring") SBasePlugin::setSBMLDocument " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::connectToParent " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::enablePackageInternal " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::stripPackage " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::getSBMLDocument " + Returns the parent SBMLDocument of this plugin object. + + Returns the parent SBMLDocument object of this plugin object. +"; + + +%feature("docstring") SBasePlugin::getURI " + Gets the URI to which this element belongs to. For example, all + elements that belong to SBML Level 3 Version 1 Core must would have + the URI 'http://www.sbml.org/sbml/level3/version1/core'; all + elements that belong to Layout Extension Version 1 for SBML Level 3 + Version 1 Core must would have the URI + 'http://www.sbml.org/sbml/level3/version1/layout/version1/' + + Unlike getElementNamespace, this function first returns the URI for + this element by looking into the SBMLNamespaces object of the + document with the its package name. if not found it will return the + result of getElementNamespace + + Returns the URI this elements + + See also getPackageName, getElementNamespace, + SBMLDocument::getSBMLNamespaces, getSBMLDocument. +"; + + +%feature("docstring") SBasePlugin::getParentSBMLObject " + Returns the parent SBase object to which this plugin object + connected. + + Returns the parent SBase object to which this plugin object + connected. +"; + + +%feature("docstring") SBasePlugin::setElementNamespace " + Sets the XML namespace to which this element belongs to. For + example, all elements that belong to SBML Level 3 Version 1 Core + must set the namespace to + 'http://www.sbml.org/sbml/level3/version1/core'; all elements that + belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core + must set the namespace to + 'http://www.sbml.org/sbml/level3/version1/layout/version1/' + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SBasePlugin::getLevel " + Returns the SBML level of the package extension of this plugin + object. + + Returns the SBML level of the package extension of this plugin + object. +"; + + +%feature("docstring") SBasePlugin::getVersion " + Returns the SBML version of the package extension of this plugin + object. + + Returns the SBML version of the package extension of this plugin + object. +"; + + +%feature("docstring") SBasePlugin::getPackageVersion " + Returns the package version of the package extension of this plugin + object. + + Returns the package version of the package extension of this plugin + object. +"; + + +%feature("docstring") SBasePlugin::replaceSIDWithFunction " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::divideAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::multiplyAssignmentsToSIdByFunction " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::hasIdentifierBeginningWith " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::prependStringToAllIdentifiers " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::transformIdentifiers " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::getLine " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::getColumn " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::getSBMLNamespaces " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::logUnknownElement " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::getErrorLog " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::logUnknownAttribute " + Internal implementation method. +"; + + +%feature("docstring") SBasePlugin::logEmptyString " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocumentPlugin " + @ingroup Core Template class for the SBMLDocument Plugin class + needed by all packages. + + Plugin objects for the SBMLDocument element must be this class or + a derived class of this class. Package developers should use + this class as-is if only 'required' attribute is added in + the SBMLDocument element by their packages. Otherwise, + developers must implement a derived class of this class and + use that class as the plugin object for the SBMLDocument element. +"; + + +%feature("docstring") SBMLDocumentPlugin::SBMLDocumentPlugin " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLDocumentPlugin(string &uri, string &prefix, + SBMLNamespacessbmlns) + + Constructor + + Parameter 'uri' is the URI of package Parameter 'prefix' is the + prefix for the given package Parameter 'sbmlns' is the + SBMLNamespaces object for the package + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLDocumentPlugin(SBMLDocumentPlugin orig) + + Copy constructor. Creates a copy of this object. +"; + + +%feature("docstring") SBMLDocumentPlugin::clone " + Creates and returns a deep copy of this SBMLDocumentPlugin object. + + Returns a (deep) copy of this object +"; + + +%feature("docstring") SBMLDocumentPlugin::setRequired " + Sets the bool value of 'required' attribute of corresponding package + in SBMLDocument element. + + Parameter 'value' is the bool value of 'required' attribute of + corresponding package in SBMLDocument element. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE +"; + + +%feature("docstring") SBMLDocumentPlugin::getRequired " + Returns the bool value of 'required' attribute of corresponding + package in SBMLDocument element. + + Returns the bool value of 'required' attribute of corresponding + package in SBMLDocument element. +"; + + +%feature("docstring") SBMLDocumentPlugin::isSetRequired " + Predicate returning True or False depending on whether this + SBMLDocumentPlugin's 'required' attribute has been set. + + Returns True if the 'required' attribute of this SBMLDocument has + been set, False otherwise. +"; + + +%feature("docstring") SBMLDocumentPlugin::unsetRequired " + Unsets the value of the 'required' attribute of this + SBMLDocumentPlugin. + + Returns integer value indicating success/failure of the function. + @~ The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_OPERATION_FAILED +"; + + +%feature("docstring") SBMLDocumentPlugin::isFlatteningImplemented " + Internal implementation method. +"; + + +%feature("docstring") SBMLDocumentPlugin::checkConsistency " + Internal implementation method. +"; + + +%feature("docstring") SBMLExtension " + @ingroup Core The core component of SBML's package extension. + + SBMLExtension class (abstract class) is a core component of package + extension which needs to be extended by package developers. The + class provides functions for getting common attributes of package + extension (e.g., package name, package version, and etc.), + functions for adding (registering) each instantiated + SBasePluginCreator object, and a static function (defined in each + SBMLExtension extended class) for initializing/registering the + package extension when the library of the package is loaded. + + How to implement an SBMLExtension extended class for each package + extension + ====================================================================== + + Package developers must implement an SBMLExtension extended class for + their packages (e.g. GroupsExtension class is implemented for groups + extension). The extended class is implemented based on the following + steps: + + (NOTE: 'src/pacakges/groups/extension/GroupsExtension.{h,cpp}' + and 'src/pacakges/layout/extension/LayoutExtension.{h,cpp}' are + example files in which SBMLExtension derived classes are implemented) + + <ol> + + * Define the following static functions in the extended class: + (examples of groups extension are shown respectively) <ol> + + * A string of package name (label) (The function name must be + 'getPackageName'.) + + string GroupsExtension.getPackageName () + { + static string pkgName = \'groups\'; + return pkgName; + } + </li> + + * Methods returning an integer of Default SBML level, + version, and package version (The method names must be + 'getDefaultLevel()', 'getDefaultVersion()', and + 'getDefaultPackageVersion()' respectively.) + + long GroupsExtension.getDefaultLevel() + { + return 3; + } + long GroupsExtension.getDefaultVersion() + { + return 1; + } + long GroupsExtension.getDefaultPackageVersion() + { + return 1; + } + </li> + + * Methods returning Strings that represent the URI of packages + + string GroupsExtension.getXmlnsL3V1V1 () + { + static string xmlns = \'http://www.sbml.org/sbml/level3/version1/groups/version1\'; + return xmlns; + } + @endverbatim + </li> + <li> <p>Strings that represent the other URI needed in this package (if any) </p> + </li> + </ol> + </li> + + <li> Override the following pure virtual functions + <ul> + <li> <code>virtual string getName () const =0</code>. This function returns the name of the package (e.g., \'layout\', \'groups\'). </li> + <li> <code>virtual long getLevel (string &uri) const =0</code>. This function returns the SBML level with the given URI of this package. </li> + <li> <code>virtual long getVersion (string &uri) const =0</code>. This function returns the SBML version with the given URI of this package. </li> + <li> <code>virtual long getPackageVersion (string &uri) const =0</code>. This function returns the package version with the given URI of this package.</li> + <li> <code>virtual long getURI (long sbmlLevel, long sbmlVersion, long pkgVersion) const =0</code>. + This function returns the URI (namespace) of the package corresponding to the combination of the given sbml level, sbml version, and pacakege version</li> + <li> <code>virtual SBMLExtension clone () const = 0</code>. This function creates and returns a deep copy of this derived object.</li> + </ul> + <p>For example, the above functions are overridden in the groups + package (\'src/packages/groups/extension/GroupsExtension.cpp\') as follows:</p> + @verbatim + string + GroupsExtension.getName() const + { + return getPackageName(); + } + + long + GroupsExtension.getLevel() const + { + if (uri == getXmlnsL3V1V1()) + { + return 3; + } + + return 0; + } + + long + GroupsExtension.getVersion() const + { + if (uri == getXmlnsL3V1V1()) + { + return 1; + } + + return 0; + } + + long + GroupsExtension.getPackageVersion() const + { + if (uri == getXmlnsL3V1V1()) + { + return 1; + } + + return 0; + } + + string + GroupsExtension.getURI() const + { + if (sbmlLevel == 3) + { + if (sbmlVersion == 1) + { + if (pkgVersion == 1) + { + return getXmlnsL3V1V1(); + } + } + } + + static string empty = \'\'; + + return empty; + } + + GroupsExtension* + GroupsExtension.clone () const + { + return new GroupsExtension(*this); + } + + Constructor, copy Constructor, and destructor also must be overridden + if additional data members are defined in the derived class. + + </li> + + * Define typedef and template instantiation code for the package + specific SBMLExtensionNamespaces template class + + <ol> + + * typedef for the package specific SBMLExtensionNamespaces + template class For example, the typedef for GroupsExtension + (defined in the groups package) is implemented in GroupsExtension.h + as follows: + + // GroupsPkgNamespaces is derived from the SBMLNamespaces class and used when creating an object of + // SBase derived classes defined in groups package. + typedef SBMLExtensionNamespaces<GroupsExtension> GroupsPkgNamespaces; + </li> + + * template instantiation code for the above typedef definition in + the implementation file (i.e., *.cpp file). For example, the + template instantiation code for GroupsExtension is implemented in + GroupsExtension.cpp as follows: + + // Instantiate SBMLExtensionNamespaces<GroupsExtension> (GroupsPkgNamespaces) for DLL. + template class LIBSBML_EXTERN SBMLExtensionNamespaces<GroupsExtension>; + + </li> </ol> + + The SBMLExtensionNamespaces template class is a derived class of + SBMLNamespaces and can be used as an argument of constructors + of SBase derived classes defined in the package extensions. For + example, a GroupsPkgNamespaces object can be used when creating a + group object as follows: </P> + + GroupPkgNamespaces gpns(3,1,1); // The arguments are SBML Level, SBML Version, and Groups Package Version. + + Group g = new Group(&gpns); // Creates a group object of L3V1 Groups V1. + + Also, the GroupsPkgNamespaces object can be used when creating an + SBMLDocument object with the groups package as follows: + + GroupsPkgNamespaces gpns(3,1,1); + SBMLDocument doc; + + doc = new SBMLDocument(&gnps); // Creates an SBMLDocument of L3V1 with Groups V1. + + </li> + + * Override the following pure virtual function which returns the + SBMLNamespaces derived object + + virtual SBMLNamespaces getSBMLExtensionNamespaces (string &uri) const =0 + For example, the function is overridden in + GroupsExtension class as follows: + + SBMLNamespaces + GroupsExtension.getSBMLExtensionNamespaces() const + { + GroupsPkgNamespaces* pkgns = None; + if ( uri == getXmlnsL3V1V1()) + { + pkgns = new GroupsPkgNamespaces(3,1,1); + } + return pkgns; + } + </li> + + * Define an enum type for representing the typecode of elements + (SBase extended classes) defined in the package extension + + For example, SBMLGroupsTypeCode_t for groups package is defined + in GroupsExtension.h as follows: + + typedef enum + { + SBML_GROUPS_GROUP = 200 + , SBML_GROUPS_MEMBER = 201 + } SBMLGroupsTypeCode_t; + @endverbatim + + <p> <em>SBML_GROUPS_GROUP</em> corresponds to the Group class (<group>) + and <em>SBML_GROUPS_MEMBER</em> corresponds to the Member (<member>) class, respectively. + + <p> Similarly, SBMLLayoutTypeCode_t + for layout package is defined in LayoutExtension.h as follows: </p> + + @verbatim + typedef enum + { + SBML_LAYOUT_BOUNDINGBOX = 100 + , SBML_LAYOUT_COMPARTMENTGLYPH = 101 + , SBML_LAYOUT_CUBICBEZIER = 102 + , SBML_LAYOUT_CURVE = 103 + , SBML_LAYOUT_DIMENSIONS = 104 + , SBML_LAYOUT_GRAPHICALOBJECT = 105 + , SBML_LAYOUT_LAYOUT = 106 + , SBML_LAYOUT_LINESEGMENT = 107 + , SBML_LAYOUT_POINT = 108 + , SBML_LAYOUT_REACTIONGLYPH = 109 + , SBML_LAYOUT_SPECIESGLYPH = 110 + , SBML_LAYOUT_SPECIESREFERENCEGLYPH = 111 + , SBML_LAYOUT_TEXTGLYPH = 112 + } SBMLLayoutTypeCode_t; + + These enum values are returned by corresponding getTypeCode() + functions. (e.g. SBML_GROUPS_GROUP is returned in + Group.getTypeCode()) + + The value of each typecode can be duplicated between those of + different packages (In the above SBMLayoutTypeCode_t and + SBMLGroupsTypeCode_t types, unique values are assigned to enum + values, but this is not mandatory.) + + Thus, to distinguish the typecodes of different packages, not + only the return value of getTypeCode() function but also that of + getPackageName() function should be checked as follows: + + void example (SBasesb) + { + 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: + .... + } + } + else if (pkgName == \'groups\') { + switch (sb->getTypeCode()) { + case SBML_GROUPS_GROUP: + .... + break; + case SBML_GROUPS_MEMBER: + .... + } + } + ... + } + + </li> + + * Override the following pure virtual function which returns a + string corresponding to the given typecode: + + virtual string SBMLExtension.getStringFromTypeCode() const; + @endverbatim + + <p> For example, the function for groups extension is implemented as follows: </p> + @verbatim + static + string SBML_GROUPS_TYPECODE_STRINGS[] = + { + \'Group\' + , \'Member\' + }; + + string + GroupsExtension.getStringFromTypeCode() const + { + int min = SBML_GROUPS_GROUP; + int max = SBML_GROUPS_MEMBER; + + if ( typeCode < min || typeCode > max) + { + return \'(Unknown SBML Groups Type)\'; + } + + return SBML_GROUPS_TYPECODE_STRINGS[typeCode - min]; + } + @endverbatim + + </li> + + <li> Implements a \'static void init()\' function in the derived class + + <p> In the init() function, initialization code which creates an instance of + the derived class and registering code which registers the instance to + SBMLExtensionRegistry class are implemented. + </p> + + For example, the init() function for groups package is implemented as follows: + @verbatim + void + GroupsExtension.init() + { + //------------------------------------------------------------------------- + // + // 1. Checks if the groups pacakge has already been registered. + // + //------------------------------------------------------------------------- + + if (SBMLExtensionRegistry.getInstance().isRegistered(getPackageName())) + { + // do nothing; + return; + } + + //------------------------------------------------------------------------- + // + // 2. Creates an SBMLExtension derived object. + // + //------------------------------------------------------------------------- + + GroupsExtension groupsExtension; + + //------------------------------------------------------------------------------------- + // + // 3. Creates SBasePluginCreatorBase derived objects required for this + // extension. The derived classes can be instantiated by using the following + // template class. + // + // temaplate<class SBasePluginType> class SBasePluginCreator + // + // The constructor of the creator class has two arguments: + // + // (1) SBaseExtensionPoint : extension point to which the plugin object connected + // (2) std::vector<string> : a std::vector object that contains a list of URI + // (package versions) supported by the plugin object. + // + // For example, two plugin objects (plugged in SBMLDocument and Model elements) are + // required for the groups extension. + // + // Since only \'required\' attribute is used in SBMLDocument by the groups package, and + // the \'required\' flag must always be \'false\', the existing + // SBMLDocumentPluginNotRequired class can be used as-is for the plugin. + // + // Since the lists of supported package versions (currently only L3V1-groups-V1 supported ) + // are equal in the both plugin objects, the same vector object is given to each + // constructor. + // + //--------------------------------------------------------------------------------------- + + std::vector<string> packageURIs; + packageURIs.push_back(getXmlnsL3V1V1()); + + SBaseExtensionPoint sbmldocExtPoint(\'core\',SBML_DOCUMENT); + SBaseExtensionPoint modelExtPoint(\'core\',SBML_MODEL); + + SBasePluginCreator<SBMLDocumentPluginNotRequired, GroupsExtension> sbmldocPluginCreator(sbmldocExtPoint,packageURIs); + SBasePluginCreator<GroupsModelPlugin, GroupsExtension> modelPluginCreator(modelExtPoint,packageURIs); + + //-------------------------------------------------------------------------------------- + // + // 3. Adds the above SBasePluginCreatorBase derived objects to the SBMLExtension derived object. + // + //-------------------------------------------------------------------------------------- + + groupsExtension.addSBasePluginCreator(&sbmldocPluginCreator); + groupsExtension.addSBasePluginCreator(&modelPluginCreator); + + //------------------------------------------------------------------------- + // + // 4. Registers the SBMLExtension derived object to SBMLExtensionRegistry + // + //------------------------------------------------------------------------- + + int result = SBMLExtensionRegistry.getInstance().addExtension(&groupsExtension); + + if (result != LIBSBML_OPERATION_SUCCESS) + { + std::cerr << \'[Error] GroupsExtension.init() failed.\' << std::endl; + } + } + + </li> + + * Instantiate a global SBMLExtensionRegister variable in appropriate + implementation file + + For example, the global variable for the groups extension is + instantiated in GroupsExtension.cpp as follows: + + static SBMLExtensionRegister<GroupsExtension> groupsExtensionRegister; + The init() function is invoked when the global variable + is instantiated, by which initialization and registering the + package extension are performed. </li> + + </ol> +"; + + +%feature("docstring") getNumOfSBasePlugins " + Internal implementation method. +"; + + +%feature("docstring") getNumOfSupportedPackageURI " + Internal implementation method. +"; + + +%feature("docstring") isSupported " + Internal implementation method. +"; + + +%feature("docstring") getSupportedPackageURI " + Internal implementation method. +"; + + +%feature("docstring") clone " + Internal implementation method. +"; + + +%feature("docstring") getName " + Internal implementation method. +"; + + +%feature("docstring") getURI " + Internal implementation method. +"; + + +%feature("docstring") getLevel " + Internal implementation method. +"; + + +%feature("docstring") getVersion " + Internal implementation method. +"; + + +%feature("docstring") getPackageVersion " + Internal implementation method. +"; + + +%feature("docstring") getStringFromTypeCode " + Internal implementation method. +"; + + +%feature("docstring") getSBMLExtensionNamespaces " + Internal implementation method. +"; + + +%feature("docstring") setEnabled " + Internal implementation method. +"; + + +%feature("docstring") isEnabled " + Internal implementation method. +"; + + +%feature("docstring") removeL2Namespaces " + Internal implementation method. +"; + + +%feature("docstring") addL2Namespaces " + Internal implementation method. +"; + + +%feature("docstring") enableL2NamespaceForDocument " + Internal implementation method. +"; + + +%feature("docstring") isInUse " + Internal implementation method. +"; + + +%feature("docstring") getErrorTableIndex " + Internal implementation method. +"; + + +%feature("docstring") SBMLExtensionException::SBMLExtensionException " + constructor +"; + + +%feature("docstring") SBMLExtensionNamespaces " + @ingroup Core Class to store level, version and namespace + information of SBML extension package. +"; + + +%feature("docstring") SBMLExtensionNamespaces::SBMLExtensionNamespaces " + Copy constructor; creates a copy of a SBMLExtensionNamespaces. + + Parameter 'orig' is the SBMLExtensionNamespaces instance to copy. +"; + + +%feature("docstring") SBMLExtensionRegistry " + @ingroup Core Registry class in which extension packages are + registered. +"; + + +%feature("docstring") SBMLExtensionRegistry::getInstance " + Returns an instance (singleton) of the SBMLExtensionRegistry class. + This function needs to be invoked when manipulating the + SBMLExtensionRegistry class. + + Returns the instance of the SBMLExtensionRegistry object. +"; + + +%feature("docstring") SBMLExtensionRegistry::addExtension " + Add the given SBMLExtension to this SBMLExtensionRegistry. + + Parameter 'ext' is the SBMLExtension object to be added. + + Returns integer value indicating success/failure of the function. + The possible values returned by this function are: + + * libsbml.LIBSBML_OPERATION_SUCCESS + + * libsbml.LIBSBML_PKG_CONFLICT + + * libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE +"; + + +%feature("docstring") SBMLExtensionRegistry::getExtension " + Returns an SBMLExtension object with the given package URI or package + name (string). + + Parameter 'package' is the URI or name of the package extension + + Returns a clone of the SBMLExtension object with the given package + URI or name. The returned extension is to be freed (i.e.: + deleted) by the caller! +"; + + +%feature("docstring") SBMLExtensionRegistry::removeL2Namespaces " + Remove all L2 Extension namespaces from the namespace list. This will + call all overriden SBMLExtension::removeL2Namespaces methods. +"; + + +%feature("docstring") SBMLExtensionRegistry::addL2Namespaces " + adds all L2 Extension namespaces to the namespace list. This will + call all overriden SBMLExtension::addL2Namespaces methods. +"; + + +%feature("docstring") SBMLExtensionRegistry::enableL2NamespaceForDocument " + Enables all extensions that support serialization / deserialization + with SBML Annotations. +"; + + +%feature("docstring") SBMLExtensionRegistry::disableUnusedPackages " + Goes through all extensions in the list of plugins of the given + document and disables all plugins that are not being used. +"; + + +%feature("docstring") SBMLExtensionRegistry::disablePackage " + Disables the package with the given URI / name. +"; + + +%feature("docstring") SBMLExtensionRegistry::getNumExtension " + Returns the number of SBMLExtension with the given extension point. + + Parameter 'extPoint' is the SBaseExtensionPoint + + Returns the number of SBMLExtension with the given extension point. +"; + + +%feature("docstring") SBMLExtensionRegistry::setEnabled " + Enable/disable the package with the given uri. + + Parameter 'uri' is the URI of the target package. Parameter + 'isEnabled' is the bool value corresponding to enabled (true) or + disabled (false) + + Returns false will be returned if the given bool value is false or + the given package is not registered, otherwise true will be + returned. +"; + + +%feature("docstring") SBMLExtensionRegistry::isEnabled " + Checks if the extension with the given URI is enabled (true) or + disabled (false) + + Parameter 'uri' is the URI of the target package. + + Returns false will be returned if the given package is disabled or + not registered, otherwise true will be returned. +"; + + +%feature("docstring") SBMLExtensionRegistry::isRegistered " + Checks if the extension with the given URI is registered (true) or + not (false) + + Parameter 'uri' is the URI of the target package. + + Returns true will be returned if the package with the given URI is + registered, otherwise false will be returned. +"; + + +%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageNames " + Returns a list of registered packages (such as 'layout', 'fbc' or + 'comp') the list contains char* strings and has to be freed by the + caller. + + Returns the names of the registered packages in a list +"; + + +%feature("docstring") SBMLExtensionRegistry::getNumRegisteredPackages " + Returns the number of registered packages. + + Returns the number of registered packages. +"; + + +%feature("docstring") SBMLExtensionRegistry::getRegisteredPackageName " + Returns the registered package name at the given index + + Parameter 'index' is zero based index of the package name to return + + Returns the package name with the given index or None +"; + + +%feature("docstring") SBMLExtensionRegistry::SBMLExtensionRegistry " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLExtensionRegistry() + + Returns the registered package name at the given index + + Parameter 'index' is zero based index of the package name to return + + Returns the package name with the given index or None + + ______________________________________________________________________ + Method variant with the following signature: + + SBMLExtensionRegistry(SBMLExtensionRegistry orig) + + Returns the registered package name at the given index + + Parameter 'index' is zero based index of the package name to return + + Returns the package name with the given index or None +"; + + +%feature("docstring") OStream " + Wrapper class for the C++ standard streams cout, cerr, and clog. + + A few libSBML methods accept an argument for indicating where to send + text string output. An example is the SBMLDocument.printErrors() + method. However, the methods use C++ style streams and not Java + stream objects. The OStream object exists to bridge the Java and + underlying native implementation. It is a simple wrapper around the + underlying stream object and provides a few basic methods for + manipulating it. +"; + + +%feature("docstring") OFStream " + Wrapper class for the C++ standard file stream ofstream. + + The C++ ofstream ('output file stream') provides an interface for + writing data to files as output streams. This class, OFStream, + wraps the C++ ofstream and provides an OStream interface to it. The + file to be associated with the stream can be specified as a + parameter to the constructors in this class. + + This class may be useful because some libSBML methods accept an + argument for indicating where to send text string output. An + example is the SBMLDocument.printErrors() method. The methods use + C++ style streams and not Java stream objects. The OStream object + exists to bridge the Java and underlying native implementation. It + is a simple wrapper around the underlying stream object and provides + a few basic methods for manipulating it. +"; + + +%feature("docstring") OStringStream " + Wrapper class for the C++ standard stream ostringstream. + + The C++ ostringstream ('output string stream class') provides an + interface to manipulating strings as if they were output streams. + This class class, OStringStream, wraps the ostringstream and + provides an OStream interface to it. + + This class may be useful because some libSBML methods accept an + argument for indicating where to send text string output. An + example is the SBMLDocument.printErrors() method. The methods use + C++ style streams and not Java stream objects. The OStream object + exists to bridge the Java and underlying native implementation. It + is a simple wrapper around the underlying stream object and provides + a few basic methods for manipulating it. +"; + + +%feature("docstring") OStream::OStream " + Creates a new OStream object with one of standard output stream + objects. + + Parameter 'sot' is a value from the StdOSType enumeration(COUT, CERR, + or CLOG) indicating the type of stream to create. +"; + + +%feature("docstring") OStream::get_ostream " + Returns the stream object. + + Returns the stream object +"; + + +%feature("docstring") OStream::endl " + Writes an end-of-line character on this tream. +"; + + +%feature("docstring") OFStream::OFStream " + Creates a new OFStream object for a file. + + This opens the given file 'filename' with the 'is_append' flag + (default is false), and creates an OFStream object instance that + associates the file's content with an OStream object. + + Parameter 'filename' is the name of the file to open Parameter + 'is_append' is whether to open the file for appending (default: + false, meaning overwrite the content instead) + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. +"; + + +%feature("docstring") OFStream::open " + Opens a file and associates this stream object with it. + + This method opens a given file 'filename' with the given 'is_append' + flag (whose default value is false), and associates this stream + object with the file's content. + + Parameter 'filename' is the name of the file to open Parameter + 'is_append' is whether to open the file for appending (default: + false, meaning overwrite the content instead) + + Documentation note: The native C++ implementation of this method + defines a default argument value. In the documentation generated for + different libSBML language bindings, you may or may not see + corresponding arguments in the method declarations. For example, in + Java and C#, a default argument is handled by declaring two separate + methods, with one of them having the argument and the other one + lacking the argument. However, the libSBML documentation will be + identical for both methods. Consequently, if you are reading this + and do not see an argument even though one is described, please look + for descriptions of other variants of this method near where this + one appears in the documentation. +"; + + +%feature("docstring") OFStream::close " + Closes the file currently associated with this stream object. +"; + + +%feature("docstring") OFStream::is_open " + Returns true if this stream object is currently associated with a + file. + + Returns true if the stream object is currently associated with a + file, false otherwise +"; + + +%feature("docstring") OStringStream::OStringStream " + Creates a new OStringStream object +"; + + +%feature("docstring") OStringStream::str " + This method has multiple variants that differ in the arguments they + accept. Each is described separately below. + + ______________________________________________________________________ + Method variant with the following signature: + + str() + + Returns the copy of the string object currently assosiated with + this ostringstream buffer. + + Returns a copy of the string object for this stream + + ______________________________________________________________________ + Method variant with the following signature: + + str(string s) + + Sets string 's' to the string object currently assosiated with this + stream buffer. + + Parameter 's' is the string to write to this stream +"; + + diff --git a/bindings/python/setup.py b/bindings/python/setup.py index f69c01c..6fe5c62 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -1,54 +1,23 @@ #!/usr/bin/env python -from distutils.core import setup +from setuptools import setup, Distribution -sbml2matlab_version = '1.2.3' +class BinaryDistribution(Distribution): + """Distribution which always forces a binary package with platform name""" + def has_ext_modules(foo): + return True -# get the os string -def _getOSString(): - - import platform - - s = platform.system().lower() - unix = False - - if s.startswith('darwin'): - s = 'macosx' - unix = True - elif s.startswith('linux'): - s = 'linux' - unix = True - elif s.startswith('win'): - s = 'win' - else: - raise SystemExit("I don't know how to install on {}, " + - "only know OSX(x86_64), Linux(i386,x86_64)" + - " and Win(32)" - .format(s)) - - arch = platform.architecture() - - if unix and arch[0].startswith('64'): - arch = 'x86_64' - elif unix and arch[0].startswith('32'): - arch = 'i386' - else: - arch = '32' # win 32 - - return s + "_" + arch - -version = sbml2matlab_version + "-" + _getOSString() - setup(name='sbml2matlab', - version=version, + version='1.2.3', description='An SBML to MATLAB translator', author='Stanley Gu, Lucian Smith', - author_email='stanleygu@gmail.com, lucianoelsmitho@gmail.com', + author_email='stanleygu@gmail.com, lpsmith@uw.edu', url='https://github.com/stanleygu/sbml2matlab', packages=['sbml2matlab'], package_data={ # add dll, won't hurt unix, not there anyway - "sbml2matlab": ["_libsbml2matlab.pyd", "*.dll", "*.txt", - "*.lib", "*.so"] - }) + "sbml2matlab": ["_sbml2matlab.pyd", "*.dll", "*.txt", + "*.lib", "*.so"]}, + distclass=BinaryDistribution, + ) diff --git a/bindings/swig/OStream.cpp b/bindings/swig/OStream.cpp index c30a329..3880315 100644 --- a/bindings/swig/OStream.cpp +++ b/bindings/swig/OStream.cpp @@ -1,203 +1,203 @@ -/** - * @file OStream.cpp - * @brief Implementations of wrapper classes for C++ standard output streams. - * @author Akiya Jouraku - * - * <!-------------------------------------------------------------------------- - * This file is part of libSBML. Please visit http://sbml.org for more - * information about SBML, and the latest version of libSBML. - * - * Copyright (C) 2009-2013 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK - * - * Copyright (C) 2006-2008 by the California Institute of Technology, - * Pasadena, CA, USA - * - * Copyright (C) 2002-2005 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. Japan Science and Technology Agency, Japan - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as http://sbml.org/software/libsbml/license.html - * ---------------------------------------------------------------------- -->*/ - -#include "OStream.h" - -/** - * Creates a new OStream object with one of standard output stream objects. - * - * @param sot a value from the StdOSType enumeration indicating - * the type of stream to create. - */ -OStream::OStream (StdOSType sot) -{ - switch (sot) { - case COUT: - Stream = &std::cout; - break; - case CERR: - Stream = &std::cerr; - break; - case CLOG: - Stream = &std::clog; - break; - default: - Stream = &std::cout; - } -} - -/** - * Destructor. - */ -OStream::~OStream () -{ -} - - -/** - * Returns the stream object. - * <p> - * @return the stream object - */ -std::ostream* -OStream::get_ostream () -{ - return Stream; -} - - -/** - * Writes an end-of-line character on this tream. - */ -void -OStream::endl () -{ - std::endl(*Stream); -} - - -/** - * Creates a new OFStream object for a file. - * <p> - * This opens the given file @p filename with the @p is_append flag - * (default is <code>false</code>), and creates an OFStream object - * instance that associates the file's content with an OStream object. - * <p> - * @param filename the name of the file to open - * @param is_append whether to open the file for appending (default: - * <code>false</code>, meaning overwrite the content instead) - */ -OFStream::OFStream (const std::string& filename, bool is_append) -{ - if (is_append) { - Stream = new std::ofstream(filename.c_str(),std::ios_base::app); - } - else { - Stream = new std::ofstream(filename.c_str(),std::ios_base::out); - } -} - - -/** - * Destructor. - */ -OFStream::~OFStream () -{ - delete Stream; -} - - -/** - * Opens a file and associates this stream object with it. - * <p> - * This method opens a given file @p filename with the given - * @p is_append flag (whose default value is <code>false</code>), - * and associates <i>this</i> stream object with the file's content. - * <p> - * @param filename the name of the file to open - * @param is_append whether to open the file for appending (default: - * <code>false</code>, meaning overwrite the content instead) - */ -void -OFStream::open (const std::string& filename, bool is_append) -{ - if (is_append) { - static_cast<std::ofstream*>(Stream)->open(filename.c_str(),std::ios_base::app); - } - else { - static_cast<std::ofstream*>(Stream)->open(filename.c_str(),std::ios_base::out); - } -} - - -/** - * Closes the file currently associated with this stream object. - */ -void -OFStream::close () -{ - static_cast<std::ofstream*>(Stream)->close(); -} - - -/** - * Returns <code>true</code> if this stream object is currently - * associated with a file. - * <p> - * @return <code>true</code> if the stream object is currently - * associated with a file, <code>false</code> otherwise - */ -bool -OFStream::is_open () -{ - return static_cast<std::ofstream*>(Stream)->is_open(); -} - - -/** - * Creates a new OStringStream object - */ -OStringStream::OStringStream () -{ - Stream = new std::ostringstream(); -} - - -/** - * Returns the copy of the string object currently assosiated - * with this <code>ostringstream</code> buffer. - * <p> - * @return a copy of the string object for this stream - */ -std::string -OStringStream::str () -{ - return static_cast<std::ostringstream*>(Stream)->str(); -} - - -/** - * Sets string @p s to the string object currently assosiated with - * this stream buffer. - * <p> - * @param s the string to write to this stream - */ -void -OStringStream::str (const std::string& s) -{ - static_cast<std::ostringstream*>(Stream)->str(s.c_str()); -} - - -/** - * Destructor. - */ -OStringStream::~OStringStream () -{ - delete Stream; -} - +/** + * @file OStream.cpp + * @brief Implementations of wrapper classes for C++ standard output streams. + * @author Akiya Jouraku + * + * <!-------------------------------------------------------------------------- + * This file is part of libSBML. Please visit http://sbml.org for more + * information about SBML, and the latest version of libSBML. + * + * Copyright (C) 2009-2013 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * + * Copyright (C) 2006-2008 by the California Institute of Technology, + * Pasadena, CA, USA + * + * Copyright (C) 2002-2005 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. Japan Science and Technology Agency, Japan + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as http://sbml.org/software/libsbml/license.html + * ---------------------------------------------------------------------- -->*/ + +#include "OStream.h" + +/** + * Creates a new OStream object with one of standard output stream objects. + * + * @param sot a value from the StdOSType enumeration indicating + * the type of stream to create. + */ +OStream::OStream (StdOSType sot) +{ + switch (sot) { + case COUT: + Stream = &std::cout; + break; + case CERR: + Stream = &std::cerr; + break; + case CLOG: + Stream = &std::clog; + break; + default: + Stream = &std::cout; + } +} + +/** + * Destructor. + */ +OStream::~OStream () +{ +} + + +/** + * Returns the stream object. + * <p> + * @return the stream object + */ +std::ostream* +OStream::get_ostream () +{ + return Stream; +} + + +/** + * Writes an end-of-line character on this tream. + */ +void +OStream::endl () +{ + std::endl(*Stream); +} + + +/** + * Creates a new OFStream object for a file. + * <p> + * This opens the given file @p filename with the @p is_append flag + * (default is <code>false</code>), and creates an OFStream object + * instance that associates the file's content with an OStream object. + * <p> + * @param filename the name of the file to open + * @param is_append whether to open the file for appending (default: + * <code>false</code>, meaning overwrite the content instead) + */ +OFStream::OFStream (const std::string& filename, bool is_append) +{ + if (is_append) { + Stream = new std::ofstream(filename.c_str(),std::ios_base::app); + } + else { + Stream = new std::ofstream(filename.c_str(),std::ios_base::out); + } +} + + +/** + * Destructor. + */ +OFStream::~OFStream () +{ + delete Stream; +} + + +/** + * Opens a file and associates this stream object with it. + * <p> + * This method opens a given file @p filename with the given + * @p is_append flag (whose default value is <code>false</code>), + * and associates <i>this</i> stream object with the file's content. + * <p> + * @param filename the name of the file to open + * @param is_append whether to open the file for appending (default: + * <code>false</code>, meaning overwrite the content instead) + */ +void +OFStream::open (const std::string& filename, bool is_append) +{ + if (is_append) { + static_cast<std::ofstream*>(Stream)->open(filename.c_str(),std::ios_base::app); + } + else { + static_cast<std::ofstream*>(Stream)->open(filename.c_str(),std::ios_base::out); + } +} + + +/** + * Closes the file currently associated with this stream object. + */ +void +OFStream::close () +{ + static_cast<std::ofstream*>(Stream)->close(); +} + + +/** + * Returns <code>true</code> if this stream object is currently + * associated with a file. + * <p> + * @return <code>true</code> if the stream object is currently + * associated with a file, <code>false</code> otherwise + */ +bool +OFStream::is_open () +{ + return static_cast<std::ofstream*>(Stream)->is_open(); +} + + +/** + * Creates a new OStringStream object + */ +OStringStream::OStringStream () +{ + Stream = new std::ostringstream(); +} + + +/** + * Returns the copy of the string object currently assosiated + * with this <code>ostringstream</code> buffer. + * <p> + * @return a copy of the string object for this stream + */ +std::string +OStringStream::str () +{ + return static_cast<std::ostringstream*>(Stream)->str(); +} + + +/** + * Sets string @p s to the string object currently assosiated with + * this stream buffer. + * <p> + * @param s the string to write to this stream + */ +void +OStringStream::str (const std::string& s) +{ + static_cast<std::ostringstream*>(Stream)->str(s.c_str()); +} + + +/** + * Destructor. + */ +OStringStream::~OStringStream () +{ + delete Stream; +} + diff --git a/bindings/swig/OStream.h b/bindings/swig/OStream.h index 2ae1e47..df5ab94 100644 --- a/bindings/swig/OStream.h +++ b/bindings/swig/OStream.h @@ -1,225 +1,225 @@ -/** - * @file OStream.h - * @brief Definition of wrapper classes for C++ standard output streams. - * @author Akiya Jouraku - * - *<!----------------------------------------------------------------------- - * This file is part of libSBML. Please visit http://sbml.org for more - * information about SBML, and the latest version of libSBML. - * - * Copyright (C) 2009-2013 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK - * - * Copyright (C) 2006-2008 by the California Institute of Technology, - * Pasadena, CA, USA - * - * Copyright (C) 2002-2005 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. Japan Science and Technology Agency, Japan - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as http://sbml.org/software/libsbml/license.html - * ------------------------------------------------------------------------> - * - * @class OStream - * - * Wrapper class for the C++ standard streams <code>cout</code>, - * <code>cerr</code>, and <code>clog</code>. - * - * A few libSBML methods accept an argument for indicating where to send - * text string output. An example is the SBMLDocument::printErrors(OStream - * stream) method. However, the methods use C++ style streams and not Java - * stream objects. The OStream object exists to bridge the Java and - * underlying native implementation. It is a simple wrapper around the - * underlying stream object and provides a few basic methods for - * manipulating it. - * - * @class OFStream - * - * Wrapper class for the C++ standard file stream <code>ofstream</code>. - * - * The C++ <code>ofstream</code> ("output file stream") provides an - * interface for writing data to files as output streams. This class, - * OFStream, wraps the C++ <code>ofstream</code> and provides an OStream - * interface to it. The file to be associated with the stream can be - * specified as a parameter to the constructors in this class. - * - * This class may be useful because some libSBML methods accept an argument - * for indicating where to send text string output. An example is the - * SBMLDocument::printErrors(OStream stream) method. The methods use C++ style streams - * and not Java stream objects. The OStream object exists to bridge the - * Java and underlying native implementation. It is a simple wrapper - * around the underlying stream object and provides a few basic methods for - * manipulating it. - * - * @class OStringStream - * - * Wrapper class for the C++ standard stream <code>ostringstream</code>. - * - * The C++ <code>ostringstream</code> ("output string stream class") - * provides an interface to manipulating strings as if they were output - * streams. This class class, OStringStream, wraps the - * <code>ostringstream</code> and provides an OStream interface to it. - * - * This class may be useful because some libSBML methods accept an argument - * for indicating where to send text string output. An example is the - * SBMLDocument::printErrors(OStream stream) method. The methods use - * C++ style streams and not Java stream objects. The OStream object - * exists to bridge the Java and underlying native implementation. It is a - * simple wrapper around the underlying stream object and provides a few - * basic methods for manipulating it. - */ - -#ifndef OStream_h -#define OStream_h - -#include <iostream> -#include <fstream> -#include <sstream> - -class LIBLAX_EXTERN OStream -{ - protected: - std::ostream* Stream; - - public: - - /** - * Enumeration listing the possible types of streams to create. - * <p> - * This is used by the constructor for this class. The names - * of the enumeration members are hopefully self-explanatory. - */ - enum StdOSType {COUT, CERR, CLOG}; - - - /** - * Creates a new OStream object with one of standard output stream objects. - * - * @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) - * indicating the type of stream to create. - */ - OStream (StdOSType sot = COUT); - - - /** - * Destructor. - */ - virtual ~OStream (); - - - /** - * Returns the stream object. - * <p> - * @return the stream object - */ - virtual std::ostream* get_ostream (); - - - /** - * Writes an end-of-line character on this tream. - */ - void endl (); - -}; - - -class LIBLAX_EXTERN OFStream : public OStream -{ - public: - /** - * Creates a new OFStream object for a file. - * <p> - * This opens the given file @p filename with the @p is_append flag - * (default is <code>false</code>), and creates an OFStream object - * instance that associates the file's content with an OStream object. - * <p> - * @param filename the name of the file to open - * @param is_append whether to open the file for appending (default: - * <code>false</code>, meaning overwrite the content instead) - * - * @if notcpp @htmlinclude warn-default-args-in-docs.html @endif - */ - OFStream (const std::string& filename, bool is_append = false); - - - /** - * Destructor. - */ - virtual ~OFStream (); - - - /** - * Opens a file and associates this stream object with it. - * <p> - * This method opens a given file @p filename with the given - * @p is_append flag (whose default value is <code>false</code>), - * and associates <i>this</i> stream object with the file's content. - * <p> - * @param filename the name of the file to open - * @param is_append whether to open the file for appending (default: - * <code>false</code>, meaning overwrite the content instead) - * - * @if notcpp @htmlinclude warn-default-args-in-docs.html @endif - */ - void open (const std::string& filename, bool is_append = false); - - - /** - * Closes the file currently associated with this stream object. - */ - void close (); - - - /** - * Returns <code>true</code> if this stream object is currently - * associated with a file. - * <p> - * @return <code>true</code> if the stream object is currently - * associated with a file, <code>false</code> otherwise - */ - bool is_open (); - -}; - - -class LIBLAX_EXTERN OStringStream : public OStream -{ - public: - /** - * Creates a new OStringStream object - */ - OStringStream (); - - - /** - * Returns the copy of the string object currently assosiated - * with this <code>ostringstream</code> buffer. - * <p> - * @return a copy of the string object for this stream - */ - std::string str (); - - - /** - * Sets string @p s to the string object currently assosiated with - * this stream buffer. - * <p> - * @param s the string to write to this stream - */ - void str (const std::string& s); - - - /** - * Destructor. - */ - virtual ~OStringStream (); - -}; - -#endif // OStream_h - +/** + * @file OStream.h + * @brief Definition of wrapper classes for C++ standard output streams. + * @author Akiya Jouraku + * + *<!----------------------------------------------------------------------- + * This file is part of libSBML. Please visit http://sbml.org for more + * information about SBML, and the latest version of libSBML. + * + * Copyright (C) 2009-2013 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * + * Copyright (C) 2006-2008 by the California Institute of Technology, + * Pasadena, CA, USA + * + * Copyright (C) 2002-2005 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. Japan Science and Technology Agency, Japan + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as http://sbml.org/software/libsbml/license.html + * ------------------------------------------------------------------------> + * + * @class OStream + * + * Wrapper class for the C++ standard streams <code>cout</code>, + * <code>cerr</code>, and <code>clog</code>. + * + * A few libSBML methods accept an argument for indicating where to send + * text string output. An example is the SBMLDocument::printErrors(OStream + * stream) method. However, the methods use C++ style streams and not Java + * stream objects. The OStream object exists to bridge the Java and + * underlying native implementation. It is a simple wrapper around the + * underlying stream object and provides a few basic methods for + * manipulating it. + * + * @class OFStream + * + * Wrapper class for the C++ standard file stream <code>ofstream</code>. + * + * The C++ <code>ofstream</code> ("output file stream") provides an + * interface for writing data to files as output streams. This class, + * OFStream, wraps the C++ <code>ofstream</code> and provides an OStream + * interface to it. The file to be associated with the stream can be + * specified as a parameter to the constructors in this class. + * + * This class may be useful because some libSBML methods accept an argument + * for indicating where to send text string output. An example is the + * SBMLDocument::printErrors(OStream stream) method. The methods use C++ style streams + * and not Java stream objects. The OStream object exists to bridge the + * Java and underlying native implementation. It is a simple wrapper + * around the underlying stream object and provides a few basic methods for + * manipulating it. + * + * @class OStringStream + * + * Wrapper class for the C++ standard stream <code>ostringstream</code>. + * + * The C++ <code>ostringstream</code> ("output string stream class") + * provides an interface to manipulating strings as if they were output + * streams. This class class, OStringStream, wraps the + * <code>ostringstream</code> and provides an OStream interface to it. + * + * This class may be useful because some libSBML methods accept an argument + * for indicating where to send text string output. An example is the + * SBMLDocument::printErrors(OStream stream) method. The methods use + * C++ style streams and not Java stream objects. The OStream object + * exists to bridge the Java and underlying native implementation. It is a + * simple wrapper around the underlying stream object and provides a few + * basic methods for manipulating it. + */ + +#ifndef OStream_h +#define OStream_h + +#include <iostream> +#include <fstream> +#include <sstream> + +class LIBLAX_EXTERN OStream +{ + protected: + std::ostream* Stream; + + public: + + /** + * Enumeration listing the possible types of streams to create. + * <p> + * This is used by the constructor for this class. The names + * of the enumeration members are hopefully self-explanatory. + */ + enum StdOSType {COUT, CERR, CLOG}; + + + /** + * Creates a new OStream object with one of standard output stream objects. + * + * @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) + * indicating the type of stream to create. + */ + OStream (StdOSType sot = COUT); + + + /** + * Destructor. + */ + virtual ~OStream (); + + + /** + * Returns the stream object. + * <p> + * @return the stream object + */ + virtual std::ostream* get_ostream (); + + + /** + * Writes an end-of-line character on this tream. + */ + void endl (); + +}; + + +class LIBLAX_EXTERN OFStream : public OStream +{ + public: + /** + * Creates a new OFStream object for a file. + * <p> + * This opens the given file @p filename with the @p is_append flag + * (default is <code>false</code>), and creates an OFStream object + * instance that associates the file's content with an OStream object. + * <p> + * @param filename the name of the file to open + * @param is_append whether to open the file for appending (default: + * <code>false</code>, meaning overwrite the content instead) + * + * @if notcpp @htmlinclude warn-default-args-in-docs.html @endif + */ + OFStream (const std::string& filename, bool is_append = false); + + + /** + * Destructor. + */ + virtual ~OFStream (); + + + /** + * Opens a file and associates this stream object with it. + * <p> + * This method opens a given file @p filename with the given + * @p is_append flag (whose default value is <code>false</code>), + * and associates <i>this</i> stream object with the file's content. + * <p> + * @param filename the name of the file to open + * @param is_append whether to open the file for appending (default: + * <code>false</code>, meaning overwrite the content instead) + * + * @if notcpp @htmlinclude warn-default-args-in-docs.html @endif + */ + void open (const std::string& filename, bool is_append = false); + + + /** + * Closes the file currently associated with this stream object. + */ + void close (); + + + /** + * Returns <code>true</code> if this stream object is currently + * associated with a file. + * <p> + * @return <code>true</code> if the stream object is currently + * associated with a file, <code>false</code> otherwise + */ + bool is_open (); + +}; + + +class LIBLAX_EXTERN OStringStream : public OStream +{ + public: + /** + * Creates a new OStringStream object + */ + OStringStream (); + + + /** + * Returns the copy of the string object currently assosiated + * with this <code>ostringstream</code> buffer. + * <p> + * @return a copy of the string object for this stream + */ + std::string str (); + + + /** + * Sets string @p s to the string object currently assosiated with + * this stream buffer. + * <p> + * @param s the string to write to this stream + */ + void str (const std::string& s); + + + /** + * Destructor. + */ + virtual ~OStringStream (); + +}; + +#endif // OStream_h + diff --git a/bindings/swig/sbml2matlab.i b/bindings/swig/sbml2matlab.i index aafd10a..f1490ab 100644 --- a/bindings/swig/sbml2matlab.i +++ b/bindings/swig/sbml2matlab.i @@ -1,73 +1,73 @@ -/** - * \file sbml2matlab.i - * \brief Language-independent SWIG directives for wrapping libsbml2matlab - * \author Lucian Smith, based on libsbml code from Ben Bornstein and Ben Kovitz - * - */ - -%module(directors="1") libsbml2matlab - -#pragma SWIG nowarn=473,401,844 - -%pragma(java) moduleclassmodifiers=" -/** - * Wrapper class for global methods and constants defined by libSBML. - * <p> - * <em style='color: #555'> - * This class of objects is defined by libsbml2matlab only and has no direct - * equivalent in terms of Sbml2matlab components. - * </em> - * <p> - * In the C++ version of libsbml2matlab, models are parsed and stored in a - * global object, which can then be queried by subsequent calls to - * sbml2matlab API functions. However, all returned elements become the - * property of the caller. - */ -public class" - - -%{ -#include "sbml2matlab.h" -%} - -/** - * - * Includes a language specific interface file. - * - */ - -%include local.i - -/** - * Disable warnings about const/non-const versions of functions. - */ -#pragma SWIG nowarn=516 - - -/** - * Ignore the 'freeMatlabString' function, as SWIG handles the new returned objects above, - * and ignore all the functions that use argument inputs. - */ - - -%ignore freeMatlabString; -%ignore sbml2matlab; -%ignore getNthSbmlError; - -/** - * Rename getMatlab as 'sbml2matlab', - */ -%rename(sbml2matlab) getMatlab; - - -/** - * Converting input arguments to output arguments - */ - -%include "typemaps.i" - -/** - * Wrap these files. - */ - -%include sbml2matlab.h +/** + * \file sbml2matlab.i + * \brief Language-independent SWIG directives for wrapping sbml2matlab + * \author Lucian Smith, based on libsbml code from Ben Bornstein and Ben Kovitz + * + */ + +%module(directors="1") sbml2matlab + +#pragma SWIG nowarn=473,401,844 + +%pragma(java) moduleclassmodifiers=" +/** + * Wrapper class for global methods and constants defined by libSBML. + * <p> + * <em style='color: #555'> + * This class of objects is defined by sbml2matlab only and has no direct + * equivalent in terms of Sbml2matlab components. + * </em> + * <p> + * In the C++ version of sbml2matlab, models are parsed and stored in a + * global object, which can then be queried by subsequent calls to + * sbml2matlab API functions. However, all returned elements become the + * property of the caller. + */ +public class" + + +%{ +#include "sbml2matlab.h" +%} + +/** + * + * Includes a language specific interface file. + * + */ + +%include local.i + +/** + * Disable warnings about const/non-const versions of functions. + */ +#pragma SWIG nowarn=516 + + +/** + * Ignore the 'freeMatlabString' function, as SWIG handles the new returned objects above, + * and ignore all the functions that use argument inputs. + */ + + +%ignore freeMatlabString; +%ignore sbml2matlab; +%ignore getNthSbmlError; + +/** + * Rename getMatlab as 'sbml2matlab', + */ +%rename(sbml2matlab) getMatlab; + + +/** + * Converting input arguments to output arguments + */ + +%include "typemaps.i" + +/** + * Wrap these files. + */ + +%include sbml2matlab.h diff --git a/bindings/swig/sbml2matlab_swig.h b/bindings/swig/sbml2matlab_swig.h index 11e8a16..81c9476 100644 --- a/bindings/swig/sbml2matlab_swig.h +++ b/bindings/swig/sbml2matlab_swig.h @@ -1 +1 @@ -#include <sbml2matlab.h> +#include <sbml2matlab.h> diff --git a/doc/sbml2matlab-license.txt b/doc/sbml2matlab-license.txt index 7a56cb4..9d0d87a 100644 --- a/doc/sbml2matlab-license.txt +++ b/doc/sbml2matlab-license.txt @@ -1,16 +1,16 @@ -/** @page sbml2matlab-license BSD License -@n - -Copyright (c) 2013, Stanley Gu, Frank Bergmann, Sri Paladugu, Lucian Smith, and Herbert Sauro. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - Neither the name of the University of Washington nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@htmlinclude google-analytics.html -*/ +/** @page sbml2matlab-license BSD License +@n + +Copyright (c) 2013, Stanley Gu, Frank Bergmann, Sri Paladugu, Lucian Smith, and Herbert Sauro. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + - Neither the name of the University of Washington nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +@htmlinclude google-analytics.html +*/ diff --git a/doc/sbml2matlab-mainpage.txt b/doc/sbml2matlab-mainpage.txt index ac154b3..ae71cff 100644 --- a/doc/sbml2matlab-mainpage.txt +++ b/doc/sbml2matlab-mainpage.txt @@ -1,9 +1,9 @@ -/** @mainpage SBML2Matlab: A converter to Matlab from SBML. - -SBML2Matlab is a small library and executable that can convert SBML files to Matlab. - - -<p>sbml2matlab is distributed under the @subpage sbml2matlab-license. The Windows binary includes a <A target="_top" HREF="http://sbml.org/Software/libSBML">libSBML</a> dll, which is released under the <A target="_top" HREF="http://sbml.org/Software/libSBML/docs/cpp-api/">LGPL</a>. libSBML, in turn, relies on <A target="_top" HREF="http://expat.sourceforge.net/">expat</a>, released under the <A target="_top" HREF="http://www.opensource.org/licenses/mit-license.php">MIT license</a>, the <A target="_top" HREF="http://www.gzip.org/">gzip</a> dll, released under the <A target="_top" HREF="http://www.math.utah.edu/docs/info/gzip_1.html#SEC1">GPL</a>, and a <A target="_top" HREF="http://www.bzip.org/">bzip</a> dll, released under the <A target="_top" HREF="http://www.bzip.org/1.0.5/bzip2-manual-1.0.5.html">BSD</a> license.</P> - -@htmlinclude google-analytics.html -*/ +/** @mainpage SBML2Matlab: A converter to Matlab from SBML. + +SBML2Matlab is a small library and executable that can convert SBML files to Matlab. + + +<p>sbml2matlab is distributed under the @subpage sbml2matlab-license. The Windows binary includes a <A target="_top" HREF="http://sbml.org/Software/libSBML">libSBML</a> dll, which is released under the <A target="_top" HREF="http://sbml.org/Software/libSBML/docs/cpp-api/">LGPL</a>. libSBML, in turn, relies on <A target="_top" HREF="http://expat.sourceforge.net/">expat</a>, released under the <A target="_top" HREF="http://www.opensource.org/licenses/mit-license.php">MIT license</a>, the <A target="_top" HREF="http://www.gzip.org/">gzip</a> dll, released under the <A target="_top" HREF="http://www.math.utah.edu/docs/info/gzip_1.html#SEC1">GPL</a>, and a <A target="_top" HREF="http://www.bzip.org/">bzip</a> dll, released under the <A target="_top" HREF="http://www.bzip.org/1.0.5/bzip2-manual-1.0.5.html">BSD</a> license.</P> + +@htmlinclude google-analytics.html +*/